]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Adding org.simantics.district.geotools plugin dev
authorjsimomaa <jani.simomaa@gmail.com>
Tue, 13 Jun 2017 08:48:54 +0000 (11:48 +0300)
committerjsimomaa <jani.simomaa@gmail.com>
Tue, 13 Jun 2017 08:48:54 +0000 (11:48 +0300)
Change-Id: Iacc44ac5435593c334fa208c40d79f07572c69ef

23 files changed:
org.simantics.district.geotools/.classpath [new file with mode: 0644]
org.simantics.district.geotools/.project [new file with mode: 0644]
org.simantics.district.geotools/META-INF/MANIFEST.MF [new file with mode: 0644]
org.simantics.district.geotools/build.properties [new file with mode: 0644]
org.simantics.district.geotools/lib/GeographicLib-Java-1.44.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/commons-pool-1.5.4.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/core-0.26.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/gt-epsg-hsql-16.0.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/gt-metadata-16.0.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/gt-opengis-16.0.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/gt-referencing-16.0.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/hsqldb-2.3.4.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/jai_core-1.1.3.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/jgridshift-1.0.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/jsr-275-1.0-beta-2.jar [new file with mode: 0644]
org.simantics.district.geotools/lib/jts-1.13.jar [new file with mode: 0644]
org.simantics.district.geotools/src/org/simantics/district/geotools/Activator.java [new file with mode: 0644]
org.simantics.district.network.ontology/graph.tg
org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph
org.simantics.district.network.ontology/src/org/simantics/district/network/ontology/DistrictNetworkResource.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/function/Functions.java
org.simantics.district.network.ui/src/org/simantics/district/network/ui/participants/DNTranslateMode.java
org.simantics.district.network/src/org/simantics/district/network/DistrictNetworkUtil.java

