]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 package org.simantics.graph.db;\r
2 \r
3 import java.util.Collection;\r
4 \r
5 import org.simantics.db.Resource;\r
6 import org.simantics.db.WriteOnlyGraph;\r
7 import org.simantics.db.exception.DatabaseException;\r
8 import org.simantics.graph.representation.Root;\r
9 \r
10 public interface IImportAdvisor2 extends IImportAdvisor {\r
11 \r
12         public static class RootInfo {\r
13                 public Root root;\r
14                 public String name;\r
15                 public Resource resource;\r
16                 public RootInfo(Root root, String name, Resource resource) {\r
17                         this.root = root;\r
18                         this.name = name;\r
19                         this.resource = resource;\r
20                 }\r
21         }\r
22         \r
23         /*\r
24          * This switches target to another location\r
25          */\r
26         void redirect(Resource temp);\r
27         \r
28         Resource getTarget();\r
29         \r
30         @Deprecated\r
31         Collection<Resource> getRoots();\r
32         @Deprecated\r
33         Collection<RootInfo> getRootInfo();\r
34         \r
35     void beforeWrite(WriteOnlyGraph graph, TransferableGraphImporter process) throws DatabaseException;\r
36     void afterWrite(WriteOnlyGraph graph, TransferableGraphImporter process) throws DatabaseException;\r
37     boolean allowImmutableModifications();\r
38     Resource createChild(WriteOnlyGraph graph, TransferableGraphImporter process, Resource parent, String name) throws DatabaseException;\r
39     Resource createChild(WriteOnlyGraph graph, TransferableGraphImporter process, Resource parent, Resource child, String name) throws DatabaseException;\r
40         Resource createRoot(WriteOnlyGraph graph, Root root, Resource resource) throws DatabaseException;\r
41 \r
42 }\r