|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The XML Path Language (XPath) is an internet W3C standard, that defines how to locate nodes in a tree.
206 Java API for XML Processing (JAXP) 1.3
Field Summary | |
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
|
Method Summary | |
IXholon |
evaluate(java.lang.String expression,
IXholon item)
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.util.Vector |
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. |
Field Detail |
public static final int AXIS_CHILD
public static final int AXIS_DESCENDANT
public static final int AXIS_ATTRIBUTE
public static final int AXIS_SELF
public static final int AXIS_DESCENDANTORSELF
public static final int AXIS_FOLLOWINGSIBLING
public static final int AXIS_FOLLOWING
public static final int AXIS_NAMESPACE
public static final int AXIS_PARENT
public static final int AXIS_ANCESTOR
public static final int AXIS_PRECEDINGSIBLING
public static final int AXIS_PRECEDING
public static final int AXIS_ANCESTORORSELF
public static final int AXIS_DEFAULT
public static final int XPATH_OP_NOP
public static final int XPATH_OP_EQ
public static final int XPATH_OP_NE
public static final int XPATH_OP_LT
public static final int XPATH_OP_GT
public static final int XPATH_OP_LE
public static final int XPATH_OP_GE
Method Detail |
public 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
public 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
public 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
public java.util.Vector 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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |