You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2016/08/08 03:18:21 UTC

vxquery git commit: Updating Data Handling

Repository: vxquery
Updated Branches:
  refs/heads/master 0970f5794 -> bbb50a9d1


Updating Data Handling


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

Branch: refs/heads/master
Commit: bbb50a9d12ca905580c964d6c9c1e2777a8c4a0e
Parents: 0970f57
Author: Christina Pavlopoulou <cp...@ucr.edu>
Authored: Sun Jul 31 10:31:12 2016 -0700
Committer: Christina Pavlopoulou <cp...@ucr.edu>
Committed: Sun Aug 7 18:58:54 2016 -0700

----------------------------------------------------------------------
 src/site/apt/development_data_handling.apt    |  41 +++++-
 src/site/apt/development_xml_document.apt     | 124 ++++++++++++++++
 src/site/apt/development_xml_node_details.apt | 162 ---------------------
 src/site/site.xml                             |   3 -
 4 files changed, 164 insertions(+), 166 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/vxquery/blob/bbb50a9d/src/site/apt/development_data_handling.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/development_data_handling.apt b/src/site/apt/development_data_handling.apt
index ece49ce..9bf16bc 100644
--- a/src/site/apt/development_data_handling.apt
+++ b/src/site/apt/development_data_handling.apt
@@ -130,6 +130,45 @@ Developer Data Handling
 | xs:string               | UTF8StringPointable  |    2 + length |
 *-------------------------+----------------------+---------------:
    
+
+* XPath Node Types
+
+  XML is used as the data source for XQuery and must be parsed into Hyracks data. Each
+  node type defined in XPath and XQuery can be mapped into pointable defined in Apache 
+  VXQuery\x99.
+  
+*-----------------------------------+----------------------+---------------+
+| <<Data Type>>                     | <<Pointable Name>>   | <<Data Size>> |
+*-----------------------------------+----------------------+---------------:
+| Attribute Nodes(ANP)              | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/AttributeNodePointable.java}AttributeNodePointable}}      |    1 + length |
+*-----------------------------------+----------------------+---------------:
+| Document Nodes(DNP)               | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/DocumentNodePointable.java}DocumentNodePointable}}      |    1 + length |
+*-----------------------------------+----------------------+---------------:
+| Element Nodes(ENP)                | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/ElementNodePointable.java}ElementNodePointable}}      |    1 + length |
+*-----------------------------------+----------------------+---------------:
+| Node Tree(NTP)                    | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/NodeTreePointable.java}NodeTreePointable}}      |    1 + length |
+*-----------------------------------+----------------------+---------------:
+| Processing Instruction Node(PINP) | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/PINodePointable.java}PINodePointable}}      |    1 + length |
+*-----------------------------------+----------------------+---------------:
+| Comment Node(CNP)                 | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/TextOrCommentNodePointable.java}TextOrCommentNodePointable}}      |    1 + length |
+*-----------------------------------+----------------------+---------------:
+| Text Node(TNP)                    | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/TextOrCommentNodePointable.java}TextOrCommentNodePointable}}      |    1 + length |
+*-----------------------------------+----------------------+---------------:
+
+
+* JSONiq Data Types
+
+  Json-items are used as a data source for JSONiq and must be parsed into Hyracks data. Each json-item defined in JSONiq can be mapped into pointable defined in Apache VXQuery\x99.
+  
+*-------------------------+----------------------+---------------:
+| Array(AP)               | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/jsonitem/ArrayPointable.java}ArrayPointable}}     |    1 + length |
+*-------------------------+----------------------+---------------:  
+| Object(OP)              | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/jsonitem/ObjectPointable.java}ObjectPointable}}   |    1 + length |
+*-------------------------+----------------------+---------------: 
+| js:null(null)           |                      |             1 |
+*-------------------------+----------------------+---------------: 
+
+
 * String Iterators
 
   For many string functions, we have used string iterators to traverse the
@@ -159,4 +198,4 @@ Developer Data Handling
   to hold your output. Adding to the result, if necessary. The array can be
   reused and can hold multiple pointable results due to the starting offset
   parameter in the pointable.
-  
\ No newline at end of file
+  

http://git-wip-us.apache.org/repos/asf/vxquery/blob/bbb50a9d/src/site/apt/development_xml_document.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/development_xml_document.apt b/src/site/apt/development_xml_document.apt
index 3d4c284..f618704 100644
--- a/src/site/apt/development_xml_document.apt
+++ b/src/site/apt/development_xml_document.apt
@@ -13,6 +13,130 @@
 ~~ See the License for the specific language governing permissions and
 ~~ limitations under the License.
 
