zorba::ItemFactory

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.

#include <zorba/item_factory.h>

Public Functions

virtual ItemcreateAnyURI( const String & aURI )
Creates an AnyURI Item see [http://www.w3.org/TR/xmlschema-2/#anyURI].
virtual ItemcreateAttributeNodeItem aParent, Item aNodeName, Item aTypeName, Item aTypedValue )
Create a new attribute node N and place it among the attributes of a given parent node.
virtual ItemcreateAttributeNodeItem aParent, Item aNodeName, Item aTypeName, std::vector< Item > aTypedValue )
virtual ItemcreateBase64Binary( const char * aBinData, size_t aLength )
Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
virtual ItemcreateBase64Binary( std::istream & aStream )
Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
virtual ItemcreateBase64Binary( const unsigned char * aBinData, size_t aLength )
Creates a Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
virtual ItemcreateBooleanbool aValue )
Creates a Boolean Item see [http://www.w3.org/TR/xmlschema-2/#bool].
virtual ItemcreateByte( char aByte )
Creates a Byte Item see [http://www.w3.org/TR/xmlschema-2/#byte].
virtual ItemcreateCommentNodeItem aParent, String & aContent )
Create a new comment node N and place it as the last child of a given parent node.
virtual ItemcreateDate( const String & aDate )
Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].
virtual ItemcreateDate( short aYear, short aMonth, short aDay )
Creates a Date Item see [http://www.w3.org/TR/xmlschema-2/#date].
virtual ItemcreateDateTime( short aYear, short aMonth, short aDay, short aHour, short aMinute, double aSecond, short aTimeZone_hours )
Creates a DateTime Item see [http://www.w3.org/TR/xmlschema-2/#dateTime].
virtual ItemcreateDateTime( const String & aDateTimeValue )
Creates a DateTime Item see [http://www.w3.org/TR/xmlschema-2/#dateTime].
virtual ItemcreateDayTimeDuration( const String & aValue )
Creates a dayTimeDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].
virtual ItemcreateDecimal( const String & aValue )
Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].
virtual ItemcreateDecimalFromDouble( double aValue )
Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].
virtual ItemcreateDecimalFromLong( unsigned long aValue )
Creates a Decimal Item see [http://www.w3.org/TR/xmlschema-2/#decimal].
virtual ItemcreateDocumentNode( const String & aBaseUri, const String & aDocUri )
Creates a documentNode Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].
virtual ItemcreateDouble( double aValue )
Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].
virtual ItemcreateDouble( const String & aValue )
Creates a Double Item see [http://www.w3.org/TR/xmlschema-2/#double].
virtual ItemcreateDuration( const String & aValue )
Creates a Duration Item see [http://www.w3.org/TR/xmlschema-2/#duration].
virtual ItemcreateDuration( short aYear, short aMonths, short aDays, short aHours, short aMinutes, double aSeconds )
Creates a Duration Item see [http://www.w3.org/TR/xmlschema-2/#duration].
virtual ItemcreateElementNodeItem & aParent, Item aNodeName, Item aTypeName, bool aHasTypedValue, bool aHasEmptyValue, NsBindings aNsBindings )
Creates a new element node.
virtual ItemcreateFloat( const String & aValue )
creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]
virtual ItemcreateFloat( float aValue )
creates a float item see [http://www.w3.org/tr/xmlschema-2/#float]
virtual ItemcreateGDay( const String & aValue )
Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].
virtual ItemcreateGDay( short aDay )
Creates a gDay Item see [http://www.w3.org/TR/xmlschema-2/#gDay].
virtual ItemcreateGMonth( const String & aValue )
Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].
virtual ItemcreateGMonth( short aMonth )
Creates a gMonth Item see [http://www.w3.org/TR/xmlschema-2/#gMonth].
virtual ItemcreateGMonthDay( const String & aValue )
Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].
virtual ItemcreateGMonthDay( short aMonth, short aDay )
Creates a gMonthDay Item see [http://www.w3.org/TR/xmlschema-2/#gMonthDay].
virtual ItemcreateGYear( const String & aValue )
Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].
virtual ItemcreateGYear( short aYear )
Creates a gYear Item see [http://www.w3.org/TR/xmlschema-2/#gYear].
virtual ItemcreateGYearMonth( const String & aValue )
Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].
virtual ItemcreateGYearMonth( short aYear, short aMonth )
Creates a gYearMonth Item see [http://www.w3.org/TR/xmlschema-2/#gYearMonth].
virtual ItemcreateHexBinary( const char * aHexData, size_t aSize )
Creates a HexBinary Item see [http://www.w3.org/TR/xmlschema-2/#hexBinary].
virtual ItemcreateInt( int aInt )
Creates a Int Item see [http://www.w3.org/TR/xmlschema-2/#int].
virtual ItemcreateInteger( long long aInteger )
Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].
virtual ItemcreateInteger( const String & aInteger )
Creates an Integer Item see [http://www.w3.org/TR/xmlschema-2/#integer].
virtual ItemcreateLong( long long aLong )
Creates a Long Item see [http://www.w3.org/TR/xmlschema-2/#long].
virtual ItemcreateNCName( const String & aValue )
Creates a NCName Item see [http://www.w3.org/TR/xmlschema-2/#NCName].
virtual ItemcreateNegativeInteger( long long aValue )
Creates a negativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#negativeInteger].
virtual ItemcreateNonNegativeInteger( unsigned long long aValue )
Creates a nonNegativeInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger].
virtual ItemcreateNonPositiveInteger( long long aValue )
Creates a nonPositiveInteger Item see [http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger].
virtual ItemcreatePiNodeItem aParent, String & aTarget, String & aContent, String & aBaseUri )
Create a new Processing Instruction node N and place it among the children of a given parent node.
virtual ItemcreatePositiveInteger( unsigned long long aValue )
Creates a positiveInteger\ Item see [http://www.w3.org/TR/xmlschema-2/#positiveInteger].
virtual ItemcreateQName( const String & aNamespace, const String & aPrefix, const String & aLocalname )
Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].
virtual ItemcreateQName( const String & aNamespace, const String & aLocalname )
Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].
virtual ItemcreateQName( const String & aQNameString )
Creates a QName Item see [http://www.w3.org/TR/xmlschema-2/#QName].
virtual ItemcreateShort( short aShort )
Creates a Short Item see [http://www.w3.org/TR/xmlschema-2/#short].
virtual ItemcreateStreamableBase64Binary( std::istream & stream, StreamReleaser streamReleaser, bool seekable=false , bool encoded=false )
Creates a streamable Base64Binary Item see [http://www.w3.org/TR/xmlschema-2/#base64Binary].
virtual ItemcreateStreamableString( std::istream & stream, StreamReleaser streamReleaser, bool seekable=false )
Creates a streamable String Item see [http://www.w3.org/TR/xmlschema-2/#string].
virtual ItemcreateString( const String & aString )
Creates a String Item see [http://www.w3.org/TR/xmlschema-2/#string].
virtual ItemcreateTextNodeItem parent, String content )
Create a new text node N and place it among the children of a given parent node.
virtual ItemcreateTime( const String & aValue )
Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].
virtual ItemcreateTime( short aHour, short aMinute, double aSecond )
Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].
virtual ItemcreateTime( short aHour, short aMinute, double aSecond, short aTimeZone_hours )
Creates a Time Item see [http://www.w3.org/TR/xmlschema-2/#time].
virtual ItemcreateUnsignedByte( const unsigned char aValue )
Creates an Unsigned Byte Item see [http://www.w3.org/TR/xmlschema-2/#unsignedByte].
virtual ItemcreateUnsignedInt( unsigned int aValue )
Creates an unsigned int Item see [http://www.w3.org/TR/xmlschema-2/#unsignedInt].
virtual ItemcreateUnsignedLong( unsigned long long aValue )
Creates an unsignedLong Item see [http://www.w3.org/TR/xmlschema-2/#unsignedLong].
virtual ItemcreateUnsignedShort( unsigned short aValue )
Creates a unsignedShort Item see [http://www.w3.org/TR/xmlschema-2/#unsignedShort].
virtual ItemcreateYearMonthDuration( const String & aValue )
Creates a yearMonthDuration Item see [http://www.w3.org/TR/xpath-functions/#duration-subtypes].
inline virtual ~ItemFactory()
Destructor.

Public Functions

createAnyURI

virtual Item createAnyURI(
    const String & aURI
)

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

virtual Item createAttributeNode(
    Item aParent,
    Item aNodeName,
    Item aTypeName,
    Item aTypedValue
)

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

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

createBase64Binary

virtual Item createBase64Binary(
    const char * aBinData,
    size_t aLength
)

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

Parameters

aBinData

a pointer to the base64 binary data.

aLength

the length of the base64 binary data.

Returns

The Base64Binary Item.

createBase64Binary

virtual Item createBase64Binary(
    std::istream & aStream
)

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

Parameters

aStream

A stream containing the Base64 encoded data.

Returns

the Base64Binary Item.

createBase64Binary

virtual Item createBase64Binary(
    const unsigned char * aBinData,
    size_t aLength
)

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

Parameters

aBinData

the data in binary form. The data is copied from aBinData.

aLength

the length of the data

Returns

the Base64Binary Item.

createBoolean

virtual Item createBoolean(
    bool aValue
)

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

virtual Item createByte(
    char aByte
)

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

virtual Item createCommentNode(
    Item aParent,
    String & aContent
)

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

virtual Item createDate(
    const String & aDate
)

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

virtual Item createDate(
    short aYear,
    short aMonth,
    short aDay
)

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

virtual Item createDateTime(
    short aYear,
    short aMonth,
    short aDay,
    short aHour,
    short aMinute,
    double aSecond,
    short aTimeZone_hours
)

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

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_hours

short-valued representation of the difference in hours to UTC.

Returns

The DateTime Item.

createDateTime

virtual Item createDateTime(
    const String & aDateTimeValue
)

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.

createDayTimeDuration

virtual Item createDayTimeDuration(
    const String & aValue
)

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

virtual Item createDecimal(
    const String & aValue
)

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

virtual Item createDecimalFromDouble(
    double aValue
)

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

virtual Item createDecimalFromLong(
    unsigned long aValue
)

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

virtual Item createDocumentNode(
    const String & aBaseUri,
    const String & aDocUri
)

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

virtual Item createDouble(
    double aValue
)

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

virtual Item createDouble(
    const String & aValue
)

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

virtual Item createDuration(
    const String & aValue
)

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

virtual Item createDuration(
    short aYear,
    short aMonths,
    short aDays,
    short aHours,
    short aMinutes,
    double aSeconds
)

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

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

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

virtual Item createFloat(
    const String & aValue
)

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

virtual Item createFloat(
    float aValue
)

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

virtual Item createGDay(
    const String & aValue
)

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

virtual Item createGDay(
    short aDay
)

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

virtual Item createGMonth(
    const String & aValue
)

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

virtual Item createGMonth(
    short aMonth
)

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

virtual Item createGMonthDay(
    const String & aValue
)

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

virtual Item createGMonthDay(
    short aMonth,
    short aDay
)

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

virtual Item createGYear(
    const String & aValue
)

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

virtual Item createGYear(
    short aYear
)

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

virtual Item createGYearMonth(
    const String & aValue
)

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

virtual Item createGYearMonth(
    short aYear,
    short aMonth
)

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

virtual Item createHexBinary(
    const char * aHexData,
    size_t aSize
)

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

Parameters

aHexData

pointer to the hexdata.

aSize

size of the hexdata.

Returns

The HexBinary Item.

createInt

virtual Item createInt(
    int aInt
)

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

virtual Item createInteger(
    long long aInteger
)

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

virtual Item createInteger(
    const String & aInteger
)

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

Parameters

aInteger

String representation of the Integer.

Returns

The Integer Item.

createLong

virtual Item createLong(
    long long aLong
)

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

virtual Item createNCName(
    const String & aValue
)

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

virtual Item createNegativeInteger(
    long long aValue
)

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

virtual Item createNonNegativeInteger(
    unsigned long long aValue
)

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

virtual Item createNonPositiveInteger(
    long long aValue
)

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

virtual Item createPiNode(
    Item aParent,
    String & aTarget,
    String & aContent,
    String & aBaseUri
)

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

virtual Item createPositiveInteger(
    unsigned long long aValue
)

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

virtual Item createQName(
    const String & aNamespace,
    const String & aPrefix,
    const String & aLocalname
)

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

virtual Item createQName(
    const String & aNamespace,
    const String & aLocalname
)

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

virtual Item createQName(
    const String & aQNameString
)

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

virtual Item createShort(
    short aShort
)

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

virtual Item createStreamableBase64Binary(
    std::istream & stream,
    StreamReleaser streamReleaser,
    bool seekable=false ,
    bool encoded=false
)

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

createStreamableString

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

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

createString

virtual Item createString(
    const String & aString
)

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

virtual Item createTextNode(
    Item parent,
    String content
)

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

virtual Item createTime(
    const String & aValue
)

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

virtual Item createTime(
    short aHour,
    short aMinute,
    double aSecond
)

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

virtual Item createTime(
    short aHour,
    short aMinute,
    double aSecond,
    short aTimeZone_hours
)

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_hours

short representation of the timezone difference in hours to UTC.

Returns

The Time Item.

createUnsignedByte

virtual Item createUnsignedByte(
    const unsigned char aValue
)

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

virtual Item createUnsignedInt(
    unsigned int aValue
)

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

virtual Item createUnsignedLong(
    unsigned long long aValue
)

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

virtual Item createUnsignedShort(
    unsigned short aValue
)

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.

createYearMonthDuration

virtual Item createYearMonthDuration(
    const String & aValue
)

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

inline virtual  ~ItemFactory()

Destructor.

blog comments powered by Disqus