diff --git a/org.simantics.district.geotools/.classpath b/org.simantics.district.geotools/.classpath
new file mode 100644 (file)
index 0000000..b7283c7
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry exported="true" kind="lib" path="lib/hsqldb-2.3.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/gt-epsg-hsql-16.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/core-0.26.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/GeographicLib-Java-1.44.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/gt-metadata-16.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/gt-opengis-16.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/gt-referencing-16.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jai_core-1.1.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jgridshift-1.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jsr-275-1.0-beta-2.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/jts-1.13.jar"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.simantics.district.geotools/.project b/org.simantics.district.geotools/.project
new file mode 100644 (file)
index 0000000..d564a79
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.simantics.district.geotools</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.simantics.district.geotools/META-INF/MANIFEST.MF b/org.simantics.district.geotools/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..f8eee2d
--- /dev/null
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Simantics Geotools
+Bundle-SymbolicName: org.simantics.district.geotools
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.simantics.district.geotools.Activator
+Require-Bundle: org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: lib/commons-pool-1.5.4.jar,
+ lib/core-0.26.jar,
+ lib/GeographicLib-Java-1.44.jar,
+ lib/gt-metadata-16.0.jar,
+ lib/gt-opengis-16.0.jar,
+ lib/gt-referencing-16.0.jar,
+ lib/jai_core-1.1.3.jar,
+ lib/jgridshift-1.0.jar,
+ lib/jsr-275-1.0-beta-2.jar,
+ lib/jts-1.13.jar,
+ .,
+ lib/gt-epsg-hsql-16.0.jar,
+ lib/hsqldb-2.3.4.jar
+Export-Package: org.geotools.geometry,
+ org.geotools.referencing,
+ org.opengis.geometry,
+ org.opengis.referencing,
+ org.opengis.referencing.crs,
+ org.opengis.referencing.operation
diff --git a/org.simantics.district.geotools/build.properties b/org.simantics.district.geotools/build.properties
new file mode 100644 (file)
index 0000000..7a0700c
--- /dev/null
@@ -0,0 +1,16 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               lib/commons-pool-1.5.4.jar,\
+               lib/core-0.26.jar,\
+               lib/GeographicLib-Java-1.44.jar,\
+               lib/gt-metadata-16.0.jar,\
+               lib/gt-opengis-16.0.jar,\
+               lib/gt-referencing-16.0.jar,\
+               lib/jai_core-1.1.3.jar,\
+               lib/jgridshift-1.0.jar,\
+               lib/jsr-275-1.0-beta-2.jar,\
+               lib/jts-1.13.jar,\
+               lib/gt-epsg-hsql-16.0.jar,\
+               lib/hsqldb-2.3.4.jar
diff --git a/org.simantics.district.geotools/lib/GeographicLib-Java-1.44.jar b/org.simantics.district.geotools/lib/GeographicLib-Java-1.44.jar
new file mode 100644 (file)
index 0000000..338ca8e
Binary files /dev/null and b/org.simantics.district.geotools/lib/GeographicLib-Java-1.44.jar differ
diff --git a/org.simantics.district.geotools/lib/commons-pool-1.5.4.jar b/org.simantics.district.geotools/lib/commons-pool-1.5.4.jar
new file mode 100644 (file)
index 0000000..43edf99
Binary files /dev/null and b/org.simantics.district.geotools/lib/commons-pool-1.5.4.jar differ
diff --git a/org.simantics.district.geotools/lib/core-0.26.jar b/org.simantics.district.geotools/lib/core-0.26.jar
new file mode 100644 (file)
index 0000000..9452f17
Binary files /dev/null and b/org.simantics.district.geotools/lib/core-0.26.jar differ
diff --git a/org.simantics.district.geotools/lib/gt-epsg-hsql-16.0.jar b/org.simantics.district.geotools/lib/gt-epsg-hsql-16.0.jar
new file mode 100644 (file)
index 0000000..47c0e74
Binary files /dev/null and b/org.simantics.district.geotools/lib/gt-epsg-hsql-16.0.jar differ
diff --git a/org.simantics.district.geotools/lib/gt-metadata-16.0.jar b/org.simantics.district.geotools/lib/gt-metadata-16.0.jar
new file mode 100644 (file)
index 0000000..cb3445c
Binary files /dev/null and b/org.simantics.district.geotools/lib/gt-metadata-16.0.jar differ
diff --git a/org.simantics.district.geotools/lib/gt-opengis-16.0.jar b/org.simantics.district.geotools/lib/gt-opengis-16.0.jar
new file mode 100644 (file)
index 0000000..7cedaf5
Binary files /dev/null and b/org.simantics.district.geotools/lib/gt-opengis-16.0.jar differ
diff --git a/org.simantics.district.geotools/lib/gt-referencing-16.0.jar b/org.simantics.district.geotools/lib/gt-referencing-16.0.jar
new file mode 100644 (file)
index 0000000..360d84e
Binary files /dev/null and b/org.simantics.district.geotools/lib/gt-referencing-16.0.jar differ
diff --git a/org.simantics.district.geotools/lib/hsqldb-2.3.4.jar b/org.simantics.district.geotools/lib/hsqldb-2.3.4.jar
new file mode 100644 (file)
index 0000000..71d39c3
Binary files /dev/null and b/org.simantics.district.geotools/lib/hsqldb-2.3.4.jar differ
diff --git a/org.simantics.district.geotools/lib/jai_core-1.1.3.jar b/org.simantics.district.geotools/lib/jai_core-1.1.3.jar
new file mode 100644 (file)
index 0000000..b29b8ee
Binary files /dev/null and b/org.simantics.district.geotools/lib/jai_core-1.1.3.jar differ
diff --git a/org.simantics.district.geotools/lib/jgridshift-1.0.jar b/org.simantics.district.geotools/lib/jgridshift-1.0.jar
new file mode 100644 (file)
index 0000000..d9b8d32
Binary files /dev/null and b/org.simantics.district.geotools/lib/jgridshift-1.0.jar differ
diff --git a/org.simantics.district.geotools/lib/jsr-275-1.0-beta-2.jar b/org.simantics.district.geotools/lib/jsr-275-1.0-beta-2.jar
new file mode 100644 (file)
index 0000000..68e19aa
Binary files /dev/null and b/org.simantics.district.geotools/lib/jsr-275-1.0-beta-2.jar differ
diff --git a/org.simantics.district.geotools/lib/jts-1.13.jar b/org.simantics.district.geotools/lib/jts-1.13.jar
new file mode 100644 (file)
index 0000000..bbaa20b
Binary files /dev/null and b/org.simantics.district.geotools/lib/jts-1.13.jar differ
diff --git a/org.simantics.district.geotools/src/org/simantics/district/geotools/Activator.java b/org.simantics.district.geotools/src/org/simantics/district/geotools/Activator.java
new file mode 100644 (file)
index 0000000..eeb057e
--- /dev/null
@@ -0,0 +1,30 @@
+package org.simantics.district.geotools;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+       private static BundleContext context;
+
+       static BundleContext getContext() {
+               return context;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext bundleContext) throws Exception {
+               Activator.context = bundleContext;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext bundleContext) throws Exception {
+               Activator.context = null;
+       }
+
+}
index ad5ff83b613216efd7c0fdfb2ce87698582b5da9..e6067186e4cfb139dea3895d189160900103c90a 100644 (file)
Binary files a/org.simantics.district.network.ontology/graph.tg and b/org.simantics.district.network.ontology/graph.tg differ
index a4144a808f895333c6ef14b09fd21fb8bc564048..63c5f1cc0e771c0f66cf5f7415dc1f1941af6643 100644 (file)
@@ -50,6 +50,11 @@ DN.MappingParameterType <T SEL.GenericParameterType
 DN.HasMapping <R L0.HasProperty : DN.MappingParameterType
     L0.HasLabel "Mapping"
 
