You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2017/03/29 02:37:07 UTC

[26/35] asterixdb git commit: AsterixDB Rat Execution Audit & Fixes

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/admaql101-demo/static/js/demo.js
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/admaql101-demo/static/js/demo.js b/asterixdb/asterix-examples/src/main/resources/admaql101-demo/static/js/demo.js
index 9bd04db..40595ec 100644
--- a/asterixdb/asterix-examples/src/main/resources/admaql101-demo/static/js/demo.js
+++ b/asterixdb/asterix-examples/src/main/resources/admaql101-demo/static/js/demo.js
@@ -17,9 +17,9 @@
  * under the License.
  */
 $(document).ready(function() {
-    
+
     var A = new AsterixDBConnection().dataverse("TinySocial");
-    
+
     function addResult(dom, res) {
         for (i in res) {
             $(dom).append(res[i] + "<br/>");
@@ -29,16 +29,16 @@ $(document).ready(function() {
     // 0A - Exact-Match Lookup
     $('#run0a').click(function () {
         $('#result0a').html('');
-        
+
         var expression0a = new FLWOGRExpression()
             .ForClause("$user", new AExpression("dataset FacebookUsers"))
             .WhereClause(new AExpression("$user.id = 8"))
             .ReturnClause("$user");
-        
+
         var success0a = function(res) {
             addResult('#result0a', res["results"]);
         };
-        
+
         A.query(expression0a.val(), success0a);
     });
 
@@ -50,11 +50,11 @@ $(document).ready(function() {
             .ForClause("$user", new AExpression("dataset FacebookUsers"))
             .WhereClause().and(new AExpression("$user.id >= 2"), new AExpression("$user.id <= 4"))
             .ReturnClause("$user");
-            
+
         var success0b = function(res) {
             addResult('#result0b', res["results"]);
         };
-        
+
         A.query(expression0b.val(), success0b);
     });
 
@@ -65,17 +65,17 @@ $(document).ready(function() {
         var expression1 = new FLWOGRExpression()
             .ForClause("$user", new AExpression("dataset FacebookUsers"))
             .WhereClause().and(
-                new AExpression("$user.user-since >= datetime('2010-07-22T00:00:00')"), 
+                new AExpression("$user.user-since >= datetime('2010-07-22T00:00:00')"),
                 new AExpression("$user.user-since <= datetime('2012-07-29T23:59:59')")
             )
             .ReturnClause("$user");
-        
+
         var success1 = function(res) {
             addResult('#result1', res["results"]);
         };
         A.query(expression1.val(), success1);
     });
-        
+
     // 2A - Equijoin
     $("#run2a").click(function() {
         $('#result2a').html('');
@@ -88,7 +88,7 @@ $(document).ready(function() {
                 "uname" : "$user.name",
                 "message" : "$message.message"
             });
-        
+
         var success2a = function(res) {
             addResult('#result2a', res["results"]);
         };
@@ -107,7 +107,7 @@ $(document).ready(function() {
                     "uname" : "$user.name",
                     "message" : "$message.message"
             });
-        
+
         var success2b = function(res) {
             addResult('#result2b', res["results"]);
         };
@@ -129,13 +129,13 @@ $(document).ready(function() {
                 "uname": "$user.name",
                 "messages" : expression3messages
             });
-            
+
         var success3 = function(res) {
             addResult('#result3', res["results"]);
         };
         A.query(expression3.val(), success3);
     });
-    
+
     // 4 - Theta Join
     $("#run4").click(function() {
         $('#result4').html('');
@@ -144,14 +144,14 @@ $(document).ready(function() {
             .ForClause( "$t2", new AExpression("dataset TweetMessages"))
             .WhereClause( new AExpression("spatial-distance($t.sender-location, $t2.sender-location) <= 1"))
             .ReturnClause({ "msgtxt" : "$t2.message-text" });
-            
+
         var expression4 = new FLWOGRExpression()
             .ForClause( "$t", new AExpression("dataset TweetMessages"))
             .ReturnClause({
                 "message" : "$t.message-text",
                 "nearby-messages" : expression4messages
             });
-        
+
         var success4 = function(res) {
             addResult('#result4', res["results"]);
         };
@@ -170,7 +170,7 @@ $(document).ready(function() {
                 "twitter-screenname": "$tu.screen-name",
                 "twitter-name": "$tu.name"
             });
-        
+
         var expression5 = new FLWOGRExpression()
             .ForClause ("$fbu", new AExpression("dataset FacebookUsers"))
             .ReturnClause(
@@ -180,16 +180,16 @@ $(document).ready(function() {
                     "similar-users" : similarUsersExpression
                 }
             );
-        
+
         var success5 = function (res) {
             addResult('#result5', res["results"]);
         };
-        
+
         var simfunction = new SetStatement( "simfunction", "edit-distance" );
         var simthreshold = new SetStatement( "simthreshold", "3");
 
         A.query(
-            [ simfunction.val() , simthreshold.val() , expression5.val() ], 
+            [ simfunction.val() , simthreshold.val() , expression5.val() ],
             success5
         );
     });
@@ -200,19 +200,19 @@ $(document).ready(function() {
 
         var expression6 = new FLWOGRExpression()
             .ForClause ("$fbu", new AQLClause().set("dataset FacebookUsers"))
-            .WhereClause( 
+            .WhereClause(
                 new QuantifiedExpression (
-                    "some" , 
+                    "some" ,
                     {"$e" : new AExpression("$fbu.employment") },
                     new FunctionExpression("is-null", new AExpression("$e.end-date"))
                 )
             )
             .ReturnClause("$fbu");
-        
+
         var success6 = function(res) {
             addResult('#result6',res["results"]);
         };
-        
+
         A.query(expression6.val(), success6);
     });
 
@@ -222,15 +222,15 @@ $(document).ready(function() {
 
         var expression7 = new FLWOGRExpression()
             .ForClause("$fbu", new AExpression("dataset FacebookUsers"))
-            .WhereClause( 
+            .WhereClause(
                 new QuantifiedExpression (
-                    "every" , 
+                    "every" ,
                     {"$e" : new AExpression("$fbu.employment") },
                     new FunctionExpression("not", new FunctionExpression("is-null", new AExpression("$e.end-date")))
                 )
             )
             .ReturnClause("$fbu");
-        
+
         var success7 = function(res) {
             addResult('#result7', res["results"]);
         };
@@ -239,8 +239,8 @@ $(document).ready(function() {
 
     // 8 - Simple Aggregation
     $('#run8').click(function () {
-    
-        $('#result8').html('');   
+
+        $('#result8').html('');
 
         var expression8 = new FunctionExpression(
             "count",
@@ -248,7 +248,7 @@ $(document).ready(function() {
                 .ForClause("$fbu", new AExpression("dataset FacebookUsers"))
                 .ReturnClause("$fbu")
         );
-        
+
         var success8 = function(res) {
             addResult('#result8', res["results"]);
         };
@@ -289,13 +289,13 @@ $(document).ready(function() {
                     "count" : new FunctionExpression("count", new AExpression("$t"))
                 }
             );
-        
+
         var success9b = function(res) {
             addResult('#result9b', res["results"]);
         };
         A.query(expression9b.val(), success9b);
     });
-    
+
     // 10 - Grouping and Limits
     $("#run10").click(function() {
         $('#result10').html('');
@@ -310,7 +310,7 @@ $(document).ready(function() {
                 {
                     "user" : "$uid",
                     "count" : "$c"
-                } 
+                }
             );
 
         var success10 = function(res) {
@@ -326,27 +326,27 @@ $(document).ready(function() {
     var expression11 = new FLWOGRExpression()
         .ForClause( "$t", new AExpression("dataset TweetMessages"))
         .ReturnClause({
-            "tweet"         : new AExpression("$t"),       
+            "tweet"         : new AExpression("$t"),
             "similar-tweets": new FLWOGRExpression()
                                 .ForClause( "$t2", new AExpression("dataset TweetMessages"))
                                 .WhereClause().and(
-                                    new AExpression("$t2.referred-topics ~= $t.referred-topics"), 
+                                    new AExpression("$t2.referred-topics ~= $t.referred-topics"),
                                     new AExpression("$t2.tweetid != $t.tweetid")
                                  )
                                 .ReturnClause("$t2.referred-topics")
-        }); 
-        
+        });
+
         var success11 = function(res) {
             addResult('#result11', res["results"]);
         };
-        
+
         var simfunction = new SetStatement( "simfunction", "jaccard" );
         var simthreshold = new SetStatement( "simthreshold", "0.3");
         A.query(
-            [ simfunction.val(), simthreshold.val(), expression11.val()], 
+            [ simfunction.val(), simthreshold.val(), expression11.val()],
             success11
         );
-        
+
     });
 
     /*$('#run0a').trigger('click');

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/admaql101-demo/tinysocial/query.txt
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/admaql101-demo/tinysocial/query.txt b/asterixdb/asterix-examples/src/main/resources/admaql101-demo/tinysocial/query.txt
index 2a50477..32f430a 100644
--- a/asterixdb/asterix-examples/src/main/resources/admaql101-demo/tinysocial/query.txt
+++ b/asterixdb/asterix-examples/src/main/resources/admaql101-demo/tinysocial/query.txt
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
 drop dataverse TinySocial if exists;
 create dataverse TinySocial;
 use dataverse TinySocial;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/asterix-sdk-stable.js
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/asterix-sdk-stable.js b/asterixdb/asterix-examples/src/main/resources/asterix-sdk-stable.js
index efd5414..b8593a4 100755
--- a/asterixdb/asterix-examples/src/main/resources/asterix-sdk-stable.js
+++ b/asterixdb/asterix-examples/src/main/resources/asterix-sdk-stable.js
@@ -19,30 +19,30 @@
 /**
 * Asterix SDK - Beta Version
 * @author Eugenia Gabrielov <ge...@gmail.com>
-* 
-* This is a Javascript helper file for generating AQL queries for AsterixDB (https://code.google.com/p/asterixdb/) 
+*
+* This is a Javascript helper file for generating AQL queries for AsterixDB (https://code.google.com/p/asterixdb/)
 */
 
 /**
 * AsterixDBConnection
-* 
-* This is a handler for connections to a local AsterixDB REST API Endpoint. 
+*
+* This is a handler for connections to a local AsterixDB REST API Endpoint.
 * This initialization takes as input a configuraiton object, and initializes
-* same basic functionality. 
+* same basic functionality.
 */
 function AsterixDBConnection(configuration) {
     // Initialize AsterixDBConnection properties
     this._properties = {};
-    
+
     // Set dataverse as null for now, this needs to be set by the user.
     this._properties["dataverse"] = "";
-    
+
     // By default, we will wait for calls to the REST API to complete. The query method
     // sends a different setting when executed asynchronously. Calls that do not specify a mode
     // will be executed synchronously.
     this._properties["mode"] = "synchronous";
-    
-    // These are the default error behaviors for Asterix and ajax errors, respectively. 
+
+    // These are the default error behaviors for Asterix and ajax errors, respectively.
     // They can be overridden by calling initializing your AsterixDBConnection like so:
     // adb = new AsterixDBConnection({
     //                                  "error" : function(data) {
@@ -52,7 +52,7 @@ function AsterixDBConnection(configuration) {
     this._properties["error"] = function(data) {
         alert("Asterix REST API Error:\n" + data["error-code"][0] + "\n" + data["error-code"][1]);
     };
-    
+
     this._properties["ajax_error"] = function(message) {
         alert("[Ajax Error]\n" + message);
     };
@@ -60,7 +60,7 @@ function AsterixDBConnection(configuration) {
     // This is the default path to the local Asterix REST API. Can be overwritten for remote configurations
     // or for demo setup purposes (such as with a proxy handler with Python or PHP.
     this._properties["endpoint_root"] = "http://localhost:19002/";
-    
+
     // If we have passed in a configuration, we will update the internal properties
     // using that configuration. You can do things such as include a new endpoint_root,
     // a new error function, a new dataverse, etc. You can even store extra info.
@@ -71,7 +71,7 @@ function AsterixDBConnection(configuration) {
     for (var key in configuration) {
         this._properties[key] = configuration[key];
     }
-    
+
     return this;
 }
 
@@ -83,38 +83,38 @@ function AsterixDBConnection(configuration) {
 */
 AsterixDBConnection.prototype.dataverse = function(dataverseName) {
     this._properties["dataverse"] = dataverseName;
-    
+
     return this;
 };
 
 
 /**
 * query (http://asterix.ics.uci.edu/documentation/api.html#QueryApi)
-* 
+*
 * @param statements, statements of an AQL query
 * @param successFn, a function to execute if this query is run successfully
 * @param mode, a string either "synchronous" or "asynchronous", depending on preferred
-*               execution mode. 
+*               execution mode.
 */
 AsterixDBConnection.prototype.query = function(statements, successFn, mode) {
- 
+
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     var m = typeof mode ? mode : "synchronous";
-    
+
     // DEBUG
     //alert(statements.join("\n"));
-     
+
     var query = "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n");
-    
+
     this._api(
         {
             "query" : query,
             "mode"  : m
         },
-        successFn, 
+        successFn,
         "query"
     );
 
@@ -123,7 +123,7 @@ AsterixDBConnection.prototype.query = function(statements, successFn, mode) {
 
 /**
 * query_status (http://asterix.ics.uci.edu/documentation/api.html#QueryStatusApi)
-* 
+*
 * @param handle, a json object of the form {"handle" : handleObject}, where
 *                   the handle object is an opaque handle previously returned
 *                   from an asynchronous call.
@@ -142,7 +142,7 @@ AsterixDBConnection.prototype.query_status = function(handle, successFn) {
 
 /**
 * query_result (http://asterix.ics.uci.edu/documentation/api.html#AsynchronousResultApi)
-* 
+*
 * handle, a json object of the form {"handle" : handleObject}, where
 *           the handle object is an opaque handle previously returned
 *           from an asynchronous call.
@@ -153,7 +153,7 @@ AsterixDBConnection.prototype.query_result = function(handle, successFn) {
         handle,
         successFn,
         "query/result"
-    ); 
+    );
 
     return this;
 };
@@ -161,7 +161,7 @@ AsterixDBConnection.prototype.query_result = function(handle, successFn) {
 
 /**
 * ddl (http://asterix.ics.uci.edu/documentation/api.html#DdlApi)
-* 
+*
 * @param statements, statements to run through ddl api
 * @param successFn, a function to execute if they are successful
 */
@@ -169,7 +169,7 @@ AsterixDBConnection.prototype.ddl = function(statements, successFn) {
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     this._api(
         {
             "ddl" :  "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n")
@@ -185,7 +185,7 @@ AsterixDBConnection.prototype.ddl = function(statements, successFn) {
 *
 * @param statements, statement(s) for an update API call
 * @param successFn, a function to run if this is executed successfully.
-* 
+*
 * This is an AsterixDBConnection handler for the update API. It passes statements provided
 * to the internal API endpoint handler.
 */
@@ -193,10 +193,10 @@ AsterixDBConnection.prototype.update = function(statements, successFn) {
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     // DEBUG
     // alert(statements.join("\n"));
-    
+
     this._api(
         {
             "statements" : "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n")
@@ -220,15 +220,15 @@ AsterixDBConnection.prototype.meta = function(statements, successFn) {
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     var query = statements.join("\n");
-    
+
     this._api(
         {
             "query" : query,
             "mode"  : "synchronous"
         },
-        successFn, 
+        successFn,
         "query"
     );
 
@@ -241,8 +241,8 @@ AsterixDBConnection.prototype.meta = function(statements, successFn) {
 *
 * @param json, the data to be passed with the request
 * @param onSuccess, the success function to be run if this succeeds
-* @param endpoint, a string representing one of the Asterix API endpoints 
-* 
+* @param endpoint, a string representing one of the Asterix API endpoints
+*
 * Documentation of endpoints is here:
 * http://asterix.ics.uci.edu/documentation/api.html
 *
@@ -253,33 +253,33 @@ AsterixDBConnection.prototype._api = function(json, onSuccess, endpoint) {
     // The success function is called if the response is successful and returns data,
     // or is just OK.
     var success_fn = onSuccess;
-    
+
     // This is the error function. Called if something breaks either on the Asterix side
     // or in the Ajax call.
     var error_fn = this._properties["error"];
     var ajax_error_fn = this._properties["ajax_error"];
-    
+
     // This is the target endpoint from the REST api, called as a string.
-    var endpoint_url = this._properties["endpoint_root"] + endpoint;    
+    var endpoint_url = this._properties["endpoint_root"] + endpoint;
 
     // This SDK does not rely on jQuery, but utilizes its Ajax capabilities when present.
     if (window.jQuery) {
         $.ajax({
-        
+
             // The Asterix API does not accept post requests.
             type        : 'GET',
-            
+
             // This is the endpoint url provided by combining the default
             // or reconfigured endpoint root along with the appropriate api endpoint
             // such as "query" or "update".
             url         : endpoint_url,
-            
+
             // This is the data in the format specified on the API documentation.
             data        : json,
-            
-            // We send out the json datatype to make sure our data is parsed correctly. 
+
+            // We send out the json datatype to make sure our data is parsed correctly.
             dataType    : "json",
-            
+
             // The success option calls a function on success, which in this case means
             // something was returned from the API. However, this does not mean the call succeeded
             // on the REST API side, it just means we got something back. This also contains the
@@ -288,23 +288,23 @@ AsterixDBConnection.prototype._api = function(json, onSuccess, endpoint) {
 
                 // Check Asterix Response for errors
                 // See http://asterix.ics.uci.edu/documentation/api.html#ErrorCodes
-                if (data["error-code"]) { 
+                if (data["error-code"]) {
                     error_fn(data);
-                    
+
                 // Otherwise, run our provided success function
                 } else {
                     success_fn(data);
                 }
             },
-            
+
             // This is the function that gets called if there is an ajax-related (non-Asterix)
             // error. Network errors, empty response bodies, syntax errors, and a number of others
-            // can pop up. 
+            // can pop up.
             error       : function(data) {
 
                 // Some of the Asterix API endpoints return empty responses on success.
                 // However, the ajax function treats these as errors while reporting a
-                // 200 OK code with no payload. So we will check for that, otherwise 
+                // 200 OK code with no payload. So we will check for that, otherwise
                 // alert of an error. An example response is as follows:
                 // {"readyState":4,"responseText":"","status":200,"statusText":"OK"}
                 if (data["status"] == 200 && data["responseText"] == "") {
@@ -314,23 +314,23 @@ AsterixDBConnection.prototype._api = function(json, onSuccess, endpoint) {
                 }
             }
         });
-        
+
     } else {
-    
+
         // NOTE: This section is in progress; currently API requires jQuery.
-    
+
         // First, we encode the parameters of the query to create a new url.
         api_endpoint = endpoint_url + "?" + Object.keys(json).map(function(k) {
             return encodeURIComponent(k) + '=' + encodeURIComponent(json[k])
         }).join('&');
-       
+
         // Now, create an XMLHttp object to carry our request. We will call the
         // UI callback function on ready.
         var xmlhttp;
         xmlhttp = new XMLHttpRequest();
         xmlhttp.open("GET", endpoint_url, true);
         xmlhttp.send(null);
-        
+
         xmlhttp.onreadystatechange = function(){
             if (xmlhttp.readyState == 4) {
                 if (xmlhttp.status === 200) {
@@ -354,7 +354,7 @@ function AExpression () {
     this._success = function() {};
 
     if (arguments.length == 1) {
-        this._properties["value"] = arguments[0];    
+        this._properties["value"] = arguments[0];
     }
 
     return this;
@@ -379,7 +379,7 @@ AExpression.prototype.run = function(successFn) {
 };
 
 
-AExpression.prototype.val = function() { 
+AExpression.prototype.val = function() {
 
     var value = "";
 
@@ -398,7 +398,7 @@ AExpression.prototype.val = function() {
 
 // @param expressionValue [String]
 AExpression.prototype.set = function(expressionValue) {
-    this._properties["value"] = expressionValue; 
+    this._properties["value"] = expressionValue;
     return this;
 };
 
@@ -415,12 +415,12 @@ AExpression.prototype.set = function(expressionValue) {
 //                  | Query
 function InsertStatement(quantifiedName, query) {
     AExpression.call(this);
-    
+
     var innerQuery = "";
     if (query instanceof AExpression) {
         innerQuery = query.val();
     } else if (typeof query == "object" && Object.getPrototypeOf( query ) === Object.prototype ) {
-        
+
         var insertStatements = [];
         for (querykey in query) {
             if (query[querykey] instanceof AExpression) {
@@ -431,12 +431,12 @@ function InsertStatement(quantifiedName, query) {
                 insertStatements.push('"' + querykey + '" : ' + query[querykey].toString());
             }
         }
-        
+
         innerQuery = "{" + insertStatements.join(', ') + "}";
     }
-    
+
     var statement = "insert into dataset " + quantifiedName + "(" + innerQuery + ");";
-    
+
     AExpression.prototype.set.call(this, statement);
 
     return this;
@@ -450,15 +450,15 @@ InsertStatement.prototype.constructor = InsertStatement;
 // DeleteStatement ::= "delete" Variable "from" "dataset" QualifiedName ( "where" Expression )?
 function DeleteStatement (variable, quantifiedName, whereExpression) {
     AExpression.call(this);
-    
+
     var statement = "delete " + variable + " from dataset " + quantifiedName;
-    
+
     if (whereExpression instanceof AExpression) {
         statement += " where " + whereExpression.val();
     }
-    
+
     AExpression.prototype.set.call(this, statement);
-    
+
     return this;
 }
 
@@ -487,21 +487,21 @@ SetStatement.prototype.constructor = SetStatement;
 
 // FunctionExpression
 // Parent: AsterixExpression
-// 
-// @param   options [Various], 
+//
+// @param   options [Various],
 // @key     function [String], a function to be applid to the expression
 // @key     expression [AsterixExpression or AQLClause] an AsterixExpression/Clause to which the fn will be applied
 function FunctionExpression() {
-    
+
     // Initialize superclass
     AExpression.call(this);
-    
+
     this._properties["function"] = "";
     this._properties["expressions"] = [];
 
     // Check for fn/expression input
     if (arguments.length >= 2 && typeof arguments[0] == "string") {
-        
+
         this._properties["function"] = arguments[0];
 
         for (i = 1; i < arguments.length; i++) {
@@ -511,7 +511,7 @@ function FunctionExpression() {
                 this._properties["expressions"].push(new AExpression(arguments[i]));
             }
         }
-    } 
+    }
 
     // Return FunctionCallExpression object
     return this;
@@ -520,7 +520,7 @@ function FunctionExpression() {
 
 FunctionExpression.prototype = Object.create(AExpression.prototype);
 FunctionExpression.prototype.constructor = FunctionExpression;
-   
+
 
 FunctionExpression.prototype.val = function () {
     var fn_args = [];
@@ -655,7 +655,7 @@ function AQLClause() {
 
 AQLClause.prototype.val = function() {
     var value = this._properties["clause"];
- 
+
     return value;
 };
 
@@ -679,28 +679,28 @@ AQLClause.prototype.set = function(value) {
 // Grammar:
 // "for" Variable ( "at" Variable )? "in" ( Expression )
 //
-// @param for_variable [String], REQUIRED, first variable in clause 
+// @param for_variable [String], REQUIRED, first variable in clause
 // @param at_variable [String], NOT REQUIRED, first variable in clause
 // @param expression [AsterixExpression], REQUIRED, expression to evaluate
 function ForClause(for_variable, at_variable, expression) {
     AQLClause.call(this);
-  
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-  
+
     this._properties["clause"] = "for " + parameters[0];
-    
+
     if (parameters.length == 3) {
         this._properties["clause"] += " at " + parameters[1];
         this._properties["clause"] += " in " + parameters[2].val();
     } else if (parameters.length == 2) {
         this._properties["clause"] += " in " + parameters[1].val();
     }
-    
+
     return this;
 }
 
@@ -717,18 +717,18 @@ ForClause.prototype.constructor = ForClause;
 // @param expression [AExpression]
 function LetClause(let_variable, expression) {
     AQLClause.call(this);
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-    
+
     this._properties["clause"] = "let " + parameters[0] + " := ";
     this._properties["clause"] += parameters[1].val();
-    
-    return this; 
+
+    return this;
 }
 
 LetClause.prototype = Object.create(AQLClause.prototype);
@@ -743,25 +743,25 @@ function ReturnClause(expression) {
     AQLClause.call(this);
 
     this._properties["clause"] = "return ";
-    
+
     if (expression instanceof AExpression || expression instanceof AQLClause) {
         this._properties["clause"] += expression.val();
-    
+
     } else if ( typeof expression == "object" && Object.getPrototypeOf( expression ) === Object.prototype ) {
-        
+
         this._properties["clause"] += "\n{\n";
         var returnStatements = [];
         for (returnValue in expression) {
-           
-            if (expression[returnValue] instanceof AExpression) { 
-                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue].val());            
-            } else if (typeof expression[returnValue] == "string") {          
-                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue]);   
+
+            if (expression[returnValue] instanceof AExpression) {
+                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue].val());
+            } else if (typeof expression[returnValue] == "string") {
+                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue]);
             }
         }
         this._properties["clause"] += returnStatements.join(",\n");
-        this._properties["clause"] += "\n}";  
-    
+        this._properties["clause"] += "\n}";
+
     } else {
         this._properties["clause"] += new AQLClause().set(expression).val();
     }
@@ -776,13 +776,13 @@ ReturnClause.prototype.constructor = ReturnClause;
 
 // WhereClause
 //
-// Grammar: 
+// Grammar:
 // ::= "where" Expression
-// 
+//
 // @param expression [BooleanExpression], pushes this expression onto the stack
 function WhereClause(expression) {
     AQLClause.call(this);
-    
+
     this._properties["stack"] = [];
 
     if (expression instanceof Array) {
@@ -790,7 +790,7 @@ function WhereClause(expression) {
     } else {
         this.bind(expression);
     }
-    
+
     return this;
 }
 
@@ -808,8 +808,8 @@ WhereClause.prototype.bind = function(expression) {
 
 
 WhereClause.prototype.val = function() {
-    var value = "";  
-    
+    var value = "";
+
     if (this._properties["stack"].length == 0) {
         return value;
     }
@@ -819,32 +819,32 @@ WhereClause.prototype.val = function() {
         value += this._properties["stack"][count].val() + " ";
         count -= 1;
     }
-    
+
     return "where " + value;
 };
 
 
 WhereClause.prototype.and = function() {
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-    
-    var andClauses = [];  
+
+    var andClauses = [];
     for (var expression in parameters) {
-        
+
         if (parameters[expression] instanceof AExpression) {
             andClauses.push(parameters[expression].val());
         }
     }
-    
+
     if (andClauses.length > 0) {
         this._properties["stack"].push(new AExpression().set(andClauses.join(" and ")));
     }
-    
+
     return this;
 };
 
@@ -858,38 +858,38 @@ WhereClause.prototype.or = function() {
         parameters = arguments;
     }
 
-    var orClauses = [];  
+    var orClauses = [];
     for (var expression in parameters) {
-        
+
         if (parameters[expression] instanceof AExpression) {
             orClauses.push(parameters[expression].val());
         }
     }
-    
+
     if (andClauses.length > 0) {
         this._properties["stack"].push(new AExpression().set(orClauses.join(" and ")));
     }
-    
+
     return this;
 };
 
 // LimitClause
 // Grammar:
 // LimitClause    ::= "limit" Expression ( "offset" Expression )?
-// 
+//
 // @param   limitExpression [REQUIRED, AQLExpression]
 // @param   offsetExpression [OPTIONAL, AQLExpression]
 function LimitClause(limitExpression, offsetExpression) {
 
     AQLClause.call(this);
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-  
+
     // limitExpression required
     this._properties["clause"] = "limit " + parameters[0].val();
 
@@ -910,17 +910,17 @@ LimitClause.prototype.constructor = LimitClause;
 // Grammar:
 // OrderbyClause  ::= "order" "by" Expression ( ( "asc" ) | ( "desc" ) )? ( "," Expression ( ( "asc" ) | ( "desc" ) )? )*
 //
-// @params AQLExpressions and asc/desc strings, in any quantity. At least one required. 
+// @params AQLExpressions and asc/desc strings, in any quantity. At least one required.
 function OrderbyClause() {
-    
+
     AQLClause.call(this);
 
     // At least one argument expression is required, and first should be expression
     if (arguments.length == 0) {
         this._properties["clause"] = null;
-        return this;    
+        return this;
     }
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
@@ -929,10 +929,10 @@ function OrderbyClause() {
     }
 
     var expc = 0;
-    var expressions = [];    
+    var expressions = [];
 
     while (expc < parameters.length) {
-      
+
         var expression = "";
 
         if (parameters[expc] instanceof AExpression) {
@@ -944,9 +944,9 @@ function OrderbyClause() {
             expc++;
             expression += " " + parameters[expc];
         }
-        
+
         expressions.push(expression);
-      
+
         expc++;
     }
 
@@ -967,9 +967,9 @@ function GroupClause() {
 
     if (arguments.length == 0) {
         this._properties["clause"] = null;
-        return this;    
-    } 
-    
+        return this;
+    }
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
@@ -981,7 +981,7 @@ function GroupClause() {
     var expressions = [];
     var variableRefs = [];
     var isDecor = false;
-    
+
     while (expc < parameters.length) {
 
         if (parameters[expc] instanceof AExpression) {
@@ -989,8 +989,8 @@ function GroupClause() {
             isDecor = false;
             expressions.push(parameters[expc].val());
 
-        } else if (typeof parameters[expc] == "string") {       
-            
+        } else if (typeof parameters[expc] == "string") {
+
             // Special keywords, decor & with
             if (parameters[expc] == "decor") {
                 isDecor = true;
@@ -1001,15 +1001,15 @@ function GroupClause() {
                     variableRefs.push(parameters[expc]);
                     expc++;
                 }
-            
+
             // Variables and variable refs
             } else {
-                
+
                 var nextc = expc + 1;
                 var expression = "";
-            
+
                 if (isDecor) {
-                    expression += "decor "; 
+                    expression += "decor ";
                     isDecor = false;
                 }
 
@@ -1031,10 +1031,10 @@ GroupClause.prototype.constructor = GroupClause;
 
 
 // Quantified Expression
-// 
+//
 // Grammar
 // QuantifiedExpression ::= ( ( "some" ) | ( "every" ) ) Variable "in" Expression ( "," Variable "in" Expression )* "satisfies" Expression
-// 
+//
 // @param String some/every
 // @param [AExpression]
 // @param [Aexpression] satisfiesExpression
@@ -1045,10 +1045,10 @@ function QuantifiedExpression (keyword, expressions, satisfiesExpression) {
     var varsInExpressions = [];
 
     for (var varInExpression in expressions) {
-        varsInExpressions.push(varInExpression + " in " + expressions[varInExpression].val()); 
-    } 
+        varsInExpressions.push(varInExpression + " in " + expressions[varInExpression].val());
+    }
     expression += varsInExpressions.join(", ") + " satisfies " + satisfiesExpression.val();
-    
+
     AExpression.prototype.set.call(this, expression);
 
     return this;
@@ -1059,5 +1059,5 @@ QuantifiedExpression.prototype.constructor = QuantifiedExpression;
 
 QuantifiedExpression.prototype.val = function() {
     var value = AExpression.prototype.val.call(this);
-    return "(" + value + ")";    
+    return "(" + value + ")";
 };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/bottle.py
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/bottle.py b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/bottle.py
index cc3d1f5..e3c5973 100755
--- a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/bottle.py
+++ b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/bottle.py
@@ -1,4 +1,26 @@
 #!/usr/bin/env python
+#
+# Copyright (c) 2014, Marcel Hellkamp.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+
 # -*- coding: utf-8 -*-
 """
 Bottle is a fast and simple micro-framework for small web applications. It

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/data/query.txt
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/data/query.txt b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/data/query.txt
index f577c52..e69b683 100755
--- a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/data/query.txt
+++ b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/data/query.txt
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
 drop dataverse twitter if exists;
 create dataverse twitter;
 use dataverse twitter;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/asterix-sdk-stable.js
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/asterix-sdk-stable.js b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/asterix-sdk-stable.js
index 6c12261..61219c2 100755
--- a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/asterix-sdk-stable.js
+++ b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/asterix-sdk-stable.js
@@ -20,31 +20,31 @@
 /**
 * Asterix SDK - Beta Version
 * @author Eugenia Gabrielov <ge...@gmail.com>
-* 
-* This is a Javascript helper file for generating AQL queries for AsterixDB (https://code.google.com/p/asterixdb/) 
+*
+* This is a Javascript helper file for generating AQL queries for AsterixDB (https://code.google.com/p/asterixdb/)
 */
 
 
 /**
 * AsterixDBConnection
-* 
-* This is a handler for connections to a local AsterixDB REST API Endpoint. 
+*
+* This is a handler for connections to a local AsterixDB REST API Endpoint.
 * This initialization takes as input a configuraiton object, and initializes
-* same basic functionality. 
+* same basic functionality.
 */
 function AsterixDBConnection(configuration) {
     // Initialize AsterixDBConnection properties
     this._properties = {};
-    
+
     // Set dataverse as null for now, this needs to be set by the user.
     this._properties["dataverse"] = "";
-    
+
     // By default, we will wait for calls to the REST API to complete. The query method
     // sends a different setting when executed asynchronously. Calls that do not specify a mode
     // will be executed synchronously.
     this._properties["mode"] = "synchronous";
-    
-    // These are the default error behaviors for Asterix and ajax errors, respectively. 
+
+    // These are the default error behaviors for Asterix and ajax errors, respectively.
     // They can be overridden by calling initializing your AsterixDBConnection like so:
     // adb = new AsterixDBConnection({
     //                                  "error" : function(data) {
@@ -54,7 +54,7 @@ function AsterixDBConnection(configuration) {
     this._properties["error"] = function(data) {
         alert("Asterix REST API Error:\n" + data["error-code"][0] + "\n" + data["error-code"][1]);
     };
-    
+
     this._properties["ajax_error"] = function(message) {
         alert("[Ajax Error]\n" + message);
     };
@@ -62,7 +62,7 @@ function AsterixDBConnection(configuration) {
     // This is the default path to the local Asterix REST API. Can be overwritten for remote configurations
     // or for demo setup purposes (such as with a proxy handler with Python or PHP.
     this._properties["endpoint_root"] = "http://localhost:19002/";
-    
+
     // If we have passed in a configuration, we will update the internal properties
     // using that configuration. You can do things such as include a new endpoint_root,
     // a new error function, a new dataverse, etc. You can even store extra info.
@@ -73,7 +73,7 @@ function AsterixDBConnection(configuration) {
     for (var key in configuration) {
         this._properties[key] = configuration[key];
     }
-    
+
     return this;
 }
 
@@ -85,38 +85,38 @@ function AsterixDBConnection(configuration) {
 */
 AsterixDBConnection.prototype.dataverse = function(dataverseName) {
     this._properties["dataverse"] = dataverseName;
-    
+
     return this;
 };
 
 
 /**
 * query (http://asterix.ics.uci.edu/documentation/api.html#QueryApi)
-* 
+*
 * @param statements, statements of an AQL query
 * @param successFn, a function to execute if this query is run successfully
 * @param mode, a string either "synchronous" or "asynchronous", depending on preferred
-*               execution mode. 
+*               execution mode.
 */
 AsterixDBConnection.prototype.query = function(statements, successFn, mode) {
- 
+
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     var m = typeof mode ? mode : "synchronous";
-    
+
     // DEBUG
     //alert(statements.join("\n"));
-     
+
     var query = "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n");
-    
+
     this._api(
         {
             "query" : query,
             "mode"  : m
         },
-        successFn, 
+        successFn,
         "query"
     );
 
@@ -125,7 +125,7 @@ AsterixDBConnection.prototype.query = function(statements, successFn, mode) {
 
 /**
 * query_status (http://asterix.ics.uci.edu/documentation/api.html#QueryStatusApi)
-* 
+*
 * @param handle, a json object of the form {"handle" : handleObject}, where
 *                   the handle object is an opaque handle previously returned
 *                   from an asynchronous call.
@@ -144,7 +144,7 @@ AsterixDBConnection.prototype.query_status = function(handle, successFn) {
 
 /**
 * query_result (http://asterix.ics.uci.edu/documentation/api.html#AsynchronousResultApi)
-* 
+*
 * handle, a json object of the form {"handle" : handleObject}, where
 *           the handle object is an opaque handle previously returned
 *           from an asynchronous call.
@@ -155,7 +155,7 @@ AsterixDBConnection.prototype.query_result = function(handle, successFn) {
         handle,
         successFn,
         "query/result"
-    ); 
+    );
 
     return this;
 };
@@ -163,7 +163,7 @@ AsterixDBConnection.prototype.query_result = function(handle, successFn) {
 
 /**
 * ddl (http://asterix.ics.uci.edu/documentation/api.html#DdlApi)
-* 
+*
 * @param statements, statements to run through ddl api
 * @param successFn, a function to execute if they are successful
 */
@@ -171,7 +171,7 @@ AsterixDBConnection.prototype.ddl = function(statements, successFn) {
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     this._api(
         {
             "ddl" :  "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n")
@@ -187,7 +187,7 @@ AsterixDBConnection.prototype.ddl = function(statements, successFn) {
 *
 * @param statements, statement(s) for an update API call
 * @param successFn, a function to run if this is executed successfully.
-* 
+*
 * This is an AsterixDBConnection handler for the update API. It passes statements provided
 * to the internal API endpoint handler.
 */
@@ -195,10 +195,10 @@ AsterixDBConnection.prototype.update = function(statements, successFn) {
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     // DEBUG
     // alert(statements.join("\n"));
-    
+
     this._api(
         {
             "statements" : "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n")
@@ -222,15 +222,15 @@ AsterixDBConnection.prototype.meta = function(statements, successFn) {
     if ( typeof statements === 'string') {
         statements = [ statements ];
     }
-    
+
     var query = statements.join("\n");
-    
+
     this._api(
         {
             "query" : query,
             "mode"  : "synchronous"
         },
-        successFn, 
+        successFn,
         "query"
     );
 
@@ -243,8 +243,8 @@ AsterixDBConnection.prototype.meta = function(statements, successFn) {
 *
 * @param json, the data to be passed with the request
 * @param onSuccess, the success function to be run if this succeeds
-* @param endpoint, a string representing one of the Asterix API endpoints 
-* 
+* @param endpoint, a string representing one of the Asterix API endpoints
+*
 * Documentation of endpoints is here:
 * http://asterix.ics.uci.edu/documentation/api.html
 *
@@ -255,33 +255,33 @@ AsterixDBConnection.prototype._api = function(json, onSuccess, endpoint) {
     // The success function is called if the response is successful and returns data,
     // or is just OK.
     var success_fn = onSuccess;
-    
+
     // This is the error function. Called if something breaks either on the Asterix side
     // or in the Ajax call.
     var error_fn = this._properties["error"];
     var ajax_error_fn = this._properties["ajax_error"];
-    
+
     // This is the target endpoint from the REST api, called as a string.
-    var endpoint_url = this._properties["endpoint_root"] + endpoint;    
+    var endpoint_url = this._properties["endpoint_root"] + endpoint;
 
     // This SDK does not rely on jQuery, but utilizes its Ajax capabilities when present.
     if (window.jQuery) {
         $.ajax({
-        
+
             // The Asterix API does not accept post requests.
             type        : 'GET',
-            
+
             // This is the endpoint url provided by combining the default
             // or reconfigured endpoint root along with the appropriate api endpoint
             // such as "query" or "update".
             url         : endpoint_url,
-            
+
             // This is the data in the format specified on the API documentation.
             data        : json,
-            
-            // We send out the json datatype to make sure our data is parsed correctly. 
+
+            // We send out the json datatype to make sure our data is parsed correctly.
             dataType    : "json",
-            
+
             // The success option calls a function on success, which in this case means
             // something was returned from the API. However, this does not mean the call succeeded
             // on the REST API side, it just means we got something back. This also contains the
@@ -290,23 +290,23 @@ AsterixDBConnection.prototype._api = function(json, onSuccess, endpoint) {
 
                 // Check Asterix Response for errors
                 // See http://asterix.ics.uci.edu/documentation/api.html#ErrorCodes
-                if (data["error-code"]) { 
+                if (data["error-code"]) {
                     error_fn(data);
-                    
+
                 // Otherwise, run our provided success function
                 } else {
                     success_fn(data);
                 }
             },
-            
+
             // This is the function that gets called if there is an ajax-related (non-Asterix)
             // error. Network errors, empty response bodies, syntax errors, and a number of others
-            // can pop up. 
+            // can pop up.
             error       : function(data) {
 
                 // Some of the Asterix API endpoints return empty responses on success.
                 // However, the ajax function treats these as errors while reporting a
-                // 200 OK code with no payload. So we will check for that, otherwise 
+                // 200 OK code with no payload. So we will check for that, otherwise
                 // alert of an error. An example response is as follows:
                 // {"readyState":4,"responseText":"","status":200,"statusText":"OK"}
                 if (data["status"] == 200 && data["responseText"] == "") {
@@ -316,23 +316,23 @@ AsterixDBConnection.prototype._api = function(json, onSuccess, endpoint) {
                 }
             }
         });
-        
+
     } else {
-    
+
         // NOTE: This section is in progress; currently API requires jQuery.
-    
+
         // First, we encode the parameters of the query to create a new url.
         api_endpoint = endpoint_url + "?" + Object.keys(json).map(function(k) {
             return encodeURIComponent(k) + '=' + encodeURIComponent(json[k])
         }).join('&');
-       
+
         // Now, create an XMLHttp object to carry our request. We will call the
         // UI callback function on ready.
         var xmlhttp;
         xmlhttp = new XMLHttpRequest();
         xmlhttp.open("GET", endpoint_url, true);
         xmlhttp.send(null);
-        
+
         xmlhttp.onreadystatechange = function(){
             if (xmlhttp.readyState == 4) {
                 if (xmlhttp.status === 200) {
@@ -356,7 +356,7 @@ function AExpression () {
     this._success = function() {};
 
     if (arguments.length == 1) {
-        this._properties["value"] = arguments[0];    
+        this._properties["value"] = arguments[0];
     }
 
     return this;
@@ -381,7 +381,7 @@ AExpression.prototype.run = function(successFn) {
 };
 
 
-AExpression.prototype.val = function() { 
+AExpression.prototype.val = function() {
 
     var value = "";
 
@@ -400,7 +400,7 @@ AExpression.prototype.val = function() {
 
 // @param expressionValue [String]
 AExpression.prototype.set = function(expressionValue) {
-    this._properties["value"] = expressionValue; 
+    this._properties["value"] = expressionValue;
     return this;
 };
 
@@ -417,12 +417,12 @@ AExpression.prototype.set = function(expressionValue) {
 //                  | Query
 function InsertStatement(quantifiedName, query) {
     AExpression.call(this);
-    
+
     var innerQuery = "";
     if (query instanceof AExpression) {
         innerQuery = query.val();
     } else if (typeof query == "object" && Object.getPrototypeOf( query ) === Object.prototype ) {
-        
+
         var insertStatements = [];
         for (querykey in query) {
             if (query[querykey] instanceof AExpression) {
@@ -433,12 +433,12 @@ function InsertStatement(quantifiedName, query) {
                 insertStatements.push('"' + querykey + '" : ' + query[querykey].toString());
             }
         }
-        
+
         innerQuery = "{" + insertStatements.join(', ') + "}";
     }
-    
+
     var statement = "insert into dataset " + quantifiedName + "(" + innerQuery + ");";
-    
+
     AExpression.prototype.set.call(this, statement);
 
     return this;
@@ -452,15 +452,15 @@ InsertStatement.prototype.constructor = InsertStatement;
 // DeleteStatement ::= "delete" Variable "from" "dataset" QualifiedName ( "where" Expression )?
 function DeleteStatement (variable, quantifiedName, whereExpression) {
     AExpression.call(this);
-    
+
     var statement = "delete " + variable + " from dataset " + quantifiedName;
-    
+
     if (whereExpression instanceof AExpression) {
         statement += " where " + whereExpression.val();
     }
-    
+
     AExpression.prototype.set.call(this, statement);
-    
+
     return this;
 }
 
@@ -489,21 +489,21 @@ SetStatement.prototype.constructor = SetStatement;
 
 // FunctionExpression
 // Parent: AsterixExpression
-// 
-// @param   options [Various], 
+//
+// @param   options [Various],
 // @key     function [String], a function to be applid to the expression
 // @key     expression [AsterixExpression or AQLClause] an AsterixExpression/Clause to which the fn will be applied
 function FunctionExpression() {
-    
+
     // Initialize superclass
     AExpression.call(this);
-    
+
     this._properties["function"] = "";
     this._properties["expressions"] = [];
 
     // Check for fn/expression input
     if (arguments.length >= 2 && typeof arguments[0] == "string") {
-        
+
         this._properties["function"] = arguments[0];
 
         for (i = 1; i < arguments.length; i++) {
@@ -513,7 +513,7 @@ function FunctionExpression() {
                 this._properties["expressions"].push(new AExpression(arguments[i]));
             }
         }
-    } 
+    }
 
     // Return FunctionCallExpression object
     return this;
@@ -522,7 +522,7 @@ function FunctionExpression() {
 
 FunctionExpression.prototype = Object.create(AExpression.prototype);
 FunctionExpression.prototype.constructor = FunctionExpression;
-   
+
 
 FunctionExpression.prototype.val = function () {
     var fn_args = [];
@@ -657,7 +657,7 @@ function AQLClause() {
 
 AQLClause.prototype.val = function() {
     var value = this._properties["clause"];
- 
+
     return value;
 };
 
@@ -681,28 +681,28 @@ AQLClause.prototype.set = function(value) {
 // Grammar:
 // "for" Variable ( "at" Variable )? "in" ( Expression )
 //
-// @param for_variable [String], REQUIRED, first variable in clause 
+// @param for_variable [String], REQUIRED, first variable in clause
 // @param at_variable [String], NOT REQUIRED, first variable in clause
 // @param expression [AsterixExpression], REQUIRED, expression to evaluate
 function ForClause(for_variable, at_variable, expression) {
     AQLClause.call(this);
-  
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-  
+
     this._properties["clause"] = "for " + parameters[0];
-    
+
     if (parameters.length == 3) {
         this._properties["clause"] += " at " + parameters[1];
         this._properties["clause"] += " in " + parameters[2].val();
     } else if (parameters.length == 2) {
         this._properties["clause"] += " in " + parameters[1].val();
     }
-    
+
     return this;
 }
 
@@ -719,18 +719,18 @@ ForClause.prototype.constructor = ForClause;
 // @param expression [AExpression]
 function LetClause(let_variable, expression) {
     AQLClause.call(this);
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-    
+
     this._properties["clause"] = "let " + parameters[0] + " := ";
     this._properties["clause"] += parameters[1].val();
-    
-    return this; 
+
+    return this;
 }
 
 LetClause.prototype = Object.create(AQLClause.prototype);
@@ -745,25 +745,25 @@ function ReturnClause(expression) {
     AQLClause.call(this);
 
     this._properties["clause"] = "return ";
-    
+
     if (expression instanceof AExpression || expression instanceof AQLClause) {
         this._properties["clause"] += expression.val();
-    
+
     } else if ( typeof expression == "object" && Object.getPrototypeOf( expression ) === Object.prototype ) {
-        
+
         this._properties["clause"] += "\n{\n";
         var returnStatements = [];
         for (returnValue in expression) {
-           
-            if (expression[returnValue] instanceof AExpression) { 
-                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue].val());            
-            } else if (typeof expression[returnValue] == "string") {          
-                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue]);   
+
+            if (expression[returnValue] instanceof AExpression) {
+                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue].val());
+            } else if (typeof expression[returnValue] == "string") {
+                returnStatements.push('"' + returnValue + '" ' + " : " + expression[returnValue]);
             }
         }
         this._properties["clause"] += returnStatements.join(",\n");
-        this._properties["clause"] += "\n}";  
-    
+        this._properties["clause"] += "\n}";
+
     } else {
         this._properties["clause"] += new AQLClause().set(expression).val();
     }
@@ -778,13 +778,13 @@ ReturnClause.prototype.constructor = ReturnClause;
 
 // WhereClause
 //
-// Grammar: 
+// Grammar:
 // ::= "where" Expression
-// 
+//
 // @param expression [BooleanExpression], pushes this expression onto the stack
 function WhereClause(expression) {
     AQLClause.call(this);
-    
+
     this._properties["stack"] = [];
 
     if (expression instanceof Array) {
@@ -792,7 +792,7 @@ function WhereClause(expression) {
     } else {
         this.bind(expression);
     }
-    
+
     return this;
 }
 
@@ -810,8 +810,8 @@ WhereClause.prototype.bind = function(expression) {
 
 
 WhereClause.prototype.val = function() {
-    var value = "";  
-    
+    var value = "";
+
     if (this._properties["stack"].length == 0) {
         return value;
     }
@@ -821,32 +821,32 @@ WhereClause.prototype.val = function() {
         value += this._properties["stack"][count].val() + " ";
         count -= 1;
     }
-    
+
     return "where " + value;
 };
 
 
 WhereClause.prototype.and = function() {
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-    
-    var andClauses = [];  
+
+    var andClauses = [];
     for (var expression in parameters) {
-        
+
         if (parameters[expression] instanceof AExpression) {
             andClauses.push(parameters[expression].val());
         }
     }
-    
+
     if (andClauses.length > 0) {
         this._properties["stack"].push(new AExpression().set(andClauses.join(" and ")));
     }
-    
+
     return this;
 };
 
@@ -860,38 +860,38 @@ WhereClause.prototype.or = function() {
         parameters = arguments;
     }
 
-    var orClauses = [];  
+    var orClauses = [];
     for (var expression in parameters) {
-        
+
         if (parameters[expression] instanceof AExpression) {
             orClauses.push(parameters[expression].val());
         }
     }
-    
+
     if (andClauses.length > 0) {
         this._properties["stack"].push(new AExpression().set(orClauses.join(" and ")));
     }
-    
+
     return this;
 };
 
 // LimitClause
 // Grammar:
 // LimitClause    ::= "limit" Expression ( "offset" Expression )?
-// 
+//
 // @param   limitExpression [REQUIRED, AQLExpression]
 // @param   offsetExpression [OPTIONAL, AQLExpression]
 function LimitClause(limitExpression, offsetExpression) {
 
     AQLClause.call(this);
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
     } else {
         parameters = arguments;
     }
-  
+
     // limitExpression required
     this._properties["clause"] = "limit " + parameters[0].val();
 
@@ -912,17 +912,17 @@ LimitClause.prototype.constructor = LimitClause;
 // Grammar:
 // OrderbyClause  ::= "order" "by" Expression ( ( "asc" ) | ( "desc" ) )? ( "," Expression ( ( "asc" ) | ( "desc" ) )? )*
 //
-// @params AQLExpressions and asc/desc strings, in any quantity. At least one required. 
+// @params AQLExpressions and asc/desc strings, in any quantity. At least one required.
 function OrderbyClause() {
-    
+
     AQLClause.call(this);
 
     // At least one argument expression is required, and first should be expression
     if (arguments.length == 0) {
         this._properties["clause"] = null;
-        return this;    
+        return this;
     }
-    
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
@@ -931,10 +931,10 @@ function OrderbyClause() {
     }
 
     var expc = 0;
-    var expressions = [];    
+    var expressions = [];
 
     while (expc < parameters.length) {
-      
+
         var expression = "";
 
         if (parameters[expc] instanceof AExpression) {
@@ -946,9 +946,9 @@ function OrderbyClause() {
             expc++;
             expression += " " + parameters[expc];
         }
-        
+
         expressions.push(expression);
-      
+
         expc++;
     }
 
@@ -969,9 +969,9 @@ function GroupClause() {
 
     if (arguments.length == 0) {
         this._properties["clause"] = null;
-        return this;    
-    } 
-    
+        return this;
+    }
+
     var parameters = [];
     if (arguments[0] instanceof Array) {
         parameters = arguments[0];
@@ -983,7 +983,7 @@ function GroupClause() {
     var expressions = [];
     var variableRefs = [];
     var isDecor = false;
-    
+
     while (expc < parameters.length) {
 
         if (parameters[expc] instanceof AExpression) {
@@ -991,8 +991,8 @@ function GroupClause() {
             isDecor = false;
             expressions.push(parameters[expc].val());
 
-        } else if (typeof parameters[expc] == "string") {       
-            
+        } else if (typeof parameters[expc] == "string") {
+
             // Special keywords, decor & with
             if (parameters[expc] == "decor") {
                 isDecor = true;
@@ -1003,15 +1003,15 @@ function GroupClause() {
                     variableRefs.push(parameters[expc]);
                     expc++;
                 }
-            
+
             // Variables and variable refs
             } else {
-                
+
                 var nextc = expc + 1;
                 var expression = "";
-            
+
                 if (isDecor) {
-                    expression += "decor "; 
+                    expression += "decor ";
                     isDecor = false;
                 }
 
@@ -1033,10 +1033,10 @@ GroupClause.prototype.constructor = GroupClause;
 
 
 // Quantified Expression
-// 
+//
 // Grammar
 // QuantifiedExpression ::= ( ( "some" ) | ( "every" ) ) Variable "in" Expression ( "," Variable "in" Expression )* "satisfies" Expression
-// 
+//
 // @param String some/every
 // @param [AExpression]
 // @param [Aexpression] satisfiesExpression
@@ -1047,10 +1047,10 @@ function QuantifiedExpression (keyword, expressions, satisfiesExpression) {
     var varsInExpressions = [];
 
     for (var varInExpression in expressions) {
-        varsInExpressions.push(varInExpression + " in " + expressions[varInExpression].val()); 
-    } 
+        varsInExpressions.push(varInExpression + " in " + expressions[varInExpression].val());
+    }
     expression += varsInExpressions.join(", ") + " satisfies " + satisfiesExpression.val();
-    
+
     AExpression.prototype.set.call(this, expression);
 
     return this;
@@ -1061,5 +1061,5 @@ QuantifiedExpression.prototype.constructor = QuantifiedExpression;
 
 QuantifiedExpression.prototype.val = function() {
     var value = AExpression.prototype.val.call(this);
-    return "(" + value + ")";    
+    return "(" + value + ")";
 };

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/geostats.js
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/geostats.js b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/geostats.js
index adc8e1d..ead5307 100755
--- a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/geostats.js
+++ b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/geostats.js
@@ -1,9 +1,28 @@
-/**
-* geostats() is a tiny and standalone javascript library for classification 
-* Project page - https://github.com/simogeo/geostats
-* Copyright (c) 2011 Simon Georget, http://valums.com
-* Licensed under the MIT license
-*/
+/*
+ * Copyright (c) 2011 Simon Georget
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * geostats() is a tiny and standalone javascript library for classification
+ * Project page - https://github.com/simogeo/geostats
+ * Copyright (c) 2011 Simon Georget, http://valums.com
+ * Licensed under the MIT license
+ */
 
 var _t = function(str) {
 	return str;
@@ -69,7 +88,7 @@ var geostats = function(a) {
 	
 	/**
 	 * Get feature count
-	 * With bounds array(0, 0.75, 1.5, 2.25, 3); 
+	 * With bounds array(0, 0.75, 1.5, 2.25, 3);
 	 * should populate this.counter with 5 keys
 	 * and increment counters for each key
 	 */
@@ -335,7 +354,7 @@ var geostats = function(a) {
 				+ ' : ' + this.min() + ' | ' + _t('Max') + ' : ' + this.max()
 				+ ']' + "\n";
 		content += _t('Mean') + ' : ' + this.mean() + ' - ' + _t('Median')	+ ' : ' + this.median() + "\n";
-		content += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation')	+ ' : ' + this.stddev()  
+		content += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation')	+ ' : ' + this.stddev()
 				+ ' - ' + _t('Coefficient of variation')	+ ' : ' + this.cov() + "\n";
 
 		return content;
@@ -600,7 +619,7 @@ var geostats = function(a) {
 	
 	/**
 	 * Return an html legend
-	 * 
+	 *
 	 */
 	this.getHtmlLegend = function(colors, legend, counter, callback) {
 		
@@ -676,4 +695,4 @@ var geostats = function(a) {
 		return this.sorted().join(', ');
 	};
 
-};
\ No newline at end of file
+};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/rainbowvis.js
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/rainbowvis.js b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/rainbowvis.js
index 862622d..1ae40b3 100644
--- a/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/rainbowvis.js
+++ b/asterixdb/asterix-examples/src/main/resources/tweetbook-demo/static/js/rainbowvis.js
@@ -1,6 +1,5 @@
 /*
-RainbowVis-JS 
-Released under MIT License
+RainbowVis-JS | Released under MIT License
 
 Source: https://github.com/anomal/RainbowVis-JS/blob/e160e6db8be28f7de99ba17c6566007410ee1f98/rainbowvis.js
 */

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/pom.xml b/asterixdb/asterix-experiments/pom.xml
index 009ed03..fc60985 100644
--- a/asterixdb/asterix-experiments/pom.xml
+++ b/asterixdb/asterix-experiments/pom.xml
@@ -82,6 +82,72 @@
           <failOnWarning>false</failOnWarning>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <licenses combine.children="append">
+            <license implementation="org.apache.rat.analysis.license.FullTextMatchingLicense">
+              <licenseFamilyCategory>BSD</licenseFamilyCategory>
+              <licenseFamilyName>Modified BSD License</licenseFamilyName>
+              <fullText>
+                Copyright (c) 2013, Los Alamos National Security, LLC
+                All rights reserved.
+
+                Copyright 2013. Los Alamos National Security, LLC. This software
+                was produced under U.S. Government contract DE-AC52-06NA25396 for
+                Los Alamos National Laboratory (LANL), which is operated by Los
+                Alamos National Security, LLC for the U.S. Department of Energy.
+                The U.S. Government has rights to use, reproduce, and distribute
+                this software.  NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL
+                SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES
+                ANY LIABILITY FOR THE USE OF THIS SOFTWARE.  If software is modified
+                to produce derivative works, such modified software should be clearly
+                marked, so as not to confuse it with the version available from LANL.
+
+
+                Additionally, redistribution and use in source and binary forms,
+                with or without modification, are permitted provided that the
+                following conditions are met:
+
+                *  Redistributions of source code must retain the above copyright
+                notice, this list of conditions and the following disclaimer.
+
+                *  Redistributions in binary form must reproduce the above copyright
+                notice, this list of conditions and the following disclaimer in the
+                documentation and/or other materials provided with the distribution.
+
+                *  Neither the name of Los Alamos National Security, LLC, Los Alamos
+                National Laboratory, LANL, the U.S. Government, nor the names of
+                its contributors may be used to endorse or promote products derived
+                from this software without specific prior written permission.
+
+                THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS
+                "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+                THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+                ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR CONTRIBUTORS
+                BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+                DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+                LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+                THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+                NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+                IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+              </fullText>
+            </license>
+          </licenses>
+          <licenseFamilies combine.children="append">
+            <licenseFamily implementation="org.apache.rat.license.ModifiedBSDLicenseFamily"/>
+          </licenseFamilies>
+          <excludes combine.children="append">
+            <exclude>**/*.dgen</exclude>
+            <exclude>**/*.dqgen</exclude>
+            <exclude>src/main/resources/gantt/vargantt1.txt</exclude>
+            <exclude>src/main/resources/gantt/*.eps</exclude> <!-- generated by gnuplot -->
+            <exclude>src/main/resources/gantt/*.gpl</exclude> <!-- generated by Gantt -->
+            <exclude>src/main/resources/gantt/*.plt</exclude> <!-- generated by Gantt -->
+          </excludes>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/src/main/appended-resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/appended-resources/META-INF/LICENSE b/asterixdb/asterix-experiments/src/main/appended-resources/META-INF/LICENSE
new file mode 100644
index 0000000..f22880d
--- /dev/null
+++ b/asterixdb/asterix-experiments/src/main/appended-resources/META-INF/LICENSE
@@ -0,0 +1,53 @@
+===
+   AsterixDB includes source code with separate copyright notices and
+   license terms. Your use of this source code is subject to the terms
+   and condition of the following licenses.
+===
+   A portion of the AsterixDB Experimental Tests
+       located at:
+         src/main/resources/gantt/gantt.py
+
+   is available under a Modified BSD License:
+---
+   Copyright (c) 2013, Los Alamos National Security, LLC
+   All rights reserved.
+
+   Copyright 2013. Los Alamos National Security, LLC. This software
+   was produced under U.S. Government contract DE-AC52-06NA25396 for
+   Los Alamos National Laboratory (LANL), which is operated by Los
+   Alamos National Security, LLC for the U.S. Department of Energy.
+   The U.S. Government has rights to use, reproduce, and distribute
+   this software.  NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL
+   SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES
+   ANY LIABILITY FOR THE USE OF THIS SOFTWARE.  If software is modified
+   to produce derivative works, such modified software should be clearly
+   marked, so as not to confuse it with the version available from LANL.
+
+
+   Additionally, redistribution and use in source and binary forms,
+   with or without modification, are permitted provided that the
+   following conditions are met:
+
+    *  Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+    *  Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    *  Neither the name of Los Alamos National Security, LLC, Los Alamos
+       National Laboratory, LANL, the U.S. Government, nor the names of
+       its contributors may be used to endorse or promote products derived
+       from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR CONTRIBUTORS
+   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+---

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/src/main/resources/gantt/gantt.py
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/resources/gantt/gantt.py b/asterixdb/asterix-experiments/src/main/resources/gantt/gantt.py
index faf9e94..d232c4d 100644
--- a/asterixdb/asterix-experiments/src/main/resources/gantt/gantt.py
+++ b/asterixdb/asterix-experiments/src/main/resources/gantt/gantt.py
@@ -1,6 +1,51 @@
 #!/usr/bin/env python
 #
-# TODO:
+# Copyright (c) 2013, Los Alamos National Security, LLC
+# All rights reserved.
+#
+# Copyright 2013. Los Alamos National Security, LLC. This software
+# was produced under U.S. Government contract DE-AC52-06NA25396 for
+# Los Alamos National Laboratory (LANL), which is operated by Los
+# Alamos National Security, LLC for the U.S. Department of Energy.
+# The U.S. Government has rights to use, reproduce, and distribute
+# this software.  NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL
+# SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES
+# ANY LIABILITY FOR THE USE OF THIS SOFTWARE.  If software is modified
+# to produce derivative works, such modified software should be clearly
+# marked, so as not to confuse it with the version available from LANL.
+#
+#
+# Additionally, redistribution and use in source and binary forms,
+# with or without modification, are permitted provided that the
+# following conditions are met:
+#
+#  *  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#
+#  *  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+#  *  Neither the name of Los Alamos National Security, LLC, Los Alamos
+#     National Laboratory, LANL, the U.S. Government, nor the names of
+#     its contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# (preceding license text from https://raw.githubusercontent.com/lanl/Gazebo/f4e0a22ab655880abe993f15c6bae2b483e66353/LICENSE
+#  provided here as a convenience)
+#
+# # TODO:
 # - Task colors:
 #     - User-defined using config file.
 #     - Automagically chosen from color space.

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/1.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/1.aql b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/1.aql
index 0446799..6eb5766 100644
--- a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/1.aql
+++ b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/1.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse experiments;
 
 create dataset Tweets(TweetMessageType) primary key tweetid;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_a.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_a.aql b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_a.aql
index 20e7ad5..2eb8592 100644
--- a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_a.aql
+++ b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_a.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse experiments;
 
 create dataset Tweets(TweetMessageType) primary key tweetid;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_b.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_b.aql b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_b.aql
index aec3bff..d6ee9d6 100644
--- a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_b.aql
+++ b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_b.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse experiments;
 
 create dataset Tweets(TweetMessageType) primary key tweetid;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_c.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_c.aql b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_c.aql
index c3ea516..4f8b9e3 100644
--- a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_c.aql
+++ b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_c.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse experiments;
 
 create dataset Tweets(TweetMessageType) primary key tweetid;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/82464fb4/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_d.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_d.aql b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_d.aql
index ea9eb8d..1deedbd 100644
--- a/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_d.aql
+++ b/asterixdb/asterix-experiments/src/main/resources/ingestion-experiment-binary-and-configs/aql/2_d.aql
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
 use dataverse experiments;
 
 create dataset Tweets(TweetMessageType) primary key tweetid;