|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xml.xpath.Basis
This class represents a Basis in the XPath expression language NOTE: it implements NamespaceContext for the benefit of NodeTest.evaluate()
Step
Field Summary |
Fields inherited from interface com.novell.xml.xpath.ContextNodeList |
DOCUMENT_ORDER, REVERSE_DOCUMENT_ORDER, UNKNOWN_ORDER |
Constructor Summary | |
Basis(AxisNameToken axisName,
NodeTest nodeTest)
Construct a Basis object based on an AxisName and a NodeTest |
|
Basis(AxisNameToken axisName,
NodeTypeToken nodeType)
Construct a Basis object based on an AxisName and a NodeType |
|
Basis(AxisNameToken axisName,
NodeTypeToken nodeType,
String literal)
Construct a Basis object based on an AxisName and a pi() NodeType |
|
Basis(AxisNameToken axisName,
WildcardNameToken wildcardName,
NamespaceContext nsContext)
Construct a Basis object based on an AxisName and a WildcardName |
|
Basis(Axis axis,
NodeTest nodeTest)
Construct a Basis object based on an AxisName and a NodeTest |
Method Summary | |
int |
count()
Return count of nodes in Basis |
protected void |
createAxis(AxisNameToken axisName)
Create the appropriate axis object based on the passed token |
void |
done()
stop referencing resources that are no longer needed |
Node |
first()
Return first node in Basis based on passed context node and expression context |
ExpandedQName |
getExpandedName(String qName)
Return the expanded name given the passed QName, given the current namespace context |
ContextListMark |
getMark()
Return a marker to a position in a ContextNodeList. |
NamespaceName |
getNamespaceName(String prefix)
Return the currently in-scope namespace URI for the passed prefix. |
protected Node |
incPosition(Node node)
Increment the current node position (the result returned from position()) |
protected void |
init()
Initialize state for first() |
Node |
next()
Return next node in Basis following a call to first() or next() |
int |
order()
Return order in which nodes are returned from first()-next() |
int |
position()
Return the position of the last node returned by a call to first() or next() |
Node |
returnToMark(ContextListMark mark)
Go to a position in a ContextNodeList previously marked with getMark() |
void |
setup(Node contextNode,
ExpressionContext context)
Initialize this basis with a context node for the axis to operate on. |
String |
toString()
Provide a readable description of the for debugging. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Basis(Axis axis, NodeTest nodeTest)
axis
- axis objectnodeTest
- node test objectpublic Basis(AxisNameToken axisName, NodeTest nodeTest)
axisName
- axis name tokennodeTest
- node test objectpublic Basis(AxisNameToken axisName, NodeTypeToken nodeType)
axisName
- axis name tokennodeType
- node type tokenpublic Basis(AxisNameToken axisName, NodeTypeToken nodeType, String literal) throws XPathException, Exception
axisName
- axis name tokennodeType
- node type token (MUST be pi)literal
- string literal argument for pi()public Basis(AxisNameToken axisName, WildcardNameToken wildcardName, NamespaceContext nsContext) throws XPathException
axisName
- axis name tokenwildcardName
- wildcard name tokennsContext
- The namespace context to use to resolve any WildcardName prefixMethod Detail |
public String toString()
public void setup(Node contextNode, ExpressionContext context)
contextNode
- the context nodepublic void done()
public Node first() throws XPathEvaluationException
first
in interface ContextNodeList
XPathEvaluationException
public Node next() throws XPathEvaluationException
next
in interface ContextNodeList
XPathEvaluationException
public int count() throws XPathEvaluationException
count
in interface ContextNodeList
XPathEvaluationException
public int position()
position
in interface ContextNodeList
public int order()
order
in interface ContextNodeList
public ContextListMark getMark()
getMark
in interface ContextNodeList
public Node returnToMark(ContextListMark mark)
returnToMark
in interface ContextNodeList
mark
- mark returned from getMark()
public NamespaceName getNamespaceName(String prefix)
prefix
- The QName prefix of interest
public ExpandedQName getExpandedName(String qName)
qName
- The QName to expand
protected void createAxis(AxisNameToken axisName)
axisName
- AxisNameToken that specifies the axisprotected void init()
protected Node incPosition(Node node)
node
- The node value (may be null)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |