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