@Override
protected Variable resolveChild(ReadGraph graph, Variable variable, Resource resource) throws DatabaseException {
Collection<Resource> path = getRVIPath(graph, variable, resource);
- if(path == null) throw new MissingVariableException("Didn't find a variable related to " + resource + ".", resource);
- for(Resource r : path) variable = variable.browse(graph, r);
+ if (path == null)
+ throw new MissingVariableException("Didn't find a variable related to " + resource + ".", resource);
+ for (Resource r : path)
+ variable = variable.browse(graph, r);
return variable;
}
-
+
@Override
protected Variable resolveChild(ReadGraph graph, Variable variable, GuidRVIPart part) throws DatabaseException {
Collection<Resource> path = getRVIPath(graph, variable, part);
- if(path == null) throw new MissingVariableException("Didn't find a variable related to " + part + ".");
- for(Resource r : path) variable = variable.browse(graph, r);
+ if (path == null)
+ throw new MissingVariableException("Didn't find a variable related to " + part + ".", variable.getPossibleRepresents(graph));
+ for (Resource r : path)
+ variable = variable.browse(graph, r);
return variable;
}