You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by ti...@apache.org on 2014/03/14 23:09:38 UTC

[17/25] git commit: Added a comment about the NodeTree structure.

Added a comment about the NodeTree structure.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/8a00d1b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/8a00d1b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/8a00d1b2

Branch: refs/heads/westmann/prettyprint
Commit: 8a00d1b270a05087e759fc479f5d1671dc030e66
Parents: 63f51a7
Author: Preston Carman <pr...@apache.org>
Authored: Mon Feb 17 13:07:26 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Mon Feb 17 13:07:26 2014 -0800

----------------------------------------------------------------------
 .../accessors/nodes/NodeTreePointable.java      | 25 ++++++++++++++++++++
 .../builders/nodes/DictionaryBuilder.java       |  2 --
 2 files changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/8a00d1b2/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/NodeTreePointable.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/NodeTreePointable.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/NodeTreePointable.java
index 4a6afaa..4b0697f 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/NodeTreePointable.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/NodeTreePointable.java
@@ -29,6 +29,31 @@ import edu.uci.ics.hyracks.data.std.primitive.IntegerPointable;
 import edu.uci.ics.hyracks.data.std.primitive.UTF8StringPointable;
 import edu.uci.ics.hyracks.data.std.primitive.VoidPointable;
 
+/*
+ * NodeTree {
+ *  NodeTreeHeader header;
+ *  NodeId nodeId?;
+ *  Dictionary dictionary?;
+ *  ElementNode rootNode;
+ * }
+ * 
+ * ElementHeader (padded) {
+ *  bit nodeIdExists;
+ *  bit dictionaryExists;
+ *  bit headerTypeExists;
+ * }
+ * 
+ * NodeId {
+ *  int32 id;
+ * }
+ * 
+ * Dictionary {
+ *  int32 numberOfItems
+ *  int32[numberOfItems] lengthOfItem
+ *  int32[numberOfItems] sortedItemIndex
+ *  bytes[] itemData
+ * }
+ */
 public class NodeTreePointable extends AbstractPointable {
     public static final int HEADER_NODEID_EXISTS_MASK = (1 << 0);
     public static final int HEADER_DICTIONARY_EXISTS_MASK = (1 << 1);

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/8a00d1b2/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/DictionaryBuilder.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/DictionaryBuilder.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/DictionaryBuilder.java
index 6a98b3d..db7ecf7 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/DictionaryBuilder.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/DictionaryBuilder.java
@@ -19,9 +19,7 @@ package org.apache.vxquery.datamodel.builders.nodes;
 import java.io.DataOutput;
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.util.Map;
 import java.util.Map.Entry;
-import java.util.Set;
 import java.util.TreeMap;
 
 import org.apache.vxquery.util.GrowableIntArray;