import org.simantics.db.request.Read;\r
import org.simantics.db.Session;\r
import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.service.QueryControl;\r
\r
public class InteropResource {\r
\r
public final Resource HasGeneratorID;\r
public final Resource HasGeneratorID_Inverse;\r
public final Resource HasImportData;\r
+ public final Resource HasInputResource;\r
public final Resource HasSource;\r
public final Resource INodeType;\r
public final Resource ImportDataOf;\r
public static final String HasGeneratorID = "http://www.simantics.org/Interop-1.0/HasGeneratorID";\r
public static final String HasGeneratorID_Inverse = "http://www.simantics.org/Interop-1.0/HasGeneratorID/Inverse";\r
public static final String HasImportData = "http://www.simantics.org/Interop-1.0/HasImportData";\r
+ public static final String HasInputResource = "http://www.simantics.org/Interop-1.0/HasInputResource";\r
public static final String HasSource = "http://www.simantics.org/Interop-1.0/HasSource";\r
public static final String INodeType = "http://www.simantics.org/Interop-1.0/INodeType";\r
public static final String ImportDataOf = "http://www.simantics.org/Interop-1.0/ImportDataOf";\r
HasGeneratorID = getResourceOrNull(graph, URIs.HasGeneratorID);\r
HasGeneratorID_Inverse = getResourceOrNull(graph, URIs.HasGeneratorID_Inverse);\r
HasImportData = getResourceOrNull(graph, URIs.HasImportData);\r
+ HasInputResource = getResourceOrNull(graph, URIs.HasInputResource);\r
HasSource = getResourceOrNull(graph, URIs.HasSource);\r
INodeType = getResourceOrNull(graph, URIs.INodeType);\r
ImportDataOf = getResourceOrNull(graph, URIs.ImportDataOf);\r
Session session = graph.getSession();\r
InteropResource ret = session.peekService(InteropResource.class);\r
if(ret == null) {\r
- ret = new InteropResource(graph);\r
+ QueryControl qc = graph.getService(QueryControl.class);\r
+ ret = new InteropResource(qc.getIndependentGraph(graph));\r
session.registerService(InteropResource.class, ret);\r
}\r
return ret;\r
if(ret == null) {\r
ret = session.syncRequest(new Read<InteropResource>() {\r
public InteropResource perform(ReadGraph graph) throws DatabaseException {\r
- return new InteropResource(graph);\r
+ QueryControl qc = graph.getService(QueryControl.class);\r
+ return new InteropResource(qc.getIndependentGraph(graph));\r
}\r
});\r
session.registerService(InteropResource.class, ret);\r