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

void

assignElementTypedValue(Item &aElement, Item aTypedValue)=0

Assigns a simple typed value to an element node.

void

assignElementTypedValue(Item &aElement, std::vector< Item > &aTypedValue)=0

Assigns a simple typed value to an element node.

Item

createAnyURI(const String &aURI)=0

Creates an AnyURI Item see [http://www.w3.org/TR/xmlschema-2/#anyURI].

Item

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.

Item

createAttributeNode(Item aParent, Item aNodeName, Item aTypeName, std::vector< Item > aTypedValue)=0

Item

createBase64Binary(const char *aData, size_t aLength, bool aIsBase64)=0

Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].

Item

createBase64Binary(std::istream &aStream)=0

Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].

Item

createBoolean(bool aValue)=0

Creates a Boolean Item see [http://www.w3.org/TR/xmlschema-2/#bool].

Item

createByte(char aByte)=0

Creates a Byte Item see [http://www.w3.org/TR/xmlschema-2/#byte].

Item

createCommentNode(Item aParent, String &aContent)=0

Create a new comment node N and place it as the last child of a given parent node.

Item

createDate(const String &aDate)=0

Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].

Item

createDate(short aYear, short aMonth, short aDay)=0

Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].

Item

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].

Item

createDateTime(short aYear, short aMonth, short aDay, short aHour, short aMinute, double aSecond)=0

Creates a DateTime Item without setting a time zone.

Item

createDateTime(const String &aDateTimeValue)=0

Creates a DateTime Item see [http://www.w3.org/TR/xmlschema-2/#dateTime].

Item

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].

Item

createDateTimeStamp(const String &aDateTimeStampValue)=0

Creates a DateTimeStamp Item see [www.w3.org/TR/xmlschema11-2/#dateTimeStamp].

Item

createDayTimeDuration(const String &aValue)=0

Creates a dayTimeDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].

Item

createDecimal(const String &aValue)=0

Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].

Item

createDecimalFromDouble(double aValue)=0

Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].

Item

createDecimalFromLong(unsigned long aValue)=0

Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].

Item

createDocumentNode(const String &aBaseUri, const String &aDocUri)=0

Creates a documentNode Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].

Item

createDouble(double aValue)=0

Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].

Item

createDouble(const String &aValue)=0

Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].

Item

createDuration(const String &aValue)=0

Creates a Duration Item see [http://www.w3.org/TR/xmlschema-2/#duration].

Item

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].

Item

createElementNode(Item &aParent, Item aNodeName, Item aTypeName, bool aHasTypedValue, bool aHasEmptyValue, NsBindings aNsBindings)=0

Creates a new element node.

Item

createFloat(const String &aValue)=0

creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]

Item

createFloat(float aValue)=0

creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]

Item

createGDay(const String &aValue)=0

Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].

Item

createGDay(short aDay)=0

Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].

Item

createGMonth(const String &aValue)=0

Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].

Item

createGMonth(short aMonth)=0

Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].

Item

createGMonthDay(const String &aValue)=0

Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].

Item

createGMonthDay(short aMonth, short aDay)=0

Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].

Item

createGYear(const String &aValue)=0

Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].

Item

createGYear(short aYear)=0

Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].

Item

createGYearMonth(const String &aValue)=0

Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].

Item

createGYearMonth(short aYear, short aMonth)=0

Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].

Item

createHexBinary(const char *aData, size_t aSize, bool aIsEncoded=true)=0

Creates a HexBinary Item see [http://www.w3.org/TR/xmlschema-2/#hexBinary].

Item

createInt(int aInt)=0

Creates a Int Item see [http://www.w3.org/TR/xmlschema-2/#int].

Item

createInteger(long long aInteger)=0

Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].

Item

createInteger(const String &aInteger)=0

Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].

Item

createJSONArray(std::vector< Item > &aItems)=0

Create a JSON Array containing the specified items.

Item

createJSONNull()=0

Create a JSON null item.