+* XML Mapping
+
+  The XML mapping to Hyracks pointables is fairly straight forward. The following example
+  shows how each node is mapped and saved into a byte array used by Hyracks.
+
+** Example XML File
+
+  The example XML file comes from W3School XQuery tutorial.
+  
+----------------------------------------
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- Edited by XMLSpy� -->
+<bookstore>
+
+    <book category="COOKING">
+        <title lang="en">Everyday Italian</title>
+        <author>Giada De Laurentiis</author>
+        <year>2005</year>
+        <price>30.00</price>
+    </book>
+    
+    <book category="CHILDREN">
+        <title lang="en">Harry Potter</title>
+        <author>J K. Rowling</author>
+        <year>2005</year>
+        <price>29.99</price>
+    </book>
+    
+    <book category="WEB">
+        <title lang="en">XQuery Kick Start</title>
+        <author>James McGovern</author>
+        <author>Per Bothner</author>
+        <author>Kurt Cagle</author>
+        <author>James Linn</author>
+        <author>Vaidyanathan Nagarajan</author>
+        <year>2003</year>
+        <price>49.99</price>
+    </book>
+    
+    <book category="WEB">
+        <title lang="en">Learning XML</title>
+        <author>Erik T. Ray</author>
+        <year>2003</year>
+        <price>39.95</price>
+    </book>
+
+</bookstore>
+----------------------------------------
+  
+** Example Hyracks Mapping
+
+  The mapping is explained through using some short hand for the above example XML file.
+  Realize the direct bytes will not be explained although the pointable names are used for
+  each piece of information.
+  
+----------------------------------------
+NodeTree {
+    DocumentNode {bookstore}
+        sequence (children) {
+            ElementNode {book}
+                sequence (attributes) {
+                    AttributeNode {category}
+                }
+                sequence (children) {
+                    ElementNode {title:Everyday Italian}
+                        sequence (attributes) {
+                            AttributeNode {lang}
+                        }
+                    ElementNode {author}
+                    ElementNode {year}
+                    ElementNode {price}
+                }
+            ElementNode {book}
+                sequence (attributes) {
+                    AttributeNode {category}
+                }
+                sequence (children) {
+                    ElementNode {title:Harry Potter}
+                        sequence (attributes) {
+                           AttributeNode {lang}
+                        }
+                    ElementNode {author}
+                    ElementNode {year}
+                    ElementNode {price}
+                }
+            ElementNode {book}
+                sequence (attributes) {
+                    AttributeNode {category}
+                }
+                sequence (children) {
+                    ElementNode {title:XQuery Kick Start}
+                        sequence (attributes) {
+                            AttributeNode {lang}
+                        }
+                    ElementNode {author}
+                    ElementNode {author}
+                    ElementNode {author}
+                    ElementNode {author}
+                    ElementNode {author}
+                    ElementNode {year}
+                    ElementNode {price}
+                }
+            ElementNode {book}
+                sequence (attributes) {
+                    AttributeNode {category}
+                }
+                sequence (children) {
+                    ElementNode {title:Learning XML}
+                        sequence (attributes) {
+                            AttributeNode {lang}
+                        }
+                    ElementNode {author}
+                    ElementNode {year}
+                    ElementNode {price}
+                }
+        }
+}
+----------------------------------------
+
+  Following is a detailed example of the byte representation of an XML document.
+   
+
+=========================================================================
+
 XML Data Model Example 
 
 

