retrieval.open();
while (!retrieval.afterLast()) {
Object atomicRoleObject=retrieval.getTupleBuffer()[0];
if (atomicRoleObject instanceof AtomicRole) {
AtomicRole atomicRole=(AtomicRole)retrieval.getTupleBuffer()[0];
Node toNode=(Node)retrieval.getTupleBuffer()[2];
Set<AtomicRole> set=outgoingEdges.get(toNode);
if (set==null) {
set=new TreeSet<AtomicRole>(RoleComparator.INSTANCE);
outgoingEdges.put(toNode,set);
}
set.add(atomicRole);
}
retrieval.next();
}
if (!outgoingEdges.isEmpty()) {
writer.println("-- Outgoing edges --------------------------------");
printEdgeMap(debugger,outgoingEdges,writer);
}
Map<Node,Set<AtomicRole>> incomingEdges=new TreeMap<Node,Set<AtomicRole>>(NodeComparator.INSTANCE);
retrieval=debugger.getTableau().getExtensionManager().getTernaryExtensionTable().createRetrieval(new boolean[] { false,false,true },ExtensionTable.View.TOTAL);
retrieval.getBindingsBuffer()[2]=node;
retrieval.open();
while (!retrieval.afterLast()) {
Object atomicRoleObject=retrieval.getTupleBuffer()[0];
if (atomicRoleObject instanceof AtomicRole) {
AtomicRole atomicRole=(AtomicRole)retrieval.getTupleBuffer()[0];
Node fromNode=(Node)retrieval.getTupleBuffer()[1];
Set<AtomicRole> set=incomingEdges.get(fromNode);
if (set==null) {
set=new TreeSet<AtomicRole>(RoleComparator.INSTANCE);
incomingEdges.put(fromNode,set);
}