/** * starting point for walking. * * @throws SemanticException */ public void startWalking(Collection<Node> startNodes, HashMap<Node, Object> nodeOutput) throws SemanticException { toWalk.addAll(startNodes); while (toWalk.size() > 0) { Node nd = toWalk.remove(0); walk(nd); // Some walkers extending DefaultGraphWalker e.g. ForwardWalker // do not use opQueue and rely uniquely in the toWalk structure, // thus we store the results produced by the dispatcher here // TODO: rewriting the logic of those walkers to use opQueue if (nodeOutput != null && getDispatchedList().contains(nd)) { nodeOutput.put(nd, retMap.get(nd)); } } // Store the results produced by the dispatcher while (!opQueue.isEmpty()) { Node node = opQueue.poll(); if (nodeOutput != null && getDispatchedList().contains(node)) { nodeOutput.put(node, retMap.get(node)); } } }
/** * starting point for walking. * * @throws SemanticException */ public void startWalking(Collection<Node> startNodes, HashMap<Node, Object> nodeOutput) throws SemanticException { toWalk.addAll(startNodes); while (toWalk.size() > 0) { Node nd = toWalk.remove(0); walk(nd); // Some walkers extending DefaultGraphWalker e.g. ForwardWalker // do not use opQueue and rely uniquely in the toWalk structure, // thus we store the results produced by the dispatcher here // TODO: rewriting the logic of those walkers to use opQueue if (nodeOutput != null && getDispatchedList().contains(nd)) { nodeOutput.put(nd, retMap.get(nd)); } } // Store the results produced by the dispatcher while (!opQueue.isEmpty()) { Node node = opQueue.poll(); if (nodeOutput != null && getDispatchedList().contains(node)) { nodeOutput.put(node, retMap.get(node)); } } }
/** * starting point for walking. * * @throws SemanticException */ public void startWalking(Collection<Node> startNodes, HashMap<Node, Object> nodeOutput) throws SemanticException { toWalk.addAll(startNodes); while (toWalk.size() > 0) { Node nd = toWalk.remove(0); walk(nd); if (nodeOutput != null) { nodeOutput.put(nd, retMap.get(nd)); } } }
/** * starting point for walking. * * @throws SemanticException */ public void startWalking(Collection<Node> startNodes, HashMap<Node, Object> nodeOutput) throws SemanticException { toWalk.addAll(startNodes); while (toWalk.size() > 0) { Node nd = toWalk.remove(0); walk(nd); if (nodeOutput != null) { nodeOutput.put(nd, retMap.get(nd)); } } }