- for(Identity id : TransferableGraphUtils.getRoots(graph)) {
- String name = "ROOT";
- ResourceInfo info = new ResourceInfo(true, name, id.resource);
- infos.put(id.resource, info);
- for(Identity child : getChildren(graph, id)) {
- ResourceInfo childInfo = recurseURI(graph, child, name);
- childInfo.newResource = true;
+// for(Identity id : TransferableGraphUtils.getRoots(graph)) {
+// String name = "ROOT";
+// ResourceInfo info = new ResourceInfo(true, name, id.resource);
+// infos.put(id.resource, info);
+// for(Identity child : getChildren(graph, id)) {
+// ResourceInfo childInfo = recurseURI(graph, child, name);
+// childInfo.newResource = true;
+// }
+// }
+ for(Identity id : graph.identities) {
+ if(id.definition instanceof Internal) {
+ Internal internal = (Internal)id.definition;
+ Identity parent = TransferableGraphUtils.getIdentity(graph, internal.parent);
+ if(parent.definition instanceof External) {
+ String name = "BASE";
+ ResourceInfo info = new ResourceInfo(true, name, id.resource);
+ info.aliasURI = TransferableGraphUtils.getURI(graph, id.resource);
+ info.newResource = true;
+ infos.put(id.resource, info);
+ for(Identity child : getChildren(graph, id)) {
+ recurseURI(graph, child, name);
+ }
+ }