com.novell.xml.xpath
Class InsertionOrderNodeSet
java.lang.Object
com.novell.xml.xpath.NodeSet
com.novell.xml.xpath.InsertionOrderNodeSet
- All Implemented Interfaces:
- ContextNodeList, Expression, ExpressionValue
- public class InsertionOrderNodeSet
- extends NodeSet
Subclass of NodeSet that orders nodes based on order of insertion
Method Summary |
void |
castFrom(Object type)
Convert from a different type of expression value to the
NodeSet type
NOTE: this will ALWAYS throw an exception (unless the "from"
type is a node-set), since there is no type type can be converted
to a node-set |
int |
order()
Return order in which nodes are returned from first()-next() |
void |
union(NodeSet rhs)
Perform a union operation between this node-set and another
node-set. |
Methods inherited from class com.novell.xml.xpath.NodeSet |
add, add, contains, count, dump, dump, evaluate, first, getArgType, getBooleanValue, getMark, getNativeValue, getNodeSetValue, getNumberValue, getResultType, getStringValue, getValueType, isConstant, isEmpty, next, position, registerForReset, remove, returnToMark, toString |
InsertionOrderNodeSet
public InsertionOrderNodeSet()
- Construct a new, empty node-set
InsertionOrderNodeSet
public InsertionOrderNodeSet(Collection copy)
throws Exception
- Construct a new node-set and initialize it to contain
the members in the passed collection
- Parameters:
copy
- A collection of Node objects
- Throws:
Exception
- Error
InsertionOrderNodeSet
public InsertionOrderNodeSet(NodeSet copy)
- Construct a new node-set with the same content as the
passed node-set
- Parameters:
copy
- The node-set to copy
union
public void union(NodeSet rhs)
- Perform a union operation between this node-set and another
node-set. The resulting union will be in document order.
- Overrides:
union
in class NodeSet
- Parameters:
rhs
- The right-hand operand of the union operator
castFrom
public void castFrom(Object type)
throws XPathConversionException
- Convert from a different type of expression value to the
NodeSet type
NOTE: this will ALWAYS throw an exception (unless the "from"
type is a node-set), since there is no type type can be converted
to a node-set
- Specified by:
castFrom
in interface ExpressionValue
- Overrides:
castFrom
in class NodeSet
- Parameters:
type
- The object to convert from.
- Throws:
XPathConversionException
order
public int order()
- Return order in which nodes are returned from first()-next()
- Specified by:
order
in interface ContextNodeList
- Overrides:
order
in class NodeSet
- Returns:
- DOCUMENT_ORDER or REVERSE_DOCUMENT_ORDER