public class DataGraphXPath extends DefaultXPath
data graph based on Jaxen.
This is the main entry point for matching an XPath against
a data graph.
| Constructor and Description |
|---|
DataGraphXPath(String xpathExpr) |
DataGraphXPath(String xpathExpr,
org.jaxen.Navigator navigator) |
| Modifier and Type | Method and Description |
|---|---|
XPathDataObject[] |
findDataObjects(DataObject root)
Returns an array of Data Object results, an error being thrown if
other than Data Object results are found or if
multiple results are found but the target Property is not a
"many" Property, i.e.
|
XPathDataProperty[] |
findProperties(DataObject root)
Returns an array of Property results, an error being thrown if
other than Property results are found.
|
XPathDataProperty |
findProperty(DataObject root)
Returns a single Property result or null
if no Property results are found.
|
org.jaxen.Context |
getNodeContext(Object node) |
DataGraphNodeAdapter[] |
getResults(DataObject root)
Returns an array with either 1 single result or multiple results,
and error being thrown if no results are found or if
multiple results are found but the target Property is not a
"many" Property, i.e.
|
isXPathaddNamespace, booleanValueOf, createFunctionContext, createNamespaceContext, createVariableContext, debug, evaluate, getContext, getContextSupport, getFunctionContext, getNamespaceContext, getNavigator, getRootExpr, getVariableContext, numberValueOf, selectNodes, selectNodesForContext, selectSingleNode, selectSingleNodeForContext, setFunctionContext, setNamespaceContext, setVariableContext, stringValueOf, toString, valueOfpublic DataGraphXPath(String xpathExpr) throws org.jaxen.JaxenException
org.jaxen.JaxenExceptionpublic DataGraphXPath(String xpathExpr, org.jaxen.Navigator navigator) throws org.jaxen.JaxenException
org.jaxen.JaxenExceptionpublic org.jaxen.Context getNodeContext(Object node)
public DataGraphNodeAdapter[] getResults(DataObject root) throws org.jaxen.JaxenException, InvalidMultiplicityException
IllegalXPathArgumentException - if no results are found or if
multiple results are found but the target Property is not a
"many" property, i.e. a multi-valued Property. The target Property
is the result or end point Property after resolving an XPATH.org.jaxen.JaxenException - as required by the Jaxen APIInvalidMultiplicityException - if the given XPATH resulted in
multiple values for a singular propertypublic XPathDataProperty[] findProperties(DataObject root) throws org.jaxen.JaxenException, InvalidEndpointException
org.jaxen.JaxenException - as required by the Jaxen APIInvalidEndpointException - when the result or
terminating node or nodes are not Property nodespublic XPathDataProperty findProperty(DataObject root) throws org.jaxen.JaxenException, InvalidEndpointException
org.jaxen.JaxenException - as required by the Jaxen APIInvalidEndpointException - when the result or
terminating node or nodes are not Property nodespublic XPathDataObject[] findDataObjects(DataObject root) throws org.jaxen.JaxenException, InvalidEndpointException, InvalidMultiplicityException
IllegalXPathArgumentException - if
other than Data Object results are found or if
multiple results are found but the target Property is not a
"many" Property, i.e. a multi-valued Property. The target Property
is the result or end point Property after resolving an XPATH.org.jaxen.JaxenException - as required by the Jaxen APIInvalidEndpointException - when the result or terminating node or nodes
for an XPATH expression are not Data Object nodesInvalidMultiplicityException - when multiple results are detected for a
singular propertyCopyright © 2017. All rights reserved.