Java Code Examples for org.jaxen.saxpath.Axis#CHILD
The following examples show how to use
org.jaxen.saxpath.Axis#CHILD .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SolrXPathHandler.java From SearchServices with GNU Lesser General Public License v3.0 | 6 votes |
public void startAllNodeStep(int axis) throws SAXPathException { switch (axis) { case Axis.CHILD: if (isAbsolutePath) { // addAbsolute(null, null); // We can always do relative stuff addRelative(null, null); } else { addRelative(null, null); } break; case Axis.DESCENDANT_OR_SELF: query.appendQuery(getArrayList(new DescendantAndSelfStructuredFieldPosition(), new DescendantAndSelfStructuredFieldPosition())); break; case Axis.SELF: query.appendQuery(getArrayList(new SelfAxisStructuredFieldPosition(), new SelfAxisStructuredFieldPosition())); break; default: throw new UnsupportedOperationException(); } }
Example 2
Source File: SolrXPathHandler.java From SearchServices with GNU Lesser General Public License v3.0 | 6 votes |
public void startNameStep(int axis, String nameSpace, String localName) throws SAXPathException { switch (axis) { case Axis.CHILD: if (isAbsolutePath) { // addAbsolute(nameSpace, localName); // we can always do relative stuff addRelative(nameSpace, localName); } else { addRelative(nameSpace, localName); } break; default: throw new UnsupportedOperationException(); } }
Example 3
Source File: MCRNodeBuilder.java From mycore with GNU General Public License v3.0 | 6 votes |
@SuppressWarnings("unchecked") private Object buildNameStep(NameStep nameStep, String value, Parent parent) throws JaxenException { String name = nameStep.getLocalName(); String prefix = nameStep.getPrefix(); Namespace ns = prefix.isEmpty() ? Namespace.NO_NAMESPACE : MCRConstants.getStandardNamespace(prefix); if (nameStep.getAxis() == Axis.CHILD) { if (parent instanceof Document) { return buildPredicates(nameStep.getPredicates(), ((Document) parent).getRootElement()); } else { return buildPredicates(nameStep.getPredicates(), buildElement(ns, name, value, (Element) parent)); } } else if (nameStep.getAxis() == Axis.ATTRIBUTE) { return buildAttribute(ns, name, value, (Element) parent); } else { if (LOGGER.isDebugEnabled()) { LOGGER.debug("ignoring axis, can not be built: {} {}{}", nameStep.getAxis(), prefix.isEmpty() ? "" : prefix + ":", name); } return null; } }