public interface IXPath extends IXholon
206 Java API for XML Processing (JAXP) 1.3
Modifier and Type | Field and Description |
---|---|
static int |
AXIS_ANCESTOR |
static int |
AXIS_ANCESTORORSELF |
static int |
AXIS_ATTRIBUTE |
static int |
AXIS_CHILD |
static int |
AXIS_DEFAULT |
static int |
AXIS_DESCENDANT |
static int |
AXIS_DESCENDANTORSELF |
static int |
AXIS_FOLLOWING |
static int |
AXIS_FOLLOWINGSIBLING |
static int |
AXIS_NAMESPACE |
static int |
AXIS_PARENT |
static int |
AXIS_PRECEDING |
static int |
AXIS_PRECEDINGSIBLING |
static int |
AXIS_SELF |
static int |
XPATH_OP_EQ |
static int |
XPATH_OP_GE |
static int |
XPATH_OP_GT |
static int |
XPATH_OP_LE |
static int |
XPATH_OP_LT |
static int |
XPATH_OP_NE |
static int |
XPATH_OP_NOP |
DEFAULT_SIZE_MSG_Q, DEFAULT_SIZE_SYSTEM_MSG_Q, GETNAME_DEFAULT, GETNAME_LOCALPART_ID, GETNAME_NOROLENAME, GETNAME_ROLENAME_OR_CLASSNAME, GETNAME_ROLENAMESEP_, GETNAME_SIZE_TEMPLATE, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx, XHOLON_ID_DEFAULT, XHOLON_ID_NULL
Modifier and Type | Method and Description |
---|---|
IXholon |
evaluate(java.lang.String expression,
IXholon item)
Evaluate an XPath expression in the specified context and return the result as a IXholon.
|
IXholon |
evaluate(java.lang.String expression,
IXholon item,
java.util.List<IXholon> pathList)
Evaluate an XPath expression in the specified context and return the result as a IXholon.
|
java.lang.String |
evaluate(java.lang.String expression,
java.lang.Object item)
Evaluate an XPath expression in the specified context and return the result as a String.
|
java.lang.Object |
evaluate(java.lang.String expression,
java.lang.Object item,
int returnType)
Evaluate an XPath expression in the specified context and return the result as the specified type.
|
java.lang.String |
getExpression(IXholon sourceNode,
IXholon reffedNode)
Get an XPath 1.0 compliant expression that uniquely identifies a shortest path
from a source node node to a target or referenced node.
|
java.lang.String |
getExpression(IXholon descendant,
IXholon ancestor,
boolean shouldEscape)
Get an XPath 1.0 compliant expression that uniquely identifies a path
from an ancestor node to a descendant node.
|
java.util.Vector<IXholon> |
searchForClosestNeighbors(int distance,
int include,
java.lang.String excludeXhcName,
java.lang.String xhcName,
int maxQuantity,
boolean matchSuperClasses,
IXholon xhNode)
Search for closest neighbors whose XholonClass names are xhcName.
|
act, actNr, appendChild, appendChild, appendChild, appendsOwnChildren, bindPorts, cleanup, configure, configure, consoleLog, decVal, decVal, depth, doAction, findFirstChildWithXhClass, findFirstChildWithXhClass, forwardMessage, forwardSyncMessage, getActionList, getAllPorts, getAnnotation, getApp, getAttributeNodeXh, getAttributeXh, getChildNodes, getClassNode, getClassNode, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumLevels, getNumSiblings, getParentNode, getPort, getPort, getPreviousSibling, getRoleName, getRootNode, getSelfAndSiblings, getSelfAndSiblingsIndex, getService, getSiblings, getUid, getUri, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhc, getXhcId, getXhcName, getXholon2Xml, getXhType, getXml2Xholon, handleNodeSelection, handleNodeSelection, hasAncestor, hasAnnotation, hasAttributeXh, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, hasSiblingNodes, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertFirstChild, isActiveObject, isAttributeHandler, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, isUniqueSibling, isUniqueSiblingRoleName, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, processReceivedSyncMessage, processSystemMessageQ, reconfigure, registerMessageForwardee, remove, removeAttributeNodeXh, removeAttributeXh, removeChild, replaceNode, searchForReferencingNodes, sendMessage, sendMessage, sendMessage, sendSyncMessage, sendSyncMessage, sendSyncMessage, sendSystemMessage, sendSystemMessage, setActionList, setAnnotation, setApp, setAttributeNodeXh, setAttributeVal, setAttributeXh, setFirstChild, setId, setName, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPort, setPort, setPorts, setRoleName, setUid, setUri, setVal_boolean, setVal_byte, setVal_char, setVal_double, setVal_float, setVal_int, setVal_long, setVal_Object, setVal_short, setVal_String, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setXhc, showAnnotation, swapNode, terminate, toXml, toXmlAttribute, toXmlAttributes, toXmlText, treeSize, visit
static final int AXIS_CHILD
static final int AXIS_DESCENDANT
static final int AXIS_ATTRIBUTE
static final int AXIS_SELF
static final int AXIS_DESCENDANTORSELF
static final int AXIS_FOLLOWINGSIBLING
static final int AXIS_FOLLOWING
static final int AXIS_NAMESPACE
static final int AXIS_PARENT
static final int AXIS_ANCESTOR
static final int AXIS_PRECEDINGSIBLING
static final int AXIS_PRECEDING
static final int AXIS_ANCESTORORSELF
static final int AXIS_DEFAULT
static final int XPATH_OP_NOP
static final int XPATH_OP_EQ
static final int XPATH_OP_NE
static final int XPATH_OP_LT
static final int XPATH_OP_GT
static final int XPATH_OP_LE
static final int XPATH_OP_GE
java.lang.Object evaluate(java.lang.String expression, java.lang.Object item, int returnType)
expression
- The XPath expression.item
- The starting context (node or node list, for example).returnType
- The desired return type.1.3
java.lang.String evaluate(java.lang.String expression, java.lang.Object item)
expression
- The XPath expression.item
- The starting context (node or node list, for example).1.3
IXholon evaluate(java.lang.String expression, IXholon item)
expression
- The XPath expression.item
- The starting context, a IXholon.Examples of expressions (location paths):
ancestor::AnElevatorSystem/Floor[1]/CallButton[1]
ancestor::Cytoplasm/Cytosol/Pyruvate
ancestor::ExtraCellularSolution/child::Glucose
./DescendantName
./child::DescendantName/TargetDescendantName
IXholon evaluate(java.lang.String expression, IXholon item, java.util.List<IXholon> pathList)
expression
- The XPath expression.item
- The starting context, a IXholon.pathList
- A list that should be filled in with the sequence of nodes found at
each locationStep in the expression. If the input pathList is null, then the method should
not do anything with the list.java.lang.String getExpression(IXholon descendant, IXholon ancestor, boolean shouldEscape)
descendant
- A Xholon node that is a descendant of ancestor.ancestor
- A Xholon node that is an ancestor of descendant.shouldEscape
- Whether or not to escape Properties key termination characters (=:).
When creating a key in a .properties file, then shouldEscape must be true.
When creating a key for querying an instance of Properties, then shouldEscape must be false.java.lang.String getExpression(IXholon sourceNode, IXholon reffedNode)
sourceNode
- A node in a Xholon tree.reffedNode
- A referenced node in a Xholon tree.java.util.Vector<IXholon> searchForClosestNeighbors(int distance, int include, java.lang.String excludeXhcName, java.lang.String xhcName, int maxQuantity, boolean matchSuperClasses, IXholon xhNode)
distance
- How far within the tree to search for neighbors.include
- Whether to include (P)arent and/or (S)iblings and/or (C)hildren.excludeXhcName
- Name of a XholonClass, used to limit the scope of the returned Vector.xhcName
- Name of a XholonClass.maxQuantity
- Maximum quantity of closest neighbors to return (may return fewer)matchSuperClasses
- Whether or not to match superclasses.