Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Markos Zaharioudakis
Hi Ghislain,

The point of the non-const param is to call take() inside the constructor, thus 
saving a (synchronized) ref counting. I have now added this take() call in the 
StructuralAnyURIItem constructor.

You are right about the static casts. I thought that getAnyUriTypeCode() was a 
zorba::Item method. I have added a ZORBA_ASSERT() to make sure that the 
aOther param is indeed an atomic item.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Markos Zaharioudakis
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Commit Message changed to:

Made URI computation lazy in StructuralAnyUri.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/structural-any-uri-lazy-2012-08-27T15-25-59.316Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread Zorba Build Bot
Validation queue job structural-any-uri-lazy-2012-08-27T15-25-59.316Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-27 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-08-21 Thread Ghislain Fourny
Hi Markos,

Thanks for your feedback, this is fixed for consistency (though in general, I 
prefer to have all references const in function parameters).

However, I could not find why the static_cast is not needed - the methods and 
variables are not part of the zorba::store::Item API?

-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-07-12 Thread Markos Zaharioudakis
Ghislain, you changed the StructuralAnyUriItem constructor to take a const 
zstring, instead of zstring. I prefer that you revert this change (because 
the old way is more consistent with the rest of the item factory methods), but 
if want to keep the const it's ok, but then the use of the temp zstring 
variable in methods inAncestor, isFollowing, etc is no longer needed (in both 
their StructuralAnyUriItem and AnyUriItem versions). The static_cast of the 
aOther param in those methods is also not needed any more.


-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-07-12 Thread Markos Zaharioudakis
Review: Needs Fixing


-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-07 Thread Ghislain Fourny
Ghislain Fourny has proposed merging 
lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918

Made URI computation lazy in StructuralAnyUri.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/atomic_items.cpp'
--- src/store/naive/atomic_items.cpp	2012-05-04 14:32:28 +
+++ src/store/naive/atomic_items.cpp	2012-05-07 14:27:20 +
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 #include stdafx.h
+#include atomic_items.h
+
 #include limits.h
 
 #include zorba/internal/unique_ptr.h
@@ -38,7 +40,6 @@
 #include store_defs.h
 #include item_iterator.h
 #include node_items.h
-#include atomic_items.h
 #include ordpath.h
 #include tree_id.h
 
