dlPredicate = getDLPredicate(args[1]);
} catch (Exception e) {
m_debugger.getOutput().println(args[1]+" is invalid: "+e.getMessage());
}
if (dlPredicate!=null) {
ExtensionTable extensionTable=m_debugger.getTableau().getExtensionManager().getExtensionTable(dlPredicate.getArity()+1);
boolean[] bindings=new boolean[extensionTable.getArity()];
bindings[0]=true;
ExtensionTable.Retrieval retrieval=extensionTable.createRetrieval(bindings,ExtensionTable.View.TOTAL);
retrieval.getBindingsBuffer()[0]=dlPredicate;
loadFacts(facts,retrieval);
title="Assertions containing the predicate '"+m_debugger.getPrefixes().abbreviateIRI(dlPredicate.toString())+"'.";
}
else {
int nodeID;
try {
nodeID=Integer.parseInt(args[1]);
}
catch (NumberFormatException e) {
m_debugger.getOutput().println("Invalid ID of the node.");
return;
}
Node node=m_debugger.getTableau().getNode(nodeID);
if (node==null) {
m_debugger.getOutput().println("Node with ID '"+nodeID+"' not found.");
return;
}
for (ExtensionTable extensionTable : m_debugger.getTableau().getExtensionManager().getExtensionTables())
for (int position=0;position<extensionTable.getArity();position++) {
boolean[] bindings=new boolean[extensionTable.getArity()];
bindings[position]=true;
ExtensionTable.Retrieval retrieval=extensionTable.createRetrieval(bindings,ExtensionTable.View.TOTAL);
retrieval.getBindingsBuffer()[position]=node;
loadFacts(facts,retrieval);
}
title="Assertions containing node '"+node.getNodeID()+"'.";
}