Default implementation of org.which uses the Jaxen project.
| Modifier and Type | Field and Description |
|---|---|
| private NamespaceContext | |
| private String | |
| private XPath |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | booleanValueOf(Object
The node, nodeset or Context object for evaluation. This value
can be null context)Implements org. |
| public Object | evaluate(Object
is either a node or a list of nodes on which to evalute the
XPath context)Implements org. evaluate evaluates an XPath expression and returns the
result as an Object.
|
| protected Object | Returns: the node expression used for sorting comparisonsDOCUMENT ME! node)DOCUMENT ME! |
| public FunctionContext | |
| public NamespaceContext | |
| public String | Returns: The XPath stringImplements org. |
| public VariableContext | |
| protected void | |
| public boolean | matches(Node
DOCUMENT ME! node)Implements org. matches returns true if the given node matches the XPath
expression.
|
| public Number | numberValueOf(Object
is either a node or a list of nodes on which to evalute the
XPath context)Implements org. numberValueOf evaluates an XPath expression and returns
the numeric value of the XPath expression if the XPath expression results
is a number, or null if the result is not a number.
|
| protected static XPath | |
| protected void | |
| public List | selectNodes(Object
is either a node or a list of nodes on which to evalute the
XPath context)Implements org. selectNodes performs this XPath expression on the given
Nodeor Listof Nodes instances appending all
the results together into a single list.
|
| public List | selectNodes(Object
is either a node or a list of nodes on which to evalute the
XPath context, XPath is the XPath expression to sort by sortXPath)Implements org. selectNodes evaluates the XPath expression on the given
Nodeor Listof Nodes and returns the result as
a List of Node s sorted by the sort XPath
expression.
|
| public List | selectNodes(Object
is either a node or a list of nodes on which to evalute the
XPath context, XPath is the XPath expression to sort by sortXPath, boolean specifies whether or not duplicate values of the sort
expression are allowed. If this parameter is true then only
distinct sort expressions values are included in the result distinct)Implements org. selectNodes evaluates the XPath expression on the given
Nodeor Listof Nodes and returns the result as
a List of Node s sorted by the sort XPath
expression.
|
| public Object | selectObject(Object
is either a node or a list of nodes on which to evalute the
XPath context)Implements org. selectObject evaluates an XPath expression and returns the
result as an Object.
|
| public Node | selectSingleNode(Object
is either a node or a list of nodes on which to evalute the
XPath context)Implements org. selectSingleNode evaluates this XPath expression on the
given Nodeor Listof Nodes and returns the
result as a single Node instance.
|
| public void | setFunctionContext(FunctionContext
DOCUMENT ME! functionContext)Implements org. |
| public void | setNamespaceContext(NamespaceContext
DOCUMENT ME! namespaceContext)Implements org. |
| public void | setNamespaceURIs(Map<String, String>
the map containing the namespace mappings map)Implements org. |
| protected void | |
| public void | setVariableContext(VariableContext
DOCUMENT ME! variableContext)Implements org. |
| public void | sort(List<Node>
is the list of Nodes to sort list)Implements org.
|
| public void | sort(List<Node>
is the list of Nodes to sort list, boolean if true then duplicate values (using the sortXPath for
comparisions) will be removed from the List distinct)Implements org.
|
| protected void | |
| public String | |
| public String | valueOf(Object
is either a node or a list of nodes on which to evalute the
XPath context)Implements org. valueOf evaluates this XPath expression and returns the
textual representation of the results using the XPath string() function.
|
| namespaceContext | back to summary |
|---|---|
| private NamespaceContext namespaceContext | |
| text | back to summary |
|---|---|
| private String text | |
| xpath | back to summary |
|---|---|
| private XPath xpath | |
| DefaultXPath | back to summary |
|---|---|
| public DefaultXPath(String text) throws InvalidXPathException Construct an XPath
| |
| booleanValueOf | back to summary |
|---|---|
| public boolean booleanValueOf(Object context) Implements org. Doc from org. Retrieve a boolean-value interpretation of this XPath expression when
evaluated against a given context.
The boolean-value of the expression is determined per the
| |
| evaluate | back to summary |
|---|---|
| public Object evaluate(Object context) Implements org. Doc from org.
| |
| getCompareValue | back to summary |
|---|---|
| protected Object getCompareValue(Node node) DOCUMENT ME! | |
| getFunctionContext | back to summary |
|---|---|
| public FunctionContext getFunctionContext() Implements org. Doc from org. DOCUMENT ME!
| |
| getNamespaceContext | back to summary |
|---|---|
| public NamespaceContext getNamespaceContext() Implements org. Doc from org. DOCUMENT ME!
| |
| getText | back to summary |
|---|---|
| public String getText() Implements org. Retrieve the textual XPath string used to initialize this Object
| |
| getVariableContext | back to summary |
|---|---|
| public VariableContext getVariableContext() Implements org. Doc from org. DOCUMENT ME!
| |
| handleJaxenException | back to summary |
|---|---|
| protected void handleJaxenException(JaxenException exception) throws XPathException | |
| matches | back to summary |
|---|---|
| public boolean matches(Node node) Implements org. Doc from org.
| |
| numberValueOf | back to summary |
|---|---|
| public Number numberValueOf(Object context) Implements org. Doc from org.
| |
| parse | back to summary |
|---|---|
| protected static XPath parse(String text) | |
| removeDuplicates | back to summary |
|---|---|
| protected void removeDuplicates(List<Node> list, Map<Node, Object> sortValues) Removes items from the list which have duplicate values | |
| selectNodes | back to summary |
|---|---|
| public List Implements org. Doc from org.
| |
| selectNodes | back to summary |
|---|---|
| public List Implements org. Doc from org.
| |
| selectNodes | back to summary |
|---|---|
| public List Implements org. Doc from org.
| |
| selectObject | back to summary |
|---|---|
| public Object selectObject(Object context) Implements org. Doc from org.
| |
| selectSingleNode | back to summary |
|---|---|
| public Node selectSingleNode(Object context) Implements org. Doc from org.
| |
| setFunctionContext | back to summary |
|---|---|
| public void setFunctionContext(FunctionContext functionContext) Implements org. Doc from org. Sets the function context to be used when evaluating XPath expressions
| |
| setNamespaceContext | back to summary |
|---|---|
| public void setNamespaceContext(NamespaceContext namespaceContext) Implements org. Doc from org. Sets the namespace context to be used when evaluating XPath expressions
| |
| setNamespaceURIs | back to summary |
|---|---|
| public void setNamespaceURIs(Map<String, String> map) Implements org. Doc from org. Sets the current NamespaceContext from a Map where the keys are the String namespace prefixes and the values are the namespace URIs. For example:
Map uris = new HashMap();
uris.put("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/");
uris.put("m", "urn:xmethodsBabelFish");
XPath xpath = document
.createXPath("SOAP-ENV:Envelope/SOAP-ENV:Body/m:BabelFish");
xpath.setNamespaceURIs(uris);
Node babelfish = xpath.selectSingleNode(document);
| |
| setNSContext | back to summary |
|---|---|
| protected void setNSContext(Object context) | |
| setVariableContext | back to summary |
|---|---|
| public void setVariableContext(VariableContext variableContext) Implements org. Doc from org. Sets the variable context to be used when evaluating XPath expressions
| |
| sort | back to summary |
|---|---|
| public void sort(List<Node> list) Implements org.
| |
| sort | back to summary |
|---|---|
| public void sort(List<Node> list, boolean distinct) Implements org.
| |
| sort | back to summary |
|---|---|
| protected void sort(List<Node> list, final Map<Node, Object> sortValues) Sorts the list based on the sortValues for each node | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| valueOf | back to summary |
|---|---|
| public String valueOf(Object context) Implements org. Doc from org.
| |