]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Changed old HasHead and HasTail relations to Variable.HasHead and Variable.HasTail...
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 19 Jun 2012 13:05:04 +0000 (13:05 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 19 Jun 2012 13:05:04 +0000 (13:05 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@25209 ac1ea38d-2e2b-0410-8846-a27921b304fc

16 files changed:
org.simantics.sysdyn.ontology/graph.tg
org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph
org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java
org.simantics.sysdyn.ui/plugin.xml
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/InputFactory.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModelHandler.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/modules/ModuleInputEditingSupport.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/modules/ModuleOutputEditingSupport.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/modules/ReferenceRow.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/structure/DependencyGraphRequest.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/ValidationUtils.java
org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/HistoryVariable.java
org.simantics.sysdyn/src/org/simantics/sysdyn/mdlImport/mdlElements/Connection.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Dependency.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Flow.java

index 772e415b2702664a6f8a28f7a3c958c3744d7ca8..47000810cc279134c996b4e7a331954e3d4df210 100644 (file)
Binary files a/org.simantics.sysdyn.ontology/graph.tg and b/org.simantics.sysdyn.ontology/graph.tg differ
index 602cd0ccca8e18755e2bfd6ad2293655bd26b03b..2c1fc383fca01c05fc7309176f99658d4968e9c3 100644 (file)
@@ -22,7 +22,7 @@ SYSDYN.ImportedOntologies : PROJ.NamespaceRequirement
     PROJ.RequiresNamespace
         "http://www.simantics.org/Sysdyn-1.1" : L0.URI
         "http://www.simantics.org/Layer0-1.0" : L0.URI
-//        "http://www.simantics.org/Documentation-1.0" : L0.URI // Experimental documentation tool
+        "http://www.simantics.org/Documentation-1.0" : L0.URI // Experimental documentation tool
         "http://www.simantics.org/SelectionView-1.1" : L0.URI        
         
 SYSDYN.SharedFunctionOntology <T L0.Ontology
@@ -87,11 +87,11 @@ SYSDYN.Variable <T STR.Component
     >-- SYSDYN.Variable.unit --> L0.String <R L0.HasProperty : L0.FunctionalRelation
     >-- SYSDYN.Variable.variability --> L0.String <R L0.HasProperty : L0.FunctionalRelation
     >-- SYSDYN.Variable.isTailOf --> STR.Connection <R STR.IsConnectedTo
-        L0.InverseOf SYSDYN.HasTail 
+        L0.InverseOf SYSDYN.Variable.HasTail 
         STR.AllowsConnectionType SYSDYN.SysdynConnectionType
         STR.HasAttachmentRelation DIA.HasPlainConnector
     >-- SYSDYN.Variable.isHeadOf --> STR.Connection <R STR.IsConnectedTo
-        L0.InverseOf SYSDYN.HasHead
+        L0.InverseOf SYSDYN.Variable.HasHead
         STR.AllowsConnectionType SYSDYN.SysdynConnectionType
         STR.HasAttachmentRelation DIA.HasArrowConnector   
     @L0.assert L0.HasDataType $Double
@@ -171,15 +171,18 @@ SYSDYN.SysdynModuleLibrary <T L0.Library
 //#####################################################################
 // Connections and Relations
 //#####################################################################
+SYSDYN.HasHead <R STR.IsConnectedTo
+SYSDYN.HasTail <R STR.IsConnectedTo
+
 SYSDYN.Dependency <T STR.Connection
     >-- SYSDYN.Dependency.angle --> L0.Double <R L0.HasProperty : L0.FunctionalRelation
     >-- SYSDYN.Dependency.refersTo --> SYSDYN.Variable <R L0.IsRelatedTo : L0.FunctionalRelation
-    @L0.singleProperty SYSDYN.HasHead
-    @L0.singleProperty SYSDYN.HasTail
+    @L0.singleProperty SYSDYN.Variable.HasHead
+    @L0.singleProperty SYSDYN.Variable.HasTail
 
 SYSDYN.Flow <T STR.Connection
-    @L0.singleProperty SYSDYN.HasHead
-    @L0.singleProperty SYSDYN.HasTail
+    @L0.singleProperty SYSDYN.Variable.HasHead
+    @L0.singleProperty SYSDYN.Variable.HasTail
 
 
 //#####################################################################
index 79f98c2a6db7baa2f3968d040b5f4b653fc4073d..9d41d6a67da4c364a50033b12ccf5a51f9797930 100644 (file)
@@ -130,6 +130,7 @@ public class SysdynResource {
     public final Resource HasEquationOrEmpty_Inverse;\r
     public final Resource HasHead;\r
     public final Resource HasHeadTerminal;\r
+    public final Resource HasHead_Inverse;\r
     public final Resource HasRangeEnd;\r
     public final Resource HasRangeEnd_Inverse;\r
     public final Resource HasRangeStart;\r
@@ -138,6 +139,7 @@ public class SysdynResource {
     public final Resource HasRangeStep_Inverse;\r
     public final Resource HasTail;\r
     public final Resource HasTailTerminal;\r
+    public final Resource HasTail_Inverse;\r
     public final Resource HasUnit;\r
     public final Resource HasUnit_Inverse;\r
     public final Resource HistoryDataset;\r
@@ -338,6 +340,8 @@ public class SysdynResource {
     public final Resource ValveSymbol_orientation;\r
     public final Resource ValveSymbol_textLocation;\r
     public final Resource Variable;\r
+    public final Resource Variable_HasHead;\r
+    public final Resource Variable_HasTail;\r
     public final Resource Variable_arrayIndexes;\r
     public final Resource Variable_arrayIndexes_Inverse;\r
     public final Resource Variable_expressions;\r
@@ -483,6 +487,7 @@ public class SysdynResource {
         public static final String HasEquationOrEmpty_Inverse = "http://www.simantics.org/Sysdyn-1.1/HasEquationOrEmpty/Inverse";\r
         public static final String HasHead = "http://www.simantics.org/Sysdyn-1.1/HasHead";\r
         public static final String HasHeadTerminal = "http://www.simantics.org/Sysdyn-1.1/HasHeadTerminal";\r
+        public static final String HasHead_Inverse = "http://www.simantics.org/Sysdyn-1.1/HasHead/Inverse";\r
         public static final String HasRangeEnd = "http://www.simantics.org/Sysdyn-1.1/HasRangeEnd";\r
         public static final String HasRangeEnd_Inverse = "http://www.simantics.org/Sysdyn-1.1/HasRangeEnd/Inverse";\r
         public static final String HasRangeStart = "http://www.simantics.org/Sysdyn-1.1/HasRangeStart";\r
@@ -491,6 +496,7 @@ public class SysdynResource {
         public static final String HasRangeStep_Inverse = "http://www.simantics.org/Sysdyn-1.1/HasRangeStep/Inverse";\r
         public static final String HasTail = "http://www.simantics.org/Sysdyn-1.1/HasTail";\r
         public static final String HasTailTerminal = "http://www.simantics.org/Sysdyn-1.1/HasTailTerminal";\r
+        public static final String HasTail_Inverse = "http://www.simantics.org/Sysdyn-1.1/HasTail/Inverse";\r
         public static final String HasUnit = "http://www.simantics.org/Sysdyn-1.1/HasUnit";\r
         public static final String HasUnit_Inverse = "http://www.simantics.org/Sysdyn-1.1/HasUnit/Inverse";\r
         public static final String HistoryDataset = "http://www.simantics.org/Sysdyn-1.1/HistoryDataset";\r
@@ -691,6 +697,8 @@ public class SysdynResource {
         public static final String ValveSymbol_orientation = "http://www.simantics.org/Sysdyn-1.1/ValveSymbol/orientation";\r
         public static final String ValveSymbol_textLocation = "http://www.simantics.org/Sysdyn-1.1/ValveSymbol/textLocation";\r
         public static final String Variable = "http://www.simantics.org/Sysdyn-1.1/Variable";\r
+        public static final String Variable_HasHead = "http://www.simantics.org/Sysdyn-1.1/Variable/HasHead";\r
+        public static final String Variable_HasTail = "http://www.simantics.org/Sysdyn-1.1/Variable/HasTail";\r
         public static final String Variable_arrayIndexes = "http://www.simantics.org/Sysdyn-1.1/Variable/arrayIndexes";\r
         public static final String Variable_arrayIndexes_Inverse = "http://www.simantics.org/Sysdyn-1.1/Variable/arrayIndexes/Inverse";\r
         public static final String Variable_expressions = "http://www.simantics.org/Sysdyn-1.1/Variable/expressions";\r
@@ -846,6 +854,7 @@ public class SysdynResource {
         HasEquationOrEmpty_Inverse = getResourceOrNull(graph, URIs.HasEquationOrEmpty_Inverse);\r
         HasHead = getResourceOrNull(graph, URIs.HasHead);\r
         HasHeadTerminal = getResourceOrNull(graph, URIs.HasHeadTerminal);\r
+        HasHead_Inverse = getResourceOrNull(graph, URIs.HasHead_Inverse);\r
         HasRangeEnd = getResourceOrNull(graph, URIs.HasRangeEnd);\r
         HasRangeEnd_Inverse = getResourceOrNull(graph, URIs.HasRangeEnd_Inverse);\r
         HasRangeStart = getResourceOrNull(graph, URIs.HasRangeStart);\r
@@ -854,6 +863,7 @@ public class SysdynResource {
         HasRangeStep_Inverse = getResourceOrNull(graph, URIs.HasRangeStep_Inverse);\r
         HasTail = getResourceOrNull(graph, URIs.HasTail);\r
         HasTailTerminal = getResourceOrNull(graph, URIs.HasTailTerminal);\r
+        HasTail_Inverse = getResourceOrNull(graph, URIs.HasTail_Inverse);\r
         HasUnit = getResourceOrNull(graph, URIs.HasUnit);\r
         HasUnit_Inverse = getResourceOrNull(graph, URIs.HasUnit_Inverse);\r
         HistoryDataset = getResourceOrNull(graph, URIs.HistoryDataset);\r
@@ -1054,6 +1064,8 @@ public class SysdynResource {
         ValveSymbol_orientation = getResourceOrNull(graph, URIs.ValveSymbol_orientation);\r
         ValveSymbol_textLocation = getResourceOrNull(graph, URIs.ValveSymbol_textLocation);\r
         Variable = getResourceOrNull(graph, URIs.Variable);\r
+        Variable_HasHead = getResourceOrNull(graph, URIs.Variable_HasHead);\r
+        Variable_HasTail = getResourceOrNull(graph, URIs.Variable_HasTail);\r
         Variable_arrayIndexes = getResourceOrNull(graph, URIs.Variable_arrayIndexes);\r
         Variable_arrayIndexes_Inverse = getResourceOrNull(graph, URIs.Variable_arrayIndexes_Inverse);\r
         Variable_expressions = getResourceOrNull(graph, URIs.Variable_expressions);\r
index 910c8d86209e7de5e9265449eb8fa89a24598933..35552fa40ac0299e16cfa01ed9e927adf81c1fa0 100644 (file)
             </command>\r
             <command\r
                   commandId="org.simantics.documentation.workbench.newDocumentation"\r
-                  icon="platform:/plugin/com.famfamfam.silk/icons/application_form.png"\r
+                  icon="platform:/plugin/com.famfamfam.silk/icons/script.png"\r
                   id="org.simantics.sysdyn.ui.browser.newDocumentation"\r
                   label="Document"\r
                   style="push">\r
index da63cc3897caabfe9a77b54d4b5ff7ed071672ac..b0c87a6cc9e301b659b0da3424c73f1c5391d785 100644 (file)
@@ -119,7 +119,7 @@ public class InputFactory extends SysdynElementFactory {
             refersTo = graph.getPossibleObject(dependency, sr.Dependency_refersTo);\r
             if(refersTo != null) {\r
                 referenceName = (String) graph.getPossibleRelatedValue(refersTo, l0.HasName);\r
-                module = graph.getPossibleObject(dependency, sr.HasTail);\r
+                module = graph.getPossibleObject(dependency, sr.Variable_HasTail);\r
                 moduleName = (String) graph.getPossibleRelatedValue(module, l0.HasName);\r
             }\r
         } else {\r
@@ -139,7 +139,7 @@ public class InputFactory extends SysdynElementFactory {
                        for(Resource dep : graph.getObjects(module, sr.Variable_isHeadOf)) {\r
                                Resource reference = graph.getPossibleObject(dep, sr.Dependency_refersTo);\r
                                if(reference!= null && reference.equals(component)) {\r
-                                       refersTo = graph.getSingleObject(dep, sr.HasTail);\r
+                                       refersTo = graph.getSingleObject(dep, sr.Variable_HasTail);\r
                                        referenceName = (String) graph.getPossibleRelatedValue(refersTo, l0.HasName);\r
                                        Variable parent = null;\r
                                        if(v instanceof ChildVariable)\r
index 64c06a70f81e7be49041ebd056e37017f80f1426..954b52fdcc6b277a5d528a869c08751530ad1f94 100644 (file)
@@ -13,6 +13,8 @@ package org.simantics.sysdyn.ui.handlers.imports;
 \r
 import java.io.File;\r
 import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
 import java.util.HashMap;\r
 \r
 import org.eclipse.core.commands.AbstractHandler;\r
@@ -29,8 +31,10 @@ import org.simantics.databoard.container.DataContainer;
 import org.simantics.databoard.container.DataContainers;\r
 import org.simantics.databoard.container.DataFormatException;\r
 import org.simantics.databoard.container.FormatHandler;\r
+import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.WriteGraph;\r
+import org.simantics.db.common.request.ObjectsWithType;\r
 import org.simantics.db.common.request.WriteRequest;\r
 import org.simantics.db.common.utils.NameUtils;\r
 import org.simantics.db.exception.DatabaseException;\r
@@ -38,6 +42,8 @@ import org.simantics.db.layer0.adapter.impl.DefaultPasteHandler;
 import org.simantics.db.layer0.adapter.impl.DefaultPasteImportAdvisor;\r
 import org.simantics.graph.representation.TransferableGraph1;\r
 import org.simantics.layer0.Layer0;\r
+import org.simantics.simulation.ontology.SimulationResource;\r
+import org.simantics.structural.stubs.StructuralResource2;\r
 import org.simantics.sysdyn.SysdynResource;\r
 import org.simantics.sysdyn.ui.Activator;\r
 import org.simantics.ui.SimanticsUI;\r
@@ -148,7 +154,9 @@ public class ImportModelHandler extends AbstractHandler {
                                                                }\r
                                                        });\r
 \r
-                                               }                                       \r
+                                               } else {\r
+                                                       fixHasTailAndHasHead(graph, ModelRoot);\r
+                                               }\r
                                        }\r
                                });\r
                        } catch (DatabaseException e) {\r
@@ -160,6 +168,44 @@ public class ImportModelHandler extends AbstractHandler {
 \r
        }\r
 \r
+       protected void fixHasTailAndHasHead(WriteGraph graph, Resource modelRoot) throws DatabaseException {\r
+               Layer0 L0 = Layer0.getInstance(graph);\r
+               SysdynResource sr = SysdynResource.getInstance(graph);\r
+               for(Resource configuration : findAllConfigurations(graph, modelRoot)) {\r
+                       Collection<Resource> connections = graph.syncRequest(new ObjectsWithType(configuration, L0.ConsistsOf, sr.Dependency));\r
+                       connections.addAll(graph.syncRequest(new ObjectsWithType(configuration, L0.ConsistsOf, sr.Flow)));\r
+\r
+                       for(Resource connection : connections) {\r
+                               Resource head = graph.getPossibleObject(connection, sr.HasHead);\r
+                               Resource tail = graph.getPossibleObject(connection, sr.HasTail);\r
+\r
+                               if(head != null && tail != null) {\r
+                                       graph.deny(connection, sr.HasHead, head);\r
+                                       graph.deny(connection, sr.HasTail, tail);\r
+\r
+                                       graph.claim(connection, sr.Variable_HasHead, head);\r
+                                       graph.claim(connection, sr.Variable_HasTail, tail);\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+       \r
+       private Collection<Resource> findAllConfigurations(ReadGraph graph, Resource modelRoot) throws DatabaseException {\r
+               Layer0 L0 = Layer0.getInstance(graph);\r
+               SysdynResource sr = SysdynResource.getInstance(graph);\r
+               StructuralResource2 SR2 = StructuralResource2.getInstance(graph);\r
+               Collection<Resource> configurations = new ArrayList<Resource>();\r
+               configurations.add(graph.getPossibleObject(modelRoot, SimulationResource.getInstance(graph).HasConfiguration));\r
+\r
+               for(Resource r : graph.getObjects(modelRoot, L0.ConsistsOf)) {\r
+                       if(graph.isInheritedFrom(r, sr.Module)) {\r
+                               configurations.add(graph.getPossibleObject(r, SR2.IsDefinedBy));\r
+                       }\r
+               }\r
+               \r
+               return configurations;\r
+       }\r
\r
        private void displayErrorMessage(Shell shell, String message) {\r
                MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ERROR);\r
                mb.setText("Error");\r
index 89da1e7afe3455b8ca838f32178ed049215d8d55..f9f13d1e4af91baa361b7ef09dc774da8b06b4ba 100644 (file)
@@ -228,7 +228,7 @@ public class ShortcutTabWidget implements Widget {
 \r
                for(Resource d : dependencies) {\r
                        if(graph.isInstanceOf(d, sr.Dependency)) {\r
-                               Resource tail = graph.getPossibleObject(d, sr.HasTail);\r
+                               Resource tail = graph.getPossibleObject(d, sr.Variable_HasTail);\r
                                if(tail != null) {\r
                                        Object name = graph.getPossibleRelatedValue(tail, l0.HasName);\r
                                        if(name != null)\r
index 66ba15a6cd1c47ff202ea5955824ad00828a390e..0fc9588de985e037bf370401f7d2cdd9911d7799 100644 (file)
@@ -73,7 +73,7 @@ public class ModuleInputEditingSupport extends EditingSupport {
                             for(Resource dependency : graph.syncRequest(new ObjectsWithType(module, sr.Variable_isHeadOf, sr.Dependency))) {\r
                                 if(graph.getPossibleObject(dependency, sr.Dependency_refersTo) == null ||\r
                                         graph.getPossibleObject(dependency, sr.Dependency_refersTo).equals(inputVariable)) {\r
-                                    Resource output = graph.getSingleObject(dependency, sr.HasTail);\r
+                                    Resource output = graph.getSingleObject(dependency, sr.Variable_HasTail);\r
                                     result.put((String)graph.getRelatedValue(output, l0.HasName), dependency);\r
                                 }\r
                             }\r
index 30f17cfcefdefc83158a3cf714ad231a7c2093ea..4b64f3bc04acd32772dea96a34f9acbd9e854c11 100644 (file)
@@ -74,7 +74,7 @@ public class ModuleOutputEditingSupport  extends EditingSupport {
                                 if(graph.getPossibleObject(dependency, sr.Dependency_refersTo) == null \r
                                                || !graph.hasStatement(graph.getPossibleObject(dependency, sr.Dependency_refersTo), l0.HasName)\r
                                                || graph.getPossibleObject(dependency, sr.Dependency_refersTo).equals(outputVariable)) {\r
-                                    Resource input = graph.getSingleObject(dependency, sr.HasHead);\r
+                                    Resource input = graph.getSingleObject(dependency, sr.Variable_HasHead);\r
                                     result.put((String)graph.getRelatedValue(input, l0.HasName), dependency);\r
                                 }\r
                             }\r
index 0340048119ac1168652b124d0c00a7a27f2707be..bab8583c59f8d5e9ec2279644e67dc827e3e9ac3 100644 (file)
@@ -73,9 +73,9 @@ public class ReferenceRow {
                 public String perform(ReadGraph graph) throws DatabaseException {\r
                     Layer0 l0 = Layer0.getInstance(graph);\r
                     SysdynResource sr = SysdynResource.getInstance(graph);\r
-                    Resource valueResource = graph.getPossibleObject(dependency, sr.HasTail);\r
+                    Resource valueResource = graph.getPossibleObject(dependency, sr.Variable_HasTail);\r
                     if(!graph.isInstanceOf(valueResource, sr.Variable))\r
-                        valueResource = graph.getPossibleObject(dependency, sr.HasHead);\r
+                        valueResource = graph.getPossibleObject(dependency, sr.Variable_HasHead);\r
                     if(!graph.isInstanceOf(valueResource, sr.Variable))\r
                         return "";\r
                     return (String)graph.getRelatedValue(valueResource, l0.HasName, Bindings.STRING);\r
index 5864b912afb6b007730e1012cea40d8ccbda8041..27c95d3ef4069ee084fe6956d5d47e7d05a44d08 100644 (file)
@@ -150,12 +150,12 @@ public class DependencyGraphRequest implements Read<Graph> {
 \r
                Collection<Resource> dependants;\r
                if(isInverted)\r
-                       dependants = getDependants(g, graph, r, sr.Variable_isTailOf, sr.HasHead, sr.Dependency);\r
+                       dependants = getDependants(g, graph, r, sr.Variable_isTailOf, sr.Variable_HasHead, sr.Dependency);\r
                else {\r
-                       dependants = getDependants(g, graph, r, sr.Variable_isHeadOf, sr.HasTail, sr.Dependency);\r
+                       dependants = getDependants(g, graph, r, sr.Variable_isHeadOf, sr.Variable_HasTail, sr.Dependency);\r
                        if (g.isInstanceOf(r, sr.Stock)) {\r
-                               dependants.addAll(getDependants(g, graph, r, sr.Variable_isTailOf, sr.HasHead, sr.Flow));\r
-                               dependants.addAll(getDependants(g, graph, r, sr.Variable_isHeadOf, sr.HasTail, sr.Flow));\r
+                               dependants.addAll(getDependants(g, graph, r, sr.Variable_isTailOf, sr.Variable_HasHead, sr.Flow));\r
+                               dependants.addAll(getDependants(g, graph, r, sr.Variable_isHeadOf, sr.Variable_HasTail, sr.Flow));\r
                        }\r
                }\r
 \r
index e6fa77b63434a27c7b9c590265b47d6688561b85..79293b0b53b8ef4ad0662652fa5780d1ee69b254 100644 (file)
@@ -120,7 +120,7 @@ public class ValidationUtils {
 \r
             for(Resource d : dependencies) {\r
                 if(graph.isInstanceOf(d, sr.Dependency)) {\r
-                    Resource tail = graph.getPossibleObject(d, sr.HasTail);\r
+                    Resource tail = graph.getPossibleObject(d, sr.Variable_HasTail);\r
                     if(tail != null) {\r
                         Object name = graph.getPossibleRelatedValue(tail, l0.HasName);\r
                         if(name != null)\r
index bd5c1ba369706234499ea1be30aa59feb0b041c6..cb327bfae9ee178f23477760bc9f9ce64b83cc3f 100644 (file)
@@ -382,7 +382,7 @@ public class HistoryVariable extends ChildVariable implements PropertyProvider,
                        // Set value for all referred variables in modules\r
                        SysdynResource sr = SysdynResource.getInstance(graph);\r
                        for(Resource dependency : graph.getObjects(this.resource, sr.Variable_isTailOf)) {\r
-                               Resource head = graph.getPossibleObject(dependency, sr.HasHead);\r
+                               Resource head = graph.getPossibleObject(dependency, sr.Variable_HasHead);\r
                                Resource ref = graph.getPossibleObject(dependency, sr.Dependency_refersTo);\r
                                if(ref != null && head != null) {\r
                                        String module = "";\r
index d6c644690a5aaa9d0e67f6a86d34b622181391b2..ba3be264c10a859b162f82f76583f7c3ef7cf2a1 100644 (file)
@@ -52,8 +52,8 @@ public abstract class Connection implements IWriteableMDLObject {
                // Build the connection to configuration\r
                Resource connection = GraphUtils.create2(graph, \r
                                connectionType,\r
-                               sr.HasHead, end.getResource(),\r
-                               sr.HasTail, start.getResource(),\r
+                               sr.Variable_HasHead, end.getResource(),\r
+                               sr.Variable_HasTail, start.getResource(),\r
                                l0.PartOf, configuration);\r
                graph.claim(connection, mr.Mapped, connection);\r
                \r
index a907c3f233f764c3b86d911a182ef3305b6656e9..f41c2014be499321af67fe8aa8d79f685d16f5c0 100644 (file)
@@ -18,9 +18,9 @@ import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;
 \r
 @GraphType(SysdynResource.URIs.Dependency)\r
 public class Dependency implements IElement {\r
-    @RelatedElement(SysdynResource.URIs.HasTail)\r
+    @RelatedElement(SysdynResource.URIs.Variable_HasTail)\r
     private IElement tail;\r
-    @RelatedElement(SysdynResource.URIs.HasHead)\r
+    @RelatedElement(SysdynResource.URIs.Variable_HasHead)\r
     private IElement head;\r
     @RelatedElement(SysdynResource.URIs.Dependency_refersTo)\r
     private IElement refersTo;\r
index 786855b35bbbe29c5477911ed2f69a50f9eba91f..43a31d05f6eadcb90918fb31db43247f17a51289 100644 (file)
@@ -18,9 +18,9 @@ import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;
 \r
 @GraphType(SysdynResource.URIs.Flow)\r
 public class Flow implements IElement {\r
-    @RelatedElement(SysdynResource.URIs.HasTail)\r
+    @RelatedElement(SysdynResource.URIs.Variable_HasTail)\r
     private IElement tail;\r
-    @RelatedElement(SysdynResource.URIs.HasHead)\r
+    @RelatedElement(SysdynResource.URIs.Variable_HasHead)\r
     private IElement head;\r
     \r
     @Override\r