|
|||||||||
| 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
public class SingletonNode
A value that is a sequence containing zero or one nodes
| Field Summary | |
|---|---|
protected NodeInfo |
node
|
| Constructor Summary | |
|---|---|
SingletonNode(NodeInfo node)
Create a node-set containing zero or one nodes |
|
| Method Summary | |
|---|---|
int |
conversionPreference(Class required)
Get conversion preference for this value to a Java class. |
Object |
convertToJava(Class target)
Convert to Java object (for passing to external functions) |
void |
display(int depth,
NamePool pool)
Diagnostic display |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value |
String |
evaluateAsString(XPathContext context)
Evaluate an expression as a String. |
Item |
evaluateItem(XPathContext context)
Evaluate as an item |
int |
getCardinality()
Determine the static cardinality |
ItemType |
getItemType()
Determine the data type of the items in the expression |
NodeInfo |
getNode()
Get the node that forms the node-set. |
int |
getSpecialProperties()
Get the static properties of this expression (other than its type). |
SequenceIterator |
iterate(XPathContext context)
Return an enumeration of this nodeset value. |
| Methods inherited from class net.sf.saxon.value.Value |
|---|
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 empty| Method Detail |
|---|
public ItemType getItemType()
public int getCardinality()
public NodeInfo getNode()
public int getSpecialProperties()
getSpecialProperties in interface ExpressiongetSpecialProperties in class Valuepublic SequenceIterator iterate(XPathContext context)
context - supplies the context for evaluation
public Item evaluateItem(XPathContext context)
context - The context in which the expression is to be evaluated
public boolean effectiveBooleanValue(XPathContext context)
context - The context in which the expression is to be evaluated
public String evaluateAsString(XPathContext context)
throws XPathException
context - The context in which the expression is to be evaluated
XPathException - if any dynamic error occurs evaluating the
expression
public void display(int depth,
NamePool pool)
depth - indentation level for this expressionpublic int conversionPreference(Class required)
conversionPreference in class Value
public Object convertToJava(Class target)
throws XPathException
convertToJava in class Valuetarget - The class required by the external function
XPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||