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