Item

createJSONObject(std::vector< std::pair< Item, Item > > &aNames)=0

Create a JSON Object containing the specified JSON Pairs.

Item

createLong(long long aLong)=0

Creates a Long Item see [http://www.w3.org/TR/xmlschema-2/#long].

Item

createNCName(const String &aValue)=0

Creates a NCName Item see [http://www.w3.org/TR/xmlschema-2/#NCName].

Item

createNegativeInteger(long long aValue)=0

Creates a negativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#negativeInteger].

Item

createNonNegativeInteger(unsigned long long aValue)=0

Creates a nonNegativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger].

Item

createNonPositiveInteger(long long aValue)=0

Creates a nonPositiveInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger].

Item

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.

Item

createPositiveInteger(unsigned long long aValue)=0

Creates a positiveInteger\ Item see [http://www.w3.org/TR/xmlschema-2/#positiveInteger].

Item

createQName(const String &aNamespace, const String &aPrefix, const String &aLocalname)=0

Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].

Item

createQName(const String &aNamespace, const String &aLocalname)=0

Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].

Item

createQName(const String &aQNameString)=0

Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].

Item

createShort(short aShort)=0

Creates a Short Item see [http://www.w3.org/TR/xmlschema-2/#short].

Item

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].

Item

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].

Item

createStreamableString(std::istream &stream, StreamReleaser streamReleaser, bool seekable=false)=0

Creates a streamable String Item see [http://www.w3.org/TR/xmlschema-2/#string].

Item

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].

Item

createString(const String &aString)=0

Creates a String Item see [http://www.w3.org/TR/xmlschema-2/#string].

Item

createTextNode(Item parent, String content)=0

Create a new text node N and place it among the children of a given parent node.

Item

createTime(const String &aValue)=0

Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].

Item

createTime(short aHour, short aMinute, double aSecond)=0

Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].

Item

createTime(short aHour, short aMinute, double aSecond, int aTimeZone)=0

Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].

Item

createUnsignedByte(const unsigned char aValue)=0

