org.dom4j.xpath
public class DefaultXPath extends Object implements XPath, NodeFilter, Serializable
Default implementation of {@link org.dom4j.XPath}which uses the Jaxen project.
Constructor Summary | |
---|---|
DefaultXPath(String text)
Construct an XPath
|
Method Summary | |
---|---|
boolean | booleanValueOf(Object context) |
Object | evaluate(Object context) |
protected Object | getCompareValue(Node node)
DOCUMENT ME!
|
FunctionContext | getFunctionContext() |
NamespaceContext | getNamespaceContext() |
String | getText()
Retrieve the textual XPath string used to initialize this Object
|
VariableContext | getVariableContext() |
protected void | handleJaxenException(JaxenException exception) |
boolean | matches(Node node) |
Number | numberValueOf(Object context) |
protected static XPath | parse(String text) |
protected void | removeDuplicates(List list, Map sortValues)
Removes items from the list which have duplicate values
|
List | selectNodes(Object context) |
List | selectNodes(Object context, XPath sortXPath) |
List | selectNodes(Object context, XPath sortXPath, boolean distinct) |
Object | selectObject(Object context) |
Node | selectSingleNode(Object context) |
void | setFunctionContext(FunctionContext functionContext) |
void | setNamespaceContext(NamespaceContext namespaceContext) |
void | setNamespaceURIs(Map map) |
protected void | setNSContext(Object context) |
void | setVariableContext(VariableContext variableContext) |
void | sort(List list)
|
void | sort(List list, boolean distinct)
|
protected void | sort(List list, Map sortValues)
Sorts the list based on the sortValues for each node
|
String | toString() |
String | valueOf(Object context) |
Parameters: text DOCUMENT ME!
Throws: InvalidXPathException DOCUMENT ME!
Parameters: node DOCUMENT ME!
Returns: the node expression used for sorting comparisons
Returns: The XPath string
Parameters: list DOCUMENT ME! sortValues DOCUMENT ME!
sort
sorts the given List of Nodes using this XPath
expression as a {@link Comparator}.
Parameters: list is the list of Nodes to sort
sort
sorts the given List of Nodes using this XPath
expression as a {@link Comparator}and optionally removing duplicates.
Parameters: list is the list of Nodes to sort distinct if true then duplicate values (using the sortXPath for comparisions) will be removed from the List
Parameters: list DOCUMENT ME! sortValues DOCUMENT ME!