public class ProxyVariables {
+ public static Variable tryToOwn(ReadGraph graph, Variable parent, Variable variable) {
+ if(variable instanceof ProxyVariableSupport) {
+ ProxyVariableSupport pvs = (ProxyVariableSupport)variable;
+ return pvs.attachTo(graph, parent);
+ }
+ return null;
+ }
+
+ public static Variable tryToOwnRenamed(ReadGraph graph, Variable parent, Variable variable, String name) {
+ if(variable instanceof ProxyVariableSupport) {
+ ProxyVariableSupport pvs = (ProxyVariableSupport)variable;
+ return pvs.attachToRenamed(graph, parent, name);
+ }
+ return null;
+ }
+
public static Variable inputVariable(ReadGraph graph, Variable context) throws DatabaseException {
Variable session = graph.syncRequest(new ProxySessionRequest(context));
if(session == null) return null;