Creates an Unsigned Byte Item see [http://www.w3.org/TR/xmlschema-2/#unsignedByte].

Item

createUnsignedInt(unsigned int aValue)=0

Creates an unsigned int Item see [http://www.w3.org/TR/xmlschema-2/#unsignedInt].

Item

createUnsignedLong(unsigned long long aValue)=0

Creates an unsignedLong Item see [http://www.w3.org/TR/xmlschema-2/#unsignedLong].

Item

createUnsignedShort(unsigned short aValue)=0

Creates a unsignedShort Item see [http://www.w3.org/TR/xmlschema-2/#unsignedShort].

Item

createUntypedAtomic(const String &value)=0

Creates a UntypedAtomic Item.

Item

createUserTypedAtomicItem(Item &aBaseItem, Item &aTypeName)=0

Create an atomic item having a user-defined atomic type.

Item

createYearMonthDuration(const String &aValue)=0

Creates a yearMonthDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].

~ItemFactory()

Destructor.

Public Functions

assignElementTypedValue

void 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

aElement The element for the typed value; may not be NULL.
aTypedValue The typed value for the element.

assignElementTypedValue

void 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

aElement The element for the typed value; may not be NULL.
aTypedValue The typed value for the element.

createAnyURI

Item createAnyURI(const String &aURI)=0

Creates an AnyURI Item see [http://www.w3.org/TR/xmlschema-2/#anyURI].

Parameters

aURI String representation of the AnyURI.

Returns

The AnyURI Item.

createAttributeNode

Item 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

aParent The parent P of the new node; may be NULL.
aNodeName The fully qualified name of the new node. The nemaspace binding implied by this name will be added to the namespaces of P. If the name prefix is "xml" and the local name is "base", then the base-uri property of P will be set or updated accordingly.
aTypeName The fully qualified name of the new node's type.
aTypedValue The typed value of the new node.

Returns

The new node N created by this method

createAttributeNode

Item createAttributeNode(Item aParent, Item aNodeName, Item aTypeName, std::vector< Item > aTypedValue)=0

createBase64Binary

Item createBase64Binary(const char *aData, size_t aLength, bool aIsBase64)=0

Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].

Parameters

aData a pointer to the data.
aLength the length of the data (in bytes).
aIsBase64 If true, aData is already Base-64 encoded; if false, aData is binary data that will first be Base-64 encoded.

Returns

The Base64Binary Item.

createBase64Binary

Item createBase64Binary(std::istream &aStream)=0

Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].

Parameters

aStream A stream containing the Base64 encoded data. The data is copied from aStream immediately.

Returns

the Base64Binary Item.

createBoolean

Item createBoolean(bool aValue)=0

Creates a Boolean Item see [http://www.w3.org/TR/xmlschema-2/#bool].

Parameters

aValue bool representation of the Boolean.

Returns

The Boolean Item.

createByte

Item createByte(char aByte)=0

Creates a Byte Item see [http://www.w3.org/TR/xmlschema-2/#byte].

Parameters

aByte char representation of the Byte.

Returns

The Byte Item.

createCommentNode

Item 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

aParent The parent P of the new node; may be NULL.
aContent The content of the new node.

Returns

The new node N created by this method

createDate

Item createDate(const String &aDate)=0

Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].

Parameters

aDate String representation of the Date (e.g. 2002-10-10).

Returns

The Date Item.

createDate

Item createDate(short aYear, short aMonth, short aDay)=0

Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].

Parameters

aYear short-valued representation of the year.
aMonth short-valued representation of the month.
aDay short-valued representation of the day.

Returns

The Date Item.

createDateTime

Item 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

aYear the year.
aMonth the month [1-12].
aDay the day [1-31].
aHour the hour [0-23].
aMinute the minute [0-59].
aSecond the seconds and fractional seconds.
aTimeZone the number of seconds east of the prime meridian.

Returns

The DateTime Item.

createDateTime

Item 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

aYear the year.
aMonth the month [1-12].
aDay the day [1-31].
aHour the hour [0-23].
aMinute the minute [0-59].
aSecond the seconds and fractional seconds.

Returns

The DateTime Item.

createDateTime

Item createDateTime(const String &aDateTimeValue)=0

Creates a DateTime Item see [http://www.w3.org/TR/xmlschema-2/#dateTime].

Parameters

aDateTimeValue String representation of the datetime value (for example, 2002-10-10T12:00:00-05:00).

Returns

The DateTime Item.

createDateTimeStamp

Item 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

aYear short-valued representation of the year.
aMonth short-valued representation of the month.
aDay short-valued representation of the day.
aHour short-valued representation of the hour.
aMinute short-valued representation of the minute.
aSecond double-valued representation of the seconds and fractional seconds.
aTimeZone the number of seconds east of the prime meridian.

Returns

The DateTimeStamp Item.

createDateTimeStamp

Item createDateTimeStamp(const String &aDateTimeStampValue)=0

Creates a DateTimeStamp Item see [www.w3.org/TR/xmlschema11-2/#dateTimeStamp].

Parameters

aDateTimeStampValue String representation of the datetimeStamp value (for example, 2002-10-10T12:00:00-05:00).

Returns

The DateTimeStamp Item.

createDayTimeDuration

Item createDayTimeDuration(const String &aValue)=0

Creates a dayTimeDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].

Parameters

aValue String lexical representation of the duration.

Returns

the dayTimeDuration Item.

createDecimal

Item createDecimal(const String &aValue)=0

Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].

Parameters

aValue String representation of the Decimal (e.g. 12678967.543233).

Returns

The Decimal Item.

createDecimalFromDouble

Item createDecimalFromDouble(double aValue)=0

Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].

Parameters

aValue double representation of the Decimal.

Returns

The Decimal Item.

createDecimalFromLong

Item createDecimalFromLong(unsigned long aValue)=0

Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].

