ItemFactory.h
Go to the documentation of this file.
1 /*
2  * Copyright 2006-2008 The FLWOR Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef API_ITEM_FACTORY_H
18 #define API_ITEM_FACTORY_H
19 
20  /** \brief ItemFactory to create Items.
21  *
22  * An instance of this class can be obtained by calling getItemFactory on the Zorba object.
23  *
24  * Each createXXX function of this class creates an Item of an XML Schema item.
25  * If an isNull() call on an Item created by one of these functions returns true the
26  * Item could not be created.
27  */
29 {
30 
31  private:
32  zorba::ItemFactory* theItemFactory;
33  public:
34  ItemFactory(zorba::ItemFactory* aItemFactory) : theItemFactory(aItemFactory) {}
35  ItemFactory(const ItemFactory& aItemFactory) : theItemFactory(aItemFactory.theItemFactory) {}
36 
37  /** \brief Creates an AnyURI Item
38  * see [http://www.w3.org/TR/xmlschema-2/#anyURI]
39  *
40  * @param aURI String representation of the AnyURI.
41  * @return The AnyURI Item.
42  */
43  Item createAnyURI (const std::string &aURI);
44 
45  /**
46  * Create a new attribute node N and place it among the
47  * attributes of a given parent node. If no parent is given, N becomes the
48  * root (and single node) of a new XML tree.
49  *
50  * @param aParent The parent P of the new node; may be NULL.
51  * @param aNodeName The fully qualified name of the new node. The nemaspace
52  * binding implied by this name will be added to the namespaces
53  * of P. If the name prefix is "xml" and the local name is
54  * "base", then the base-uri property of P will be set or
55  * updated accordingly.
56  * @param aTypeName The fully qualified name of the new node's type.
57  * @param aTypedValue The typed value of the new node.
58  * @return The new node N created by this method
59  */
60  Item createAttributeNode (Item& aParent, Item& aNodeName, Item& aTypeName, Item& aTypedValue);
61 
62  Item createAttributeNode (Item& aParent, Item& aNodeName, Item& aTypeName, std::vector< Item > aTypedValue);
63 
64  /** \brief Creates a Base64Binary Item
65  * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
66  *
67  * @param aBinData a pointer to the base64 binary data.
68  * @param aLength the length of the base64 binary data.
69  * @return The Base64Binary Item.
70  */
71  Item createBase64Binary (const char *aBinData, size_t aLength);
72 
73  /** \brief Creates a Base64Binary Item
74  * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
75  *
76  * @param aStream A stream containing the Base64 encoded data.
77  * @return the Base64Binary Item.
78  */
79  Item createBase64Binary (std::istream &aStream);
80 
81  /** \brief Creates a Base64Binary Item
82  * see [http://www.w3.org/TR/xmlschema-2/#base64Binary]
83  *
84  * @param aBinData the data in binary form. The data is copied from aBinData.
85  * @param aLength the length of the data
86  * @return the Base64Binary Item.
87  */
88  Item createBase64Binary (const unsigned char *aBinData, size_t aLength);
89 
90  /** \brief Creates a Boolean Item
91  * see [http://www.w3.org/TR/xmlschema-2/#bool]
92  *
93  * @param aValue bool representation of the Boolean.
94  * @return The Boolean Item.
95  */
96  Item createBoolean (bool aValue);
97 
98  /** \brief Creates a Byte Item
99  * see [http://www.w3.org/TR/xmlschema-2/#byte]
100  *
101  * @param aByte char representation of the Byte.
102  * @return The Byte Item.
103  */
104  Item createByte (char aByte);
105 
106  /**
107  * Create a new comment node N and place it as the last child of a given
108  * parent node. If no parent is given, N becomes the root (and single node)
109  * of a new XML tree.
110  *
111  * @param aParent The parent P of the new node; may be NULL.
112  * @param aContent The content of the new node.
113  * @return The new node N created by this method
114  */
115  Item createCommentNode (Item &aParent, const std::string &aContent);
116 
117  /** \brief Creates a Date Item
118  * see [http://www.w3.org/TR/xmlschema-2/#date]
119  *
120  * @param aDate String representation of the Date (e.g. 2002-10-10).
121  * @return The Date Item.
122  */
123  Item createDate (const std::string &aDate);
124 
125  /** \brief Creates a Date Item
126  * see [http://www.w3.org/TR/xmlschema-2/#date]
127  *
128  * @param aYear short-valued representation of the year.
129  * @param aMonth short-valued representation of the month.
130  * @param aDay short-valued representation of the day.
131  * @return The Date Item.
132  */
133  Item createDate (short aYear, short aMonth, short aDay);
134 
135  /** \brief Creates a DateTime Item
136  * see [http://www.w3.org/TR/xmlschema-2/#dateTime]
137  *
138  * @param aDateTimeValue String representation of the datetime value
139  * (for example, 2002-10-10T12:00:00-05:00).
140  * @return The DateTime Item.
141  */
142  Item createDateTime (const std::string &aDateTimeValue);
143 
144  /** \brief Creates a DateTime Item
145  * see [http://www.w3.org/TR/xmlschema-2/#dateTime]
146  *
147  * @param aYear short-valued representation of the year.
148  * @param aMonth short-valued representation of the month.
149  * @param aDay short-valued representation of the day.
150  * @param aHour short-valued representation of the hour.
151  * @param aMinute short-valued representation of the minute.
152  * @param aSecond double-valued representation of the seconds and fractional seconds.
153  * @param aTimeZone_hours short-valued representation of the difference in hours to UTC.
154  * @return The DateTime Item.
155  */
156  Item createDateTime (short aYear, short aMonth, short aDay, short aHour, short aMinute, double aSecond, short aTimeZone_hours);
157 
158  /** \brief Creates a Decimal Item
159  * see [http://www.w3.org/TR/xmlschema-2/#decimal]
160  *
161  * @param aValue String representation of the Decimal (e.g. 12678967.543233).
162  * @return The Decimal Item.
163  */
164  Item createDecimal (const std::string &aValue);
165 
166  /** \brief Creates a Decimal Item
167  * see [http://www.w3.org/TR/xmlschema-2/#decimal]
168  *
169  * @param aValue double representation of the Decimal.
170  * @return The Decimal Item.
171  */
172  Item createDecimalFromDouble (double aValue);
173 
174  /** \brief Creates a Decimal Item
175  * see [http://www.w3.org/TR/xmlschema-2/#decimal]
176  *
177  * @param aValue unsigned long representation of the Decimal.
178  * @return The Decimal Item.
179  */
180  Item createDecimalFromLong (unsigned long aValue);
181 
182  /** \brief Creates a Double Item
183  * see [http://www.w3.org/TR/xmlschema-2/#double]
184  *
185  * @param aValue String representation of the Double.
186  * @return The Double Item.
187  */
188  Item createDouble (const std::string &aValue);
189 
190  /** \brief Creates a Double Item
191  * see [http://www.w3.org/TR/xmlschema-2/#double]
192  *
193  * @param aValue double representation of the Double.
194  * @return The Double Item.
195  */
196  Item createDouble (double aValue);
197 
198  /** \brief Creates a Duration Item
199  * see [http://www.w3.org/TR/xmlschema-2/#duration]
200  *
201  * @param aValue String representation of the NCName.
202  * @return The Duration Item.
203  */
204  Item createDuration (const std::string &aValue);
205 
206  /** \brief Creates a Duration Item
207  * see [http://www.w3.org/TR/xmlschema-2/#duration]
208  *
209  * @param aYear short-valued representation of the years.
210  * @param aMonths short-valued representation of the months.
211  * @param aDays short-valued representation of the days.
212  * @param aHours short-valued representation of the hours.
213  * @param aMinutes short-valued representation of the minutes.
214  * @param aSeconds double-valued representation of the seconds and fractional seconds.
215  * @return The Duration Item.
216  */
217  Item createDuration (short aYear, short aMonths, short aDays, short aHours, short aMinutes, double aSeconds);
218 
219  /** \brief Creates a dayTimeDuration Item
220  * see [http://www.w3.org/TR/xpath-functions/#duration-subtypes]
221  *
222  * @param aValue String lexical representation of the duration.
223  * @return the dayTimeDuration Item.
224  */
225  Item createDayTimeDuration (const std::string &aValue);
226 
227  /** \brief Creates a yearMonthDuration Item
228  * see [http://www.w3.org/TR/xpath-functions/#duration-subtypes]
229  *
230  * @param aValue String lexical representation of the duration.
231  * @return the yearMonthDuration Item.
232  */
233  Item createYearMonthDuration (const std::string &aValue);
234 
235  /** \brief Creates a documentNode Item
236  * see [http://www.w3.org/TR/xpath-functions/#duration-subtypes]
237  *
238  * @param aBaseUri String representation of the Base URI.
239  * @param aDocUri String representation of the Document URI.
240  * @return the documentNode Item.
241  */
242  Item createDocumentNode (const std::string &aBaseUri, const std::string &aDocUri);
243 
244  /**
245  * @brief Creates a new element node.
246  *
247  * Create a new element node N and place it at the end among the
248  * children of a given parent node. If no parent is given, N becomes the
249  * root (and single node) of a new XML tree.
250  *
251  * @param aParent The parent P of the new node; may be NULL.
252  * @param aNodeName The fully qualified name of the new node.
253  * @param aTypeName The fully qualified name of the new node's type.
254  * Not allowed to be NULL, use xsd:untyped instead.
255  * @param aHasTypedValue Whether the node has a typed value or not (element
256  * nodes with complex type and element-only content do
257  * not have typed value).
258  * @param aHasEmptyValue True if the typed value of the node is the empty
259  * sequence. This is the case if the element has a
260  * complex type with empty content.
261  * @param aNsBindings A set of namespace bindings. The namespaces property
262  * of N will be the union of this set and the namespaces
263  * property of P.
264  * @return The new node N created by this method
265  */
266  Item createElementNode (Item &aParent, Item &aNodeName, Item &aTypeName, bool aHasTypedValue, bool aHasEmptyValue, std::vector< std::pair< std::string, std::string > > aNsBindings);
267 
268  /**
269  * @brief Creates a new element node.
270  *
271  * Create a new element node N and place it at the end among the
272  * children of a given parent node. If no parent is given, N becomes the
273  * root (and single node) of a new XML tree.
274  *
275  * @param aParent The parent P of the new node; may be NULL.
276  * @param aNodeName The fully qualified name of the new node.
277  * @param aTypeName The fully qualified name of the new node's type.
278  * Not allowed to be NULL, use xsd:untyped instead.
279  * @param aHasTypedValue Whether the node has a typed value or not (element
280  * nodes with complex type and element-only content do
281  * not have typed value).
282  * @param aHasEmptyValue True if the typed value of the node is the empty
283  * sequence. This is the case if the element has a
284  * complex type with empty content.
285  * @return The new node N created by this method
286  */
287  Item createElementNode (Item &aParent, Item &aNodeName, Item &aTypeName, bool aHasTypedValue, bool aHasEmptyValue);
288 
289  /** \brief creates a float item
290  * see [http://www.w3.org/tr/xmlschema-2/#float]
291  *
292  * @param aValue string representation of the float.
293  * @return the float item.
294  */
295  Item createFloat (const std::string &aValue);
296 
297  /** \brief creates a float item
298  * see [http://www.w3.org/tr/xmlschema-2/#float]
299  *
300  * @param aValue float representation of the float.
301  * @return the float item.
302  */
303  Item createFloat (float aValue);
304 
305  /** \brief Creates a gDay Item
306  * see [http://www.w3.org/TR/xmlschema-2/#gDay]
307  *
308  * @param aValue String representation of the gDay.
309  * @return The gDay Item.
310  */
311  Item createGDay (const std::string &aValue);
312 
313  /** \brief Creates a gDay Item
314  * see [http://www.w3.org/TR/xmlschema-2/#gDay]
315  *
316  * @param aDay short representation of the gDay.
317  * @return The gDay Item.
318  */
319  Item createGDay (short aDay);
320 
321  /** \brief Creates a gMonth Item
322  * see [http://www.w3.org/TR/xmlschema-2/#gMonth]
323  *
324  * @param aValue String representation of the gMonth.
325  * @return The gMonth Item.
326  */
327  Item createGMonth (const std::string &aValue);
328 
329  /** \brief Creates a gMonth Item
330  * see [http://www.w3.org/TR/xmlschema-2/#gMonth]
331  *
332  * @param aMonth short representation of the gMonth.
333  * @return The gMonth Item.
334  */
335  Item createGMonth (short aMonth);
336 
337  /** \brief Creates a gMonthDay Item
338  * see [http://www.w3.org/TR/xmlschema-2/#gMonthDay]
339  *
340  * @param aValue String representation of the gMonthDay.
341  * @return The gMonthDay Item.
342  */
343  Item createGMonthDay (const std::string &aValue);
344 
345  /** \brief Creates a gMonthDay Item
346  * see [http://www.w3.org/TR/xmlschema-2/#gMonthDay]
347  *
348  * @param aMonth short representation of the month.
349  * @param aDay short representation of the day.
350  * @return The gMonthDay Item.
351  */
352  Item createGMonthDay (short aMonth, short aDay);
353 
354  /** \brief Creates a gYear Item
355  * see [http://www.w3.org/TR/xmlschema-2/#gYear]
356  *
357  * @param aYear short representation of the gYear.
358  * @return The gYear Item.
359  */
360  Item createGYear (short aYear);
361 
362  /** \brief Creates a gYear Item
363  * see [http://www.w3.org/TR/xmlschema-2/#gYear]
364  *
365  * @param aValue String representation of the gYear.
366  * @return The gYear Item.
367  */
368  Item createGYear (const std::string &aValue);
369 
370  /** \brief Creates a gYearMonth Item
371  * see [http://www.w3.org/TR/xmlschema-2/#gYearMonth]
372  *
373  * @param aValue String representation of the gYearMonth.
374  * @return The gYearMonth Item.
375  */
376  Item createGYearMonth (const std::string &aValue);
377 
378  /** \brief Creates a gYearMonth Item
379  * see [http://www.w3.org/TR/xmlschema-2/#gYearMonth]
380  *
381  * @param aYear short representation of the year.
382  * @param aMonth short representation of the month.
383  * @return The gYearMonth Item.
384  */
385  Item createGYearMonth (short aYear, short aMonth);
386 
387  /** \brief Creates a HexBinary Item
388  * see [http://www.w3.org/TR/xmlschema-2/#hexBinary]
389  *
390  * @param aHexData pointer to the hexdata.
391  * @param aSize size of the hexdata.
392  * @return The HexBinary Item.
393  */
394  Item createHexBinary (const char *aHexData, size_t aSize);
395 
396  /** \brief Creates a Int Item
397  * see [http://www.w3.org/TR/xmlschema-2/#int]
398  *
399  * @param aInt int representation of the Int.
400  * @return The NCName Item.
401  */
402  Item createInt (int aInt);
403 
404  /** \brief Creates an Integer Item
405  * see [http://www.w3.org/TR/xmlschema-2/#integer]
406  *
407  * @param aInteger String representation of the Integer.
408  * @return The Integer Item.
409  */
410  Item createInteger (const std::string &aInteger);
411 
412 #ifndef SWIGPHP // Seems that this kind of overloading is causing conflinct among some versions of SWIG/PHP
413  /** \brief Creates an Integer Item
414  * see [http://www.w3.org/TR/xmlschema-2/#integer]
415  *
416  * @param aInteger unsigned long representation of the Integer.
417  * @return The Integer Item.
418  */
419  Item createInteger (long long aInteger);
420 #endif /* SWIGPHP */
421 
422  /** \brief Creates a Long Item
423  * see [http://www.w3.org/TR/xmlschema-2/#long]
424  *
425  * @param aLong long long representation of the Long.
426  * @return The Long Item.
427  */
428  Item createLong (long long aLong);
429 
430  /** \brief Creates a NCName Item
431  * see [http://www.w3.org/TR/xmlschema-2/#NCName]
432  *
433  * @param aValue String representation of the NCName.
434  * @return The NCName Item.
435  */
436  Item createNCName (const std::string &aValue);
437 
438  /** \brief Creates a negativeInteger Item
439  * see [http://www.w3.org/TR/xmlschema-2/#negativeInteger]
440  *
441  * @param aValue long long representation of the negativeInteger.
442  * @return The negativeInteger Item.
443  */
444  Item createNegativeInteger (long long aValue);
445 
446  /** \brief Creates a nonNegativeInteger Item
447  * see [http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger]
448  *
449  * @param aValue unsigned long representation of the nonNegativeInteger.
450  * @return The nonNegativeInteger Item.
451  */
452  Item createNonNegativeInteger (unsigned long long aValue);
453 
454  /** \brief Creates a nonPositiveInteger Item
455  * see [http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger]
456  *
457  * @param aValue long long representation of the NCName.
458  * @return The nonPositiveInteger Item.
459  */
460  Item createNonPositiveInteger (long long aValue);
461 
462  /**
463  * Create a new Processing Instruction node N and place it among the
464  * children of a given parent node. If no parent is given, N becomes the
465  * root (and single node) of a new XML tree.
466  *
467  * @param aParent The parent P of the new node; may be NULL.
468  * @param aTarget The Target of the new node.
469  * @param aContent The Content of the new node.
470  * @param aBaseUri The Base URI of the new node, may be NULL.
471  * @return The new node N created by this method
472  */
473  Item createPiNode (Item &aParent, const std::string &aTarget, const std::string &aContent, const std::string &aBaseUri);
474 
475  /** \brief Creates a positiveInteger\ Item
476  * see [http://www.w3.org/TR/xmlschema-2/#positiveInteger]
477  *
478  * @param aValue unsigned long representation of the positiveInteger.
479  * @return The positiveInteger Item.
480  */
481  Item createPositiveInteger (unsigned long long aValue);
482 
483  /** \brief Creates a QName Item
484  * see [http://www.w3.org/TR/xmlschema-2/#QName]
485  *
486  * @param aNamespace String representation of the namespace.
487  * @param aPrefix String representation of the prefix.
488  * @param aLocalname String representation of the localname.
489  *
490  * @return The QName Item.
491  */
492  Item createQName (const std::string &aNamespace, const std::string &aPrefix, const std::string &aLocalname);
493 
494  /** \brief Creates a QName Item
495  * see [http://www.w3.org/TR/xmlschema-2/#QName]
496  *
497  * @param aNamespace String representation of the namespace.
498  * @param aLocalname String representation of the localname. *
499  * @return The QName Item.
500  */
501  Item createQName (const std::string &aNamespace, const std::string &aLocalname);
502 
503  /** \brief Creates a QName Item
504  * see [http://www.w3.org/TR/xmlschema-2/#QName]
505  *
506  * The QName is constructed by parsing the string using the notation
507  * invented by James Clark (i.e. {namespace}localname).
508  *
509  * @param aQNameString String in the QName notation by James Clark.
510  * @return The QName Item.
511  */
512  Item createQName (const std::string &aQNameString);
513 
514  /** \brief Creates a Short Item
515  * see [http://www.w3.org/TR/xmlschema-2/#short]
516  *
517  * @param aShort short representation of the Short.
518  * @return The Short Item.
519  */
520  Item createShort (short aShort);
521  //Item createStreamableString (std::istream &stream, StreamReleaser streamReleaser, bool seekable=false);
522 
523  /** \brief Creates a String Item
524  * see [http://www.w3.org/TR/xmlschema-2/#string]
525  *
526  * @param aString String representation of the String Item.
527  * @return The String Item
528  */
529  Item createString (const std::string &aString);
530 
531  /**
532  * Create a new text node N and place it among the
533  * children of a given parent node. If no parent is given, N becomes the
534  * root (and single node) of a new XML tree.
535  *
536  * @param aParent The parent P of the new node; may be NULL.
537  * @param aContent The content of the new node.
538  * @return The new node N created by this method
539  */
540  Item createTextNode (Item &aParent, const std::string &aContent);
541 
542  /** \brief Creates a Time Item
543  * see [http://www.w3.org/TR/xmlschema-2/#time]
544  *
545  * @param aHour short representation of the hour.
546  * @param aMinute short representation of the minute.
547  * @param aSecond double representation of the seconds and fractional seconds.
548  * @param aTimeZone_hours short representation of the timezone difference in hours to UTC.
549  * @return The Time Item.
550  */
551  Item createTime (short aHour, short aMinute, double aSecond, short aTimeZone_hours);
552 
553  /** \brief Creates a Time Item
554  * see [http://www.w3.org/TR/xmlschema-2/#time]
555  *
556  * @param aHour short representation of the hour.
557  * @param aMinute short representation of the minute.
558  * @param aSecond double representation of the seconds and fractional seconds.
559  * @return The Time Item.
560  */
561  Item createTime (short aHour, short aMinute, double aSecond);
562 
563  /** \brief Creates a Time Item
564  * see [http://www.w3.org/TR/xmlschema-2/#time]
565  *
566  * @param aValue String representation of the Time.
567  * @return The Time Item
568  */
569  Item createTime (const std::string &aValue);
570 
571  /** \brief Creates an Unsigned Byte Item
572  * see [http://www.w3.org/TR/xmlschema-2/#unsignedByte]
573  *
574  * @param aValue unsignedByte unsigned char representation of the unsigned byte.
575  * @return The Unsigned Byte Item.
576  */
577  Item createUnsignedByte (const unsigned char aValue);
578 
579  /** \brief Creates an unsigned int Item
580  * see [http://www.w3.org/TR/xmlschema-2/#unsignedInt]
581  *
582  * @param aValue unsigned int representation of the unsignedInt.
583  * @return The unsignedInt Item.
584  */
585  Item createUnsignedInt (unsigned int aValue);
586 
587  /** \brief Creates an unsignedLong Item
588  * see [http://www.w3.org/TR/xmlschema-2/#unsignedLong]
589  *
590  * @param aValue unsignedLong long long representation of the unsignedLong.
591  * @return The unsignedLong Item.
592  */
593  Item createUnsignedLong (unsigned long long aValue);
594 
595  /** \brief Creates a unsignedShort Item
596  * see [http://www.w3.org/TR/xmlschema-2/#unsignedShort]
597  *
598  * @param aValue unsigned short representation of the unsignedShort.
599  * @return The unsignedShort Item.
600  */
601  Item createUnsignedShort (unsigned short aValue);
602 
603  /**
604  * \brief Create a JSON null item.
605  */
607 
608  /**
609  * \brief Create a JSON Number item from a string.
610  * This will actually be
611  * an xs:integer, xs:double, or xs:decimal, depending on the content
612  * of the string.
613  *
614  * @param aString The input string.
615  */
616  Item createJSONNumber(std::string aString);
617 
618  /**
619  * \brief Create a JSON Object containing the specified JSON Pairs.
620  *
621  * @param aNames A vector containing the name and value of each pair.
622  */
623  Item createJSONObject(std::vector<std::pair<Item, Item> >& aNames);
624 
625  /**
626  * \brief Create a JSON Object containing the specified string Pairs.
627  *
628  * @param aNames A vector containing the name and value of each pair.
629  */
630  Item createJSONObject(std::vector<std::pair<std::string, std::string> >& aNames);
631 
632  /**
633  * \brief Create a JSON Array containing the specified items.
634  *
635  * @param aItems a Vector<Item> containing Items which may
636  * be stored in a JSON Array (namely JSON Arrays, JSON Objects,
637  * JSON nulls, valid JSON numeric types, or xs:strings).
638  */
639  Item createJSONArray(std::vector<Item>& aItems);
640 
641  /**
642  * \brief Create a JSON Array containing the specified items.
643  *
644  * @param aItems a Vector<String> containing strings which may
645  * be stored in a JSON Array.
646  */
647  Item createJSONArray(std::vector<std::string>& aItems);
648 
649  /** \brief Creates a DateTime Item
650  * see [http://www.w3.org/TR/xmlschema-2/#dateTime]
651  *
652  * @param aYear short-valued representation of the year.
653  * @param aMonth short-valued representation of the month.
654  * @param aDay short-valued representation of the day.
655  * @param aHour short-valued representation of the hour.
656  * @param aMinute short-valued representation of the minute.
657  * @param aSecond double-valued representation of the seconds and fractional seconds.
658  * @param aTimeZone_hours short-valued representation of the difference in hours to UTC.
659  * @return The DateTime Item.
660  */
661  Item
662  createDateTimeStamp(short aYear, short aMonth, short aDay,
663  short aHour, short aMinute, double aSecond,
664  short aTimeZone_hours);
665 
666  /** \brief Creates a DateTime Item
667  * see [http://www.w3.org/TR/xmlschema-2/#dateTime]
668  *
669  * @param aDateTimeValue String representation of the datetime value
670  * (for example, 2002-10-10T12:00:00-05:00).
671  * @return The DateTime Item.
672  */
673  Item
674  createDateTimeStamp( const std::string &aValue );
675 
676 }; // class ItemFactory
677 
678 #endif