+DN.Edge.HasLength <R L0.HasProperty : SEL.GenericParameterType
+    L0.HasLabel "Length"
+    L0.HasRange L0.Double
+    L0.readOnly true
+
 DN.Edge.HasDiameter <R L0.HasProperty : SEL.GenericParameterType
     L0.HasLabel "Diameter"
     L0.HasRange L0.Double
@@ -146,7 +151,7 @@ ACTIONS = DN.Actions : L0.Library
 
 ACTIONS.NewDNDiagram : MOD.NewComposite
     MOD.NewComposite.HasCompositeType DN.Composite
-    MOD.NewComposite.HasDefaultName "NewDNComposite"
+    MOD.NewComposite.HasDefaultName "NewNetworkDiagram"
 
 IMAGES = DN.Images : L0.Library
 
index 8ac781ba9057509ba23ce50cc664f332ea05c686..f75f51d1820adbb78f921baa5a9fa689df87da02 100644 (file)
@@ -27,6 +27,8 @@ public class DistrictNetworkResource {
     public final Resource EdgeMappingParameterType;
     public final Resource Edge_HasDiameter;
     public final Resource Edge_HasDiameter_Inverse;
+    public final Resource Edge_HasLength;
+    public final Resource Edge_HasLength_Inverse;
     public final Resource Edge_HasOuterDiameter;
     public final Resource Edge_HasOuterDiameter_Inverse;
     public final Resource Functions;
@@ -102,6 +104,8 @@ public class DistrictNetworkResource {
         public static final String EdgeMappingParameterType = "http://www.simantics.org/DistrictNetwork-1.0/EdgeMappingParameterType";
         public static final String Edge_HasDiameter = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasDiameter";
         public static final String Edge_HasDiameter_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasDiameter/Inverse";
+        public static final String Edge_HasLength = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasLength";
+        public static final String Edge_HasLength_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasLength/Inverse";
         public static final String Edge_HasOuterDiameter = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasOuterDiameter";
         public static final String Edge_HasOuterDiameter_Inverse = "http://www.simantics.org/DistrictNetwork-1.0/Edge/HasOuterDiameter/Inverse";
         public static final String Functions = "http://www.simantics.org/DistrictNetwork-1.0/Functions";
@@ -187,6 +191,8 @@ public class DistrictNetworkResource {
         EdgeMappingParameterType = getResourceOrNull(graph, URIs.EdgeMappingParameterType);
         Edge_HasDiameter = getResourceOrNull(graph, URIs.Edge_HasDiameter);
         Edge_HasDiameter_Inverse = getResourceOrNull(graph, URIs.Edge_HasDiameter_Inverse);
+        Edge_HasLength = getResourceOrNull(graph, URIs.Edge_HasLength);
+        Edge_HasLength_Inverse = getResourceOrNull(graph, URIs.Edge_HasLength_Inverse);
         Edge_HasOuterDiameter = getResourceOrNull(graph, URIs.Edge_HasOuterDiameter);
         Edge_HasOuterDiameter_Inverse = getResourceOrNull(graph, URIs.Edge_HasOuterDiameter_Inverse);
         Functions = getResourceOrNull(graph, URIs.Functions);
index 627de3a62171b46eebe4b2407edb3285b5da5d73..b6132d20146965e08432bb513c1b3924f3c0322b 100644 (file)
@@ -52,6 +52,7 @@ import org.simantics.modeling.ModelingResources;
 import org.simantics.modeling.ModelingUtils;
 import org.simantics.modeling.adapters.NewCompositeActionFactory;
 import org.simantics.modeling.typicals.TypicalUtil;
+import org.simantics.operation.Layer0X;
 import org.simantics.scl.reflection.annotations.SCLValue;
 import org.simantics.ui.workbench.action.DefaultActions;
 import org.simantics.utils.ui.SWTUtils;
@@ -435,6 +436,10 @@ public class Functions {
                                 graph.claim(diagram, DN.EdgeDefaultMapping, dialog.getDefaultEdgeMapping());
                                 graph.claim(diagram, DN.VertexDefaultMapping, dialog.getDefaultVertexMapping());
                                 graph.claim(diagram, DN.HasSpatialRefSystem, dialog.getCRS());
+                                
+                                // Generated name prefix from composite name
+                                String compositeName = graph.getRelatedValue2(composite, Layer0.getInstance(graph).HasName, Bindings.STRING);
+                                graph.claimLiteral(diagram, Layer0X.getInstance(graph).HasGeneratedNamePrefix, "N" + compositeName.substring(compositeName.length() - 1, compositeName.length()));
                             }
                         });
                         DefaultActions.asyncPerformDefaultAction(Simantics.getSession(), composite, false, false, true);
index 8603add13e995f670265ec0845abfe2476210e84..9132fa2fd2133b5fc8158a6920ff5a040af9eefc 100644 (file)
@@ -2,7 +2,6 @@ package org.simantics.district.network.ui.participants;
 
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
 import java.util.ArrayList;
 import java.util.Collection;
 
@@ -17,13 +16,10 @@ import org.simantics.diagram.elements.ElementTransforms.TransformedObject;
 import org.simantics.diagram.stubs.DiagramResource;
 import org.simantics.district.network.ModelledCRS;
 import org.simantics.district.network.ontology.DistrictNetworkResource;
-import org.simantics.district.network.ui.adapters.DistrictNetworkVertexElement;
-import org.simantics.district.network.ui.nodes.DistrictNetworkVertexNode;
 import org.simantics.g2d.canvas.Hints;
 import org.simantics.g2d.diagram.participant.pointertool.TranslateMode;
 import org.simantics.g2d.element.ElementUtils;
 import org.simantics.g2d.element.IElement;
-import org.simantics.g2d.element.handler.Move;
 
 public class DNTranslateMode extends TranslateMode {
 
@@ -33,13 +29,6 @@ public class DNTranslateMode extends TranslateMode {
     
     @Override
     protected boolean commit() {
-        for (IElement el : elementsToReallyTranslate) {
-            Move move = el.getElementClass().getAtMostOneItemOfClass(Move.class);
-            if (move != null) {
-                Point2D oldPos = move.getPosition(el);
-                move.moveTo(el, oldPos.getX() + dx, oldPos.getY() + dy);
-            }
-        }
         try {
             Simantics.getSession().syncRequest(new WriteRequest() {
                 @Override
@@ -49,20 +38,23 @@ public class DNTranslateMode extends TranslateMode {
                     DiagramResource DIA = DiagramResource.getInstance(graph);
                     for (IElement e : elementsToReallyTranslate) {
                         
-                        DistrictNetworkVertexNode node = e.getHint(DistrictNetworkVertexElement.KEY_DN_VERTEX_NODE);
-                        Rectangle2D bounds = node.getBounds();
                         
                         Object obj = ElementUtils.getObject(e);
                         if (obj instanceof Resource) {
+                            
                             Resource res = (Resource) obj;
+                            
+                            // Read current location from graph
+                            double[] currentCoords = graph.getRelatedValue2(res, DIA.HasLocation);
+                            
+                            double x = ModelledCRS.longitudeToX(currentCoords[0]);
+                            double y = ModelledCRS.latitudeToY(currentCoords[1]);
+                                    
                             AffineTransform at = ElementUtils.getLocalTransform(e, new AffineTransform());
                             if (graph.isInstanceOf(res, DN.Vertex)) {
                                 
-                                double x = at.getTranslateX();
-                                double y = at.getTranslateY();
-
-                                double lat = ModelledCRS.yToLatitude(y / at.getScaleY());
-                                double lon = ModelledCRS.xToLongitude(x / at.getScaleX());
+                                double lat = ModelledCRS.yToLatitude(y + (dy / at.getScaleY()));
+                                double lon = ModelledCRS.xToLongitude(x + (dx / at.getScaleX()));
                                 
                                 // write to db
                                 double[] coords = new double[] { lon, lat };
index 6155bf6fade9face371879bcd4ed246094991a3e..9f6f46fa6de2efc150e4b962e0d62e265c25e321 100644 (file)
@@ -10,12 +10,12 @@ import org.simantics.db.WriteGraph;
 import org.simantics.db.common.utils.OrderedSetUtils;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.diagram.stubs.DiagramResource;
-import org.simantics.diagram.synchronization.graph.AddElement;
 import org.simantics.diagram.synchronization.graph.DiagramGraphUtil;
 import org.simantics.diagram.synchronization.graph.layer.GraphLayer;
 import org.simantics.diagram.synchronization.graph.layer.IGraphLayerUtil;
 import org.simantics.district.network.ontology.DistrictNetworkResource;
 import org.simantics.layer0.Layer0;
+import org.simantics.operation.Layer0X;
 
 public class DistrictNetworkUtil {
 
@@ -32,7 +32,7 @@ public class DistrictNetworkUtil {
         OrderedSetUtils.add(graph, composite, edge);
         graph.claim(composite, L0.ConsistsOf, L0.PartOf, edge);
         
-        AddElement.claimFreshElementName(graph, composite, edge);
+        claimFreshElementName(graph, composite, edge);
         return edge;
     }
     
@@ -54,7 +54,7 @@ public class DistrictNetworkUtil {
         OrderedSetUtils.add(graph, composite, vertex);
         graph.claim(composite, L0.ConsistsOf, L0.PartOf, vertex);
         
-        AddElement.claimFreshElementName(graph, composite, vertex);
+        claimFreshElementName(graph, composite, vertex);
         
         // We need to put GraphLayer to newLayers so...
         for (Resource layer : graph.getObjects(composite, DiagramResource.getInstance(graph).HasLayer)) {
@@ -89,6 +89,8 @@ public class DistrictNetworkUtil {
                 graph.claim(endVertexEdge, DN.HasEndVertex, master);
             }
             OrderedSetUtils.remove(graph, composite, slave);
+            // Remove ConsistsOf statement
+            graph.deny(composite, Layer0.getInstance(graph).ConsistsOf, slave);
         }
         return master;
     }
@@ -109,4 +111,21 @@ public class DistrictNetworkUtil {
         
         return crsClass.calculateDistance(startCoords, endCoords);
     }
+    
+    public static final String claimFreshElementName(WriteGraph graph, Resource diagram, Resource element) throws DatabaseException {
+        Layer0 L0 = Layer0.getInstance(graph);
+        DiagramResource DIA = DiagramResource.getInstance(graph);
+        // Get name prefix from diagram
+        String namePrefix = graph.getPossibleRelatedValue2(diagram, Layer0X.getInstance(graph).HasGeneratedNamePrefix);
+        if (namePrefix == null)
+            namePrefix = "";
+        // Give running name to element and increment the counter attached to the diagram.
+        Long l = graph.getPossibleRelatedValue(diagram, DIA.HasModCount, Bindings.LONG);
+        if (l == null)
+            l = Long.valueOf(0L);
+        String name = namePrefix + l.toString();
+        graph.claimLiteral(element, L0.HasName, name, Bindings.STRING);
+        graph.claimLiteral(diagram, DIA.HasModCount, ++l, Bindings.LONG);
+        return name;
+    }
 }