net.sf.saxon.expr

Class UntypedAtomicConverter

public final class UntypedAtomicConverter extends UnaryExpression implements MappingFunction

An UntypedAtomicConverter is an expression that converts any untypedAtomic items in a sequence to a specified type
Constructor Summary
UntypedAtomicConverter(Expression sequence, AtomicType requiredItemType, boolean allConverted)
Constructor
Method Summary
intcomputeSpecialProperties()
Determine the special properties of this expression
protected StringdisplayOperator(NamePool pool)
Give a string representation of the operator for use in diagnostics
ItemevaluateItem(XPathContext context)
Evaluate as an Item.
ItemTypegetItemType(TypeHierarchy th)
Determine the data type of the items returned by the expression
SequenceIteratoriterate(XPathContext context)
Iterate over the sequence of values
Objectmap(Item item, XPathContext context)
Implement the mapping function
ExpressiontypeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression

Constructor Detail

UntypedAtomicConverter

public UntypedAtomicConverter(Expression sequence, AtomicType requiredItemType, boolean allConverted)
Constructor

Parameters: sequence this must be a sequence of atomic values. This is not checked; a ClassCastException will occur if the precondition is not satisfied. requiredItemType the item type to which untypedAtomic items in the sequence should be converted, using the rules for "cast as". allConverted true if the result of this expression is a sequence in which all items belong to the required type

Method Detail

computeSpecialProperties

public int computeSpecialProperties()
Determine the special properties of this expression

Returns: NON_CREATIVE.

displayOperator

protected String displayOperator(NamePool pool)
Give a string representation of the operator for use in diagnostics

Returns: the operator, as a string

evaluateItem

public Item evaluateItem(XPathContext context)
Evaluate as an Item. This should only be called if the UntypedAtomicConverter has cardinality zero-or-one

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the data type of the items returned by the expression

Parameters: th

iterate

public SequenceIterator iterate(XPathContext context)
Iterate over the sequence of values

map

public Object map(Item item, XPathContext context)
Implement the mapping function

typeCheck

public Expression typeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression