|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.value.Value
net.sf.saxon.value.SingletonNode
A value that is a sequence containing zero or one nodes
Field Summary | |
protected NodeInfo |
node
|
Fields inherited from class net.sf.saxon.value.Value |
EMPTY_CLASS_ARRAY |
Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
EMPTY_VALUE_ARRAY |
Constructor Summary | |
SingletonNode(NodeInfo node)
Create a node-set containing zero or one nodes |
Method Summary | |
java.lang.Object |
convertToJava(java.lang.Class target,
XPathContext context)
Convert to Java object (for passing to external functions) |
void |
display(int depth,
NamePool pool,
java.io.PrintStream out)
Diagnostic display |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value |
java.lang.String |
evaluateAsString(XPathContext context)
Evaluate an expression as a String. |
Item |
evaluateItem(XPathContext context)
Evaluate as an item |
int |
getCardinality()
Determine the static cardinality |
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process(). |
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the items in the expression. |
int |
getLength()
Get the length of the sequence |
NodeInfo |
getNode()
Get the node that forms the node-set. |
int |
getSpecialProperties()
Get the static properties of this expression (other than its type). |
java.lang.String |
getStringValue()
Convert the value to a string, using the serialization rules. |
Item |
itemAt(int n)
Get the n'th item in the sequence (starting from 0). |
SequenceIterator |
iterate(XPathContext context)
Return an enumeration of this nodeset value. |
void |
process(XPathContext context)
Process the instruction, without returning any tail calls |
Methods inherited from class net.sf.saxon.value.Value |
asItem, asIterator, asValue, checkPermittedContents, collapseWhitespace, convert, convertJavaObjectToXPath, equals, getDependencies, getIterator, getParentExpression, hashCode, iterateSubExpressions, makeQNameValue, normalizeWhitespace, optimize, promote, reduce, schemaEquals, simplify, stringToNumber, toString, trimWhitespace, typeCheck |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected NodeInfo node
Constructor Detail |
public SingletonNode(NodeInfo node)
node
- The node to be contained in the node-set, or null if the node-set
is to be emptyMethod Detail |
public int getImplementationMethod()
public void process(XPathContext context) throws XPathException
process
in interface Expression
process
in class Value
context
- The dynamic context, giving access to the current node,
the current variables, etc.
XPathException
public ItemType getItemType(TypeHierarchy th)
getItemType
in interface Expression
getItemType
in class Value
th
-
public int getCardinality()
getCardinality
in interface Expression
getCardinality
in class Value
public int getLength() throws XPathException
getLength
in class Value
XPathException
public Item itemAt(int n) throws XPathException
itemAt
in class Value
XPathException
public NodeInfo getNode()
public int getSpecialProperties()
getSpecialProperties
in interface Expression
getSpecialProperties
in class Value
StaticProperty.NON_CREATIVE
public SequenceIterator iterate(XPathContext context)
context
- supplies the context for evaluation
public Item evaluateItem(XPathContext context)
evaluateItem
in interface Expression
evaluateItem
in class Value
public boolean effectiveBooleanValue(XPathContext context)
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class Value
context
- The context in which the expression is to be evaluated
public java.lang.String getStringValue()
getStringValue
in interface ValueRepresentation
getStringValue
in class Value
public java.lang.String evaluateAsString(XPathContext context) throws XPathException
evaluateAsString
in interface Expression
evaluateAsString
in class Value
context
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic void display(int depth, NamePool pool, java.io.PrintStream out)
display
in interface Expression
display
in class Value
public java.lang.Object convertToJava(java.lang.Class target, XPathContext context) throws XPathException
convertToJava
in class Value
XPathException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |