]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph.db/src/org/simantics/graph/db/IImportAdvisor2.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.graph.db / src / org / simantics / graph / db / IImportAdvisor2.java
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 (file)
index 0000000..e7912ef
--- /dev/null
@@ -0,0 +1,42 @@
+package org.simantics.graph.db;\r
+\r
+import java.util.Collection;\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteOnlyGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.graph.representation.Root;\r
+\r
+public interface IImportAdvisor2 extends IImportAdvisor {\r
+\r
+       public static class RootInfo {\r
+               public Root root;\r
+               public String name;\r
+               public Resource resource;\r
+               public RootInfo(Root root, String name, Resource resource) {\r
+                       this.root = root;\r
+                       this.name = name;\r
+                       this.resource = resource;\r
+               }\r
+       }\r
+       \r
+       /*\r
+        * This switches target to another location\r
+        */\r
+       void redirect(Resource temp);\r
+       \r
+       Resource getTarget();\r
+       \r
+       @Deprecated\r
+       Collection<Resource> getRoots();\r
+       @Deprecated\r
+       Collection<RootInfo> getRootInfo();\r
+       \r
+    void beforeWrite(WriteOnlyGraph graph, TransferableGraphImporter process) throws DatabaseException;\r
+    void afterWrite(WriteOnlyGraph graph, TransferableGraphImporter process) throws DatabaseException;\r
+    boolean allowImmutableModifications();\r
+    Resource createChild(WriteOnlyGraph graph, TransferableGraphImporter process, Resource parent, String name) throws DatabaseException;\r
+    Resource createChild(WriteOnlyGraph graph, TransferableGraphImporter process, Resource parent, Resource child, String name) throws DatabaseException;\r
+       Resource createRoot(WriteOnlyGraph graph, Root root, Resource resource) throws DatabaseException;\r
+\r
+}\r