]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fixed objmap, h2d, sysdyn and sysdyn.ui to use the new style URIs.
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 11 Mar 2010 08:23:06 +0000 (08:23 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 11 Mar 2010 08:23:06 +0000 (08:23 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@14811 ac1ea38d-2e2b-0410-8846-a27921b304fc

37 files changed:
org.simantics.h2d/src/org/simantics/h2d/diagram/Diagram.java
org.simantics.objmap/examples/org/simantics/objmap/examples/SysdynExample.java
org.simantics.objmap/src/org/simantics/objmap/annotations/factories/RelatedElementRuleFactory.java
org.simantics.objmap/src/org/simantics/objmap/annotations/factories/RelatedElementsRuleFactory.java
org.simantics.objmap/src/org/simantics/objmap/annotations/factories/RelatedValueRuleFactory.java
org.simantics.objmap/src/org/simantics/objmap/rules/MappedElementRule.java
org.simantics.objmap/src/org/simantics/objmap/rules/MappedElementsRule.java
org.simantics.objmap/src/org/simantics/objmap/rules/ValueRule.java
org.simantics.objmap/src/org/simantics/objmap/rules/range/FieldAccessor.java
org.simantics.objmap/src/org/simantics/objmap/schema/MappingSchemas.java
org.simantics.sysdyn.ui/adapters.xml
org.simantics.sysdyn.ui/plugin.xml
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/AuxiliaryElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/CloudElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/DependencyElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/FlowElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/RectangularElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/StockElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/TextElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/ValveElement.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/ValveElementOld.java
org.simantics.sysdyn/src/org/simantics/sysdyn/SysdynResource.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Auxiliary.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Cloud.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Configuration.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Dependency.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Flow.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Stock.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Valve.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Variable.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/ConstantExpression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/DelayExpression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/LookupExpression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/NormalExpression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/ParameterExpression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/WithLookupExpression.java

index afd9d8d783415fde334a869025355b199bc3069d..d17e4bfff11a30d4a395735cdc7fb347e2faf806 100644 (file)
@@ -7,10 +7,10 @@ import org.simantics.h2d.element.IElement;
 import org.simantics.objmap.annotations.RelatedValue;\r
 import org.simantics.objmap.annotations.GraphType;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Configuration")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Configuration")\r
 public class Diagram implements IDiagram {\r
 \r
-    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#ConsistsOf")\r
+    @RelatedValue("http://www.simantics.org/Layer0-1.0/Relations/ConsistsOf")\r
        public ArrayList<IElement> elements = new ArrayList<IElement>();\r
        ArrayList<IDiagramListener> listeners = new ArrayList<IDiagramListener>();\r
        \r
index 57092cb72e8945802c16466fc43d0dcfe059536a..174c8eb471d3fe4c1cf714cf67c8758ba6100241 100644 (file)
@@ -14,29 +14,29 @@ import org.simantics.objmap.schema.SimpleSchema;
 \r
 public class SysdynExample {\r
 \r
-    @GraphType("http://www.simantics.org/Sysdyn#Configuration")\r
+    @GraphType("http://www.simantics.org/Sysdyn-1.0/Configuration")\r
     static class Configuration {\r
-        @RelatedElements("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#ConsistsOf")\r
+        @RelatedElements("http://www.simantics.org/Layer0-1.0/Relations/ConsistsOf")\r
         Collection<Component> components; \r
     }\r
     \r
     static abstract class Component {        \r
     }\r
     \r
-    @GraphType("http://www.simantics.org/Sysdyn#Dependency")\r
+    @GraphType("http://www.simantics.org/Sysdyn-1.0/Dependency")\r
     static class Dependency extends Component {\r
-        @RelatedElement("http://www.simantics.org/Sysdyn#HasTail")\r
+        @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasTail")\r
         Variable tail;\r
-        @RelatedElement("http://www.simantics.org/Sysdyn#HasHead")\r
+        @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasHead")\r
         Auxiliary head;\r
     }\r
     \r
     static abstract class Variable extends Component {\r
-        @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasName")\r
+        @RelatedValue("http://www.simantics.org/Layer0-1.0/Relations/HasName")\r
         String name;\r
     }\r
     \r
-    @GraphType("http://www.simantics.org/Sysdyn#Auxiliary")\r
+    @GraphType("http://www.simantics.org/Sysdyn-1.0/Auxiliary")\r
     static class Auxiliary extends Variable {\r
     }\r
     \r
index f4499fa4fdc93cab5c312e895dd7a5557fa999b3..2aedbd31303c1a43916748d03049c8e5997336de 100644 (file)
@@ -20,7 +20,7 @@ public class RelatedElementRuleFactory implements IFieldRuleFactory {
     public IMappingRule create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException {\r
         RelatedElement annotation = (RelatedElement)_annotation;\r
         return new MappedElementRule(\r
-                new RelatedObjectAccessor(g.getResourceByURI(annotation.value())),\r
+                new RelatedObjectAccessor(g.getResource(annotation.value())),\r
                 new FieldAccessor<Object>(field)\r
                 );\r
     }\r
index 7269783e94f8dee824803ca6d6b3006a75af4a36..d6f6c0dc4f2b3237767f0b7f12b1f6138ebe2b90 100644 (file)
@@ -21,7 +21,7 @@ public class RelatedElementsRuleFactory implements IFieldRuleFactory {
     public IMappingRule create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException {\r
         RelatedElements annotation = (RelatedElements)_annotation;\r
         return new MappedElementsRule(\r
-                new RelatedObjectsAccessor(g.getResourceByURI(annotation.value()),\r
+                new RelatedObjectsAccessor(g.getResource(annotation.value()),\r
                         annotation.composition()),\r
                 new FieldAccessor<Collection<Object>>(field)\r
                 );\r
index 7bbecaa48655698c1944a7ef012cfaabf8d60ddf..f04f4fb1d968ea5531a18b740d2f8698fc66f202 100644 (file)
@@ -3,7 +3,6 @@ package org.simantics.objmap.annotations.factories;
 import java.lang.annotation.Annotation;\r
 import java.lang.reflect.Field;\r
 \r
-import org.simantics.db.Builtins;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.exception.ResourceNotFoundException;\r
 import org.simantics.db.exception.ServiceException;\r
@@ -20,10 +19,10 @@ public class RelatedValueRuleFactory implements IFieldRuleFactory {
     @Override\r
     public IMappingRule create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException {\r
         RelatedValue annotation = (RelatedValue)_annotation;\r
-        Builtins b = g.getBuiltins();\r
+        //Builtins b = g.getBuiltins();\r
         return new ValueRule(\r
                 new RelatedValueAccessor(\r
-                        g.getResourceByURI(annotation.value()), \r
+                        g.getResource(annotation.value()), \r
                         DataTypeUtils.dataTypeOfClass(g, field.getType())\r
                     ),\r
                 new FieldAccessor<Object>(field)\r
index 51a3e6e5812b8d2615cbf11c31badfee0aca7091..c9baa3b8ec4b3927561faf5aa6ff408eb7933be2 100644 (file)
@@ -1,13 +1,9 @@
 package org.simantics.objmap.rules;\r
 \r
-import java.util.ArrayList;\r
-\r
 import org.apache.log4j.Logger;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.WriteGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.layer0.utils.direct.GraphUtils;\r
 import org.simantics.objmap.IFunction;\r
 import org.simantics.objmap.IMappingRule;\r
 import org.simantics.objmap.MappingException;\r
index e37ce13301822e32f63a034aa531a78e8049d5c0..24062a0edf08cb094a6cf6393b7baeba262352ed 100644 (file)
@@ -7,8 +7,6 @@ import org.apache.log4j.Logger;
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.WriteGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.layer0.utils.direct.GraphUtils;\r
 import org.simantics.objmap.IFunction;\r
 import org.simantics.objmap.IMappingRule;\r
 import org.simantics.objmap.MappingException;\r
index 13e46703df3defdd951a38f763db701e5dd2cfd8..98a4908f3b8abecaebadb2dd136e945f4e9a8682 100644 (file)
@@ -4,10 +4,6 @@ import org.apache.log4j.Logger;
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.WriteGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.exception.ServiceException;\r
-import org.simantics.db.exception.ValidationException;\r
-import org.simantics.layer0.utils.direct.GraphUtils;\r
 import org.simantics.objmap.IFunction;\r
 import org.simantics.objmap.IMappingRule;\r
 import org.simantics.objmap.MappingException;\r
index 83a4bfd049b9958dcf3ef39bcf1ee379baf999c9..be773b4075aea9097c06ea28822586e7a298f09f 100644 (file)
@@ -3,8 +3,6 @@ package org.simantics.objmap.rules.range;
 import java.lang.reflect.Field;\r
 \r
 import org.apache.log4j.Logger;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.layer0.utils.direct.GraphUtils;\r
 import org.simantics.objmap.MappingException;\r
 \r
 /**\r
index 472915bfbaca213d3b25c9113324c17a36a0bc20..19552eada19d38590417abe3691bd5d3d7a56a82 100644 (file)
@@ -35,7 +35,7 @@ public class MappingSchemas {
            collectRulesFromAnnotations(g, clazz, rules);\r
            \r
            return new SimpleLinkType(\r
-                   g.getResourceByURI(graphType.value()), \r
+                   g.getResource(graphType.value()), \r
                 clazz, rules);    \r
        }\r
        \r
index 21a73a133ac14a66f660b972461fd04f1578aa71..3b210400b010adf847fcd03ebc9601c7bc4b1f1d 100644 (file)
@@ -3,13 +3,13 @@
        <target\r
                interface="org.simantics.project.features.IProjectFeature">\r
                <resource\r
-                       uri="http://www.simantics.org/Sysdyn#SysdynProject"\r
+                       uri="http://www.simantics.org/Sysdyn-1.0/SysdynProject"\r
                        class="org.simantics.sysdyn.ui.project.SysdynProject" />\r
        </target>\r
        <target\r
                interface="org.simantics.scenegraph.adapters.ISceneGraphProvider">\r
                <type\r
-                       uri="http://www.simantics.org/Sysdyn#Configuration"\r
+                       uri="http://www.simantics.org/Sysdyn-1.0/Configuration"\r
                        class="org.simantics.sysdyn.ui.sg.SysdynSceneGraphProvider">\r
                        <graph />\r
                        <this />\r
index f4d8d2395976695ea29b41e13dd9655aec2cd216..0e0926b3457f265b5aec040bc8f744196d64046a 100644 (file)
       <adapter\r
             editorId="org.simantics.sysdyn.ui.diagramEditor"\r
             priority="3"\r
-            type_uris="http://www.simantics.org/Sysdyn#Configuration">\r
+            type_uris="http://www.simantics.org/Sysdyn-1.0/Configuration">\r
       </adapter>\r
       <adapter\r
             editorId="org.simantics.sysdyn.ui.modelicaEditor"\r
             priority="2"\r
-            type_uris="http://www.simantics.org/Sysdyn#Configuration">\r
+            type_uris="http://www.simantics.org/Sysdyn-1.0/Configuration">\r
       </adapter>\r
    </extension>\r
    <extension\r
index e143b7a54a82de1f7cc4df8fe4ad69bdef65960a..44f2a0ede6d739c0c0ac59b7cef11688036d1f15 100644 (file)
@@ -2,7 +2,7 @@ package org.simantics.sysdyn.ui.elements;
 \r
 import org.simantics.objmap.annotations.GraphType;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Auxiliary")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Auxiliary")\r
 public class AuxiliaryElement extends TextElement {\r
         \r
        public AuxiliaryElement() {     \r
index 279feecf0d56cbf69dcb5d4c5462a7a30efb36d3..285b769b1657fd31cc39056997f59ff00f422d7f 100644 (file)
@@ -9,7 +9,7 @@ import org.simantics.h2d.node.ShapeNode;
 import org.simantics.objmap.annotations.GraphType;\r
 import org.simantics.scenegraph.g2d.G2DParentNode;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Cloud")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Cloud")\r
 public class CloudElement extends RectangularElement implements Connectable {\r
         \r
        public static final double CLOUD_SIZE_X = 5.0;\r
index 16a0fbc5782039b6122c0fefb3f114f8f7e2c1cc..b56537102c5025c1435fd95e8ce5290840c2ea4d 100644 (file)
@@ -21,7 +21,7 @@ import org.simantics.objmap.annotations.RelatedElement;
 import org.simantics.objmap.annotations.RelatedValue;\r
 import org.simantics.scenegraph.g2d.G2DParentNode;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Dependency")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Dependency")\r
 public class DependencyElement extends Element implements IElementListener {\r
        \r
        /*\r
@@ -31,11 +31,11 @@ public class DependencyElement extends Element implements IElementListener {
     public static double ARROW_LENGTH2 = 3.0;\r
     public static double ARROW_WIDTH = 1.8;\r
     \r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasTail")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasTail")\r
        Connectable tail;\r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasHead")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasHead")\r
        Connectable head;\r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasAngle")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasAngle")\r
        double angle = 0.1;\r
 \r
        // Auxiliary    \r
index 4501e6fbcae462d360dd5a3ca840980d02376590..d0bfa970625070ad81c7f670c662a735ac2c5f16 100644 (file)
@@ -13,7 +13,7 @@ import org.simantics.objmap.annotations.GraphType;
 import org.simantics.objmap.annotations.RelatedElement;\r
 import org.simantics.scenegraph.g2d.G2DParentNode;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Flow")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Flow")\r
 public class FlowElement extends Element implements IElementListener {\r
 \r
     public static double ARROW_LENGTH = 3.2;\r
@@ -25,9 +25,9 @@ public class FlowElement extends Element implements IElementListener {
     /*\r
      * Total length of the arrow is ARROW_LENGTH1 + ARROW_LENGTH2\r
      */    \r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasTail")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasTail")\r
     Connectable tail;\r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasHead")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasHead")\r
     Connectable head;\r
 \r
     // Auxiliary       \r
index af7c0ba4b830497babca441d1efb7c053e2e0fdf..5d84e216b3c065f3717d7349cbb4b50871280b8c 100644 (file)
@@ -16,9 +16,9 @@ public abstract class RectangularElement extends Element implements Movable {
        \r
        protected Rectangle2D bounds = new Rectangle2D.Double();\r
        \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasX")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasX")\r
     protected double posX;\r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasY")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasY")\r
     protected double posY;     \r
     \r
        public RectangularElement() {   \r
index a171f60c196c030df83bfdc9d91a4bba64e811b1..821257aa71705db2761d2c437202ac1aa02e6c5c 100644 (file)
@@ -5,7 +5,7 @@ import org.simantics.objmap.annotations.GraphType;
 import org.simantics.objmap.annotations.UpdateMethod;\r
 import org.simantics.scenegraph.g2d.G2DParentNode;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Stock")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Stock")\r
 public class StockElement extends TextElement {\r
        \r
     RectangleNode rectangleNode;\r
index e3555d1ef930a2d243d536addeba7641b48ac970..169255408f3dfb6fcb840747fc672e426feaed63 100644 (file)
@@ -27,7 +27,7 @@ import org.simantics.objmap.annotations.UpdateMethod;
 import org.simantics.scenegraph.g2d.G2DParentNode;\r
 import org.simantics.sysdyn.SysdynResource;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Auxiliary")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Auxiliary")\r
 public class TextElement extends RectangularElement implements Movable, Connectable, IEventHandler {\r
 \r
     static final Font FONT = new Font("sans-serif", Font.PLAIN, 12);\r
@@ -39,10 +39,10 @@ public class TextElement extends RectangularElement implements Movable, Connecta
     static final FontRenderContext FRC = new FontRenderContext(FONT_TRANSFORM, true, true);\r
 \r
     // Properties\r
-    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasName")\r
+    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations-1.0/HasName")\r
     public String label = "Unnamed";\r
 \r
-    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasType")\r
+    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations-1.0/HasType")\r
     public String type = "Real";\r
 \r
     // Auxiliary fields\r
index 6cf57f6f1c14e5da585a05dfdbe37b9fb4ff9ea0..714df5a2d29f4b47036d24b86677579c9b0ef4ef 100644 (file)
@@ -10,7 +10,7 @@ import org.simantics.h2d.node.ShapeNode;
 import org.simantics.objmap.annotations.GraphType;\r
 import org.simantics.scenegraph.g2d.G2DParentNode;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Valve")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Valve")\r
 public class ValveElement extends TextElement implements Rotatable {\r
         \r
        public static final double VALVE_SIZE = 5.0;\r
index 7b33b5ca2e605c98bb2c3e5cdfc7572bf4b4afdd..04a7bfd73853c931329819ecd5e2e80e8577ad19 100644 (file)
@@ -10,7 +10,7 @@ import org.simantics.h2d.node.ShapeNode;
 import org.simantics.objmap.annotations.GraphType;\r
 import org.simantics.scenegraph.g2d.G2DParentNode;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Valve")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Valve")\r
 public class ValveElementOld extends RectangularElement implements Connectable, Rotatable {\r
         \r
        public static final double VALVE_SIZE = 5.0;\r
index 42cac6a6e66cd8adbe8a5df4b5599c984f35e728..155bea642bb6a6fb7fa41cdc10a8f29cf0a8dc07 100644 (file)
@@ -54,44 +54,44 @@ public class SysdynResource {
     public final Resource WithLookupExpression;\r
     \r
     public static class URIs {\r
-        public static final String Auxiliary = "http://www.simantics.org/Sysdyn#Auxiliary";\r
-        public static final String Cloud = "http://www.simantics.org/Sysdyn#Cloud";\r
-        public static final String Configuration = "http://www.simantics.org/Sysdyn#Configuration";\r
-        public static final String ConstantExpression = "http://www.simantics.org/Sysdyn#ConstantExpression";\r
-        public static final String DelayExpression = "http://www.simantics.org/Sysdyn#DelayExpression";\r
-        public static final String Dependency = "http://www.simantics.org/Sysdyn#Dependency";\r
-        public static final String Expression = "http://www.simantics.org/Sysdyn#Expression";\r
-        public static final String Flow = "http://www.simantics.org/Sysdyn#Flow";\r
-        public static final String HasAngle = "http://www.simantics.org/Sysdyn#HasAngle";\r
-        public static final String HasEquation = "http://www.simantics.org/Sysdyn#HasEquation";\r
-        public static final String HasExpression = "http://www.simantics.org/Sysdyn#HasExpression";\r
-        public static final String HasHead = "http://www.simantics.org/Sysdyn#HasHead";\r
-        public static final String HasInitialEquation = "http://www.simantics.org/Sysdyn#HasInitialEquation";\r
-        public static final String HasLookup = "http://www.simantics.org/Sysdyn#HasLookup";\r
-        public static final String HasStartTime = "http://www.simantics.org/Sysdyn#HasStartTime";\r
-        public static final String HasStopTime = "http://www.simantics.org/Sysdyn#HasStopTime";\r
-        public static final String HasTail = "http://www.simantics.org/Sysdyn#HasTail";\r
-        public static final String HasType = "http://www.simantics.org/Sysdyn#HasType";\r
-        public static final String HasUnit = "http://www.simantics.org/Sysdyn#HasUnit";\r
-        public static final String HasX = "http://www.simantics.org/Sysdyn#HasX";\r
-        public static final String HasY = "http://www.simantics.org/Sysdyn#HasY";\r
-        public static final String IndependentVariable = "http://www.simantics.org/Sysdyn#IndependentVariable";\r
-        public static final String IsHeadOf = "http://www.simantics.org/Sysdyn#IsHeadOf";\r
-        public static final String IsTailOf = "http://www.simantics.org/Sysdyn#IsTailOf";\r
-        public static final String LookupExpression = "http://www.simantics.org/Sysdyn#LookupExpression";\r
-        public static final String NormalExpression = "http://www.simantics.org/Sysdyn#NormalExpression";\r
-        public static final String ParameterExpression = "http://www.simantics.org/Sysdyn#ParameterExpression";\r
-        public static final String Stock = "http://www.simantics.org/Sysdyn#Stock";\r
-        public static final String StockExpression = "http://www.simantics.org/Sysdyn#StockExpression";\r
-        public static final String SysdynProject = "http://www.simantics.org/Sysdyn#SysdynProject";\r
-        public static final String Valve = "http://www.simantics.org/Sysdyn#Valve";\r
-        public static final String Variable = "http://www.simantics.org/Sysdyn#Variable";\r
-        public static final String WithLookupExpression = "http://www.simantics.org/Sysdyn#WithLookupExpression";\r
+        public static final String Auxiliary = "http://www.simantics.org/Sysdyn-1.0/Auxiliary";\r
+        public static final String Cloud = "http://www.simantics.org/Sysdyn-1.0/Cloud";\r
+        public static final String Configuration = "http://www.simantics.org/Sysdyn-1.0/Configuration";\r
+        public static final String ConstantExpression = "http://www.simantics.org/Sysdyn-1.0/ConstantExpression";\r
+        public static final String DelayExpression = "http://www.simantics.org/Sysdyn-1.0/DelayExpression";\r
+        public static final String Dependency = "http://www.simantics.org/Sysdyn-1.0/Dependency";\r
+        public static final String Expression = "http://www.simantics.org/Sysdyn-1.0/Expression";\r
+        public static final String Flow = "http://www.simantics.org/Sysdyn-1.0/Flow";\r
+        public static final String HasAngle = "http://www.simantics.org/Sysdyn-1.0/HasAngle";\r
+        public static final String HasEquation = "http://www.simantics.org/Sysdyn-1.0/HasEquation";\r
+        public static final String HasExpression = "http://www.simantics.org/Sysdyn-1.0/HasExpression";\r
+        public static final String HasHead = "http://www.simantics.org/Sysdyn-1.0/HasHead";\r
+        public static final String HasInitialEquation = "http://www.simantics.org/Sysdyn-1.0/HasInitialEquation";\r
+        public static final String HasLookup = "http://www.simantics.org/Sysdyn-1.0/HasLookup";\r
+        public static final String HasStartTime = "http://www.simantics.org/Sysdyn-1.0/HasStartTime";\r
+        public static final String HasStopTime = "http://www.simantics.org/Sysdyn-1.0/HasStopTime";\r
+        public static final String HasTail = "http://www.simantics.org/Sysdyn-1.0/HasTail";\r
+        public static final String HasType = "http://www.simantics.org/Sysdyn-1.0/HasType";\r
+        public static final String HasUnit = "http://www.simantics.org/Sysdyn-1.0/HasUnit";\r
+        public static final String HasX = "http://www.simantics.org/Sysdyn-1.0/HasX";\r
+        public static final String HasY = "http://www.simantics.org/Sysdyn-1.0/HasY";\r
+        public static final String IndependentVariable = "http://www.simantics.org/Sysdyn-1.0/IndependentVariable";\r
+        public static final String IsHeadOf = "http://www.simantics.org/Sysdyn-1.0/IsHeadOf";\r
+        public static final String IsTailOf = "http://www.simantics.org/Sysdyn-1.0/IsTailOf";\r
+        public static final String LookupExpression = "http://www.simantics.org/Sysdyn-1.0/LookupExpression";\r
+        public static final String NormalExpression = "http://www.simantics.org/Sysdyn-1.0/NormalExpression";\r
+        public static final String ParameterExpression = "http://www.simantics.org/Sysdyn-1.0/ParameterExpression";\r
+        public static final String Stock = "http://www.simantics.org/Sysdyn-1.0/Stock";\r
+        public static final String StockExpression = "http://www.simantics.org/Sysdyn-1.0/StockExpression";\r
+        public static final String SysdynProject = "http://www.simantics.org/Sysdyn-1.0/SysdynProject";\r
+        public static final String Valve = "http://www.simantics.org/Sysdyn-1.0/Valve";\r
+        public static final String Variable = "http://www.simantics.org/Sysdyn-1.0/Variable";\r
+        public static final String WithLookupExpression = "http://www.simantics.org/Sysdyn-1.0/WithLookupExpression";\r
     }\r
     \r
     public static Resource getResourceOrNull(ReadGraph graph, String uri) {\r
         try {\r
-            return graph.getResourceByURI(uri);\r
+            return graph.getResource(uri);\r
         } catch(DatabaseException e) {\r
             System.err.println(e.getMessage());\r
             return null;\r
index f325b446f857c224fd23817ae6dd3470c83cf0bf..a2a72a7e25e5e869db010eeaeed884e8b1d295d9 100644 (file)
@@ -3,10 +3,10 @@ package org.simantics.sysdyn.representation;
 import org.simantics.objmap.annotations.GraphType;\r
 import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Auxiliary")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Auxiliary")\r
 public class Auxiliary extends Variable {\r
     @Override\r
     public void accept(IElementVisitorVoid v) {\r
-        v.visit(this);        \r
+        v.visit(this);\r
     }\r
 }\r
index 9c1b74fe2e91344ab52235df6b3a14fcde6f8954..0faf66008348fe94fe3fa8a28460af089cc2e8da 100644 (file)
@@ -3,10 +3,10 @@ package org.simantics.sysdyn.representation;
 import org.simantics.objmap.annotations.GraphType;\r
 import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Cloud")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Cloud")\r
 public class Cloud implements IElement {\r
     @Override\r
     public void accept(IElementVisitorVoid v) {\r
-        v.visit(this);        \r
+        v.visit(this);\r
     }\r
 }\r
index 8fef48c351475e97f91b3fe9cc8ba95dd7b61c39..dfdb653c089d6c42fc7195e5047f50ed9b609b03 100644 (file)
@@ -9,19 +9,19 @@ import org.simantics.sysdyn.representation.visitors.ElementVisitorVoidAdapter;
 import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
 \r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Configuration")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Configuration")\r
 public class Configuration {\r
-    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasName")\r
+    @RelatedValue("http://www.simantics.org/Layer0-1.0/Relations/HasName")\r
     public String name = "Unnamed";\r
     \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasStartTime")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasStartTime")\r
     public Double startTime = 0.0;\r
     \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasStopTime")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasStopTime")\r
     public Double stopTime = 10.0;\r
     \r
     @RelatedElements(\r
-         value = "http://www.vtt.fi/Simantics/Layer0/1.0/Relations#ConsistsOf",\r
+         value = "http://www.simantics.org/Layer0-1.0/Relations/ConsistsOf",\r
          composition = true)\r
     public ArrayList<IElement> elements = new ArrayList<IElement>();\r
     \r
index ff1eb648fa614b9a77db4ef4cba779000bb13cf9..6f639bdc5244783d1560c1442ebe8dcdbbc55fa2 100644 (file)
@@ -4,11 +4,11 @@ import org.simantics.objmap.annotations.GraphType;
 import org.simantics.objmap.annotations.RelatedElement;\r
 import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Dependency")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Dependency")\r
 public class Dependency implements IElement {\r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasTail")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasTail")\r
     public IElement tail;\r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasHead")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasHead")\r
     public IElement head;\r
     \r
     @Override\r
index c9a2aa6332ec4a48d2ee1f74fcf9b11bf93f737a..0413c7862c3f0754843b5396e400ffb6199517d8 100644 (file)
@@ -4,11 +4,11 @@ import org.simantics.objmap.annotations.GraphType;
 import org.simantics.objmap.annotations.RelatedElement;\r
 import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Flow")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Flow")\r
 public class Flow implements IElement {\r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasTail")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasTail")\r
     public IElement tail;\r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasHead")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasHead")\r
     public IElement head;\r
     \r
     @Override\r
index 3287853fe95ae39cb818587c1c86636aecb70a00..109162422633902298e91678cb25886d2d511372 100644 (file)
@@ -5,7 +5,7 @@ import java.util.ArrayList;
 import org.simantics.objmap.annotations.GraphType;\r
 import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Stock")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Stock")\r
 public class Stock extends Variable {\r
     public ArrayList<Variable> incomingFlows = new ArrayList<Variable>(2);\r
     public ArrayList<Variable> outgoingFlows = new ArrayList<Variable>(2);\r
index b36740102c79f28b3896d666aefd7d990640b803..7b6f19665f8759aced2d8401fb1e79774e0aad2a 100644 (file)
@@ -3,10 +3,10 @@ package org.simantics.sysdyn.representation;
 import org.simantics.objmap.annotations.GraphType;\r
 import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Valve")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/Valve")\r
 public class Valve extends Variable {\r
     @Override\r
     public void accept(IElementVisitorVoid v) {\r
-        v.visit(this);        \r
+        v.visit(this);\r
     }\r
 }\r
index d9b441192b65e9c877e099b9a2f51da2304f3450..dee65cc360f8f26500dab937eb46e2c1588ddc46 100644 (file)
@@ -5,13 +5,13 @@ import org.simantics.objmap.annotations.RelatedValue;
 import org.simantics.sysdyn.representation.expressions.IExpression;\r
 \r
 public abstract class Variable implements IElement {\r
-    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasName")\r
+    @RelatedValue("http://www.simantics.org/Layer0-1.0/Relations/HasName")\r
     protected String name;\r
-    @RelatedValue("http://www.vtt.fi/Simantics/Layer0/1.0/Relations#HasType")\r
+    @RelatedValue("http://www.simantics.org/Layer0-1.0/Relations/HasType")\r
     protected String type;\r
-    //@RelatedValue("http://www.simantics.org/Sysdyn#HasValue")\r
+    //@RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasValue")\r
     //public String value;\r
-    @RelatedElement("http://www.simantics.org/Sysdyn#HasExpression")\r
+    @RelatedElement("http://www.simantics.org/Sysdyn-1.0/HasExpression")\r
     public IExpression expression;\r
     \r
     public String getName() {\r
index 86f26e1cd629369424e698f5c870ef75d65d7e02..2ac6bc62a42085c5d7bac5822a3cf866faa65106 100644 (file)
@@ -4,12 +4,12 @@ import org.simantics.objmap.annotations.GraphType;
 import org.simantics.objmap.annotations.RelatedValue;\r
 import org.simantics.sysdyn.representation.Variable;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#ConstantExpression")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/ConstantExpression")\r
 public class ConstantExpression extends Expression {\r
-    \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasEquation")\r
+\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasEquation")\r
     private String equation;\r
-    \r
+\r
     @Override\r
     public String getDeclaration(Variable variable) {\r
         return "    constant " + variable.getType() + " " + variable.getName() + " = " + equation + ";\n";\r
index cb3348593fc9b97d73e16598320fa50a52c08bd7..285a74e12fdbfa0478a815f00e63a876cc15564e 100644 (file)
@@ -2,7 +2,7 @@ package org.simantics.sysdyn.representation.expressions;
 \r
 import org.simantics.objmap.annotations.GraphType;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#Delayxpression")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/DelayExpression")\r
 public class DelayExpression extends Expression {\r
 \r
 }\r
index ccb925d8998ea7e1851e8dec3844fc1db1cd171b..2877ee416b340781b3ecb08cf1629abb31d85ba5 100644 (file)
@@ -2,7 +2,7 @@ package org.simantics.sysdyn.representation.expressions;
 \r
 import org.simantics.objmap.annotations.GraphType;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#LookupExpression")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/LookupExpression")\r
 public class LookupExpression extends Expression {\r
 \r
 }\r
index c8242c54e27666bc3152cf1ca3f8b83933739e40..8929020a6fab5a5a151300a0e97a5d23f65a96bc 100644 (file)
@@ -4,12 +4,12 @@ import org.simantics.objmap.annotations.GraphType;
 import org.simantics.objmap.annotations.RelatedValue;\r
 import org.simantics.sysdyn.representation.Variable;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#NormalExpression")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/NormalExpression")\r
 public class NormalExpression extends Expression {\r
 \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasEquation")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasEquation")\r
     private String equation;\r
-      \r
+\r
     @Override\r
     public String getDeclaration(Variable variable) {\r
         return "    " + variable.getType() + " " + variable.getName() + ";\n";\r
@@ -19,5 +19,5 @@ public class NormalExpression extends Expression {
     public String getEquation(Variable variable) {\r
         return "    " + variable.getName() + " = " + equation + ";\n";\r
     }\r
-    \r
+\r
 }\r
index 26d5d09fa5cd5b8baeead303d323f855a9cfadd8..4b650367045eaf49d9d33ef2d1ff00d90e8244d4 100644 (file)
@@ -4,10 +4,10 @@ import org.simantics.objmap.annotations.GraphType;
 import org.simantics.objmap.annotations.RelatedValue;\r
 import org.simantics.sysdyn.representation.Variable;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#ParameterExpression")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/ParameterExpression")\r
 public class ParameterExpression extends Expression {\r
     \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasEquation")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasEquation")\r
     private String equation;\r
     \r
     @Override\r
index 5ab28c21e0c2de7bc05f4777c3875a5809f1eb99..ca7f4506b1dd3f4a25893aa63b95c99c3875682e 100644 (file)
@@ -5,12 +5,12 @@ import org.simantics.objmap.annotations.RelatedValue;
 import org.simantics.sysdyn.representation.Stock;\r
 import org.simantics.sysdyn.representation.Variable;\r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#StockExpression")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/StockExpression")\r
 public class StockExpression extends Expression {\r
-    \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasInitialEquation")\r
+\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasInitialEquation")\r
     private String initialEquation;\r
-    \r
+\r
     @Override\r
     public String getDeclaration(Variable variable) {\r
         Double value = null;\r
@@ -33,12 +33,12 @@ public class StockExpression extends Expression {
         b.append("    der(")\r
         .append(variable.getName())\r
         .append(") =");\r
-       for(Variable flow : ((Stock)variable).incomingFlows)\r
-           b.append("\n        + ").append(flow.getName());\r
-       for(Variable flow : ((Stock)variable).outgoingFlows)\r
-           b.append("\n        - ").append(flow.getName());\r
-       b.append(";\n");\r
-       return b.toString();\r
+        for(Variable flow : ((Stock)variable).incomingFlows)\r
+            b.append("\n        + ").append(flow.getName());\r
+        for(Variable flow : ((Stock)variable).outgoingFlows)\r
+            b.append("\n        - ").append(flow.getName());\r
+        b.append(";\n");\r
+        return b.toString();\r
     }\r
 \r
     @Override\r
index 56775723f229c6e9475ed5f60aa96b33718548ba..7179d6e8bd85e1888d093ac017e3d9aff8c0968a 100644 (file)
@@ -5,12 +5,12 @@ import org.simantics.objmap.annotations.RelatedValue;
 import org.simantics.sysdyn.representation.Variable;\r
 \r
 \r
-@GraphType("http://www.simantics.org/Sysdyn#WithLookupExpression")\r
+@GraphType("http://www.simantics.org/Sysdyn-1.0/WithLookupExpression")\r
 public class WithLookupExpression extends Expression {\r
 \r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasLookup")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasLookup")\r
     private String lookupTable;\r
-    @RelatedValue("http://www.simantics.org/Sysdyn#HasEquation")\r
+    @RelatedValue("http://www.simantics.org/Sysdyn-1.0/HasEquation")\r
     private String equation;\r
 \r
     @Override\r