/** * Tests if this node matches the given test. Attribute nodes are text * nodes, too, because they can contain a value. * * @param test the test object * @return a flag if this node corresponds to the test */ @Override public boolean testNode(final NodeTest test) { if (test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_TEXT) { return true; } return super.testNode(test); }
/** * Tests if this node matches the given test. Configuration nodes are text * nodes, too because they can contain a value. * * @param test the test object * @return a flag if this node corresponds to the test */ @Override public boolean testNode(final NodeTest test) { if (test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_TEXT) { return true; } return super.testNode(test); }
public boolean testNode(NodeTest nodeTest) { return getValuePointer().testNode(nodeTest); }
public boolean testNode(NodeTest nodeTest) { return getValuePointer().testNode(nodeTest); }
/** * Tests if this node matches the given test. Configuration nodes are text * nodes, too because they can contain a value. * * @param test the test object * @return a flag if this node corresponds to the test */ @Override public boolean testNode(NodeTest test) { if (test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_TEXT) { return true; } return super.testNode(test); } }
/** * Tests if this node matches the given test. Configuration nodes are text * nodes, too because they can contain a value. * * @param test the test object * @return a flag if this node corresponds to the test */ @Override public boolean testNode(NodeTest test) { if (test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_TEXT) { return true; } return super.testNode(test); } }
public boolean nextNode() { if (!setStarted) { setStarted = true; currentNodePointer = parentContext.getCurrentNodePointer(); if (includeSelf && currentNodePointer.testNode(nodeTest)) { position++; return true; } } while (true) { currentNodePointer = currentNodePointer.getImmediateParentPointer(); if (currentNodePointer == null) { return false; } if (currentNodePointer.testNode(nodeTest)) { position++; return true; } } } }
@Override public boolean testNode(NodeTest test) { if (index == WHOLE_COLLECTION) { if (test == null) { return true; } if (test instanceof NodeNameTest) { return false; } return test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_NODE; } return getValuePointer().testNode(test); }
public boolean testNode(NodeTest test) { if (index == WHOLE_COLLECTION) { if (test == null) { return true; } if (test instanceof NodeNameTest) { return false; } return test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_NODE; } return getValuePointer().testNode(test); }
@Override public boolean testNode(NodeTest test) { if (index == WHOLE_COLLECTION) { if (test == null) { return true; } if (test instanceof NodeNameTest) { return false; } return test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_NODE; } return getValuePointer().testNode(test); }
public boolean setPosition(int position) { if (position != 1) { return false; } super.setPosition(position); if (!startedSet) { startedSet = true; nodePointer = (NodePointer) parentContext.getCurrentNodePointer(); } if (nodePointer == null) { return false; } return nodeTest == null || nodePointer.testNode(nodeTest); } }
public boolean nextNode() { // Each set contains exactly one node: the parent if (setStarted) { return false; } setStarted = true; NodePointer thisLocation = parentContext.getCurrentNodePointer(); currentNodePointer = thisLocation.getImmediateParentPointer(); while (currentNodePointer != null && currentNodePointer.isContainer()) { currentNodePointer = currentNodePointer.getImmediateParentPointer(); } if (currentNodePointer != null && currentNodePointer.testNode(nodeTest)) { position++; return true; } return false; } }
null)); if (currentNodePointer.testNode(nodeTest)) { super.setPosition(getCurrentPosition() + 1); return true; null)); else if (currentNodePointer.testNode(nodeTest)) { super.setPosition(getCurrentPosition() + 1); return true; it = (NodeIterator) stack.peek(); currentNodePointer = it.getNodePointer(); if (currentNodePointer.testNode(nodeTest)) { super.setPosition(getCurrentPosition() + 1); return true;