@@ -72,6 +73,18 @@
 
 
 /***
+
+/
+AnyUriTypeCode AtomicItem::getAnyUriTypeCode() const
+{
+  throw ZORBA_EXCEPTION(
+zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
+ERROR_PARAMS( __FUNCTION__, typeid(*this).name() )
+  );
+}
+
+
+/***
   For numeric items or the untyped item: convert this item to a long item,
   if possible, i.e., if the conversion is going to be lossless.
 /
@@ -1082,7 +1095,6 @@
 /
 
 StructuralAnyUriItem::StructuralAnyUriItem(
-zstring encoded,
 ulong collectionId,
 const TreeId treeId, 
 store::StoreConsts::NodeKind nodeKind,
@@ -1091,17 +1103,18 @@
   theCollectionId(collectionId),
   theTreeId(treeId),
   theNodeKind(nodeKind),
-  theOrdPath(ordPath)
-{
-  theValue.take(encoded);
-}
-
-
-StructuralAnyUriItem::StructuralAnyUriItem(zstring value)
-{
-  theValue.take(value);
-
-  std::istringstream input(theValue.str());
+  theOrdPath(ordPath),
+  theEncodedValue()
+{}
+
+StructuralAnyUriItem::StructuralAnyUriItem(const zstring value)
+{
+  if (value == )
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
+
+  theEncodedValue = value;
+  std::istringstream input(theEncodedValue.str());
 
   ulong prefixlen = (ulong)strlen(zorba:);
 
@@ -,51 +1124,64 @@
   input  prefix;
 
   if (!input.good())
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
 
   if (prefix != zorba:)
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
 
   input  theCollectionId;
 
   if (!input.good())
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
   
   char period;
   input  period;
   if (!input.good())
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
   if (period != '.')
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
 
 
   input  theTreeId;
   if (!input.good())
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
   
   input  period;
   if (!input.good())
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
   if (period != '.')
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
 
   int lNodeKind;
   input  lNodeKind;
   theNodeKind = static_caststore::StoreConsts::NodeKind(lNodeKind);
   if (!input.good())
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI,
+  ERROR_PARAMS(theEncodedValue));
   if (lNodeKind = 0 || 

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-07 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/104918
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-04 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-04 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/structural-any-uri-lazy-2012-05-04T14-59-00.624Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-04 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/structural-any-uri-lazy-2012-05-05T02-41-35.772Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-04 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/structural-any-uri-lazy-2012-05-05T03-28-00.002Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-04 Thread Zorba Build Bot
Validation queue job structural-any-uri-lazy-2012-05-05T03-28-00.002Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-04 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve  1, Disapprove  1, 
Needs Fixing  1, Pending  1. Got: 1 Approve, 2 Needs Fixing.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-05-04 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-24 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-24 Thread Zorba Build Bot
There are additional revisions which have not been approved in review. Please 
seek review and approval of these new revisions.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-24 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-04 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-04 Thread Ghislain Fourny
Thanks Markos for your useful comments. The new revision takes them all into 
account.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-04 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/structural-any-uri-lazy-2012-04-04T13-30-26.473Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-04 Thread Markos Zaharioudakis
Now that the StructuralAnyUriItem does not inherit from AnyUriItem anymore, the 
method getAnyUriTypeCode() should be added (as virual) to the AtomicItem class, 
with a default implementation throwing an error. 
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-04 Thread Zorba Build Bot
Validation queue job structural-any-uri-lazy-2012-04-04T13-30-26.473Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-04 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve  1, Disapprove  1, 
Needs Fixing  1, Pending  1. Got: 1 Approve, 2 Needs Fixing.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-04 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-04-01 Thread Markos Zaharioudakis
It seems some of the changes made here will conflict with the chengs made in 
the tree-id branch. Ghislain can you try to merge the trunk into this branch 
and resolve the conflicts?

Also, I don't like the fact that a zstring (i.e., theValue) is now just wasted 
space in each StructuralAnyUriItem. Either make theValue mutable so that it can 
be reused by StructuralAnyUriItem, or don't make StructuralAnyUriItem a 
subclass of AnyUriItem anymore (it dosn't inherit much from AnyUriItem anymore).
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-03-28 Thread Ghislain Fourny
Ghislain Fourny has proposed merging 
lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707

Made URI computation lazy in StructuralAnyUri.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/atomic_items.cpp'
--- src/store/naive/atomic_items.cpp	2012-03-27 00:56:11 +
+++ src/store/naive/atomic_items.cpp	2012-03-28 12:10:27 +
@@ -1079,7 +1079,6 @@
 /
 
 StructuralAnyUriItem::StructuralAnyUriItem(
-zstring encoded,
 ulong collectionId,
 ulong treeId, 
 store::StoreConsts::NodeKind nodeKind,
@@ -1088,20 +1087,21 @@
   theCollectionId(collectionId),
   theTreeId(treeId),
   theNodeKind(nodeKind),
-  theOrdPath(ordPath)
-{
-  theValue.take(encoded);
-}
-
+  theOrdPath(ordPath),
+  theIsEncoded(false),
+  theEncodedValue()
+{}
 
 StructuralAnyUriItem::StructuralAnyUriItem(zstring value)
+  : theIsEncoded(true)
 {
-  theValue.take(value);
+  theEncodedValue.take(value);
+  std::istringstream input(theEncodedValue.str());
 
   ulong prefixlen = (ulong)strlen(zorba:);
 
-  if (strncmp(theValue.c_str(), zorba:, prefixlen))
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+  if (strncmp(theEncodedValue.c_str(), zorba:, prefixlen))
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theEncodedValue));
 
   const char* start;
 
@@ -1110,19 +1110,19 @@
   //
   // Decode collection id
   //
-  start = theValue.c_str() + prefixlen;
+  start = theEncodedValue.c_str() + prefixlen;
 
   char* next = const_castchar*(start);
 
   theCollectionId = strtoul(start, next, 10);
 
   if (errno != 0 || start == next)
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theEncodedValue));
 
   start = next;
 
   if (*start != '.')
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theEncodedValue));
 
   ++start;
 
@@ -1132,12 +1132,12 @@
   theTreeId = strtoul(start, next, 10);
 
   if (errno != 0 || start == next)
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theEncodedValue));
 
   start = next;
 
   if (*start != '.')
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theEncodedValue));
 
   ++start;
 
@@ -1147,12 +1147,12 @@
   if (*start  '0'  *start ='6')
 theNodeKind = static_caststore::StoreConsts::NodeKind(*start-'0');
   else
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theEncodedValue));
 
   ++start;
 
   if (*start != '.')
-throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theValue));
+throw ZORBA_EXCEPTION(zerr::ZAPI0028_INVALID_NODE_URI, ERROR_PARAMS(theEncodedValue));
 
   ++start;
 
@@ -1162,6 +1162,97 @@
   theOrdPath = OrdPath((unsigned char*)start, (ulong)strlen(start));
 }
 
+void StructuralAnyUriItem::encode() const
+{
+  ZORBA_FATAL(theNodeKind,Unexpected node kind);
+  std::ostringstream stream;
+  streamzorba:
+theCollectionId  .
+theTreeId  .
+static_castint(theNodeKind)  .
+theOrdPath.serialize();
+  zorba::zstring lValue = stream.str();
+  theEncodedValue.take(lValue);
+  theIsEncoded = true;
+}
+
+
+zstring StructuralAnyUriItem::show() const
+{
+  zstring res(xs:anyURI();
+  res += getString();
+  res += );
+  return res;
+}
+ 
+bool StructuralAnyUriItem::equals(
+const store::Item* item,
+long timezone,
+const XQPCollator* aCollation) const
+{
+  const StructuralAnyUriItem* lOther =
+  dynamic_castconst StructuralAnyUriItem*(item);
+  return (lOther 
+  lOther-theCollectionId == theCollectionId 
+  lOther-theTreeId == theTreeId 
+  lOther-theNodeKind == theNodeKind 
+  lOther-theOrdPath == theOrdPath);
+}
+ 
+long StructuralAnyUriItem::compare(
+  const Item* other,
+  long timezone,
+  const XQPCollator* aCollation) const
+{
+  const StructuralAnyUriItem* lOther =
+  dynamic_castconst StructuralAnyUriItem*(other);
+  assert(lOther);
+  if (theCollectionId  lOther-theCollectionId)
+  {
+return -1;
+  }
+  if (theCollectionId  lOther-theCollectionId)
+  {
+return 1;
+  }
+  if (theTreeId  lOther-theTreeId)
+  {
+return -1;
+  }
+  if (theTreeId  

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-03-28 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-03-28 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-03-28 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/structural-any-uri-lazy-2012-03-28T18-00-41.433Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-03-28 Thread Zorba Build Bot
Validation queue job structural-any-uri-lazy-2012-03-28T18-00-41.433Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-03-28 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve  1, Disapprove  1, 
Needs Fixing  1, Pending  1. Got: 1 Approve, 2 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/structural-any-uri-lazy into lp:zorba

2012-03-28 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/structural-any-uri-lazy into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
-- 
https://code.launchpad.net/~zorba-coders/zorba/structural-any-uri-lazy/+merge/99707
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp