From d26148afe7f72dad8eee04764a866b6bdd201c8e Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Wed, 14 Jun 2017 15:08:03 +0300 Subject: [PATCH] Fixed URI of the root resource in fail-safe import URIStringUtils.splitURI returns root URI in non-standard format, so fix it manually as a workaround. Otherwise ExternalEntities cannot be created under the root resource. refs #7299 Change-Id: Ie548eebba5c267617cb845df684b025b59c069f5 --- .../graph/db/StreamingTransferableGraphImportProcess.java | 4 ++++ 1 file changed, 4 insertions(+) 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 78c369f96..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 @@ -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 -- 2.43.2