X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2FStreamingTransferableGraphImportProcess.java;h=a043e59f74ab8772d89d6aea2e5620d4bfbb68a0;hb=refs%2Fchanges%2F97%2F197%2F1;hp=3d4b78977af148de732ce03080e329e74d760c3f;hpb=54b3e007b23f516cb3916fd139344b2780e105e8;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java index 3d4b78977..a043e59f7 100644 --- a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java @@ -37,6 +37,7 @@ import org.simantics.db.VirtualGraph; import org.simantics.db.WriteOnlyGraph; import org.simantics.db.common.WriteBindings; import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener; +import org.simantics.db.common.request.PossibleIndexRoot; import org.simantics.db.common.uri.UnescapedChildMapOfResource; import org.simantics.db.common.utils.Logger; import org.simantics.db.exception.DatabaseException; @@ -210,7 +211,9 @@ public class StreamingTransferableGraphImportProcess implements TransferableGrap void prepare(ReadGraph graph) throws Exception { -// indexRoot = graph.syncRequest(new PossibleIndexRoot(((IImportAdvisor2)advisor).getTarget())); + Resource target = advisor.getTarget(); + if(target != null) + indexRoot = graph.syncRequest(new PossibleIndexRoot(target)); findBuiltins(graph); readIdentities(graph); @@ -316,7 +319,7 @@ public class StreamingTransferableGraphImportProcess implements TransferableGrap return resourceUtil.mayHaveResource(type); } - void findClusterSet(WriteOnlyGraph graph, Resource rootLibrary, Resource indexRoot, int[] clustering, int[] clusterSets, long[] clusters, int id) throws DatabaseException { + void findClusterSet(WriteOnlyGraph graph, Resource rootLibrary, int[] clustering, int[] clusterSets, long[] clusters, int id) throws DatabaseException { ClusteringSupport support = graph.getService(ClusteringSupport.class); if(id == Extensions.ROOT_LIBRARY_CLUSTER_SET || id == Extensions.INDEX_ROOT_CLUSTER_SET) return; for(int pos=0,index=0;index