/** * 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); }
if (typeTest.getNodeType() == Compiler.NODE_TYPE_NODE || typeTest.getNodeType() == Compiler.NODE_TYPE_TEXT)
public boolean testNode(NodeTest nodeTest) { return nodeTest == null || ((nodeTest instanceof NodeTypeTest) && ((NodeTypeTest) nodeTest).getNodeType() == Compiler.NODE_TYPE_NODE); }
public boolean testNode(NodeTest nodeTest) { return nodeTest == null || ((nodeTest instanceof NodeTypeTest) && ((NodeTypeTest) nodeTest).getNodeType() == Compiler.NODE_TYPE_NODE); }
public boolean testNode(NodeTest nodeTest) { return nodeTest == null || ((nodeTest instanceof NodeTypeTest) && ((NodeTypeTest) nodeTest).getNodeType() == org.apache.commons.jxpath.ri.Compiler.NODE_TYPE_NODE); }
public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; if (!nodeNameTest.isWildcard()) { String localName = nodeNameTest.getNodeName().getName(); String nameSpace = nodeNameTest.getNamespaceURI(); if (nameSpace == null) nameSpace = getNamespaceResolver().getNamespaceURI(""); return new AttributeNodeIterator(this, Types.typeName(nameSpace, localName)); } else { return new AttributeNodeIterator(this); } } if (test instanceof NodeTypeTest) { NodeTypeTest nodeTypeTest = (NodeTypeTest) test; if (nodeTypeTest.getNodeType() == Compiler.NODE_TYPE_NODE) { return new AttributeNodeIterator(this); } } return super.childIterator(test, reverse, startWith); }
public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; if (!nodeNameTest.isWildcard()) { String localName = nodeNameTest.getNodeName().getName(); String nameSpace = nodeNameTest.getNamespaceURI(); if (nameSpace == null) nameSpace = getNamespaceResolver().getNamespaceURI(""); return new SingleFeatureTypeAttributeIterator( this, featureType, Types.typeName(nameSpace, localName)); } else { return new FeatureTypeAttributeIterator(this, featureType); } } if (test instanceof NodeTypeTest) { NodeTypeTest nodeTypeTest = (NodeTypeTest) test; if (nodeTypeTest.getNodeType() == Compiler.NODE_TYPE_NODE) { return new FeatureTypeAttributeIterator(this, featureType); } } return super.childIterator(test, reverse, startWith); } }
public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; if (!nodeNameTest.isWildcard()) { String localName = nodeNameTest.getNodeName().getName(); String nameSpace = nodeNameTest.getNamespaceURI(); if (nameSpace == null) nameSpace = getNamespaceResolver().getNamespaceURI(""); return new SingleFeatureTypeAttributeIterator( this, ((ComplexType) attType), Types.typeName(nameSpace, localName)); } else { return new FeatureTypeAttributeIterator(this, ((ComplexType) attType)); } } if (test instanceof NodeTypeTest) { NodeTypeTest nodeTypeTest = (NodeTypeTest) test; if (nodeTypeTest.getNodeType() == Compiler.NODE_TYPE_NODE) { return new FeatureTypeAttributeIterator(this, ((ComplexType) attType)); } } return super.childIterator(test, reverse, startWith); }
/** * 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 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); }
@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 NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test == null) { return createNodeIterator(null, reverse, startWith); } if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; QName testName = nodeNameTest.getNodeName(); if (isValidProperty(testName)) { return createNodeIterator(nodeNameTest.isWildcard() ? null : testName.toString(), reverse, startWith); } return null; } return test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_NODE ? createNodeIterator(null, reverse, startWith) : null; }
@Override public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test == null) { return createNodeIterator(null, reverse, startWith); } if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; QName testName = nodeNameTest.getNodeName(); if (isValidProperty(testName)) { return createNodeIterator(nodeNameTest.isWildcard() ? null : testName.toString(), reverse, startWith); } return null; } return test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_NODE ? createNodeIterator(null, reverse, startWith) : null; }
@Override public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test == null) { return createNodeIterator(null, reverse, startWith); } if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; QName testName = nodeNameTest.getNodeName(); if (isValidProperty(testName)) { return createNodeIterator(nodeNameTest.isWildcard() ? null : testName.toString(), reverse, startWith); } return null; } return test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_NODE ? createNodeIterator(null, reverse, startWith) : null; }
public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; if (!nodeNameTest.isWildcard()) { int index = featureType.find(nodeNameTest.getNodeName().getName()); if (index > -1) { return new SingleFeatureTypeAttributeIterator(this, index); } } else { return new FeatureTypeAttributeIterator(this); } } if (test instanceof NodeTypeTest) { NodeTypeTest nodeTypeTest = (NodeTypeTest) test; if (nodeTypeTest.getNodeType() == Compiler.NODE_TYPE_NODE) { return new FeatureTypeAttributeIterator(this); } } return super.childIterator(test, reverse, startWith); } }
public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; if (!nodeNameTest.isWildcard()) { int index = featureType.indexOf(nodeNameTest.getNodeName().getName()); if (index > -1) { return new SingleFeatureTypeAttributeIterator(this, index); } } else { return new FeatureTypeAttributeIterator(this); } } if (test instanceof NodeTypeTest) { NodeTypeTest nodeTypeTest = (NodeTypeTest) test; if (nodeTypeTest.getNodeType() == Compiler.NODE_TYPE_NODE) { return new FeatureTypeAttributeIterator(this); } } return super.childIterator(test, reverse, startWith); } }
public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; if (!nodeNameTest.isWildcard()) { String localName = nodeNameTest.getNodeName().getName(); String nameSpace = nodeNameTest.getNamespaceURI(); if (nameSpace == null) nameSpace = getNamespaceResolver().getNamespaceURI(""); return new AttributeNodeIterator(this, Types.typeName(nameSpace, localName)); } else { return new AttributeNodeIterator(this); } } if (test instanceof NodeTypeTest) { NodeTypeTest nodeTypeTest = (NodeTypeTest) test; if (nodeTypeTest.getNodeType() == Compiler.NODE_TYPE_NODE) { return new AttributeNodeIterator(this); } } return super.childIterator(test, reverse, startWith); }