Item#include </home/jenkins/.jenkins/ubuntu-remote-queue/jenkins-BuildZorbaUbuntu-462/source/zorba/swig/Item.h> The Zorba Item interface. This class is the Zorba representation of an Item as defined in the XQuery 1.0 and XPath 2.0 Data Model (XDM); see http://www.w3.org/TR/xpath-datamodel/.Instances of the XDM are a sequence, i.e. an ordered collection of zero or more items. In the Zorba API, a sequence is represented by the ItemSequence class.The Item class is the union of all XQuery node and atomic types. The class provides functions to access the information of an Item. Note that not all functions are defined on every Item kind. If a function is called on an Item that does not provide the called function, an ZXQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE error is raised.Instances of the Item class are always passed by copy. To check whether a given Item is valid isNull() can be called which returns true if the given Item is not valid and false otherwise. A new atomic Item can be created using the ItemFactory. A new node Item should be created by the result of a query.Friend Classes
Private Attributes
Public Functions
Public Static Functions
Friend ClassesCollectionfriend class Collection
CollectionManagerfriend class CollectionManager
DocumentManagerfriend class DocumentManager
DynamicContextfriend class DynamicContext
ItemFactoryfriend class ItemFactory
ItemSequencefriend class ItemSequence
Iteratorfriend class Iterator
SingletonIteratorfriend class SingletonIterator
StaticCollectionManagerfriend class StaticCollectionManager
StaticContextfriend class StaticContext
Private AttributestheItemzorba::Item theItem
Public Functionsclosevoid close() Free all resources aquired by this Item. After calling close() on an Item the Item is invalidated, i.e. a subsequent call to isNull() will return true.Note that calling this function is usually not necessary because close() is implicitly called by the destructor. Calling close() is only necessary if the resources aquired by an Item should be released before the Item goes out of scope, i.e. the destructor is called.Also note that this function is available for all types of Items. getAtomizationValueIterator getAtomizationValue() const Get the atomization value of the Item. The atomization value is the value that is returned by atomization (see http://www.w3.org/TR/xquery/#id-atomization). Note that this function is available for all types of Items. Parameters
getAttributesIterator getAttributes() const getBooleanValuebool getBooleanValue() const getChildrenIterator getChildren() const getDoubleValuedouble getDoubleValue() const getEBVItem getEBV() const Get the effective boolean value of the Item. The effective boolean value is the result of applying the fn:boolean function on the Item (see http://www.w3.org/TR/xpath-functions/#func-boolean). Note that this function is available for all types of Items. Parameters
getIntValueint getIntValue() const getLocalNamestd::string getLocalName() const Get the value of a QName's local name. Note that this function is only available for Items of type QName. ReturnsString the local name of the QName.Parameters
getLongValuelong long getLongValue() const getNamespacestd::string getNamespace() const Get the (optional) value of a QName's namespace. Note that this function is only available for Items of type QName. ReturnsString the namespace URI of the QName.Parameters
getNamespaceBindingsstd::vector< std::pair< std::string, std::string > > getNamespaceBindings() getNodeKindint getNodeKind() const getNodeNamebool getNodeName(Item &aNodeName) const getParentItem getParent() const getPrefixstd::string getPrefix() const Get the (optional) value of a QName's prefix. Note that this function is only available for Items of type QName. ReturnsString the prefix of the QName.Parameters
getStringValuestd::string getStringValue() const Get the string value of the Item. The string value is the string that is extracted by calling the fn:string function on the Item (see http://www.w3.org/TR/xpath-functions/#func-string). Note that this function is available for all types of Items. Parameters
getTypeItem getType() const Get the type of the Item. See http://www.w3.org/TR/xpath-datamodel/#types. Note that this function is available for all types of Items. Parameters
getUnsignedIntValueunsigned int getUnsignedIntValue() const
isAtomicbool isAtomic() const isNaNbool isNaN() const isNodebool isNode() const isNullbool isNull() const isPosOrNegInfbool isPosOrNegInf() const Item Item() Default constructor.
Item Item(const Item &aItem) Copy constructor.
Item Item(const zorba::Item &aZItem) Constructor that is used to construct Items in the Zorba engine itself. This constructor is for internal use only. serializestd::string serialize() const Serializes the object. Returns a string with the value of the object serialized ReturnsThe string value of the Item.Parameters
serializestd::string serialize(SerializationOptions serOptions) const serializeToStreamvoid serializeToStream(ZorbaIOStream &aStream) const Serializes the object. Put the serialized object into the specified stream. Parameters
Parameters
serializeToStreamvoid serializeToStream(ZorbaIOStream &aStream, SerializationOptions serOptions) const Public Static Functions |