Parameters

aValue unsigned long representation of the Decimal.

Returns

The Decimal Item.

createDocumentNode

Item createDocumentNode(const String &aBaseUri, const String &aDocUri)=0

Creates a documentNode Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].

Parameters

aBaseUri String representation of the Base URI.
aDocUri String representation of the Document URI.

Returns

the documentNode Item.

createDouble

Item createDouble(double aValue)=0

Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].

Parameters

aValue double representation of the Double.

Returns

The Double Item.

createDouble

Item createDouble(const String &aValue)=0

Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].

Parameters

aValue String representation of the Double.

Returns

The Double Item.

createDuration

Item createDuration(const String &aValue)=0

Creates a Duration Item see [http://www.w3.org/TR/xmlschema-2/#duration].

Parameters

aValue String representation of the NCName.

Returns

The Duration Item.

createDuration

Item 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

aYear short-valued representation of the years.
aMonths short-valued representation of the months.
aDays short-valued representation of the days.
aHours short-valued representation of the hours.
aMinutes short-valued representation of the minutes.
aSeconds double-valued representation of the seconds and fractional seconds.

Returns

The Duration Item.

createElementNode

Item 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

aParent The parent P of the new node; may be NULL.
aNodeName The fully qualified name of the new node.
aTypeName The fully qualified name of the new node's type. Not allowed to be NULL, use xsd:untyped instead.
aHasTypedValue Whether the node has a typed value or not (element nodes with complex type and element-only content do not have typed value).
aHasEmptyValue True if the typed value of the node is the empty sequence. This is the case if the element has a complex type with empty content.
aNsBindings A set of namespace bindings. The namespaces property of N will be the union of this set and the namespaces property of P.

Returns

The new node N created by this method

createFloat

Item createFloat(const String &aValue)=0

creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]

Parameters

aValue string representation of the float.

Returns

the float item.

createFloat

Item createFloat(float aValue)=0

creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]

Parameters

aValue float representation of the float.

Returns

the float item.

createGDay

Item createGDay(const String &aValue)=0

Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].

Parameters

aValue String representation of the gDay.

Returns

The gDay Item.

createGDay

Item createGDay(short aDay)=0

Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].

Parameters

aDay short representation of the gDay.

Returns

The gDay Item.

createGMonth

Item createGMonth(const String &aValue)=0

Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].

Parameters

aValue String representation of the gMonth.

Returns

The gMonth Item.

createGMonth

Item createGMonth(short aMonth)=0

Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].

Parameters

aMonth short representation of the gMonth.

Returns

The gMonth Item.

createGMonthDay

Item createGMonthDay(const String &aValue)=0

Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].

Parameters

aValue String representation of the gMonthDay.

Returns

The gMonthDay Item.

createGMonthDay

Item createGMonthDay(short aMonth, short aDay)=0

Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].

Parameters

aMonth short representation of the month.
aDay short representation of the day.

Returns

The gMonthDay Item.

createGYear

Item createGYear(const String &aValue)=0

Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].

Parameters

aValue String representation of the gYear.

Returns

The gYear Item.

createGYear

Item createGYear(short aYear)=0

Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].

Parameters

aYear short representation of the gYear.

Returns

The gYear Item.

createGYearMonth

Item createGYearMonth(const String &aValue)=0

Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].

Parameters

aValue String representation of the gYearMonth.

Returns

The gYearMonth Item.

createGYearMonth

Item createGYearMonth(short aYear, short aMonth)=0

Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].

Parameters

aYear short representation of the year.
aMonth short representation of the month.

Returns

The gYearMonth Item.

createHexBinary

Item 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

aData pointer to the data.
aSize size of the data in bytes.
aIsEncoded if true, the aData is already HexBinary encoded.

Returns

The HexBinary Item.

createInt

Item createInt(int aInt)=0

