|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xpath.Expression | +--weblogic.apache.xpath.patterns.NodeTest | +--weblogic.apache.xpath.patterns.StepPattern
This class represents a single pattern match step.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Fields inherited from class weblogic.apache.xpath.patterns.NodeTest |
m_whatToShow,
SCORE_NODETEST,
SCORE_NONE,
SCORE_NSWILD,
SCORE_OTHER,
SCORE_QNAME,
SHOW_BYFUNCTION,
SHOW_NAMESPACE,
SUPPORTS_PRE_STRIPPING,
WILD |
Fields inherited from class weblogic.apache.xpath.Expression |
m_slocator |
Constructor Summary | |
StepPattern(int whatToShow)
Construct a StepPattern that doesn't test for node names. |
|
StepPattern(int whatToShow,
java.lang.String namespace,
java.lang.String name)
Construct a StepPattern that tests for namespaces and node names. |
Method Summary | |
protected void |
calcScore()
Static calc of match score. |
void |
calcTargetString()
Calculate the local name or psuedo name of the node that this pattern will test, for hash table lookup optimization. |
boolean |
canTraverseOutsideSubtree()
Tell if this expression or it's subexpressions can traverse outside the current subtree. |
XObject |
execute(XPathContext xctxt)
Test the current node to see if it matches the given node test, and if it does, and there is a relative path pattern, execute that to see if it matches also. |
XObject |
executeRelativePathPattern(XPathContext xctxt)
Execute the match pattern step relative to another step. |
XObject |
executeStep(XPathContext xctxt)
Execute this pattern step, including predicates. |
int |
getLastPos(XPathContext xctxt)
Get the count of the nodes that match the test, which is the proximity position of the last node that can pass this test in the sub context selection. |
double |
getMatchScore(XPathContext xctxt,
org.w3c.dom.Node context)
Get the match score of the given node. |
Expression |
getPredicate(int i)
Get a predicate expression. |
int |
getPredicateCount()
Get the number of predicates for this match pattern step. |
int |
getProximityPosition(XPathContext xctxt)
Get the proximity position index of the current node based on this node test. |
java.lang.String |
getTargetString()
Get the local name or psuedo name of the node that this pattern will test, for hash table lookup optimization. |
void |
setPredicates(Expression[] predicates)
Set the predicates for this match pattern step. |
void |
setRelativePathPattern(StepPattern expr)
Set the reference to nodetest and predicate for parent or ancestor. |
Methods inherited from class weblogic.apache.xpath.patterns.NodeTest |
debugWhatToShow,
execute,
getDefaultScore,
getLocalName,
getNamespace,
getWhatToShow,
initNodeTest,
initNodeTest |
Methods inherited from class weblogic.apache.xpath.Expression |
assert,
error,
setSourceLocator,
warn |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public StepPattern(int whatToShow, java.lang.String namespace, java.lang.String name)
whatToShow
- Bit set defined mainly by NodeFilter
.namespace
- The namespace to be tested.name
- The local name to be tested.public StepPattern(int whatToShow)
whatToShow
- Bit set defined mainly by NodeFilter
.Method Detail |
public void calcTargetString()
PsuedoNames
public java.lang.String getTargetString()
PsuedoNames
public void setRelativePathPattern(StepPattern expr)
expr
- The relative pattern expression.public boolean canTraverseOutsideSubtree()
public Expression getPredicate(int i)
i
- The index of the predicate.public final int getPredicateCount()
public void setPredicates(Expression[] predicates)
predicates
- An array of expressions that define predicates
for this step.protected void calcScore()
public XObject executeStep(XPathContext xctxt) throws javax.xml.transform.TransformerException
xctxt
- XPath runtime context.NodeTest.SCORE_NODETEST
,
NodeTest.SCORE_NONE
,
NodeTest.SCORE_NSWILD
,
NodeTest.SCORE_QNAME
, or
NodeTest.SCORE_OTHER
.public int getProximityPosition(XPathContext xctxt)
xctxt
- XPath runtime context.public int getLastPos(XPathContext xctxt)
xctxt
- XPath runtime context.public XObject executeRelativePathPattern(XPathContext xctxt) throws javax.xml.transform.TransformerException
xctxt
- The XPath runtime context.NodeTest.SCORE_NODETEST
,
NodeTest.SCORE_NONE
,
NodeTest.SCORE_NSWILD
,
NodeTest.SCORE_QNAME
, or
NodeTest.SCORE_OTHER
.public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
xctxt
- XPath runtime context.NodeTest.SCORE_NODETEST
,
NodeTest.SCORE_NONE
,
NodeTest.SCORE_NSWILD
,
NodeTest.SCORE_QNAME
, or
NodeTest.SCORE_OTHER
.public double getMatchScore(XPathContext xctxt, org.w3c.dom.Node context) throws javax.xml.transform.TransformerException
xctxt
- The XPath runtime context.context
- The node to be tested.NodeTest.SCORE_NODETEST
,
NodeTest.SCORE_NONE
,
NodeTest.SCORE_NSWILD
,
NodeTest.SCORE_QNAME
, or
NodeTest.SCORE_OTHER
.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |