]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphChildVariable.java
For PSaaS
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / variable / StandardGraphChildVariable.java
index b784754bfa69ce8187999cb78af598506552c45d..5ab9d50283cb0801a456a3ada386c366be7052f8 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,20 @@ 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;
+            }
+        };
+    }
        
 }