From: Hannu Niemistö Date: Wed, 24 May 2017 08:54:49 +0000 (+0300) Subject: Merge "StreamingTransferableGraphImportProcess assumes index root cluster set" into... X-Git-Tag: v1.28.0~3 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=80daffa62afed30f51a20b19989b670edbc1732c;hp=2aa4234f4f8dd5d976fb60725290a03c83231baa;p=simantics%2Fplatform.git Merge "StreamingTransferableGraphImportProcess assumes index root cluster set" into release/1.28.0 --- 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 c802f8b74..93131413f 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 @@ -339,6 +339,14 @@ public class StreamingTransferableGraphImportProcess implements TransferableGrap 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; + Resource indexRootClusterSetResource = rootLibrary; + if(support.isClusterSet(indexRoot)) { + indexRootClusterSetResource = indexRoot; + } else { + graph.setClusterSet4NewResource(rootLibrary); + graph.flushCluster(); + } + int indexRootCsHandle = builder.handle(indexRootClusterSetResource); for(int pos=0,index=0;index