}
}
Vector<DatabaseElementNode> outputNodes = new Vector<DatabaseElementNode>();
for (SubTreeSelectStatement stmt : _statements) {
DatabaseElementNode node = nodeSet.get(stmt.targetPath().variableName());
QueryOutputNodeCollector nodeMarker = null;
if(stmt.label() == null)
nodeMarker = new QueryOutputNodeCollector(outputNodes);
else
try {
nodeMarker = new QueryOutputNodeCollector(outputNodes, _resultSchema.find(stmt.label()));
} catch (WikiException e) {
e.printStackTrace();
}
new RelativeXPathConsumer().consume(node, stmt.targetPath(), nodeMarker);
}
if (outputNodes.size() > 0) {
TimeSequence timestamp = null;
for (int iNode = 0; iNode < outputNodes.size(); iNode++) {
DatabaseElementNode node = outputNodes.get(iNode);
if (timestamp != null) {
timestamp = timestamp.union(node.getTimestamp());
} else {
timestamp = node.getTimestamp();
}
}
DatabaseGroupNode result = new ResultGroupNode(_resultSchema, timestamp);
for (DatabaseElementNode node : outputNodes) {
result.children().add(node);