Merge lp:~zorba-coders/zorba/feature-api-createDateTime into lp:zorba

Proposed by Matthias Brantner
Status: Merged
Approved by: Chris Hillery
Approved revision: 10964
Merged at revision: 10964
Proposed branch: lp:~zorba-coders/zorba/feature-api-createDateTime
Merge into: lp:zorba
Diff against target: 77 lines (+34/-0)
4 files modified
ChangeLog (+1/-0)
include/zorba/item_factory.h (+15/-0)
src/api/itemfactoryimpl.cpp (+14/-0)
src/api/itemfactoryimpl.h (+4/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/feature-api-createDateTime
Reviewer Review Type Date Requested Status
Chris Hillery Approve
Matthias Brantner Approve
Review via email: mp+117976@code.launchpad.net

Commit message

new ItemFactory function that allows creating dateTime items without timezone

Description of the change

new ItemFactory function that allows creating dateTime items without timezone

The function will be needed in the archive module (see separate merge proposal).

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job feature-api-createDateTime-2012-08-02T19-41-02.373Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job feature-api-createDateTime-2012-08-03T01-01-06.684Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-07-27 02:49:06 +0000
3+++ ChangeLog 2012-08-02 19:39:20 +0000
4@@ -13,6 +13,7 @@
5 * Added ft:tokenize-nodes() function to full-text module
6 * New XQuery 3.0 functions
7 - fn:parse-xml-fragment#1
8+ * New ItemFactory function that allows creating dateTime items without timezone
9 * Added support for transient maps to the
10 http://www.zorba-xquery.com/modules/store/data-structures/unordered-map module.
11 * Added support for fragments to fn:path
12
13=== modified file 'include/zorba/item_factory.h'
14--- include/zorba/item_factory.h 2012-07-24 08:48:48 +0000
15+++ include/zorba/item_factory.h 2012-08-02 19:39:20 +0000
16@@ -295,6 +295,21 @@
17 short aHour, short aMinute, double aSecond,
18 short aTimeZone_hours) = 0;
19
20+ /** \brief Creates a DateTime Item without setting a time zone.
21+ * see [http://www.w3.org/TR/xmlschema-2/#dateTime]
22+ *
23+ * @param aYear short-valued representation of the year.
24+ * @param aMonth short-valued representation of the month.
25+ * @param aDay short-valued representation of the day.
26+ * @param aHour short-valued representation of the hour.
27+ * @param aMinute short-valued representation of the minute.
28+ * @param aSecond double-valued representation of the seconds and fractional seconds.
29+ * @return The DateTime Item.
30+ */
31+ virtual Item
32+ createDateTime(short aYear, short aMonth, short aDay,
33+ short aHour, short aMinute, double aSecond) = 0;
34+
35 /** \brief Creates a DateTime Item
36 * see [http://www.w3.org/TR/xmlschema-2/#dateTime]
37 *
38
39=== modified file 'src/api/itemfactoryimpl.cpp'
40--- src/api/itemfactoryimpl.cpp 2012-07-24 08:48:48 +0000
41+++ src/api/itemfactoryimpl.cpp 2012-08-02 19:39:20 +0000
42@@ -366,6 +366,20 @@
43 }
44
45
46+Item
47+ItemFactoryImpl::createDateTime(
48+ short aYear, short aMonth, short aDay,
49+ short aHour, short aMinute, double aSecond)
50+{
51+ store::Item_t lItem;
52+ theItemFactory->createDateTime(
53+ lItem, aYear, aMonth, aDay,
54+ aHour, aMinute, aSecond);
55+
56+ return &*lItem;
57+}
58+
59+
60 Item ItemFactoryImpl::createDateTime( const String& aDateTimeValue )
61 {
62 zstring lString = Unmarshaller::getInternalString( aDateTimeValue );
63
64=== modified file 'src/api/itemfactoryimpl.h'
65--- src/api/itemfactoryimpl.h 2012-07-24 08:48:48 +0000
66+++ src/api/itemfactoryimpl.h 2012-08-02 19:39:20 +0000
67@@ -118,6 +118,10 @@
68 short aTimezone_hours);
69
70 virtual Item
71+ createDateTime(short aYear, short aMonth, short aDay,
72+ short aHour, short aMinute, double aSecond);
73+
74+ virtual Item
75 createDateTime( const String& aDateTimeValue );
76
77 virtual Item

Subscribers

People subscribed via source and target branches