- public static Set<Resource> walk(ReadGraph graph, Collection<Resource> resources, Set<Resource> exclusions, boolean ignoreVirtual) throws DatabaseException {
- ConsistsOfProcess process = new ConsistsOfProcess(graph, resources, exclusions, ignoreVirtual);
- return process.result;
+ public static Pair<List<ConsistsOfProcessEntry>,Set<Resource>> walk(ReadGraph graph, Collection<SeedSpec> specs, boolean ignoreVirtual) throws DatabaseException {
+ return walk(graph, null, specs, ignoreVirtual);
+ }
+
+ public static Pair<List<ConsistsOfProcessEntry>,Set<Resource>> walk(ReadGraph graph, ResourceMap<ExtentStatus> status, Collection<SeedSpec> specs, boolean ignoreVirtual) throws DatabaseException {
+
+ Collection<ConsistsOfProcessEntry> entries = new ArrayList<>();
+ for(SeedSpec r : specs) {
+ if(SeedSpecType.INTERNAL.equals(r.specType))
+ entries.add(new ConsistsOfProcessEntry(null, r.resource, true));
+ else
+ entries.add(new ConsistsOfProcessEntry(null, r.resource, false));
+ }
+ ConsistsOfProcess process = new ConsistsOfProcess(graph, status, entries, ignoreVirtual);
+ return Pair.make(process.result, process.childrenWithNoName);
+
+ }
+
+ static class ConsistsOfProcessEntry {
+ public ConsistsOfProcessEntry parent;
+ public Resource resource;
+ public boolean internal;
+ public boolean valid = true;
+ public String name = null;
+ ConsistsOfProcessEntry(ConsistsOfProcessEntry parent, Resource resource, boolean internal) {
+ this.parent = parent;
+ this.resource = resource;
+ this.internal = internal;
+ }