|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xalan.xpath.SimpleNodeLocator
SimpleNodeLocator implements a search of one or more DOM trees. By using the connect function as an extension, the user may specify a directory and a filter specification for XML files that will be searched. This is a singleton class.
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.
Constructor Summary | |
SimpleNodeLocator()
Create a SimpleNodeLocator object. |
Method Summary | |
static XLocator |
connect(java.lang.String path,
java.lang.String fileSpec)
(Same as query for the moment). |
XNodeSet |
connectToNodes(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
java.util.Vector connectArgs)
Execute a connection (if it was not executed by the static connect method) and process the following LocationPath, if it is present. |
double |
doPredicate(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int argLen,
int startOpPos)
Test a node to see if it matches the predicate test. |
static XPathFactory |
factory()
Create an XPathFactory for this XLocator. |
protected MutableNodeList |
findAncestors(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add ancestors to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findAncestorsOrSelf(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add ancestors or the context to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findAttributes(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add attributes to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findChildren(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
NodeCallback callback,
java.lang.Object callbackInfo,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add children to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findDescendants(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
NodeCallback callback,
java.lang.Object callbackInfo,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the descendants (and the context if the stepType is FROM_DESCENDANTS_OR_SELF) to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findFollowing(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the nodes following the context to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findFollowingSiblings(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the sibling nodes following the context to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findNamespace(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the namespace node of the context. |
protected int |
findNodeSet(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Execute a step that performs an OP_VARIABLE, OP_EXTFUNCTION, OP_FUNCTION, or OP_GROUP function. |
protected MutableNodeList |
findNodesOnUnknownAxis(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the namespace node of the context. |
protected MutableNodeList |
findParent(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the parent to the list if it meets the NodeTest qualification. |
protected MutableNodeList |
findPreceding(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the nodes preceding the context to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findPrecedingSiblings(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the sibling nodes preceding the context to the list if they meet the NodeTest qualification. |
protected MutableNodeList |
findRoot(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
boolean isSimpleFollowing,
boolean stopAtFirst)
Execute a step to the root. |
protected MutableNodeList |
findSelf(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int stepType,
MutableNodeList subQueryResults,
NodeCallback callback,
java.lang.Object callbackInfo,
boolean isSimpleFollowing,
boolean stopAtFirst)
Add the context to the list if it meets the NodeTest qualification. |
static XLocator |
getDefaultLocator()
The the default locator. |
XNodeSet |
locationPath(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
NodeCallback callback,
java.lang.Object callbackInfo,
boolean stopAtFirst)
Execute a location path. |
double |
locationPathPattern(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos)
Execute a a location path pattern. |
double |
nodeTest(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
int argLen,
int stepType)
Test a node to see if it matches the given node test. |
protected boolean |
predicate(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos)
Execute a single predicate for a single node. |
protected MutableNodeList |
predicates(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
MutableNodeList subQueryResults,
int[] endPredicatesPos)
Qualify a node list by it's predicates. |
static XLocator |
query(java.lang.String path,
java.lang.String fileSpec)
Execute the proprietary connect() function, which returns an instance of XLocator. |
protected MutableNodeList |
step(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
NodeCallback callback,
java.lang.Object callbackInfo,
boolean isSimpleFollowing,
boolean stopAtFirst)
Execute a step and predicates in a location path. |
protected org.w3c.dom.Node |
stepPattern(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
double[] scoreHolder)
Execute a step in a location path. |
XNodeSet |
union(XPath xpath,
XPathSupport execContext,
org.w3c.dom.Node context,
int opPos,
NodeCallback callback,
java.lang.Object callbackInfo)
Computes the union of its operands which must be node-sets. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SimpleNodeLocator()
Method Detail |
public static XLocator getDefaultLocator()
public static XLocator query(java.lang.String path, java.lang.String fileSpec)
opPos
- The current position in the xpath.m_opMap array.args
- The function args.public static XLocator connect(java.lang.String path, java.lang.String fileSpec)
opPos
- The current position in the xpath.m_opMap array.args
- The function args.public XNodeSet connectToNodes(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, java.util.Vector connectArgs) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.connectArgs
- The same arguments that were passed to the
static connect function.public XNodeSet union(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, NodeCallback callback, java.lang.Object callbackInfo) throws org.xml.sax.SAXException
context
- The current source tree context node.opPos
- The current position in the m_opMap array.public XNodeSet locationPath(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, NodeCallback callback, java.lang.Object callbackInfo, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.execContext
- The execution context.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.callback
- Interface that implements the processLocatedNode method.callbackInfo
- Object that will be passed to the processLocatedNode method.protected MutableNodeList step(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, NodeCallback callback, java.lang.Object callbackInfo, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.protected MutableNodeList findSelf(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, NodeCallback callback, java.lang.Object callbackInfo, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_SELF.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findAttributes(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_ATTRIBUTES.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findNamespace(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_NAMESPACE.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findChildren(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, NodeCallback callback, java.lang.Object callbackInfo, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_CHILDREN.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findDescendants(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, NodeCallback callback, java.lang.Object callbackInfo, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_DESCENDANTS or XPath.FROM_DESCENDANTS_OR_SELF.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findFollowing(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_FOLLOWING.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findFollowingSiblings(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_FOLLOWING_SIBLINGS.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected int findNodeSet(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- One of OP_VARIABLE, OP_EXTFUNCTION,
OP_FUNCTION, or OP_GROUP.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findRoot(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_ROOT.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findParent(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_PARENT.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findAncestors(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_ANCESTORS.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findAncestorsOrSelf(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_ANCESTORS_OR_SELF.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findPreceding(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_PRECEDING.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findPrecedingSiblings(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_PRECEDING_SIBLINGS.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected MutableNodeList findNodesOnUnknownAxis(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int stepType, MutableNodeList subQueryResults, boolean isSimpleFollowing, boolean stopAtFirst) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.stepType
- Value of XPath.FROM_NAMESPACE.subQueryResults
- Should be an empty node list where the
results of the step will be put.protected boolean predicate(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos) throws org.xml.sax.SAXException
protected MutableNodeList predicates(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, MutableNodeList subQueryResults, int[] endPredicatesPos) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.subQueryResults
- The list of nodes that need to be qualified.endPredicatesPos
- The end position in the xpath.m_opMap array will be filled in.public double locationPathPattern(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.protected org.w3c.dom.Node stepPattern(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, double[] scoreHolder) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.public double doPredicate(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int argLen, int startOpPos) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.argLen
- The length of the argument.startOpPos
- The original position in the xpath.m_opMap array.public double nodeTest(XPath xpath, XPathSupport execContext, org.w3c.dom.Node context, int opPos, int argLen, int stepType) throws org.xml.sax.SAXException
xpath
- The xpath that is executing.context
- The current source tree context node.opPos
- The current position in the xpath.m_opMap array.len
- The length of the argument.len
- The type of the step.public static XPathFactory factory()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |