X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2FTransferableGraphs.java;h=7b1a177045a0f4537299282f7a07c7e50fc8c32c;hb=75eeab9e5966da1373b5f5ca151f76662796bf11;hp=2b93df74dceeb0fed0b3f0c871a62fe043968d8a;hpb=69d8f2b115a832560eca0d56903c8977178b71ab;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java index 2b93df74d..7b1a17704 100644 --- a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java @@ -182,10 +182,15 @@ public class TransferableGraphs { } public static ImportResult importGraph1(Session session, VirtualGraph vg, final TransferableGraphSource tg, IImportAdvisor advisor_, TGStatusMonitor monitor) throws DatabaseException { + return importGraph1(session, vg, tg, advisor_, monitor, null); + } + + public static ImportResult importGraph1(Session session, VirtualGraph vg, final TransferableGraphSource tg, IImportAdvisor advisor_, TGStatusMonitor monitor, Boolean failOnMissing) throws DatabaseException { final IImportAdvisor2 advisor = (advisor_ instanceof IImportAdvisor2) ? ((IImportAdvisor2)advisor_) : new WrapperAdvisor(advisor_); - final StreamingTransferableGraphImportProcess process = new StreamingTransferableGraphImportProcess(session, vg, tg, advisor, monitor); + final StreamingTransferableGraphImportProcess process = failOnMissing == null ? new StreamingTransferableGraphImportProcess(session, vg, tg, advisor, monitor) + : new StreamingTransferableGraphImportProcess(session, vg, tg, advisor, monitor, failOnMissing); session.syncRequest(new ReadRequest() { @Override public void run(ReadGraph graph) throws DatabaseException {