http://git-wip-us.apache.org/repos/asf/vxquery/blob/bbb50a9d/src/site/apt/development_xml_node_details.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/development_xml_node_details.apt b/src/site/apt/development_xml_node_details.apt
deleted file mode 100644
index 7483b0e..0000000
--- a/src/site/apt/development_xml_node_details.apt
+++ /dev/null
@@ -1,162 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one or more
-~~ contributor license agreements.  See the NOTICE file distributed with
-~~ this work for additional information regarding copyright ownership.
-~~ The ASF licenses this file to You under the Apache License, Version 2.0
-~~ (the "License"); you may not use this file except in compliance with
-~~ the License.  You may obtain a copy of the License at
-~~
-~~     http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~ Unless required by applicable law or agreed to in writing, software
-~~ distributed under the License is distributed on an "AS IS" BASIS,
-~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-~~ See the License for the specific language governing permissions and
-~~ limitations under the License.
-
-XML Data and Node Types
-
-  XML is used as the data source for XQuery and must be parsed into Hyracks data. Each
-  node type defined in XPath and XQuery can be mapped into pointable defined in Apache 
-  VXQuery\x99.
-
-* XPath Node Types
-
-*-----------------------------------+----------------------+---------------+
-| <<Data Type>>                     | <<Pointable Name>>   | <<Data Size>> |
-*-----------------------------------+----------------------+---------------:
-| Attribute Nodes(ANP)              | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/AttributeNodePointable.java}AttributeNodePointable}}      |    1 + length |
-*-----------------------------------+----------------------+---------------:
-| Document Nodes(DNP)               | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/DocumentNodePointable.java}DocumentNodePointable}}      |    1 + length |
-*-----------------------------------+----------------------+---------------:
-| Element Nodes(ENP)                | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/ElementNodePointable.java}ElementNodePointable}}      |    1 + length |
-*-----------------------------------+----------------------+---------------:
-| Node Tree(NTP)                    | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/NodeTreePointable.java}NodeTreePointable}}      |    1 + length |
-*-----------------------------------+----------------------+---------------:
-| Processing Instruction Node(PINP) | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/PINodePointable.java}PINodePointable}}      |    1 + length |
-*-----------------------------------+----------------------+---------------:
-| Comment Node(CNP)                 | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/TextOrCommentNodePointable.java}TextOrCommentNodePointable}}      |    1 + length |
-*-----------------------------------+----------------------+---------------:
-| Text Node(TNP)                    | {{{https://git-wip-us.apache.org/repos/asf?p=vxquery.git;a=blob;f=vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/nodes/TextOrCommentNodePointable.java}TextOrCommentNodePointable}}      |    1 + length |
-*-----------------------------------+----------------------+---------------:
-
-
-* XML Mapping
-
-  The XML mapping to Hyracks pointables is fairly straight forward. The following example
-  shows how each node is mapped and saved into a byte array used by Hyracks.
-
-** Example XML File
-
-  The example XML file comes from W3School XQuery tutorial.
-  
-----------------------------------------
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Edited by XMLSpy� -->
-<bookstore>
-
-    <book category="COOKING">
-        <title lang="en">Everyday Italian</title>
-        <author>Giada De Laurentiis</author>
-        <year>2005</year>
-        <price>30.00</price>
-    </book>
-    
-    <book category="CHILDREN">
-        <title lang="en">Harry Potter</title>
-        <author>J K. Rowling</author>
-        <year>2005</year>
-        <price>29.99</price>
-    </book>
-    
-    <book category="WEB">
-        <title lang="en">XQuery Kick Start</title>
-        <author>James McGovern</author>
-        <author>Per Bothner</author>
-        <author>Kurt Cagle</author>
-        <author>James Linn</author>
-        <author>Vaidyanathan Nagarajan</author>
-        <year>2003</year>
-        <price>49.99</price>
-    </book>
-    
-    <book category="WEB">
-        <title lang="en">Learning XML</title>
-        <author>Erik T. Ray</author>
-        <year>2003</year>
-        <price>39.95</price>
-    </book>
-
-</bookstore>
-----------------------------------------
-  
-** Example Hyracks Mapping
-
-  The mapping is explained through using some short hand for the above example XML file.
-  Realize the direct bytes will not be explained although the pointable names are used for
-  each piece of information.
-  
-----------------------------------------
-NodeTree {
-    DocumentNode {bookstore}
-        sequence (children) {
-            ElementNode {book}
-                sequence (attributes) {
-                    AttributeNode {category}
-                }
-                sequence (children) {
-                    ElementNode {title:Everyday Italian}
-                        sequence (attributes) {
-                            AttributeNode {lang}
-                        }
-                    ElementNode {author}
-                    ElementNode {year}
-                    ElementNode {price}
-                }
-            ElementNode {book}
-                sequence (attributes) {
-                    AttributeNode {category}
-                }
-                sequence (children) {
-                    ElementNode {title:Harry Potter}
-                        sequence (attributes) {
-                           AttributeNode {lang}
-                        }
-                    ElementNode {author}
-                    ElementNode {year}
-                    ElementNode {price}
-                }
-            ElementNode {book}
-                sequence (attributes) {
-                    AttributeNode {category}
-                }
-                sequence (children) {
-                    ElementNode {title:XQuery Kick Start}
-                        sequence (attributes) {
-                            AttributeNode {lang}
-                        }
-                    ElementNode {author}
-                    ElementNode {author}
-                    ElementNode {author}
-                    ElementNode {author}
-                    ElementNode {author}
-                    ElementNode {year}
-                    ElementNode {price}
-                }
-            ElementNode {book}
-                sequence (attributes) {
-                    AttributeNode {category}
-                }
-                sequence (children) {
-                    ElementNode {title:Learning XML}
-                        sequence (attributes) {
-                            AttributeNode {lang}
-                        }
-                    ElementNode {author}
-                    ElementNode {year}
-                    ElementNode {price}
-                }
-        }
-}
-----------------------------------------
-  
-  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/vxquery/blob/bbb50a9d/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index 5b9e21b..bf69e70 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -96,9 +96,6 @@ limitations under the License.
                 name="XMark Benchmark Status"
                 href="development_xmark_status.html" />
             <item
-                name="XML Data and Node Types"
-                href="development_xml_node_details.html" />
-            <item
                 name="XML Data Model Example"
                 href="development_xml_document.html" />
             <item