\r
public CreateDependencyGraph(Resource root, int levels, boolean isInverted) {\r
this.root = root;\r
- this.nodes = new HashMap<Resource, Node>();\r
this.isInverted = isInverted; \r
this.levels = levels;\r
}\r
\r
@Override\r
public Graph perform(ReadGraph g) throws DatabaseException {\r
+ nodes = new HashMap<Resource, Node>();\r
Graph graph = new Graph();\r
graph.setRankdir("LR");\r
if (g.isInstanceOf(root, SysdynResource.getInstance(g).IndependentVariable)) {\r
Collection<Resource> dependencies = g.getObjects(r, headRelation);\r
Collection<Resource> dependants = new ArrayList<Resource>();\r
for(Resource d : dependencies) {\r
- Resource dependant = g.getSingleObject(d, tailRelation);\r
+ Resource dependant = g.getPossibleObject(d, tailRelation);\r
+ if(dependant == null)\r
+ continue;\r
if(!g.isInstanceOf(dependant, sr.IndependentVariable)) {\r
break;\r
}\r