1 package org.simantics.graph.db;
\r
3 import java.util.Collection;
\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
10 public interface IImportAdvisor2 extends IImportAdvisor {
\r
12 public static class RootInfo {
\r
15 public Resource resource;
\r
16 public RootInfo(Root root, String name, Resource resource) {
\r
19 this.resource = resource;
\r
24 * This switches target to another location
\r
26 void redirect(Resource temp);
\r
28 Resource getTarget();
\r
31 Collection<Resource> getRoots();
\r
33 Collection<RootInfo> getRootInfo();
\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