|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.xml.xpath.ExpressionContext
Implements the functionality required for the expression evaluation context for XPath expressions
Expression| Nested Class Summary | |
protected class |
ExpressionContext.State
Contains state information for the expression context |
| Field Summary |
| Fields inherited from interface com.novell.xml.xpath.ContextNodeList |
DOCUMENT_ORDER, REVERSE_DOCUMENT_ORDER, UNKNOWN_ORDER |
| Constructor Summary | |
ExpressionContext()
Create an empty ExpressionContext |
|
ExpressionContext(ExpressionContext iVal)
Create a copy of an existing expression context, minus any saved state information. |
|
ExpressionContext(Map properties)
Create an empty ExpressionContext with extended properties |
|
| Method Summary | |
int |
count()
Return a count of nodes in the context node list. |
ExpressionValue |
evaluate(Node currentNode,
Expression expression)
Evaluate a top-level expression - this sets the current node, then resets it after evaluation |
Node |
first()
Return the first node in the context node list. |
Node |
getCurrentNode()
Return the current node for the outer-most expression This may be different that the current context node. |
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. |
protected Node |
getNamespaceContext()
Return the node that is the current context node for namespace resolution |
NamespaceName |
getNamespaceName(String prefix)
Return the currently in-scope namespace URI for the passed prefix. |
Object |
getProperty(String name)
Get an opaque property |
Node |
next()
Return a the subsequent node in the context node list after a call to first() or next() |
int |
order()
Return order in which nodes are returned from first()-next() |
void |
popState()
Restore the last saved expression context state. |
int |
position()
Return the position of the last node returned by a call to first() or next() |
void |
pushState()
Save the current expression context state. |
void |
removeProperty(String name,
Object value)
Clear an opaque property |
Node |
returnToMark(ContextListMark mark)
Go to a position in a ContextNodeList previously marked with getMark() |
void |
setContextNodeList(ContextNodeList list)
Set the context node list for the expression context. |
void |
setNamespaceContext(Node node)
Set the namespace context for the expression context. |
void |
setProperty(String name,
Object value)
Set an opaque property |
boolean |
stripNode(Node node)
Return if a text or cdata section node should be stripped (not returned from an axis). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExpressionContext()
public ExpressionContext(Map properties)
properties - Map instance that contains extended properties (may be null)public ExpressionContext(ExpressionContext iVal)
iVal - The existing context.| Method Detail |
public ExpressionValue evaluate(Node currentNode,
Expression expression)
throws XPathEvaluationException
currentNode - The context node for the expressionexpression - The expression to evaluate
XPathEvaluationExceptionpublic void pushState()
public void popState()
public void setContextNodeList(ContextNodeList list)
list - The context node list to set.public void setNamespaceContext(Node node)
node - The namespace context node.public Node getCurrentNode()
public NamespaceName getNamespaceName(String prefix)
getNamespaceName in interface NamespaceContextprefix - The QName prefix of interest
public ExpandedQName getExpandedName(String qName)
getExpandedName in interface NamespaceContextqName - The QName to expand
public Node first()
throws XPathEvaluationException
first in interface ContextNodeListXPathEvaluationException
public Node next()
throws XPathEvaluationException
next in interface ContextNodeListXPathEvaluationException
public int count()
throws XPathEvaluationException
count in interface ContextNodeListXPathEvaluationExceptionpublic int position()
position in interface ContextNodeListpublic int order()
order in interface ContextNodeListpublic ContextListMark getMark()
getMark in interface ContextNodeListpublic Node returnToMark(ContextListMark mark)
returnToMark in interface ContextNodeListmark - mark returned from getMark()
public boolean stripNode(Node node)
stripNode in interface WhitespaceStrippernode - The text or cdata section node to test
protected Node getNamespaceContext()
public void setProperty(String name,
Object value)
name - the name of the propertyvalue - the value of the property
public void removeProperty(String name,
Object value)
name - the name of the propertypublic Object getProperty(String name)
name - the name of the property
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||