From: Antti Villberg Date: Sat, 13 May 2017 18:33:37 +0000 (+0300) Subject: An action to show a pgraph for resources in ontologies X-Git-Tag: v1.29.0~49 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F22%2F522%2F2;p=simantics%2Fplatform.git An action to show a pgraph for resources in ontologies #7225 Change-Id: I358fc705d5a7afcb20edb6520019a3689a978cd7 --- diff --git a/bundles/org.simantics.db.layer0/adapters.xml b/bundles/org.simantics.db.layer0/adapters.xml index 13fbd87b2..5586b5fd1 100644 --- a/bundles/org.simantics.db.layer0/adapters.xml +++ b/bundles/org.simantics.db.layer0/adapters.xml @@ -140,6 +140,11 @@ class="org.simantics.db.layer0.adapter.impl.SharedOntologyCopyHandler"> + + + + + getExportMetadata() { @@ -2205,7 +2212,7 @@ public class ModelingUtils { } - public static void exportSharedOntology(ReadGraph graph, Resource library, String fileName, String format, int version) throws DatabaseException { + public static TransferableGraph1 exportSharedOntology(ReadGraph graph, Resource library, String fileName, String format, int version) throws DatabaseException { Layer0 L0 = Layer0.getInstance(graph); String name = graph.getRelatedValue(library, L0.HasName, Bindings.STRING); @@ -2217,7 +2224,7 @@ public class ModelingUtils { LibraryInfo info = new LibraryInfo(name, library, draft); try { - exportSharedOntology(new NullProgressMonitor(), graph, new File(fileName), format, version, info); + return exportSharedOntology(new NullProgressMonitor(), graph, fileName != null ? new File(fileName) : null, format, version, info); } catch (IOException e) { throw new DatabaseException(e); }