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=4894467e3d1260aa25d4239349942542000ede22;hb=d26148afe7f72dad8eee04764a866b6bdd201c8e;hp=754ae61233f1e2b36460801a2743495b967af439;hpb=8aa0b1dd8b4ddd5d14e18c79d236c58decbaddcd;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 754ae6123..4894467e3 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 @@ -289,7 +289,7 @@ public class StreamingTransferableGraphImportProcess implements TransferableGrap 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)) { + if(indexRoot != null && support.isClusterSet(indexRoot)) { indexRootClusterSetResource = indexRoot; } else { graph.setClusterSet4NewResource(rootLibrary); @@ -339,6 +339,10 @@ public class StreamingTransferableGraphImportProcess implements TransferableGrap Collections.sort(missing); for(String uri : missing) { String[] parts = URIStringUtils.splitURI(uri); + // URIStringUtils.splitURI returns root URI in non-standard format, so fix it manually as a workaround + if (parts[0].equals("http://")) { + parts[0] = "http:/"; + } Resource parent = resolvedParents.get(parts[0]); // TODO: proper exception message