From: Antti Villberg Date: Tue, 23 May 2017 11:00:44 +0000 (+0300) Subject: StreamingTransferableGraphImportProcess assumes index root cluster set X-Git-Tag: v1.28.0~3^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=b8403a3565fc946a389ea509ef8fd4067610fa00;p=simantics%2Fplatform.git StreamingTransferableGraphImportProcess assumes index root cluster set refs #7240 Change-Id: I32ef3d78a8c278849fa6a44052a85e61510a72f5 --- 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