org.exist.xquery.value
Interface Item

All Known Subinterfaces:
NodeValue
All Known Implementing Classes:
AbstractDateTimeValue, AnyURIValue, AtomicValue, AttributeImpl, Base64Binary, BinaryValue, BooleanValue, CDATASectionImpl, CommentImpl, ComputableValue, DateTimeValue, DateValue, DayTimeDurationValue, DecimalValue, DocumentImpl, DoubleValue, DurationValue, ElementImpl, FloatValue, FunctionReference, GDayValue, GMonthDayValue, GMonthValue, GYearMonthValue, GYearValue, HexBinary, IntegerValue, JavaObjectValue, NamespaceNode, NodeImpl, NodeProxy, NumericValue, ProcessingInstructionImpl, QNameValue, ReferenceNode, StringValue, TextImpl, TimeValue, UntypedAtomicValue, YearMonthDurationValue

public interface Item

This class represents an item in a sequence as defined by the XPath 2.0 specification. Every item is either an atomic value or a node.

Author:
wolf

Method Summary
 AtomicValue atomize()
           
 int conversionPreference(Class javaClass)
           
 AtomicValue convertTo(int requiredType)
          Convert this item into an atomic value, whose type corresponds to the specified target type.
 void copyTo(DBBroker broker, DocumentBuilderReceiver receiver)
           
 String getStringValue()
          Return the string value of this item (see the definition of string value in XPath).
 int getType()
          Return the type of this item according to the type constants defined in class Type.
 void nodeMoved(NodeId oldNodeId, StoredNode newNode)
          Nodes may implement this method to be informed of storage address and node id changes after updates.
 Object toJavaObject(Class target)
           
 void toSAX(DBBroker broker, ContentHandler handler, Properties properties)
           
 Sequence toSequence()
          Convert this item into a sequence, containing only the item.
 

Method Detail

getType

int getType()
Return the type of this item according to the type constants defined in class Type.


getStringValue

String getStringValue()
                      throws XPathException
Return the string value of this item (see the definition of string value in XPath).

Throws:
XPathException

toSequence

Sequence toSequence()
Convert this item into a sequence, containing only the item.


convertTo

AtomicValue convertTo(int requiredType)
                      throws XPathException
Convert this item into an atomic value, whose type corresponds to the specified target type. requiredType should be one of the type constants defined in Type. An XPathException is thrown if the conversion is impossible.

Parameters:
requiredType -
Throws:
XPathException

atomize

AtomicValue atomize()
                    throws XPathException
Throws:
XPathException

toSAX

void toSAX(DBBroker broker,
           ContentHandler handler,
           Properties properties)
           throws SAXException
Throws:
SAXException

copyTo

void copyTo(DBBroker broker,
            DocumentBuilderReceiver receiver)
            throws SAXException
Throws:
SAXException

conversionPreference

int conversionPreference(Class javaClass)

toJavaObject

Object toJavaObject(Class target)
                    throws XPathException
Throws:
XPathException

nodeMoved

void nodeMoved(NodeId oldNodeId,
               StoredNode newNode)
Nodes may implement this method to be informed of storage address and node id changes after updates.

Parameters:
oldNodeId -
newNode -
See Also:
UpdateListener


Copyright (C) Wolfgang Meier. All rights reserved.