zorba::ItemFactory#include <zorba/item_factory.h> ItemFactory to create Items. An instance of this class can be obtained by calling getItemFactory on the Zorba object.Each createXXX function of this class creates an Item of an XML Schema item. If an isNull() call on an Item created by one of these functions returns true the Item could not be created.Public Functions
Public FunctionsassignElementTypedValuevoid assignElementTypedValue(Item &aElement, Item aTypedValue)=0 Assigns a simple typed value to an element node. Creates a simple typed value for an element. Note that this may only be done once per element. This method should only be used during creation of a new tree. Using this method to modify elements after processing has begun has undefined results. Parameters
assignElementTypedValuevoid assignElementTypedValue(Item &aElement, std::vector< Item > &aTypedValue)=0 Assigns a simple typed value to an element node. Creates a simple typed value for an element. Note that this may only be done once per element. This method should only be used during creation of a new tree. Using this method to modify elements after processing has begun has undefined results. Parameters
createAnyURIItem createAnyURI(const String &aURI)=0 Creates an AnyURI Item see [http://www.w3.org/TR/xmlschema-2/#anyURI].
Parameters
ReturnsThe AnyURI Item.createAttributeNodeItem createAttributeNode(Item aParent, Item aNodeName, Item aTypeName, Item aTypedValue)=0 Create a new attribute node N and place it among the attributes of a given parent node. If no parent is given, N becomes the root (and single node) of a new XML tree. Parameters
ReturnsThe new node N created by this methodcreateAttributeNodeItem createAttributeNode(Item aParent, Item aNodeName, Item aTypeName, std::vector< Item > aTypedValue)=0
createBase64BinaryItem createBase64Binary(const char *aData, size_t aLength, bool aIsBase64)=0 Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
Parameters
ReturnsThe Base64Binary Item.createBase64BinaryItem createBase64Binary(std::istream &aStream)=0 Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
Parameters
Returnsthe Base64Binary Item.createBooleanItem createBoolean(bool aValue)=0 Creates a Boolean Item see [http://www.w3.org/TR/xmlschema-2/#bool].
Parameters
ReturnsThe Boolean Item.createByteItem createByte(char aByte)=0 Creates a Byte Item see [http://www.w3.org/TR/xmlschema-2/#byte].
Parameters
ReturnsThe Byte Item.createCommentNodeItem createCommentNode(Item aParent, String &aContent)=0 Create a new comment node N and place it as the last child of a given parent node. If no parent is given, N becomes the root (and single node) of a new XML tree. Parameters
ReturnsThe new node N created by this methodcreateDateItem createDate(const String &aDate)=0 Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].
Parameters
ReturnsThe Date Item.createDateItem createDate(short aYear, short aMonth, short aDay)=0 Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].
Parameters
ReturnsThe Date Item.createDateTimeItem createDateTime(short aYear, short aMonth, short aDay, short aHour, short aMinute, double aSecond, int aTimeZone)=0 Creates a DateTime Item see [http://www.w3.org/TR/xmlschema-2/#dateTime].
Parameters
ReturnsThe DateTime Item.createDateTimeItem createDateTime(short aYear, short aMonth, short aDay, short aHour, short aMinute, double aSecond)=0 Creates a DateTime Item without setting a time zone. see [http://www.w3.org/TR/xmlschema-2/#dateTime] Parameters
ReturnsThe DateTime Item.createDateTimeItem createDateTime(const String &aDateTimeValue)=0 Creates a DateTime Item see [http://www.w3.org/TR/xmlschema-2/#dateTime].
Parameters
ReturnsThe DateTime Item.createDateTimeStampItem createDateTimeStamp(short aYear, short aMonth, short aDay, short aHour, short aMinute, double aSecond, int aTimeZone)=0 Creates a DateTimeStamp Item see [www.w3.org/TR/xmlschema11-2/#dateTimeStamp].
Parameters
ReturnsThe DateTimeStamp Item.createDateTimeStampItem createDateTimeStamp(const String &aDateTimeStampValue)=0 createDayTimeDurationItem createDayTimeDuration(const String &aValue)=0 Creates a dayTimeDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].
Parameters
Returnsthe dayTimeDuration Item.createDecimalItem createDecimal(const String &aValue)=0 Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].
Parameters
ReturnsThe Decimal Item.createDecimalFromDoubleItem createDecimalFromDouble(double aValue)=0 Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].
Parameters
ReturnsThe Decimal Item.createDecimalFromLongItem createDecimalFromLong(unsigned long aValue)=0 Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].
Parameters
ReturnsThe Decimal Item.createDocumentNodeItem createDocumentNode(const String &aBaseUri, const String &aDocUri)=0 Creates a documentNode Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].
Parameters
Returnsthe documentNode Item.createDoubleItem createDouble(double aValue)=0 Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].
Parameters
ReturnsThe Double Item.createDoubleItem createDouble(const String &aValue)=0 Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].
Parameters
ReturnsThe Double Item.createDurationItem createDuration(const String &aValue)=0 Creates a Duration Item see [http://www.w3.org/TR/xmlschema-2/#duration].
Parameters
ReturnsThe Duration Item.createDurationItem createDuration(short aYear, short aMonths, short aDays, short aHours, short aMinutes, double aSeconds)=0 Creates a Duration Item see [http://www.w3.org/TR/xmlschema-2/#duration].
Parameters
ReturnsThe Duration Item.createElementNodeItem createElementNode(Item &aParent, Item aNodeName, Item aTypeName, bool aHasTypedValue, bool aHasEmptyValue, NsBindings aNsBindings)=0 Creates a new element node. Create a new element node N and place it at the end among the children of a given parent node. If no parent is given, N becomes the root (and single node) of a new XML tree. Parameters
ReturnsThe new node N created by this methodcreateFloatItem createFloat(const String &aValue)=0 creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]
Parameters
Returnsthe float item.createFloatItem createFloat(float aValue)=0 creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]
Parameters
Returnsthe float item.createGDayItem createGDay(const String &aValue)=0 Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].
Parameters
ReturnsThe gDay Item.createGDayItem createGDay(short aDay)=0 Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].
Parameters
ReturnsThe gDay Item.createGMonthItem createGMonth(const String &aValue)=0 Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].
Parameters
ReturnsThe gMonth Item.createGMonthItem createGMonth(short aMonth)=0 Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].
Parameters
ReturnsThe gMonth Item.createGMonthDayItem createGMonthDay(const String &aValue)=0 Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].
Parameters
ReturnsThe gMonthDay Item.createGMonthDayItem createGMonthDay(short aMonth, short aDay)=0 Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].
Parameters
ReturnsThe gMonthDay Item.createGYearItem createGYear(const String &aValue)=0 Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].
Parameters
ReturnsThe gYear Item.createGYearItem createGYear(short aYear)=0 Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].
Parameters
ReturnsThe gYear Item.createGYearMonthItem createGYearMonth(const String &aValue)=0 Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].
Parameters
ReturnsThe gYearMonth Item.createGYearMonthItem createGYearMonth(short aYear, short aMonth)=0 Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].
Parameters
ReturnsThe gYearMonth Item.createHexBinaryItem createHexBinary(const char *aData, size_t aSize, bool aIsEncoded=true)=0 Creates a HexBinary Item see [http://www.w3.org/TR/xmlschema-2/#hexBinary].
Parameters
ReturnsThe HexBinary Item.createIntItem createInt(int aInt)=0 Creates a Int Item see [http://www.w3.org/TR/xmlschema-2/#int].
Parameters
ReturnsThe NCName Item.createIntegerItem createInteger(long long aInteger)=0 Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].
Parameters
ReturnsThe Integer Item.createIntegerItem createInteger(const String &aInteger)=0 Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].
Parameters
ReturnsThe Integer Item.createJSONArrayItem createJSONArray(std::vector< Item > &aItems)=0 Create a JSON Array containing the specified items.
Parameters
createJSONObjectItem createJSONObject(std::vector< std::pair< Item, Item > > &aNames)=0 Create a JSON Object containing the specified JSON Pairs.
Parameters
createLongItem createLong(long long aLong)=0 Creates a Long Item see [http://www.w3.org/TR/xmlschema-2/#long].
Parameters
ReturnsThe Long Item.createNCNameItem createNCName(const String &aValue)=0 Creates a NCName Item see [http://www.w3.org/TR/xmlschema-2/#NCName].
Parameters
ReturnsThe NCName Item.createNegativeIntegerItem createNegativeInteger(long long aValue)=0 Creates a negativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#negativeInteger].
Parameters
ReturnsThe negativeInteger Item.createNonNegativeIntegerItem createNonNegativeInteger(unsigned long long aValue)=0 Creates a nonNegativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger].
Parameters
ReturnsThe nonNegativeInteger Item.createNonPositiveIntegerItem createNonPositiveInteger(long long aValue)=0 Creates a nonPositiveInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger].
Parameters
ReturnsThe nonPositiveInteger Item.createPiNodeItem createPiNode(Item aParent, String &aTarget, String &aContent, String &aBaseUri)=0 Create a new Processing Instruction node N and place it among the children of a given parent node. If no parent is given, N becomes the root (and single node) of a new XML tree. Parameters
ReturnsThe new node N created by this methodcreatePositiveIntegerItem createPositiveInteger(unsigned long long aValue)=0 Creates a positiveInteger\ Item see [http://www.w3.org/TR/xmlschema-2/#positiveInteger].
Parameters
ReturnsThe positiveInteger Item.createQNameItem createQName(const String &aNamespace, const String &aPrefix, const String &aLocalname)=0 createQNameItem createQName(const String &aNamespace, const String &aLocalname)=0 Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].
Parameters
ReturnsThe QName Item.createQNameItem createQName(const String &aQNameString)=0 Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName]. The QName is constructed by parsing the string using the notation invented by James Clark (i.e. {namespace}localname). Parameters
ReturnsThe QName Item.createShortItem createShort(short aShort)=0 Creates a Short Item see [http://www.w3.org/TR/xmlschema-2/#short].
Parameters
ReturnsThe Short Item.createStreamableBase64BinaryItem createStreamableBase64Binary(std::istream &stream, StreamReleaser streamReleaser, bool seekable=false, bool encoded=false)=0 Creates a streamable Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
Parameters
createStreamableBase64BinaryItem createStreamableBase64Binary(std::istream &stream, StreamReleaser streamReleaser, char const *uri, bool seekable=false, bool encoded=false)=0 Creates a streamable Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
Parameters
createStreamableStringItem createStreamableString(std::istream &stream, StreamReleaser streamReleaser, bool seekable=false)=0 Creates a streamable String Item see [http://www.w3.org/TR/xmlschema-2/#string].
Parameters
createStreamableStringItem createStreamableString(std::istream &stream, StreamReleaser streamReleaser, char const *uri, bool seekable=false)=0 Creates a streamable String Item see [http://www.w3.org/TR/xmlschema-2/#string].
Parameters
createStringItem createString(const String &aString)=0 createTextNodeItem createTextNode(Item parent, String content)=0 Create a new text node N and place it among the children of a given parent node. If no parent is given, N becomes the root (and single node) of a new XML tree. Parameters
ReturnsThe new node N created by this methodcreateTimeItem createTime(const String &aValue)=0 Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].
Parameters
ReturnsThe Time ItemcreateTimeItem createTime(short aHour, short aMinute, double aSecond)=0 Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].
Parameters
ReturnsThe Time Item.createTimeItem createTime(short aHour, short aMinute, double aSecond, int aTimeZone)=0 Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].
Parameters
ReturnsThe Time Item.createUnsignedByteItem createUnsignedByte(const unsigned char aValue)=0 Creates an Unsigned Byte Item see [http://www.w3.org/TR/xmlschema-2/#unsignedByte].
Parameters
ReturnsThe Unsigned Byte Item.createUnsignedIntItem createUnsignedInt(unsigned int aValue)=0 Creates an unsigned int Item see [http://www.w3.org/TR/xmlschema-2/#unsignedInt].
Parameters
ReturnsThe unsignedInt Item.createUnsignedLongItem createUnsignedLong(unsigned long long aValue)=0 Creates an unsignedLong Item see [http://www.w3.org/TR/xmlschema-2/#unsignedLong].
Parameters
ReturnsThe unsignedLong Item.createUnsignedShortItem createUnsignedShort(unsigned short aValue)=0 Creates a unsignedShort Item see [http://www.w3.org/TR/xmlschema-2/#unsignedShort].
Parameters
ReturnsThe unsignedShort Item.createUntypedAtomicItem createUntypedAtomic(const String &value)=0 createUserTypedAtomicItemItem createUserTypedAtomicItem(Item &aBaseItem, Item &aTypeName)=0 Create an atomic item having a user-defined atomic type.
Parameters
Returnsa new atomic item having the given user-defined atomic type.createYearMonthDurationItem createYearMonthDuration(const String &aValue)=0 Creates a yearMonthDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].
Parameters
Returnsthe yearMonthDuration Item.~ItemFactory ~ItemFactory() Destructor.
|