Creates a Int Item see [http://www.w3.org/TR/xmlschema-2/#int].

Parameters

aInt int representation of the Int.

Returns

The NCName Item.

createInteger

Item createInteger(long long aInteger)=0

Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].

Parameters

aInteger unsigned long representation of the Integer.

Returns

The Integer Item.

createInteger

Item createInteger(const String &aInteger)=0

Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].

Parameters

aInteger String representation of the Integer.

Returns

The Integer Item.

createJSONArray

Item createJSONArray(std::vector< Item > &aItems)=0

Create a JSON Array containing the specified items.

Parameters

aItems A std::vector<Item> containing Items which may be stored in a JSON Array (namely JSON Arrays, JSON Objects, JSON nulls, valid JSON numeric types, or xs:strings).

createJSONNull

Item createJSONNull()=0

Create a JSON null item.

createJSONObject

Item createJSONObject(std::vector< std::pair< Item, Item > > &aNames)=0

Create a JSON Object containing the specified JSON Pairs.

Parameters

aNames A vector containing the name and value of each pair.

createLong

Item createLong(long long aLong)=0

Creates a Long Item see [http://www.w3.org/TR/xmlschema-2/#long].

Parameters

aLong long long representation of the Long.

Returns

The Long Item.

createNCName

Item createNCName(const String &aValue)=0

Creates a NCName Item see [http://www.w3.org/TR/xmlschema-2/#NCName].

Parameters

aValue String representation of the NCName.

Returns

The NCName Item.

createNegativeInteger

Item createNegativeInteger(long long aValue)=0

Creates a negativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#negativeInteger].

Parameters

aValue long long representation of the negativeInteger.

Returns

The negativeInteger Item.

createNonNegativeInteger

Item createNonNegativeInteger(unsigned long long aValue)=0

Creates a nonNegativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger].

Parameters

aValue unsigned long representation of the nonNegativeInteger.

Returns

The nonNegativeInteger Item.

createNonPositiveInteger

Item createNonPositiveInteger(long long aValue)=0

Creates a nonPositiveInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger].

Parameters

aValue long long representation of the NCName.

Returns

The nonPositiveInteger Item.

createPiNode

Item 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

aParent The parent P of the new node; may be NULL.
aTarget The Target of the new node.
aContent The Content of the new node.
aBaseUri The Base URI of the new node, may be NULL.

Returns

The new node N created by this method

createPositiveInteger

Item createPositiveInteger(unsigned long long aValue)=0

Creates a positiveInteger\ Item see [http://www.w3.org/TR/xmlschema-2/#positiveInteger].

Parameters

aValue unsigned long representation of the positiveInteger.

Returns

The positiveInteger Item.

createQName

Item createQName(const String &aNamespace, const String &aPrefix, const String &aLocalname)=0

Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].

Parameters

aNamespace String representation of the namespace.
aPrefix String representation of the prefix.
aLocalname String representation of the localname.

Returns

The QName Item.

createQName

Item createQName(const String &aNamespace, const String &aLocalname)=0

Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].

Parameters

aNamespace String representation of the namespace.
aLocalname String representation of the localname. *

Returns

The QName Item.

createQName

Item 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

aQNameString String in the QName notation by James Clark.

Returns

The QName Item.

createShort

Item createShort(short aShort)=0

