public class NodesRequest extends VariableRead<Set<Variable>> {
+ public static boolean PROFILE = false;
+
public NodesRequest(Variable var) {
super(var);
}
@Override
public Set<Variable> perform(ReadGraph graph) throws DatabaseException {
-
+
long s = System.nanoTime();
StructuralResource2.getInstance(graph);
if(variable == null)
return Collections.emptySet();
-
+
Set<Variable> nodes = new THashSet<Variable>();
Collection<Variable> children = graph.syncRequest(new VariableChildren(variable));
for(Variable child : children) {
nodes.addAll(childNodes);
}
- if(DocumentRequest.PROFILE) {
+ if(PROFILE) {
long dura = System.nanoTime()-s;
- System.err.println("NodesRequest " + System.identityHashCode(this) + " " + variable.getURI(graph) + " in " + 1e-6*dura + "ms.");
+ System.err.println("NodesRequest " + System.identityHashCode(this) + " in " + 1e-6*dura + "ms. " + variable.getURI(graph));
}
return nodes;