* @param factory the query node factory.
* @return the abstract query tree.
*/
private static QueryRootNode createMatchAllNodesQuery(
QueryNodeFactory factory) {
QueryRootNode allNodesQueryNode = factory.createQueryRootNode();
PathQueryNode pathNode = factory.createPathQueryNode(allNodesQueryNode);
LocationStepQueryNode lsNode = factory.createLocationStepQueryNode(pathNode);
lsNode.setNameTest(null);
lsNode.setIncludeDescendants(true);
pathNode.addPathStep(lsNode);
pathNode.setAbsolute(true);
allNodesQueryNode.setLocationNode(pathNode);
return allNodesQueryNode;
}