Creates a Short Item see [http://www.w3.org/TR/xmlschema-2/#short].

Parameters

aShort short representation of the Short.

Returns

The Short Item.

createStreamableBase64Binary

Item 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

stream An istream from where to read the binary's content.
streamReleaser A function pointer which is invoked once the StreamableBase64Binary is destroyed. Normally this function will delete the std::istream object passed to it.
seekable is the given stream seekable
encoded is the contents of the given stream already base64 encoded

Returns

The streamable String Item

createStreamableBase64Binary

Item 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

stream An istream from where to read the binary's content.
streamReleaser A function pointer which is invoked once the StreamableBase64Binary is destroyed. Normally this function will delete the std::istream object passed to it.
uri The URI is intended to be used to note the origination URI (e.g., file) that data is coming from.
seekable is the given stream seekable
encoded is the contents of the given stream already base64 encoded

Returns

The streamable String Item

createStreamableString

Item 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

stream An istream from where to read the string's content.
streamReleaser A function pointer which is invoked once the StreamableStringItem is destroyed. Normally this function will delete the std::istream object passed to it.
seekable

Returns

The streamable String Item

createStreamableString

Item 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

stream An istream from where to read the string's content.
streamReleaser A function pointer which is invoked once the StreamableStringItem is destroyed. Normally this function will delete the std::istream object passed to it.
uri The URI is intended to be used to note the origination URI (e.g., file) that data is coming from.
seekable

Returns

The streamable String Item

createString

Item createString(const String &aString)=0

Creates a String Item see [http://www.w3.org/TR/xmlschema-2/#string].

Parameters

aString String representation of the String Item.

Returns

The String Item

createTextNode

Item 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

parent The parent P of the new node; may be NULL.
content The content of the new node.

Returns

The new node N created by this method

createTime

Item createTime(const String &aValue)=0

Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].

Parameters

aValue String representation of the Time.

Returns

The Time Item

createTime

Item createTime(short aHour, short aMinute, double aSecond)=0

Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].

Parameters

aHour short representation of the hour.
aMinute short representation of the minute.
aSecond double representation of the seconds and fractional seconds.

Returns

The Time Item.

createTime

Item createTime(short aHour, short aMinute, double aSecond, int aTimeZone)=0

Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].

Parameters

aHour short representation of the hour.
aMinute short representation of the minute.
aSecond double representation of the seconds and fractional seconds.
aTimeZone the number of seconds east of the prime meridian.

Returns

The Time Item.

createUnsignedByte

Item createUnsignedByte(const unsigned char aValue)=0

Creates an Unsigned Byte Item see [http://www.w3.org/TR/xmlschema-2/#unsignedByte].

Parameters

aValue unsignedByte unsigned char representation of the unsigned byte.

Returns

The Unsigned Byte Item.

createUnsignedInt

Item createUnsignedInt(unsigned int aValue)=0

Creates an unsigned int Item see [http://www.w3.org/TR/xmlschema-2/#unsignedInt].

Parameters

aValue unsigned int representation of the unsignedInt.

Returns

The unsignedInt Item.

createUnsignedLong

Item createUnsignedLong(unsigned long long aValue)=0

Creates an unsignedLong Item see [http://www.w3.org/TR/xmlschema-2/#unsignedLong].

Parameters

aValue unsignedLong long long representation of the unsignedLong.

Returns

The unsignedLong Item.

createUnsignedShort

Item createUnsignedShort(unsigned short aValue)=0

Creates a unsignedShort Item see [http://www.w3.org/TR/xmlschema-2/#unsignedShort].

Parameters

aValue unsigned short representation of the unsignedShort.

Returns

The unsignedShort Item.

createUntypedAtomic

Item createUntypedAtomic(const String &value)=0

Creates a UntypedAtomic Item.

Parameters

value String representation of the UntypedAtomic Item.

Returns

The UntypedAtomic Item

createUserTypedAtomicItem

Item createUserTypedAtomicItem(Item &aBaseItem, Item &aTypeName)=0

Create an atomic item having a user-defined atomic type.

Parameters

aBaseItem the base item of the item to create.
aTypeName the name of the type of the item to create.

Returns

a new atomic item having the given user-defined atomic type.

createYearMonthDuration

Item createYearMonthDuration(const String &aValue)=0

Creates a yearMonthDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].

Parameters

aValue String lexical representation of the duration.

Returns

the yearMonthDuration Item.

~ItemFactory

 ~ItemFactory()

Destructor.