|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.value.Value | +--net.sf.saxon.value.AtomicValue
A AtomicValue is a value that isn't a sequence and isn't a node. More strictly, it is any sequence of length one whose content is not a node.
Field Summary |
Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
Constructor Summary | |
AtomicValue()
|
Method Summary | |
AtomicValue |
convert(AtomicType targetType,
XPathContext context)
Convert the value to a given type. |
abstract AtomicValue |
convert(int requiredType,
XPathContext context)
Convert the value to a given type. |
java.lang.Object |
convertToJava(java.lang.Class target,
Configuration config,
XPathContext context)
Convert to Java object (for passing to external functions) |
void |
display(int level,
NamePool pool,
java.io.PrintStream out)
Diagnostic print of expression structure |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the value |
java.lang.String |
evaluateAsString(XPathContext context)
Evaluate as a string |
Item |
evaluateItem(XPathContext context)
Evaluate the value (this simply returns the value unchanged) |
int |
getCardinality()
Determine the static cardinality |
AtomicValue |
getComponent(int component)
Method to extract components of a value. |
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process(). |
AtomicValue |
getPrimitiveValue()
Get the primitive value (the value in the value space). |
abstract java.lang.String |
getStringValue()
Convert the value to a string, using the serialization rules. |
SequenceIterator |
getTypedValue(Configuration config)
Get the typed value of this item |
SequenceIterator |
iterate(XPathContext context)
Iterate over the (single) item in the sequence |
void |
process(XPathContext context)
Process the instruction, without returning any tail calls |
java.lang.String |
toString()
Get string value. |
Methods inherited from class net.sf.saxon.value.Value |
analyze, asItem, asValue, collapseWhitespace, convertJavaObjectToXPath, getDependencies, getParentExpression, getSpecialProperties, inverse, iterateSubExpressions, normalizeWhitespace, promote, simplify, stringToNumber, trimWhitespace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.saxon.expr.Expression |
getItemType |
Constructor Detail |
public AtomicValue()
Method Detail |
public int getImplementationMethod()
getImplementationMethod
in interface Expression
public void process(XPathContext context) throws XPathException
process
in interface Expression
context
- The dynamic context, giving access to the current node,
the current variables, etc.
XPathException
public final int getCardinality()
getCardinality
in interface Expression
Cardinality
public abstract AtomicValue convert(int requiredType, XPathContext context) throws XPathException
requiredType
- type code of the required atomic typecontext
- the evaluation context. Used primarily for error reporting,
since nearly all type conversions are context-independent. The value may be
null if the context is not known.
XPathException
- if conversion is not allowed for this
required type, or if the particular value cannot be convertedpublic final AtomicValue convert(AtomicType targetType, XPathContext context) throws XPathException
XPathException
public Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface Expression
context
- the evaluation context (not used in this implementation)
XPathException
public final SequenceIterator iterate(XPathContext context)
iterate
in interface Expression
context
- the evaluation context (not used in this implementation)
public final java.lang.String evaluateAsString(XPathContext context)
evaluateAsString
in interface Expression
context
- The context in which the expression is to be evaluated
public abstract java.lang.String getStringValue()
getStringValue
in interface Item
getStringValue
in class Value
public final SequenceIterator getTypedValue(Configuration config)
getTypedValue
in interface Item
config
- the configuration: this is needed because it provides access
to schema information needed to interpret the type annotation
public AtomicValue getPrimitiveValue()
Type.isPrimitiveType(int)
public boolean effectiveBooleanValue(XPathContext context)
effectiveBooleanValue
in interface Expression
context
- the evaluation context (not used in this implementation)
public AtomicValue getComponent(int component) throws XPathException
XPathException
public java.lang.String toString()
toString
in class Value
public final void display(int level, NamePool pool, java.io.PrintStream out)
display
in interface Expression
level
- the indentation level of the outputout
- pool
- NamePool used to expand any names appearing in the expressionpublic java.lang.Object convertToJava(java.lang.Class target, Configuration config, XPathContext context) throws XPathException
convertToJava
in class Value
target
- The class required by the external functionconfig
- The configuration (needed for access to schema information)
XPathException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |