]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
For PSaaS
authorAntti Villberg <antti.villberg@semantum.fi>
Thu, 1 Nov 2018 07:05:29 +0000 (09:05 +0200)
committerAntti Villberg <antti.villberg@semantum.fi>
Thu, 1 Nov 2018 07:05:29 +0000 (09:05 +0200)
Change-Id: Ia475403cda4769be923c7fba4d180269cabca816

bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphChildVariable.java

index b784754bfa69ce8187999cb78af598506552c45d..eb68744b5524a04b3932e818ecb5da1889aa91c4 100644 (file)
@@ -24,7 +24,7 @@ import org.simantics.db.layer0.variable.Variables.Role;
 import org.simantics.layer0.Layer0;
 import org.simantics.simulator.variable.exceptions.NodeManagerException;
 
-public class StandardGraphChildVariable extends AbstractChildVariable {
+public class StandardGraphChildVariable extends AbstractChildVariable implements ProxyVariableSupport {
 
        /*
         * Extension points
@@ -335,5 +335,22 @@ public class StandardGraphChildVariable extends AbstractChildVariable {
     public Resource getPossiblePredicateResource(ReadGraph graph) throws DatabaseException {
        return null;
     }
-       
+
+    @Override
+    public Variable attachTo(ReadGraph graph, Variable parent) {
+        return new StandardGraphChildVariable(parent, node, resource);
+    }
+    
+    @Override
+    public Variable attachToRenamed(ReadGraph graph, Variable parent, String name) {
+        return new StandardGraphChildVariable(parent, node, resource) {
+
+            @Override
+            public String getName(ReadGraph graph) throws DatabaseException {
+                return name;
+            }
+            
+        };
+    }
+    
 }