X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2FIImportAdvisor2.java;fp=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2FIImportAdvisor2.java;h=e7912ef6c4103c3338e4f3ee0cd914b75ac8de23;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/IImportAdvisor2.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/IImportAdvisor2.java new file mode 100644 index 000000000..e7912ef6c --- /dev/null +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/IImportAdvisor2.java @@ -0,0 +1,42 @@ +package org.simantics.graph.db; + +import java.util.Collection; + +import org.simantics.db.Resource; +import org.simantics.db.WriteOnlyGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.graph.representation.Root; + +public interface IImportAdvisor2 extends IImportAdvisor { + + public static class RootInfo { + public Root root; + public String name; + public Resource resource; + public RootInfo(Root root, String name, Resource resource) { + this.root = root; + this.name = name; + this.resource = resource; + } + } + + /* + * This switches target to another location + */ + void redirect(Resource temp); + + Resource getTarget(); + + @Deprecated + Collection getRoots(); + @Deprecated + Collection getRootInfo(); + + void beforeWrite(WriteOnlyGraph graph, TransferableGraphImporter process) throws DatabaseException; + void afterWrite(WriteOnlyGraph graph, TransferableGraphImporter process) throws DatabaseException; + boolean allowImmutableModifications(); + Resource createChild(WriteOnlyGraph graph, TransferableGraphImporter process, Resource parent, String name) throws DatabaseException; + Resource createChild(WriteOnlyGraph graph, TransferableGraphImporter process, Resource parent, Resource child, String name) throws DatabaseException; + Resource createRoot(WriteOnlyGraph graph, Root root, Resource resource) throws DatabaseException; + +}