You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by bi...@apache.org on 2014/07/21 12:02:10 UTC

[1/4] Remove the "Atom" related dev and test codes

Repository: olingo-odata4-js
Updated Branches:
  refs/heads/master 690b0d554 -> 014949ce9


http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-batch-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-batch-functional-tests.js b/datajs/tests/odata-batch-functional-tests.js
index cd6c979..2bac8d1 100644
--- a/datajs/tests/odata-batch-functional-tests.js
+++ b/datajs/tests/odata-batch-functional-tests.js
@@ -18,7 +18,7 @@
  */
 
 (function (window, undefined) {
-    OData.defaultHandler.accept = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    OData.defaultHandler.accept = "application/json;q=0.9, */*;q=0.1";
 
     var unexpectedErrorHandler = function (err) {
         djstest.assert(false, "Unexpected call to error handler with error: " + djstest.toString(err));

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-batch-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-batch-tests.js b/datajs/tests/odata-batch-tests.js
index 7e038ad..4dc1393 100644
--- a/datajs/tests/odata-batch-tests.js
+++ b/datajs/tests/odata-batch-tests.js
@@ -21,7 +21,7 @@
 
 (function (window, undefined) {
     // DATAJS INTERNAL START
-    var defaultAcceptString = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    var defaultAcceptString = "application/json;q=0.9, */*;q=0.1";
 
     var testPayload = {
         CategoryID : 42,
@@ -30,8 +30,6 @@
         version: "4.0"
     };
     
-    // to do: test Atom payload
-    // var atomPayload = OData.atomSerializer(OData.atomHandler, testPayload, { "OData-Version": "4.0" });
     var jsonPayload = OData.json.jsonSerializer(OData.json.jsonHandler, testPayload, { "OData-Version": "4.0" });
 
     djstest.addTest(function writeRequestTest() {
@@ -106,8 +104,6 @@
                 { requestUri: "http://feed(2)", headers: { "Accept": "application/json;odata.metadata=minimal" }, method: "GET" },
                 { __changeRequests: [
                         { requestUri: "http://feed(1)", headers: {}, method: "POST", data: testPayload }
-                        // to do: test atom payload                       
-//                        { requestUri: "http://feed(2)", headers: { "Content-Type": "application/atom+xml", "OData-Version": "4.0" }, method: "PUT", data: testPayload }//
                         ]
                 },
                 { requestUri: "http://feed(1)", headers: {} }
@@ -184,14 +180,12 @@
                 __batchRequests: [
                     { __changeRequests: [
                         { requestUri: "http://feed(1)", headers: {}, method: "POST", data: testPayload }
-//                        { requestUri: "http://feed(2)", headers: { "Content-Type": "application/atom+xml", "OData-Version": "4.0" }, method: "PUT", data: testPayload }
                         ]
                     }
             ]
             }
         };
 
-        // To do: test atom payload
         var template = "\r\n--<batchBoundary>\r\n" +
                        "Content-Type: multipart/mixed; boundary=<changesetBoundary>\r\n" +
                        "\r\n--<changesetBoundary>\r\n" +

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-cache-filter-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-cache-filter-functional-tests.html b/datajs/tests/odata-cache-filter-functional-tests.html
index 5537ed2..3c72a81 100644
--- a/datajs/tests/odata-cache-filter-functional-tests.html
+++ b/datajs/tests/odata-cache-filter-functional-tests.html
@@ -16,33 +16,7 @@
         window.TestSynchronizer.init(QUnit);
     </script>
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>
-    <script type="text/javascript" src="common/common.js"></script>   
-<!--
-    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>
-    -->
+    <script type="text/javascript" src="common/common.js"></script>
     <script type="text/javascript" src="common/djstest.js"></script>
     <script type="text/javascript" src="common/CacheOracle.js"></script>
     <script type="text/javascript" src="common/ObservableHttpClient.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-cache-filter-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-cache-filter-functional-tests.js b/datajs/tests/odata-cache-filter-functional-tests.js
index 8d918c9..4e2f950 100644
--- a/datajs/tests/odata-cache-filter-functional-tests.js
+++ b/datajs/tests/odata-cache-filter-functional-tests.js
@@ -18,7 +18,7 @@
  */
 
 (function (window, undefined) {
-    OData.defaultHandler.accept = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    OData.defaultHandler.accept = "application/json;q=0.9, */*;q=0.1";
     var feeds = [
         { feed: "./endpoints/FoodStoreDataServiceV4.svc/Foods" }
     ];

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-cache-fperf-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-cache-fperf-tests.html b/datajs/tests/odata-cache-fperf-tests.html
index befdcfe..9a0632a 100644
--- a/datajs/tests/odata-cache-fperf-tests.html
+++ b/datajs/tests/odata-cache-fperf-tests.html
@@ -16,33 +16,7 @@
         window.TestSynchronizer.init(QUnit);
     </script>
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>
-    <script type="text/javascript" src="common/common.js"></script>   
-    <!--
-    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
-    
+    <script type="text/javascript" src="common/common.js"></script>    
     <script type="text/javascript" src="common/CacheOracle.js"></script>  
     <script type="text/javascript" src="common/djstest.js"></script>
     <script type="text/javascript" src="odata-cache-fperf-tests.js"></script>  

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-cache-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-cache-functional-tests.html b/datajs/tests/odata-cache-functional-tests.html
index 59baca0..0390b18 100644
--- a/datajs/tests/odata-cache-functional-tests.html
+++ b/datajs/tests/odata-cache-functional-tests.html
@@ -15,31 +15,6 @@
     <script type="text/javascript">
         window.TestSynchronizer.init(QUnit);
     </script>
-    <!--
-    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>
     <script type="text/javascript" src="common/common.js"></script>
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-cache-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-cache-functional-tests.js b/datajs/tests/odata-cache-functional-tests.js
index 31e9eef..9cc8747 100644
--- a/datajs/tests/odata-cache-functional-tests.js
+++ b/datajs/tests/odata-cache-functional-tests.js
@@ -18,7 +18,7 @@
  */
 
 (function (window, undefined) {
-    OData.defaultHandler.accept = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    OData.defaultHandler.accept = "application/json;q=0.9, */*;q=0.1";
     var CustomDataSource = function (baseUri) {
         this.baseUri = baseUri;
     };

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-cache-rx-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-cache-rx-functional-tests.html b/datajs/tests/odata-cache-rx-functional-tests.html
index e75c131..ce0c4af 100644
--- a/datajs/tests/odata-cache-rx-functional-tests.html
+++ b/datajs/tests/odata-cache-rx-functional-tests.html
@@ -14,31 +14,6 @@
     <script type="text/javascript">
         window.TestSynchronizer.init(QUnit);
     </script>
-    <!--
-    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>   
     <script type="text/javascript" src="common/common.js"></script>
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-cache-rx-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-cache-rx-functional-tests.js b/datajs/tests/odata-cache-rx-functional-tests.js
index c39a74f..423f94c 100644
--- a/datajs/tests/odata-cache-rx-functional-tests.js
+++ b/datajs/tests/odata-cache-rx-functional-tests.js
@@ -18,7 +18,7 @@
  */
 
 (function (window, undefined) {
-    OData.defaultHandler.accept = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    OData.defaultHandler.accept = "application/json;q=0.9, */*;q=0.1";
     var feeds = [
         { uri: "./endpoints/FoodStoreDataServiceV4.svc/Foods" }
     ];

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-fuzz.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-fuzz.html b/datajs/tests/odata-fuzz.html
index f66b3c5..93009b9 100644
--- a/datajs/tests/odata-fuzz.html
+++ b/datajs/tests/odata-fuzz.html
@@ -7,34 +7,8 @@
     <meta http-equiv="expires" content="-1" />
     <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js"></script>
     <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>
-
-<!--
-    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>   
-
+    <script type="text/javascript" src="common/common.js"></script>
     <script type="text/javascript">
 
         var testCsdl = '' +

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-handler-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-handler-tests.js b/datajs/tests/odata-handler-tests.js
index 30643f6..0ca383f 100644
--- a/datajs/tests/odata-handler-tests.js
+++ b/datajs/tests/odata-handler-tests.js
@@ -293,11 +293,11 @@
 
     djstest.addTest(function contentTypeTest() {
         var tests = [
-            { contentType: "application/atom+xml;param1=value1;param2=value2", expected: { mediaType: "application/atom+xml", properties: { param1: "value1", param2: "value2"}} },
-            { contentType: "application/atom+xml; param1=value1; param2=value2", expected: { mediaType: "application/atom+xml", properties: { param1: "value1", param2: "value2"}} },
-            { contentType: "application/atom+xml;param1=value1; param2=value2", expected: { mediaType: "application/atom+xml", properties: { param1: "value1", param2: "value2"}} },
-            { contentType: "application/atom+xml; param1=value1;param2=value2", expected: { mediaType: "application/atom+xml", properties: { param1: "value1", param2: "value2"}} },
-            { contentType: "application/atom+xml", expected: { mediaType: "application/atom+xml", properties: {}} },
+            { contentType: "application/json;param1=value1;param2=value2", expected: { mediaType: "application/json", properties: { param1: "value1", param2: "value2"}} },
+            { contentType: "application/json; param1=value1; param2=value2", expected: { mediaType: "application/json", properties: { param1: "value1", param2: "value2"}} },
+            { contentType: "application/json;param1=value1; param2=value2", expected: { mediaType: "application/json", properties: { param1: "value1", param2: "value2"}} },
+            { contentType: "application/json; param1=value1;param2=value2", expected: { mediaType: "application/json", properties: { param1: "value1", param2: "value2"}} },
+            { contentType: "application/json", expected: { mediaType: "application/json", properties: {}} },
             { contentType: ";param1=value1;param2=value2", expected: { mediaType: "", properties: { param1: "value1", param2: "value2"}} }
         ];
 
@@ -316,8 +316,8 @@
 
     djstest.addTest(function contentTypeToStringTest() {
         var tests = [
-            { contentType: { mediaType: "application/atom+xml", properties: { param1: "value1", param2: "value2"} }, expected: "application/atom+xml;param1=value1;param2=value2" },
-            { contentType: { mediaType: "application/atom+xml", properties: {} }, expected: "application/atom+xml" },
+            { contentType: { mediaType: "application/json", properties: { param1: "value1", param2: "value2"} }, expected: "application/json;param1=value1;param2=value2" },
+            { contentType: { mediaType: "application/json", properties: {} }, expected: "application/json" },
             { contentType: { mediaType: "", properties: { param1: "value1", param2: "value2"} }, expected: ";param1=value1;param2=value2" }
         ];
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-json-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-json-tests.js b/datajs/tests/odata-json-tests.js
index ebb7c6a..239f4f8 100644
--- a/datajs/tests/odata-json-tests.js
+++ b/datajs/tests/odata-json-tests.js
@@ -233,12 +233,7 @@
            },
            { context: { response: { requestUri: "http://base.org" }, dataServiceVersion: "4.0" },
                expected: {
-                   "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                   "@odata.type": "#DataJS.Tests.V4.Food",
-                   "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink",
-                   "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink",
-                   "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType",
-                   "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag",
+                   "@odata.id": "Foods(4)",
                    ID: 0,
                    Name: "Bread",
                    Description: "Whole grain bread",
@@ -268,40 +263,21 @@
            },
            { context: { response: { requestUri: "http://base.org" }, dataServiceVersion: "4.0" },
                expected: {
+                   "@odata.id": "Foods(4)",
                    value : [{
-                       "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                       "@odata.type": "#DataJS.Tests.V4.Food",
-                       "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink",
-                       "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink",
-                       "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType",
-                       "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag",
+                       "@odata.id": "Foods(4)",
                        ID: 0,
                        ComplexInLayerOne:
                        {
-                           "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                           "@odata.type": "#DataJS.Tests.V4.Food",
-                           "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer1",
-                           "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer1",
-                           "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer1",
-                           "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer1",
+                           "@odata.id": "Foods(4)",
                            ID: 1,
                            ComplexInLayerTwo:
                            {
-                               "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                               "@odata.type": "#DataJS.Tests.V4.Food",
-                               "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer2",
-                               "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer2",
-                               "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer2",
-                               "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer2",
+                               "@odata.id": "Foods(4)",
                                ID: 2,
                                ComplexInLayerThreeList: [
                                {
-                                   "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                                   "@odata.type": "#DataJS.Tests.V4.Food",
-                                   "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer3",
-                                   "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer3",
-                                   "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer3",
-                                   "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer3",
+                                   "@odata.id": "Foods(4)",
                                    ID: 3,
                                    Name: "BreadInLayer3",
                                    Description: "Whole grain bread inLayer3",
@@ -311,12 +287,7 @@
                                    Price: 5.5
                                },
                                {
-                                   "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                                   "@odata.type": "#DataJS.Tests.V4.Food",
-                                   "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer3",
-                                   "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer3",
-                                   "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer3",
-                                   "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer3",
+                                   "@odata.id": "Foods(4)",
                                    ID: 3,
                                    Name: "BreadInLayer3",
                                    Description: "Whole grain bread inLayer3",
@@ -347,39 +318,19 @@
                        Price: 2.5
                    },
                    {
-                       "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                       "@odata.type": "#DataJS.Tests.V4.Food",
-                       "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink",
-                       "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink",
-                       "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType",
-                       "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag",
+                       "@odata.id": "Foods(4)",
                        ID: 0,
                        ComplexInLayerOne:
                        {
-                           "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                           "@odata.type": "#DataJS.Tests.V4.Food",
-                           "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer1",
-                           "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer1",
-                           "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer1",
-                           "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer1",
+                           "@odata.id": "Foods(4)",
                            ID: 1,
                            ComplexInLayerTwo:
                            {
-                               "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                               "@odata.type": "#DataJS.Tests.V4.Food",
-                               "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer2",
-                               "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer2",
-                               "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer2",
-                               "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer2",
+                               "@odata.id": "Foods(4)",
                                ID: 2,
                                ComplexInLayerThreeList: [
                                {
-                                   "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                                   "@odata.type": "#DataJS.Tests.V4.Food",
-                                   "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer3",
-                                   "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer3",
-                                   "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer3",
-                                   "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer3",
+                                   "@odata.id": "Foods(4)",
                                    ID: 3,
                                    Name: "BreadInLayer3",
                                    Description: "Whole grain bread inLayer3",
@@ -389,12 +340,7 @@
                                    Price: 5.5
                                },
                                {
-                                   "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                                   "@odata.type": "#DataJS.Tests.V4.Food",
-                                   "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer3",
-                                   "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer3",
-                                   "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer3",
-                                   "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer3",
+                                   "@odata.id": "Foods(4)",
                                    ID: 3,
                                    Name: "BreadInLayer3",
                                    Description: "Whole grain bread inLayer3",
@@ -619,39 +565,19 @@
            },
            { context: { response: { requestUri: "http://base.org" }, dataServiceVersion: "4.0" },
                expected: {
-                   "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                   "@odata.type": "#DataJS.Tests.V4.Food",
-                   "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink",
-                   "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink",
-                   "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType",
-                   "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag",
+                   "@odata.id": "Foods(4)",
                    ID: 0,
                    ComplexInLayerOne:
                    {
-                       "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                       "@odata.type": "#DataJS.Tests.V4.Food",
-                       "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer1",
-                       "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer1",
-                       "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer1",
-                       "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer1",
+                       "@odata.id": "Foods(4)",
                        ID: 1,
                        ComplexInLayerTwo:
                        {
-                           "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                           "@odata.type": "#DataJS.Tests.V4.Food",
-                           "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer2",
-                           "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer2",
-                           "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer2",
-                           "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer2",
+                           "@odata.id": "Foods(4)",
                            ID: 2,
                            ComplexInLayerThree:
                            {
-                               "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                               "@odata.type": "#DataJS.Tests.V4.Food",
-                               "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink/layer3",
-                               "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink/layer3",
-                               "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType/layer3",
-                               "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag/layer3",
+                               "@odata.id": "Foods(4)",
                                ID: 3,
                                Name: "BreadInLayer3",
                                Description: "Whole grain bread inLayer3",
@@ -760,12 +686,7 @@
            { context: { response: { requestUri: "http://base.org" }, dataServiceVersion: "4.0" },
                expected: {
                    value: [{
-                       "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                       "@odata.type": "#DataJS.Tests.V4.Food",
-                       "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink",
-                       "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink",
-                       "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType",
-                       "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag",
+                       "@odata.id": "Foods(4)",
                        ID: 0,
                        Name: "Bread",
                        Description: "Whole grain bread",
@@ -775,12 +696,7 @@
                        Price: 2.5
                    },
                    {
-                       "@odata.etag": "W/MjAxMy0wNS0yN1QxMTo1OFo=",
-                       "@odata.type": "#DataJS.Tests.V4.Food",
-                       "@odata.mediaEditLink": "http://base.org/$metadata#Foods/mediaEditLink2",
-                       "@odata.mediaReadLink": "http://base.org/$metadata#Foods/mediaReadLink2",
-                       "@odata.mediaContentType": "http://base.org/$metadata#Foods/mediaContentType2",
-                       "@odata.mediaEtag": "http://base.org/$metadata#Foods/mediaEtag2",
+                       "@odata.id": "Foods(2)",
                        ID: 1,
                        Name: "Bread",
                        Description: "Whole grain bread",

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-links-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-links-functional-tests.html b/datajs/tests/odata-links-functional-tests.html
index 9c748d3..f820266 100644
--- a/datajs/tests/odata-links-functional-tests.html
+++ b/datajs/tests/odata-links-functional-tests.html
@@ -15,22 +15,6 @@
         <script type="text/javascript">
             window.TestSynchronizer.init(QUnit);
     </script>
-<!--
-    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>   
     <script type="text/javascript" src="common/common.js"></script>
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-links-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-links-functional-tests.js b/datajs/tests/odata-links-functional-tests.js
index d77973f..8f15470 100644
--- a/datajs/tests/odata-links-functional-tests.js
+++ b/datajs/tests/odata-links-functional-tests.js
@@ -126,7 +126,7 @@
         "./endpoints/FoodStoreDataServiceV4.svc"
     ];
 
-    var mimeTypes = [undefined, "application/json;odata.metadata=minimal"/*, "application/xml"*/];
+    var mimeTypes = [undefined, "application/json;odata.metadata=minimal"];
 
     var httpStatusCode = {
         created: 201,

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-metadata-awareness-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-metadata-awareness-functional-tests.html b/datajs/tests/odata-metadata-awareness-functional-tests.html
index 4e7fa76..cb903bb 100644
--- a/datajs/tests/odata-metadata-awareness-functional-tests.html
+++ b/datajs/tests/odata-metadata-awareness-functional-tests.html
@@ -14,22 +14,6 @@
     <script type="text/javascript">
         window.TestSynchronizer.init(QUnit);
     </script>
-<!--
-    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>
     <script type="text/javascript" src="common/common.js"></script>   
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-metadata-awareness-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-metadata-awareness-functional-tests.js b/datajs/tests/odata-metadata-awareness-functional-tests.js
index 13cde56..22ce235 100644
--- a/datajs/tests/odata-metadata-awareness-functional-tests.js
+++ b/datajs/tests/odata-metadata-awareness-functional-tests.js
@@ -32,8 +32,8 @@
         noContent: 204
     };
 
-    var acceptHeaders = { Accept: "application/atom+xml" };
-    var mimeHeaders = { "Content-Type": "application/atom+xml", Accept: "application/atom+xml" };
+    var acceptHeaders = { Accept: "application/json" };
+    var mimeHeaders = { "Content-Type": "application/json", Accept: "application/json" };
     var keepInContentVariations = [true, false];
     var feedUris = { "true": service + "/ReplicatedEntries", "false": service + "/MappedEntries" };
     var typeNames = { "true": "DataJS.Tests.ReplicatedEntry", "false": "DataJS.Tests.MappedEntry" };

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-perf-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-perf-tests.html b/datajs/tests/odata-perf-tests.html
index cb2e141..1aea5de 100644
--- a/datajs/tests/odata-perf-tests.html
+++ b/datajs/tests/odata-perf-tests.html
@@ -14,22 +14,6 @@
     <script type="text/javascript">
         window.TestSynchronizer.init(QUnit);
     </script>
-
-    <!--<script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script> 
     <script type="text/javascript" src="common/common.js"></script> 
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-perf-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-perf-tests.js b/datajs/tests/odata-perf-tests.js
index e9da5e7..2d3746a 100644
--- a/datajs/tests/odata-perf-tests.js
+++ b/datajs/tests/odata-perf-tests.js
@@ -39,7 +39,6 @@
 
     // null "service" indicates the feed is read-only
     var feeds = [
-        // will add atom format test after enabling atom scenario
         { service: largeCollectionService, uri: largeCollectionService + "Customers", mimeType: "application/json;odata.metadata=minimal" },
         { service: largeCollectionService, uri: largeCollectionService + "Customers", mimeType: "application/json;odata.metadata=full" },
         { service: largeCollectionService, uri: largeCollectionService + "Customers", mimeType: "application/json;odata.metadata=none" },

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-qunit-tests.htm
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-qunit-tests.htm b/datajs/tests/odata-qunit-tests.htm
index 07e7ee4..e22bc51 100644
--- a/datajs/tests/odata-qunit-tests.htm
+++ b/datajs/tests/odata-qunit-tests.htm
@@ -43,31 +43,6 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL
     <script type="text/javascript" src="../build/datajs-2.0.0.min.js"></script>
     <script type="text/javascript" src="common/common.js"></script>
 
-<!--SK TODO enable    <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
-    
     <script type="text/javascript" src="./common/mockHttpClient.js"></script>
     <script type="text/javascript" src="./common/mockXMLHttpRequest.js"></script>
 
@@ -76,7 +51,6 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL
 
 <!--bingl: disable the failure test case. Will fix them in the next change set-->
 <!--    <script type="text/javascript" src="odata-tests.js"></script>-->
-<!--    <script type="text/javascript" src="odata-atom-tests.js"></script>-->
     <script type="text/javascript" src="odata-json-tests.js"></script>
 <!--    <script type="text/javascript" src="odata-json-light-tests.js"></script>-->
     <script type="text/javascript" src="odata-metadata-tests.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-read-crossdomain-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-read-crossdomain-functional-tests.html b/datajs/tests/odata-read-crossdomain-functional-tests.html
index 1713450..0d2ba44 100644
--- a/datajs/tests/odata-read-crossdomain-functional-tests.html
+++ b/datajs/tests/odata-read-crossdomain-functional-tests.html
@@ -15,31 +15,6 @@
         <script type="text/javascript">
             window.TestSynchronizer.init(QUnit);
     </script>
-
-    <!--<script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-    
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>
     <script type="text/javascript" src="common/common.js"></script> 
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-read-crossdomain-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-read-crossdomain-functional-tests.js b/datajs/tests/odata-read-crossdomain-functional-tests.js
index 2a7db7b..f74a1d8 100644
--- a/datajs/tests/odata-read-crossdomain-functional-tests.js
+++ b/datajs/tests/odata-read-crossdomain-functional-tests.js
@@ -40,7 +40,6 @@
 
     var handlerAcceptStrings = [
         "*/*",
-    /*"application/atom+xml",*/
         "application/json",
         undefined
     ];

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-read-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-read-functional-tests.html b/datajs/tests/odata-read-functional-tests.html
index 0e33dda..4ed5b29 100644
--- a/datajs/tests/odata-read-functional-tests.html
+++ b/datajs/tests/odata-read-functional-tests.html
@@ -15,22 +15,6 @@
         <script type="text/javascript">
             window.TestSynchronizer.init(QUnit);
         </script>
-
-    <!--<script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>
     <script type="text/javascript" src="common/common.js"></script>   
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-read-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-read-functional-tests.js b/datajs/tests/odata-read-functional-tests.js
index 60e5f6c..79c92bc 100644
--- a/datajs/tests/odata-read-functional-tests.js
+++ b/datajs/tests/odata-read-functional-tests.js
@@ -18,16 +18,14 @@
  */
 
 (function (window, undefined) {
-    OData.defaultHandler.accept = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    OData.defaultHandler.accept = "application/json;q=0.9, */*;q=0.1";
     var unexpectedErrorHandler = function (err) {
         djstest.assert(false, "Unexpected call to error handler with error: " + djstest.toString(err));
         djstest.done();
     };
 
-    // to do: enable the Atom/XML senario
     var validServiceDocumentAcceptHeaders = [
             "*/*",
-    //"application/xml",
             "application/json",
             undefined
           ];
@@ -43,13 +41,11 @@
     ];
 
     var invalidMetadataAcceptHeaders = [
-            "application/atom+xml",
             "application/json"
         ];
 
     var handlerAcceptStrings = [
         "*/*",
-    //      "application/atom+xml",
         "application/json",
          undefined
       ];

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-request-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-request-functional-tests.html b/datajs/tests/odata-request-functional-tests.html
index ff3bbcc..888887b 100644
--- a/datajs/tests/odata-request-functional-tests.html
+++ b/datajs/tests/odata-request-functional-tests.html
@@ -15,21 +15,6 @@
         window.TestSynchronizer.init(QUnit);
     </script>
     
-    <!--<script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json-light.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>-->
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>
     <script type="text/javascript" src="common/common.js"></script>
     <script type="text/javascript" src="common/djstest.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-request-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-request-functional-tests.js b/datajs/tests/odata-request-functional-tests.js
index c6affc8..f20475d 100644
--- a/datajs/tests/odata-request-functional-tests.js
+++ b/datajs/tests/odata-request-functional-tests.js
@@ -18,7 +18,7 @@
  */
 
 (function (window, undefined) {
-    OData.defaultHandler.accept = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    OData.defaultHandler.accept = "application/json;q=0.9, */*;q=0.1";
     var unexpectedErrorHandler = function (err) {
         djstest.assert(false, "Unexpected call to error handler with error: " + djstest.toString(err));
         djstest.done();
@@ -162,7 +162,7 @@
         })
     };
 
-    var mimeTypes = [undefined, "application/json;odata.metadata=minimal"/*, "application/atom+xml"*/];
+    var mimeTypes = [undefined, "application/json;odata.metadata=minimal"];
 
     var httpStatusCode = {
         created: 201,
@@ -317,19 +317,17 @@
                     }, "Update collection property to " + serviceName + " service using mimeType = " + mimeType + " and DSV = " + dataServiceVersion, headers);
                 }
 
-                if (mimeType !== "application/atom+xml") {
-                    djstest.addTest(function updatePrimitivePropertyTest(headers) {
-                        var request = {
-                            requestUri: categoriesFeed + "(0)/Name",
-                            method: "PUT",
-                            headers: headers,
-                            data: { value: "Updated Category" }
-                        };
+                djstest.addTest(function updatePrimitivePropertyTest(headers) {
+                    var request = {
+                        requestUri: categoriesFeed + "(0)/Name",
+                        method: "PUT",
+                        headers: headers,
+                        data: { value: "Updated Category" }
+                    };
 
-                        djstest.assertsExpected(2);
-                        verifyRequest(request, djstest.done);
-                    }, "Update primitive property to " + serviceName + " service using mimeType = " + mimeType + " and DSV = " + dataServiceVersion, headers);
-                }
+                    djstest.assertsExpected(2);
+                    verifyRequest(request, djstest.done);
+                }, "Update primitive property to " + serviceName + " service using mimeType = " + mimeType + " and DSV = " + dataServiceVersion, headers);
 
                 djstest.addTest(function updateLinkedEntityTest(headers) {
                     var request = {

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-tests.js b/datajs/tests/odata-tests.js
index ea4041f..40567e9 100644
--- a/datajs/tests/odata-tests.js
+++ b/datajs/tests/odata-tests.js
@@ -47,7 +47,7 @@
         } else {
             var apis = [
                 { targetName: "datajs", names: "createDataCache,createStore,defaultStoreMechanism" },
-                { targetName: "OData", names: "atomHandler,batchHandler,defaultError,defaultHandler,defaultHttpClient,defaultMetadata,defaultSuccess,jsonHandler,metadataHandler,read,request,textHandler,xmlHandler,parseMetadata" }
+                { targetName: "OData", names: "batchHandler,defaultError,defaultHandler,defaultHttpClient,defaultMetadata,defaultSuccess,jsonHandler,metadataHandler,read,request,textHandler,xmlHandler,parseMetadata" }
             ];
 
             for (var i = 0; i < apis.length; i++) {


[3/4] Remove the "Atom" related dev and test codes

Posted by bi...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/code/atomreader.cs
----------------------------------------------------------------------
diff --git a/datajs/tests/code/atomreader.cs b/datajs/tests/code/atomreader.cs
deleted file mode 100644
index 789a51d..0000000
--- a/datajs/tests/code/atomreader.cs
+++ /dev/null
@@ -1,815 +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.
- */
-
-/// <summary>
-/// Class used to parse the Content section of the feed to return the properties data and metadata
-/// </summary>
-
-namespace DataJS.Tests
-{
-    using System;
-    using System.Collections.Generic;
-    using System.IO;
-    using System.Linq;
-    using System.ServiceModel.Syndication;
-    using Microsoft.Spatial;
-    using System.Xml;
-    using System.Xml.Linq;
-
-    public static class AtomReader
-    {
-        const string atomXmlNs = "http://www.w3.org/2005/Atom";
-        const string gmlXmlNs = "http://www.opengis.net/gml";
-        const string odataRelatedPrefix = "http://schemas.microsoft.com/ado/2007/08/dataservices/related";
-        const string odataRelatedLinksPrefix = "http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks";
-        const string odataXmlNs = "http://schemas.microsoft.com/ado/2007/08/dataservices";
-        const string odataMetaXmlNs = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
-        const string odataEditMediaPrefix = "http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media";
-        const string odataMediaResourcePrefix = "http://schemas.microsoft.com/ado/2007/08/dataservices/mediaresource";
-
-        const string hrefAttribute = "href";
-        const string titleElement = "title";
-        const string workspaceElement = "workspace";
-        const string workspacesProperty = "workspaces";
-        const string collectionElement = "collection";
-        const string collectionsProperty = "collections";
-        const string extensionsProperty = "extensions";
-        static string baseUri = string.Empty;
-
-        /// <summary>
-        /// Creates a service document object
-        /// </summary>
-        /// <param name="container">The XML container</param>
-        /// <param name="uri">Uri to append to the href value</param>
-        /// <returns>The service document JsonObject</returns>
-        public static JsonObject ReadServiceDocument(TextReader payload, string baseUri)
-        {
-            JsonObject jsonObject = new JsonObject();
-            XElement container = XElement.Load(payload);
-
-            if (container != null && container.HasElements)
-            {
-                jsonObject["workspaces"] =
-                    container
-                        .Elements()
-                            .Where(element => element.Name.LocalName.Equals(workspaceElement))
-                            .Select(element => ReadWorkspaceObject(element, baseUri))
-                            .ToArray();
-
-                jsonObject["extensions"] =
-                    container
-                        .Elements()
-                            .Where(element => !element.Name.LocalName.Equals(workspaceElement))
-                            .Select(element => ReadExtensionElement(element))
-                            .ToArray();
-            }
-
-            return jsonObject;
-        }
-
-        public static JsonObject ReadEntry(TextReader payload)
-        {
-            SyndicationItem item = SyndicationItem.Load(XmlReader.Create(payload));
-            return ReadEntry(item);
-        }
-
-        public static JsonObject ReadFeed(TextReader payload)
-        {
-            SyndicationFeed feed = SyndicationFeed.Load(XmlReader.Create(payload));
-            JsonObject feedData = new JsonObject();
-            JsonObject feedMetadata = new JsonObject();
-
-            feedData["results"] = feed.Items.Select(item => ReadEntry(item)).ToArray();
-            feedData["__metadata"] = feedMetadata;
-
-            feedMetadata["feed_extensions"] = feed.AttributeExtensions.Select(pair => ReadExtension(pair)).ToArray();
-
-            if (feed.Id != null)
-            {
-                feedMetadata["uri"] = feed.Id;
-                feedMetadata["uri_extensions"] = new JsonObject[] { };
-            }
-
-            if (feed.Title != null)
-            {
-                feedMetadata["title"] = feed.Title.Text;
-                feedMetadata["title_extensions"] = GetTitleExtensions(feed.Title);
-            }
-
-            SyndicationLink feedSelfLink = GetLink("self", feed.Links);
-            if (feedSelfLink != null)
-            {
-                feedMetadata["self"] = feedSelfLink.GetAbsoluteUri().AbsoluteUri;
-                feedMetadata["self_extensions"] = GetLinkExtensions(feedSelfLink);
-            }
-
-            long? count = GetInlineCount(feed);
-            if (count.HasValue)
-            {
-                feedData["__count"] = count.Value;
-            }
-
-            SyndicationLink feedNextLink = GetLink("next", feed.Links);
-            if (feedNextLink != null)
-            {
-                feedData["__next"] = feedNextLink.GetAbsoluteUri().AbsoluteUri;
-                feedMetadata["next_extensions"] = GetLinkExtensions(feedNextLink);
-            }
-
-            return feedData;
-        }
-
-        private static JsonObject ReadEntry(SyndicationItem item)
-        {
-            SyndicationLink entryEditLink = GetLink("edit", item.Links);
-            SyndicationCategory entryCategory = item.Categories.FirstOrDefault();
-
-            XElement propertiesElement = GetPropertiesElement(item);
-            JsonObject entryData = ReadObject(propertiesElement);
-            entryData = JsonObject.Merge(entryData, ReadNavigationProperties(item));
-            entryData = JsonObject.Merge(entryData, ReadNamedStreams(item));
-
-            JsonObject propertiesMetadata = ReadPropertiesMetadata(propertiesElement);
-            propertiesMetadata = JsonObject.Merge(propertiesMetadata, ReadNavigationPropertiesMetadata(item));
-            propertiesMetadata = JsonObject.Merge(propertiesMetadata, ReadNamedStreamMetadata(item));
-
-            JsonObject entryMetadata = new JsonObject();
-            entryData["__metadata"] = entryMetadata;
-            entryMetadata["properties"] = propertiesMetadata;
-
-            if (item.Id != null)
-            {
-                entryMetadata["uri"] = item.Id;
-                entryMetadata["uri_extensions"] = new JsonObject[] { };
-            }
-
-            if (entryCategory != null)
-            {
-                entryMetadata["type"] = entryCategory.Name;
-                entryMetadata["type_extensions"] = new JsonObject[] { };
-            }
-
-            if (entryEditLink != null)
-            {
-                entryMetadata["edit"] = entryEditLink.GetAbsoluteUri().AbsoluteUri;
-                entryMetadata["edit_link_extensions"] = GetLinkExtensions(entryEditLink);
-            }
-
-            return entryData;
-        }
-
-        private static JsonObject ReadExtension(KeyValuePair<XmlQualifiedName, string> pair)
-        {
-            return ReaderUtils.CreateExtension(pair.Key.Name, pair.Key.Namespace, pair.Value);
-        }
-
-        private static string GetCollectionType(string type)
-        {
-            if (type != null && type.StartsWith("Collection("))
-            {
-                int start = 11;
-                int end = type.IndexOf(")") - 11;
-                return type.Substring(start, end);
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Find the m:properties element within a feed entry
-        /// </summary>
-        /// <param name="item">The feed entry</param>
-        /// <returns>The m:properties element</returns>
-        private static XElement GetPropertiesElement(SyndicationItem item)
-        {
-            // Check if the m:properties element is within the content element
-            XmlSyndicationContent xmlContent = item.Content as XmlSyndicationContent;
-            if (xmlContent != null)
-            {
-                XElement contentElement = XElement.Load(xmlContent.GetReaderAtContent());
-                return contentElement.Elements().FirstOrDefault(e => e.Name == XName.Get("properties", odataMetaXmlNs));
-            }
-            // If we're here, then we are dealing with a feed that has an MLE
-            // i.e. the m:properties element is a peer of the content element, and shows up
-            // in the elementExtensions instead
-            SyndicationElementExtension propertiesElementExtension = item.ElementExtensions.FirstOrDefault(e => e.OuterName.Equals("properties"));
-            if (propertiesElementExtension != null)
-            {
-                XNode propertiesElement = XNode.ReadFrom(propertiesElementExtension.GetReader());
-                return (XElement)propertiesElement;
-            }
-
-            throw new NotSupportedException("Unsupported feed entry format");
-        }
-
-        /// <summary>
-        /// Gets the inline count within a feed
-        /// </summary>
-        /// <param name="feed">The feed</param>
-        /// <returns>The inline count, or null if none exists</returns>
-        private static long? GetInlineCount(SyndicationFeed feed)
-        {
-            SyndicationElementExtension countElementExtension = feed.ElementExtensions.SingleOrDefault(extension =>
-                extension.OuterName.Equals("count", StringComparison.OrdinalIgnoreCase) &&
-                extension.OuterNamespace.Equals(odataMetaXmlNs));
-
-            if (countElementExtension != null)
-            {
-                XElement countElement = (XElement)XNode.ReadFrom(countElementExtension.GetReader());
-                return XmlConvert.ToInt64(countElement.Value);
-            }
-            else
-            {
-                return null;
-            }
-        }
-
-        /// <summary>
-        /// Gets the link with the specified relationship type
-        /// </summary>
-        /// <param name="rel">Relationship type</param>
-        /// <param name="links">The set of links to search from</param>
-        /// <returns>The link with the specified relationship type, or null if none exists</returns>
-        private static SyndicationLink GetLink(string rel, IEnumerable<SyndicationLink> links)
-        {
-            return links.SingleOrDefault(link => link.RelationshipType.Equals(rel, StringComparison.InvariantCultureIgnoreCase));
-        }
-
-        private static IEnumerable<SyndicationLink> GetLinks(string rel, IEnumerable<SyndicationLink> links)
-        {
-            return links.Where(link => link.RelationshipType.StartsWith(rel, StringComparison.Ordinal));
-        }
-
-        //TODO refactor the extraction of extensions into extension elements and extension attribute methods.
-        private static JsonObject[] GetLinkExtensions(SyndicationLink link)
-        {
-            List<JsonObject> extensions = new List<JsonObject>();
-            //TODO: fix the inclusion of title as extension.  Title attribute is not required in the link element and its
-            //inclusion as an extension should be tested for the precesence of the attribute in the xml element.  Unfortunately,
-            //SyndicationLink doesn't allow for accessing the underlying XML document.. perhaps using an AtomFormatter10?? 
-            extensions.Add(ReaderUtils.CreateExtension("title", null, link.Title));
-            extensions.AddRange(link.AttributeExtensions.Select(pair => ReadExtension(pair)));
-
-            return extensions.ToArray();
-        }
-
-        private static JsonObject[] GetTitleExtensions(TextSyndicationContent title)
-        {
-            List<JsonObject> extensions = new List<JsonObject>();
-            extensions.Add(ReaderUtils.CreateExtension("type", null, title.Type));
-            extensions.AddRange(title.AttributeExtensions.Select(pair => ReadExtension(pair)));
-
-            return extensions.ToArray();
-        }
-
-        /// <summary>
-        /// Gets the "type" value from a property element
-        /// </summary>
-        /// <param name="propertyElement">The property element</param>
-        /// <returns>The "type" value, or default (Edm.String) if none specified</returns>
-        private static string GetTypeAttribute(XElement propertyElement)
-        {
-            XAttribute typeAttribute = propertyElement.Attribute(XName.Get("type", odataMetaXmlNs));
-            if (typeAttribute == null)
-            {
-                if (propertyElement.HasElements)
-                {
-                    return null;
-                }
-                return "Edm.String";
-            }
-            return typeAttribute.Value;
-        }
-
-        private static bool HasTypeAttribute(XElement propertyElement)
-        {
-            return propertyElement.Attribute(XName.Get("type", odataMetaXmlNs)) != null;
-        }
-
-        private static bool IsCollectionProperty(XElement propertyElement)
-        {
-            string type = GetTypeAttribute(propertyElement);
-            if (type != null && type.StartsWith("Collection("))
-            {
-                return true;
-
-            }
-            return propertyElement.Elements().Count(pe => pe.Name == XName.Get("element", odataXmlNs)) > 1;
-        }
-
-        private static JsonObject ReadWorkspaceObject(XElement container, string baseUri)
-        {
-            JsonObject jsonObject = new JsonObject();
-
-            jsonObject["collections"] =
-                container
-                    .Elements()
-                        .Where(element => element.Name.LocalName.Equals("collection"))
-                        .Select(element => ReadWorkspaceCollections(element, baseUri))
-                        .ToArray();
-
-            jsonObject["extensions"] =
-                container
-                    .Elements()
-                        .Where(element =>
-                            !(element.Name.LocalName.Equals("collection") ||
-                              element.Name.LocalName.Equals("title")))
-                        .Select(element => ReadExtensionElement(element))
-                        .ToArray();
-
-            jsonObject["title"] =
-                container
-                    .Elements()
-                    .Where(element => element.Name.LocalName.Equals("title"))
-                    .First()
-                    .Value;
-
-            return jsonObject;
-        }
-
-        private static JsonObject ReadWorkspaceCollections(XElement container, string baseUri)
-        {
-            JsonObject jsonObject = new JsonObject();
-            string title = string.Empty;
-
-            jsonObject["extensions"] =
-                container
-                    .Elements()
-                        .Where(element =>
-                            !(element.Name.LocalName.Equals(collectionElement) ||
-                              element.Name.LocalName.Equals(titleElement)))
-                        .Select(element => ReadExtensionElement(element))
-                        .ToArray();
-
-            jsonObject["title"] =
-                container
-                    .Elements()
-                        .Where(element => element.Name.LocalName.Equals("title"))
-                        .First()
-                        .Value;
-
-            IEnumerable<XAttribute> hrefAttributes =
-                container
-                    .Attributes()
-                        .Where(element => element.Name.LocalName.Equals("href"));
-
-            jsonObject["href"] = baseUri + hrefAttributes.First().Value;
-
-            return jsonObject;
-        }
-
-        private static JsonObject ReadExtensionElement(XElement element)
-        {
-            JsonObject jsonObject = ReaderUtils.CreateExtension(element.Name.LocalName, element.BaseUri, null);
-            jsonObject.Remove("value");
-            jsonObject["attributes"] = ReadExtensionAttributes(element);
-            jsonObject["children"] = element.Elements().Select(child => ReadExtensionElement(element)).ToArray();
-
-            return jsonObject;
-        }
-
-        private static JsonObject ReadExtensionAttribute(XAttribute attribute)
-        {
-            return ReaderUtils.CreateExtension(attribute.Name.LocalName, attribute.BaseUri, attribute.Value);
-        }
-
-        private static JsonObject[] ReadExtensionAttributes(XElement container)
-        {
-            List<JsonObject> attributes = new List<JsonObject>();
-            foreach (XAttribute attribute in container.Attributes())
-            {
-                attributes.Add(ReadExtensionAttribute(attribute));
-            }
-            return attributes.ToArray();
-        }
-
-        private static JsonObject ReadNamedStreamMetadata(SyndicationItem item)
-        {
-            JsonObject propertiesMetadata = new JsonObject();
-            JsonObject streamMetadata;
-            string propertyName;
-
-            foreach (SyndicationLink link in GetLinks(odataEditMediaPrefix, item.Links))
-            {
-                streamMetadata = new JsonObject();
-                streamMetadata["edit_media_extensions"] = GetLinkExtensions(link);
-                streamMetadata["media_src_extensions"] = new JsonObject[0];
-
-                propertyName = link.RelationshipType.Substring(odataEditMediaPrefix.Length + 1);
-                propertiesMetadata[propertyName] = streamMetadata;
-            }
-
-            foreach (SyndicationLink link in GetLinks(odataMediaResourcePrefix, item.Links))
-            {
-                streamMetadata = new JsonObject();
-                streamMetadata["media_src_extensions"] = GetLinkExtensions(link);
-
-                propertyName = link.RelationshipType.Substring(odataMediaResourcePrefix.Length + 1);
-                if (propertiesMetadata.ContainsKey(propertyName))
-                {
-                    streamMetadata = JsonObject.Merge((JsonObject)propertiesMetadata[propertyName], streamMetadata);
-                }
-                propertiesMetadata[propertyName] = streamMetadata;
-            }
-            return propertiesMetadata;
-        }
-
-        private static JsonObject ReadNamedStreams(SyndicationItem item)
-        {
-            // Not very elegant, but quick and easy, do it in two passes.
-            JsonObject streams = new JsonObject();
-            JsonObject streamValue;
-            JsonObject mediaResource;
-            string propertyName;
-
-            foreach (SyndicationLink link in GetLinks(odataEditMediaPrefix, item.Links))
-            {
-                propertyName = link.RelationshipType.Substring(odataEditMediaPrefix.Length + 1);
-                streamValue = new JsonObject();
-                mediaResource = new JsonObject();
-
-                streams[propertyName] = streamValue;
-
-                streamValue["__mediaresource"] = mediaResource;
-
-                mediaResource["edit_media"] = link.GetAbsoluteUri().AbsoluteUri;
-                mediaResource["content_type"] = link.MediaType;
-                mediaResource["media_src"] = link.GetAbsoluteUri().AbsoluteUri;
-
-                var etagAttributeName = new XmlQualifiedName("etag", odataMetaXmlNs);
-                if (link.AttributeExtensions.ContainsKey(etagAttributeName))
-                {
-                    mediaResource["media_etag"] = link.AttributeExtensions[etagAttributeName];
-                    link.AttributeExtensions.Remove(etagAttributeName);
-                }
-            }
-
-            foreach (SyndicationLink link in GetLinks(odataMediaResourcePrefix, item.Links))
-            {
-                propertyName = link.RelationshipType.Substring(odataMediaResourcePrefix.Length + 1);
-                mediaResource = new JsonObject();
-                mediaResource["content_type"] = link.MediaType;
-                mediaResource["media_src"] = link.GetAbsoluteUri().AbsoluteUri;
-
-                if (streams.ContainsKey(propertyName))
-                {
-                    streamValue = streams[propertyName] as JsonObject;
-                    mediaResource = JsonObject.Merge(streamValue["__mediaresource"] as JsonObject, mediaResource);
-                }
-                else
-                {
-                    streamValue = new JsonObject();
-                }
-                streamValue["__mediaresource"] = mediaResource;
-                streams[propertyName] = streamValue;
-            }
-            return streams;
-        }
-
-        private static JsonObject ReadNavigationProperties(SyndicationItem item)
-        {
-            JsonObject navProperties = new JsonObject();
-            SyndicationElementExtension inline;
-
-            string propertyName;
-            JsonObject propertyValue = null;
-
-            foreach (SyndicationLink link in GetLinks(odataRelatedPrefix, item.Links))
-            {
-                propertyName = link.RelationshipType.Substring(odataRelatedPrefix.Length + 1);
-                inline = link.ElementExtensions.SingleOrDefault(e =>
-                    odataMetaXmlNs.Equals(e.OuterNamespace, StringComparison.Ordinal) &&
-                    e.OuterName.Equals("inline", StringComparison.Ordinal));
-
-                if (inline != null)
-                {
-                    XElement inlineElement = (XElement)XNode.ReadFrom(inline.GetReader());
-                    XElement innerElement = inlineElement.Elements().FirstOrDefault();
-
-                    if (innerElement != null)
-                    {
-                        // By default the inner feed/entry does not have the xml:base attribute, so we need to
-                        // add it so that the parsed SyndicationFeed or SyndicationItem retains the baseUri
-                        if (link.BaseUri != null)
-                        {
-                            innerElement.SetAttributeValue(XNamespace.Xml + "base", link.BaseUri.OriginalString);
-                        }
-
-                        // We are converting to a string before creating the reader to strip out extra indenting,
-                        // otherwise the reader creates extra XmlText nodes that SyndicationFeed/SyndicationItem cannot handle
-                        try
-                        {
-                            propertyValue = ReadFeed(new StringReader(innerElement.ToString()));
-                        }
-                        catch (XmlException)
-                        {
-                            // Try with entry instead .. 
-
-                            propertyValue = ReadEntry(new StringReader(innerElement.ToString()));
-                        }
-                    }
-                }
-                else
-                {
-                    JsonObject deferred = new JsonObject();
-                    deferred["uri"] = link.GetAbsoluteUri().AbsoluteUri;
-
-                    propertyValue = new JsonObject();
-                    propertyValue["__deferred"] = deferred;
-                }
-                navProperties[propertyName] = propertyValue;
-            }
-            return navProperties;
-        }
-
-        private static JsonObject ReadNavigationPropertiesMetadata(SyndicationItem item)
-        {
-            JsonObject propertiesMetadata = new JsonObject();
-            JsonObject navMetadata;
-            string propertyName;
-
-            foreach (SyndicationLink link in GetLinks(odataRelatedPrefix, item.Links))
-            {
-                navMetadata = new JsonObject();
-                navMetadata["extensions"] = GetLinkExtensions(link).Where(e =>
-                    !(string.Equals(e["name"] as string, "inline", StringComparison.Ordinal) &&
-                        string.Equals(e["namespaceURI"] as string, odataMetaXmlNs, StringComparison.Ordinal))
-                ).ToArray();
-
-                propertyName = link.RelationshipType.Substring(odataRelatedPrefix.Length + 1);
-                propertiesMetadata[propertyName] = navMetadata;
-            }
-
-            foreach (SyndicationLink link in GetLinks(odataRelatedLinksPrefix, item.Links))
-            {
-                navMetadata = new JsonObject();
-                navMetadata["associationuri"] = link.GetAbsoluteUri().AbsoluteUri;
-                navMetadata["associationuri_extensions"] = link.GetAbsoluteUri().AbsoluteUri;
-
-                propertyName = link.RelationshipType.Substring(odataRelatedLinksPrefix.Length + 1);
-                if (propertiesMetadata.ContainsKey(propertyName))
-                {
-                    navMetadata = JsonObject.Merge(propertiesMetadata[propertyName] as JsonObject, navMetadata);
-                }
-                propertiesMetadata[propertyName] = navMetadata;
-            }
-
-            return propertiesMetadata;
-        }
-
-        private static JsonObject ReadPropertiesMetadata(XElement container)
-        {
-            JsonObject json = null;
-            if (container != null && container.Elements().Any(e => e.Name.NamespaceName == odataXmlNs))
-            {
-                json = new JsonObject();
-                foreach (XElement propertyElement in container.Elements())
-                {
-                    json[propertyElement.Name.LocalName] = ReadPropertyMetadata(propertyElement);
-                }
-            }
-            return json;
-        }
-
-        private static JsonObject ReadPropertyMetadata(XElement property)
-        {
-            var metadata = ReaderUtils.CreateEntryPropertyMetadata(GetTypeAttribute(property));
-
-            if (IsCollectionProperty(property))
-            {
-                string collectionType = GetCollectionType(GetTypeAttribute(property));
-                if (collectionType == null)
-                {
-                    metadata["type"] = "Collection()";
-                }
-
-                List<JsonObject> elements = new List<JsonObject>();
-                foreach (XElement item in property.Elements(XName.Get("element", odataXmlNs)))
-                {
-                    string itemType =
-                        HasTypeAttribute(item) ? GetTypeAttribute(item) :
-                        IsCollectionProperty(item) ? "Collection()" : collectionType;
-
-                    var itemMetadata = ReaderUtils.CreateEntryPropertyMetadata(itemType);
-                    if (item.Elements().Any(e => e.Name.NamespaceName == odataXmlNs))
-                    {
-                        itemMetadata["properties"] = ReadPropertiesMetadata(item);
-                    }
-                    elements.Add(itemMetadata);
-                }
-                metadata["elements"] = elements.ToArray();
-            }
-            else if (property != null && property.Elements().Any(e => e.Name.NamespaceName == odataXmlNs))
-            {
-                metadata["properties"] = ReadPropertiesMetadata(property);
-            }
-
-            return metadata;
-        }
-
-        /// <summary>
-        /// Creates a JsonObject from an XML container element (e.g. the m:properties element) of an OData ATOM feed entry. 
-        /// </summary>
-        /// <param name="container">The XML container</param>
-        /// <param name="buildValue">Function that builds a value from a property element</param>
-        /// <returns>The JsonObject containing the name-value pairs</returns>
-        private static JsonObject ReadObject(XElement container)
-        {
-            if (container == null)
-            {
-                return null;
-            }
-
-            var json = new JsonObject();
-            foreach (XElement propertyElement in container.Elements())
-            {
-                json[propertyElement.Name.LocalName] = ReadDataItem(propertyElement);
-            }
-            return json;
-        }
-
-        private static JsonObject ReadCollectionProperty(XElement property, string typeName)
-        {
-            var collectionType = GetCollectionType(typeName);
-
-            var json = new JsonObject();
-            var results = new List<object>();
-
-            foreach (XElement item in property.Elements())
-            {
-                object resultItem = ReadDataItem(item);
-                results.Add(resultItem);
-
-                JsonObject complexValue = resultItem as JsonObject;
-                if (complexValue != null)
-                {
-                    var metadata = complexValue["__metadata"] as JsonObject;
-                    if (!string.IsNullOrEmpty(collectionType) && metadata["type"] == null)
-                    {
-                        metadata["type"] = collectionType;
-                    }
-                }
-            }
-
-            json["results"] = results;
-            json["__metadata"] = ReaderUtils.CreateEntryPropertyMetadata(typeName, false);
-
-            return json;
-        }
-
-        private static JsonObject ReadComplexProperty(XElement container, string typeName)
-        {
-            JsonObject json = ReadObject(container);
-            json["__metadata"] = ReaderUtils.CreateEntryPropertyMetadata(GetTypeAttribute(container), false);
-            return json;
-        }
-
-        private static JsonObject ReadJsonSpatialProperty(XElement container, XElement gmlValue, bool isGeography)
-        {
-            GmlFormatter gmlFormatter = GmlFormatter.Create();
-            GeoJsonObjectFormatter jsonformatter = GeoJsonObjectFormatter.Create();
-
-            bool ignoreCrc = !gmlValue.Attributes().Any(a => a.Name.LocalName == "srsName");
-
-            ISpatial spatialValue;
-            if (isGeography)
-            {
-                spatialValue = gmlFormatter.Read<Geography>(gmlValue.CreateReader());
-            }
-            else
-            {
-                spatialValue = gmlFormatter.Read<Geometry>(gmlValue.CreateReader());
-            }
-
-            IDictionary<string, object> geoJsonData = jsonformatter.Write(spatialValue);
-            JsonObject json = new JsonObject();
-
-            Queue<object> geoJsonScopes = new Queue<object>();
-            Queue<object> jsonScopes = new Queue<object>();
-
-            geoJsonScopes.Enqueue(geoJsonData);
-            jsonScopes.Enqueue(json);
-
-            Func<object, object> convertScope = (scope) =>
-            {
-                object newScope =
-                        scope is List<object> || scope is object[] ? (object)new List<Object>() :
-                        scope is IDictionary<string, object> ? (object)new JsonObject() :
-                        null;
-
-                if (newScope != null)
-                {
-                    geoJsonScopes.Enqueue(scope);
-                    jsonScopes.Enqueue(newScope);
-                }
-
-                return newScope ?? scope;
-            };
-
-            while (jsonScopes.Count > 0)
-            {
-                if (jsonScopes.Peek() is JsonObject)
-                {
-                    var currentGeoJson = (IDictionary<string, object>)geoJsonScopes.Dequeue();
-                    var currentJson = (JsonObject)jsonScopes.Dequeue();
-
-                    foreach (var item in currentGeoJson)
-                    {
-                        if (!ignoreCrc || item.Key != "crs")
-                        {
-                            currentJson[item.Key] = convertScope(item.Value);
-                        }
-                    }
-                }
-                else
-                {
-                    var currentGeoJson = (IEnumerable<object>)geoJsonScopes.Dequeue();
-                    var currentJson = (List<object>)jsonScopes.Dequeue();
-
-                    foreach (var item in currentGeoJson)
-                    {
-                        currentJson.Add(convertScope(item));
-                    }
-                }
-            }
-            json["__metadata"] = ReaderUtils.CreateEntryPropertyMetadata(GetTypeAttribute(container), false);
-            return json;
-        }
-
-        public static object ReadDataItem(XElement item)
-        {
-            string typeName = GetTypeAttribute(item);
-            XElement gmlRoot = item.Elements().SingleOrDefault(e => e.Name.NamespaceName == gmlXmlNs);
-
-            if (gmlRoot != null)
-            {
-                bool isGeography = typeName.StartsWith("Edm.Geography");
-                return ReadJsonSpatialProperty(item, gmlRoot, isGeography);
-            }
-
-            bool isCollection = IsCollectionProperty(item);
-            if (item.HasElements || isCollection)
-            {
-                // Complex type, Collection Type: parse recursively
-                return isCollection ? ReadCollectionProperty(item, typeName) : ReadComplexProperty(item, typeName);
-            }
-
-            // Primitive type: null value
-            XNamespace mNamespace = item.GetNamespaceOfPrefix("m");
-            XAttribute nullAttribute = mNamespace == null ? null : item.Attribute(mNamespace.GetName("null"));
-            if (nullAttribute != null && nullAttribute.Value.Equals("true", StringComparison.InvariantCultureIgnoreCase))
-            {
-                return null;
-            }
-
-            // Primitive type: check type and parse value accordingly
-            string value = item.Value;
-            switch (typeName)
-            {
-                case "Edm.Byte":
-                    return XmlConvert.ToByte(value);
-                case "Edm.Int16":
-                    return XmlConvert.ToInt16(value);
-                case "Edm.Int32":
-                    return XmlConvert.ToInt32(value);
-                case "Edm.SByte":
-                    return XmlConvert.ToSByte(value);
-                case "Edm.Boolean":
-                    return XmlConvert.ToBoolean(value);
-                case "Edm.Double":
-                    return XmlConvert.ToDouble(value);
-                case "Edm.Single":
-                    return XmlConvert.ToSingle(value);
-                case "Edm.Guid":
-                    return XmlConvert.ToGuid(value);
-                case "Edm.DateTime":
-                    return new JsDate(XmlConvert.ToDateTime(value, XmlDateTimeSerializationMode.Utc));
-                case "Edm.DateTimeOffset":
-                    return new JsDate(XmlConvert.ToDateTimeOffset(value));
-                case "Edm.Time":
-                    throw new NotSupportedException(typeName + " is not supported");
-                // Decimal and Int64 values are sent as strings over the wire.  This is the same behavior as WCF Data Services JSON serializer.
-                case "Edm.Decimal":
-                case "Edm.Int64":
-                case "":
-                default:
-                    return value;
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/common/ODataReadOracle.js
----------------------------------------------------------------------
diff --git a/datajs/tests/common/ODataReadOracle.js b/datajs/tests/common/ODataReadOracle.js
index c18db57..450b089 100644
--- a/datajs/tests/common/ODataReadOracle.js
+++ b/datajs/tests/common/ODataReadOracle.js
@@ -23,14 +23,13 @@
 (function (window, undefined) {
     var jsonMime = "application/json";
     var universalMime = "*/*";
-    var atomMime = "application/atom+xml";
 
     var readFeed = function (url, success, mimeType, recognizeDates) {
         /// <summary>Calls the ReadFeed endpoint with the specified URL</summary>
         /// <param name="url" type="String">The URL to read the feed from</param>
         /// <param name="success" type="Function">The success callback function</param>
         /// <param name="mimeType" type="String">The MIME media type in the Accept header</param>
-        var readMethod = getReadMethod(mimeType, "ReadFeed");
+        var readMethod = getReadMethod(mimeType);
         oracleRequest("GET", readMethod, typeof url === "string" ? { url: url} : url, mimeType, recognizeDates, function (data) {
             success(data);
         });
@@ -41,24 +40,10 @@
         /// <param name="url" type="String">The URL to read the entry from</param>
         /// <param name="success" type="Function">The success callback function</param>
         /// <param name="mimeType" type="String">The MIME media type in the Accept header</param>
-        var readMethod = getReadMethod(mimeType, "ReadEntry");
+        var readMethod = getReadMethod(mimeType);
         oracleRequest("GET", readMethod, typeof url === "string" ? { url: url} : url, mimeType, recognizeDates, success);
     };
 
-    var readFeedLoopback = function (atomFeedXml, success, recognizeDates) {
-        /// <summary>Calls the ReadFeedLoopback endpoint with the specified atom feed xml</summary>
-        /// <param name="atomFeedXml" type="String">The atom feed xml</param>
-        /// <param name="success" type="Function">The success callback function</param>
-        oracleRequest("POST", "ReadFeedLoopback", atomFeedXml, atomMime, recognizeDates, success);
-    };
-
-    var readEntryLoopback = function (atomEntryXml, success, recognizeDates) {
-        /// <summary>Calls the ReadEntryLoopback endpoint with the specified atom entry xml</summary>
-        /// <param name="atomEntryXml" type="String">The atom entry xml</param>
-        /// <param name="success" type="Function">The success callback function</param>
-        oracleRequest("POST", "ReadEntryLoopback", atomEntryXml, atomMime, recognizeDates, success);
-    };
-
     var readLinksEntry = function (url, success) {
         /// <summary>Calls the ReadMetadata endpoint with the specified URL</summary>
         /// <param name="url" type="String">The URL to read the metadata from</param>
@@ -93,7 +78,7 @@
         /// <param name="url" type="String">The URL to the service</param>
         /// <param name="success" type="Function">The success callback function</param>
         /// <param name="mimeType" type="String">The MIME type being tested</param>
-        var readMethod = getReadMethod(mimeType, "ReadServiceDocument");
+        var readMethod = getReadMethod(mimeType);
         oracleRequest("GET", readMethod, typeof url === "string" ? { url: url} : url, mimeType, null, success);
     };
 
@@ -147,10 +132,8 @@
         readPage(url);
     };
 
-    var getReadMethod = function (mimeType, defaultEndpoint) {
+    var getReadMethod = function (mimeType) {
         switch (mimeType) {
-            case atomMime:
-                return defaultEndpoint;
             case jsonMime:
             case universalMime:
             default:
@@ -200,8 +183,6 @@
     window.ODataReadOracle = {
         readFeed: readFeed,
         readEntry: readEntry,
-        readFeedLoopback: readFeedLoopback,
-        readEntryLoopback: readEntryLoopback,
         readLinksEntry: readLinksEntry,
         readLinksFeed: readLinksFeed,
         readJson: readJson,

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/common/ODataReadOracle.svc
----------------------------------------------------------------------
diff --git a/datajs/tests/common/ODataReadOracle.svc b/datajs/tests/common/ODataReadOracle.svc
index 51ccd62..7536de4 100644
--- a/datajs/tests/common/ODataReadOracle.svc
+++ b/datajs/tests/common/ODataReadOracle.svc
@@ -46,36 +46,6 @@ namespace DataJS.Tests
         const string jsonlightMediaType = "application/json";
 
         /// <summary>
-        /// Reads a URI that will return an OData ATOM feed
-        /// </summary>
-        /// <param name="url">The URL to send the request to</param>
-        /// <param name="user">The username for basic authentication</param>
-        /// <param name="password">The password for basic authentication</param>
-        /// <returns>JSON object expected to be returned by OData.read (plus type metadata markers that will need to be removed)</returns>
-        [OperationContract]
-        [WebGet(ResponseFormat = WebMessageFormat.Json)]
-        public JsonObject ReadFeed(string url, string user, string password)
-        {
-            WebResponse response = ReaderUtils.CreateRequest(ResolveUri(url, UriKind.Absolute), user, password).GetResponse();
-            return AtomReader.ReadFeed(new StreamReader(response.GetResponseStream()));
-        }
-
-        /// <summary>
-        /// Reads a URI that will return an OData ATOM feed entry
-        /// </summary>
-        /// <param name="url">URL of the entry</param>
-        /// <param name="user">The username for basic authentication</param>
-        /// <param name="password">The password for basic authentication</param>
-        /// <returns>JSON object expected to be returned by OData.read</returns>
-        [OperationContract]
-        [WebGet(ResponseFormat = WebMessageFormat.Json)]
-        public JsonObject ReadEntry(string url, string user, string password)
-        {
-            WebResponse response = ReaderUtils.CreateRequest(ResolveUri(url, UriKind.Absolute), user, password).GetResponse();
-            return AtomReader.ReadEntry(new StreamReader(response.GetResponseStream()));
-        }
-
-        /// <summary>
         /// Reads a URI that will return a metadata object
         /// </summary>
         /// <param name="url">The URL to send the request to</param>
@@ -88,33 +58,7 @@ namespace DataJS.Tests
             Dictionary<string, object> jsonObject = CsdlReader.ReadCsdl(new StreamReader(response.GetResponseStream()));
             return ReaderUtils.ConvertDictionarytoJsonlightStream(jsonObject);
         }
-
-        /// <summary>
-        /// Reads a URI that will return a metadata object
-        /// </summary>
-        /// <param name="url">The URL to send the request to</param>
-        /// <param name="mimeType">Mime type being tested to determine base URI</param>
-        /// <returns>JSON object expected to be returned by OData.read (plus type metadata markers that will need to be removed)</returns>
-        [OperationContract]
-        [WebGet(ResponseFormat = WebMessageFormat.Json)]
-        public JsonObject ReadServiceDocument(string url, string mimeType)
-        {
-            WebResponse response = WebRequest.Create(ResolveUri(url, UriKind.Absolute)).GetResponse();
-            string baseUri = string.Empty;
-
-            // With JSON responses only relative path passed to the library is available
-            if (mimeType.Equals(jsonlightMediaType))
-            {
-                baseUri = ResolveUri(url, UriKind.Relative).ToString();
-            }
-            else
-            {
-                baseUri = response.ResponseUri.AbsoluteUri;
-            }
-
-            return AtomReader.ReadServiceDocument(new StreamReader(response.GetResponseStream()), baseUri);
-        }
-
+        
         /// <summary>
         /// Reads a URI that will get the Json response and return the stream
         /// </summary>
@@ -138,31 +82,6 @@ namespace DataJS.Tests
             return response.GetResponseStream();
         }
 
-
-        /// <summary>
-        /// Loops back an ATOM feed passed to the webservice in JSON format.
-        /// </summary>
-        /// <param name="content">The ATOM feed xml stream to loopback as JSON</param>
-        /// <returns>JSON object expected to be returned by OData.read (plus type metadata markers that will need to be removed)</returns>
-        [OperationContract]
-        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
-        public JsonObject ReadFeedLoopback(Stream content)
-        {
-            return AtomReader.ReadFeed(new StreamReader(content));
-        }
-
-        /// <summary>
-        /// Loops back an ATOM entry passed to the webservice in JSON format.
-        /// </summary>
-        /// <param name="content">The ATOM entry xml stream to loopback as JSON</param>
-        /// <returns>JSON object expected to be returned by OData.read (plus type metadata markers that will need to be removed)</returns>
-        [OperationContract]
-        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
-        public JsonObject ReadEntryLoopback(Stream content)
-        {
-            return AtomReader.ReadEntry(new StreamReader(content));
-        }
-
         /// <summary>
         /// Resolves the given url string to a URI
         /// </summary>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/datajs-cache-large-collection-functional-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/datajs-cache-large-collection-functional-tests.html b/datajs/tests/datajs-cache-large-collection-functional-tests.html
index fbed913..357998a 100644
--- a/datajs/tests/datajs-cache-large-collection-functional-tests.html
+++ b/datajs/tests/datajs-cache-large-collection-functional-tests.html
@@ -15,30 +15,8 @@
         window.TestSynchronizer.init(QUnit);
     </script>
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>   
+    <script type="text/javascript" src="common/common.js"></script>
 
-    <!--<script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-  
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
-    
     <script type="text/javascript" src="common/djstest.js"></script>
     <script type="text/javascript" src="common/CacheOracle.js"></script>
     <script type="text/javascript" src="common/ObservableHttpClient.js"></script>

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/datajs-cache-large-collection-functional-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/datajs-cache-large-collection-functional-tests.js b/datajs/tests/datajs-cache-large-collection-functional-tests.js
index e8d973c..2788974 100644
--- a/datajs/tests/datajs-cache-large-collection-functional-tests.js
+++ b/datajs/tests/datajs-cache-large-collection-functional-tests.js
@@ -18,7 +18,7 @@
  */
 
 (function (window, undefined) {
-    OData.defaultHandler.accept = "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1";
+    OData.defaultHandler.accept = "application/json;q=0.9, */*;q=0.1";
     var largeCollectionFeed = "./endpoints/LargeCollectionService.svc/Customers";
     var itemsInCollection = 2 * 1024 * 1024;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/datajs-cache-long-haul-tests.html
----------------------------------------------------------------------
diff --git a/datajs/tests/datajs-cache-long-haul-tests.html b/datajs/tests/datajs-cache-long-haul-tests.html
index c73fa71..a5f00c4 100644
--- a/datajs/tests/datajs-cache-long-haul-tests.html
+++ b/datajs/tests/datajs-cache-long-haul-tests.html
@@ -8,26 +8,7 @@
     <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js"></script>
     <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>
     <script type="text/javascript" src="../build/datajs-2.0.0.js"></script>   
-    <!-- <script type="text/javascript" src="../src/datajs.js"></script>
-    <script type="text/javascript" src="../src/utils.js"></script>
-    <script type="text/javascript" src="../src/xml.js"></script>
-    <script type="text/javascript" src="../src/odata-utils.js"></script>
-    <script type="text/javascript" src="../src/odata-handler.js"></script>
-    <script type="text/javascript" src="../src/odata-gml.js"></script>
-    <script type="text/javascript" src="../src/odata-xml.js"></script>
-    <script type="text/javascript" src="../src/odata-net.js"></script>
-    <script type="text/javascript" src="../src/odata-json.js"></script>
-    <script type="text/javascript" src="../src/odata-atom.js"></script>
-    <script type="text/javascript" src="../src/odata-metadata.js"></script>
-    <script type="text/javascript" src="../src/odata-batch.js"></script>
-    <script type="text/javascript" src="../src/odata.js"></script>
-    <script type="text/javascript" src="../src/store-dom.js"></script>
-    <script type="text/javascript" src="../src/store-indexeddb.js"></script>
-    <script type="text/javascript" src="../src/store-memory.js"></script>
-    <script type="text/javascript" src="../src/store.js"></script>
-    <script type="text/javascript" src="../src/deferred.js"></script>
-    <script type="text/javascript" src="../src/cache-source.js"></script>
-    <script type="text/javascript" src="../src/cache.js"></script>-->
+    <script type="text/javascript" src="common/common.js"></script>
     <script type="text/javascript" src="common/djstest.js"></script>
     <script type="text/javascript" src="common/Instrument.js"></script>
     <script type="text/javascript">

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/datajs-startup-perf-test.html
----------------------------------------------------------------------
diff --git a/datajs/tests/datajs-startup-perf-test.html b/datajs/tests/datajs-startup-perf-test.html
index 58534ed..d717db4 100644
--- a/datajs/tests/datajs-startup-perf-test.html
+++ b/datajs/tests/datajs-startup-perf-test.html
@@ -38,8 +38,7 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL
                 var durationLimit = 500;
                 var memorySizeDeltaLimit = 5000000;
 
-                //var filename = "datajs-0.0.0.min.js";
-                var filename = "../build/datajs-0.0.0.min.js";
+                var filename = "../build/datajs-2.0.0.min.js";
                 var getBrowserMemorySize = Instrument.getBrowserMemorySize;
 
                 $.ajax({


[2/4] Remove the "Atom" related dev and test codes

Posted by bi...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/tests/odata-atom-tests.js
----------------------------------------------------------------------
diff --git a/datajs/tests/odata-atom-tests.js b/datajs/tests/odata-atom-tests.js
deleted file mode 100644
index 9c12233..0000000
--- a/datajs/tests/odata-atom-tests.js
+++ /dev/null
@@ -1,4745 +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.
- */
- 
-// odata-atom-tests.js
-
-(function (window, undefined) {
-
-    module("Unit");
-
-    var parseMetadataHelper = function (text) {
-        var response = { statusCode: 200, body: text, headers: { "Content-Type": "application/xml"} };
-        OData.metadataHandler.read(response, {});
-        return response.data;
-    };
-
-    var resetFoodData = function () {
-        $.ajax({ url: "./endpoints/FoodStoreDataServiceV4.svc/ResetData", async: false, type: "POST" });
-    };
-
-    var customerSampleMetadataText = '' +
-    '<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">\r\n' +
-    '<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="2.0">\r\n' +
-    '<Schema Namespace="Ns" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns="http://schemas.microsoft.com/ado/2006/04/edm">\r\n' +
-    '    <EntityType Name="Customer">\r\n' +
-    '    <Key><PropertyRef Name="ID" /></Key>\r\n' +
-    '     <Property Name="ID" Type="Edm.Int32" Nullable="false" />\r\n' +
-    '     <Property Name="Name" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="xhtml" m:FC_KeepInContent="false" />\r\n' +
-    '     <Property Name="LastName" Type="Edm.String" Nullable="true" m:FC_TargetPath="foo/bar/@baz" m:FC_NsUri="htp://prefix" m:FC_NsPrefix="prefix" m:FC_KeepInContent="false" />\r\n' +
-    '     <Property Name="FavoriteNumber" Type="Edm.Int32" Nullable="true" m:FC_TargetPath="favorite/number" m:FC_NsUri="htp://prefix" m:FC_NsPrefix="prefix" m:FC_KeepInContent="false" />\r\n' +
-    '     <Property Name="Address" Type="Ns.Address" Nullable="false" \r\n' +
-    '       m:FC_TargetPath="foo/bar/@city" m:FC_NsUri="htp://prefix" m:FC_NsPrefix="prefix" m:FC_SourcePath="City" m:FC_KeepInContent="false" \r\n' +
-    '       m:FC_TargetPath_1="foo/bar" m:FC_NsUri_1="htp://prefix" m:FC_NsPrefix_1="prefix" m:FC_SourcePath_1="Street" m:FC_KeepInContent_1="false" />\r\n' +
-    '    </EntityType>\r\n' +
-    '    <ComplexType Name="Address">\r\n' +
-    '     <Property Name="Street" Type="Edm.String" Nullable="true" />\r\n' +
-    '     <Property Name="City" Type="Edm.String" Nullable="true" />\r\n' +
-    '    </ComplexType>\r\n' +
-    '    <EntityContainer Name="SampleContext" m:IsDefaultEntityContainer="true">\r\n' +
-    '     <EntitySet Name="Customers" EntityType="Ns.Customer" />\r\n' +
-    '    </EntityContainer>\r\n' +
-    '</Schema>\r\n' +
-    '</edmx:DataServices></edmx:Edmx>';
-
-    var foodServiceV4FoodsSampleText = '' +
-    '<feed xml:base="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods">' +
-	'<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods</id>' +
-	'<title type="text">Foods</title>' +
-	'<updated>2013-12-30T05:45:07Z</updated>' +
-	'<link rel="self" title="Foods" href="Foods" />' +
-	'<entry>' +
-	'	<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)</id>' +
-	'	<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
-	'	<link rel="edit" title="Food" href="Foods(0)" />' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(0)/Category" />' +
-	'	<title />' +
-	'	<updated>2013-12-30T05:45:07Z</updated>' +
-	'	<author>' +
-	'		<name />' +
-	'	</author>' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(0)/Picture" m:etag="W/&quot;123456789&quot;" />' +
-	'	<content type="application/xml">' +
-	'		<m:properties>' +
-	'			<d:FoodID m:type="Int32">0</d:FoodID>' +
-	'			<d:Name>flour</d:Name>' +
-	'			<d:UnitPrice m:type="Double">0.19999</d:UnitPrice>' +
-	'			<d:ServingSize m:type="Decimal">1</d:ServingSize>' +
-	'			<d:MeasurementUnit>Cup</d:MeasurementUnit>' +
-	'			<d:ProteinGrams m:type="Byte">3</d:ProteinGrams>' +
-	'			<d:FatGrams m:type="Int16">1</d:FatGrams>' +
-	'			<d:CarbohydrateGrams m:type="Int32">20</d:CarbohydrateGrams>' +
-	'			<d:CaloriesPerServing m:type="Int64">140</d:CaloriesPerServing>' +
-	'			<d:IsAvailable m:type="Boolean">true</d:IsAvailable>' +
-	'			<d:ExpirationDate m:type="DateTimeOffset">2010-12-25T12:00:00Z</d:ExpirationDate>' +
-	'			<d:ItemGUID m:type="Guid">27272727-2727-2727-2727-272727272727</d:ItemGUID>' +
-	'			<d:Weight m:type="Single">10</d:Weight>' +
-	'			<d:AvailableUnits m:type="SByte">1</d:AvailableUnits>' +
-	'			<d:Packaging m:type="#DataJS.Tests.V4.Package">' +
-	'				<d:Type m:null="true" />' +
-	'				<d:Color></d:Color>' +
-	'				<d:NumberPerPackage m:type="Int32">2147483647</d:NumberPerPackage>' +
-	'				<d:RequiresRefridgeration m:type="Boolean">false</d:RequiresRefridgeration>' +
-	'				<d:ShipDate m:type="DateTimeOffset">2000-12-29T00:00:00Z</d:ShipDate>' +
-	'				<d:PackageDimensions m:type="#DataJS.Tests.V4.Dimensions">' +
-	'					<d:Length m:type="Decimal">79228162514264337593543950335</d:Length>' +
-	'					<d:Height m:type="Int16">32767</d:Height>' +
-	'					<d:Width m:type="Int64">9223372036854775807</d:Width>' +
-	'					<d:Volume m:type="Double">1.7976931348623157E+308</d:Volume>' +
-	'				</d:PackageDimensions>' +
-	'			</d:Packaging>' +
-	'			<d:CookedSize m:type="#DataJS.Tests.V4.CookedDimensions">' +
-	'				<d:Length m:type="Decimal">2</d:Length>' +
-	'				<d:Height m:type="Int16">1</d:Height>' +
-	'				<d:Width m:type="Int64">3</d:Width>' +
-	'				<d:Volume m:type="Double">6</d:Volume>' +
-	'			</d:CookedSize>' +
-	'			<d:AlternativeNames m:type="#Collection(String)">' +
-	'				<m:element>ground cereal</m:element>' +
-	'				<m:element>ground grain</m:element>' +
-	'			</d:AlternativeNames>' +
-	'			<d:Providers m:type="#Collection(DataJS.Tests.V4.Provider)">' +
-	'				<m:element>' +
-	'					<d:Name>Flour Provider</d:Name>' +
-	'					<d:Aliases m:type="#Collection(String)">' +
-	'						<m:element>fp1</m:element>' +
-	'						<m:element>flour provider1</m:element>' +
-	'					</d:Aliases>' +
-	'					<d:Details m:type="#DataJS.Tests.V4.ProviderDetails">' +
-	'						<d:Telephone>555-555-555</d:Telephone>' +
-	'						<d:PreferredCode m:type="Int32">1001</d:PreferredCode>' +
-	'					</d:Details>' +
-	'				</m:element>' +
-	'				<m:element>' +
-	'					<d:Name>Ground Grains</d:Name>' +
-	'					<d:Aliases m:type="#Collection(String)" />' +
-	'					<d:Details m:null="true" />' +
-	'				</m:element>' +
-	'			</d:Providers>' +
-	'			<d:SpatialData m:type="GeometryCollection">' +
-	'				<gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326">' +
-	'					<gml:geometryMembers>' +
-	'						<gml:Point>' +
-	'							<gml:pos>5 5</gml:pos>' +
-	'						</gml:Point>' +
-	'					</gml:geometryMembers>' +
-	'				</gml:MultiGeometry>' +
-	'			</d:SpatialData>' +
-	'		</m:properties>' +
-	'	</content>' +
-	'</entry>' +
-	'<entry>' +
-	'	<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(1)</id>' +
-	'	<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
-	'	<link rel="edit" title="Food" href="Foods(1)" />' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(1)/Category" />' +
-	'	<title />' +
-	'	<updated>2013-12-30T05:45:07Z</updated>' +
-	'	<author>' +
-	'		<name />' +
-	'	</author>' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(1)/Picture" m:etag="W/&quot;123456789&quot;" />' +
-	'	<content type="application/xml">' +
-	'		<m:properties>' +
-	'			<d:FoodID m:type="Int32">1</d:FoodID>' +
-	'			<d:Name>sugar</d:Name>' +
-	'			<d:UnitPrice m:type="Double">0.2</d:UnitPrice>' +
-	'			<d:ServingSize m:type="Decimal">1</d:ServingSize>' +
-	'			<d:MeasurementUnit>tsp</d:MeasurementUnit>' +
-	'			<d:ProteinGrams m:type="Byte">0</d:ProteinGrams>' +
-	'			<d:FatGrams m:type="Int16">0</d:FatGrams>' +
-	'			<d:CarbohydrateGrams m:type="Int32">4</d:CarbohydrateGrams>' +
-	'			<d:CaloriesPerServing m:type="Int64">16</d:CaloriesPerServing>' +
-	'			<d:IsAvailable m:type="Boolean">false</d:IsAvailable>' +
-	'			<d:ExpirationDate m:type="DateTimeOffset">2011-12-28T00:00:00Z</d:ExpirationDate>' +
-	'			<d:ItemGUID m:type="Guid">ffffffff-ffff-ffff-ffff-ffffffffffff</d:ItemGUID>' +
-	'			<d:Weight m:type="Single">0.1</d:Weight>' +
-	'			<d:AvailableUnits m:type="SByte">0</d:AvailableUnits>' +
-	'			<d:Packaging m:type="#DataJS.Tests.V4.Package">' +
-	'				<d:Type xml:space="preserve"> </d:Type>' +
-	'				<d:Color>BLUE</d:Color>' +
-	'				<d:NumberPerPackage m:type="Int32">-2147483648</d:NumberPerPackage>' +
-	'				<d:RequiresRefridgeration m:type="Boolean">true</d:RequiresRefridgeration>' +
-	'				<d:ShipDate m:type="DateTimeOffset">2000-12-29T00:00:00Z</d:ShipDate>' +
-	'				<d:PackageDimensions m:type="#DataJS.Tests.V4.Dimensions">' +
-	'					<d:Length m:type="Decimal">-79228162514264337593543950335</d:Length>' +
-	'					<d:Height m:type="Int16">-32768</d:Height>' +
-	'					<d:Width m:type="Int64">-9223372036854775808</d:Width>' +
-	'					<d:Volume m:type="Double">-1.7976931348623157E+308</d:Volume>' +
-	'				</d:PackageDimensions>' +
-	'			</d:Packaging>' +
-	'			<d:CookedSize m:null="true" />' +
-	'			<d:AlternativeNames m:type="#Collection(String)" />' +
-	'			<d:Providers m:type="#Collection(DataJS.Tests.V4.Provider)" />' +
-	'			<d:SpatialData m:null="true" />' +
-	'		</m:properties>' +
-	'	</content>' +
-	'</entry>' +
-    '</feed>';
-
-    var foodServiceV4MetadataText = '' +
-    '<?xml version="1.0" encoding="utf-8"?>\r\n' +
-    '<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">\r\n' +
-	'<edmx:DataServices>\r\n' +
-	'	<Schema Namespace="DataJS.Tests.V4" xmlns="http://docs.oasis-open.org/odata/ns/edm">\r\n' +
-	'		<EntityType Name="Category">\r\n' +
-	'			<Key>\r\n' +
-	'				<PropertyRef Name="CategoryID" />\r\n' +
-	'			</Key>\r\n' +
-	'			<Property Name="Icon" Type="Edm.Stream" Nullable="false" />\r\n' +
-	'			<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />\r\n' +
-	'			<Property Name="Name" Type="Edm.String" />\r\n' +
-	'			<NavigationProperty Name="Foods" Type="Collection(DataJS.Tests.V4.Food)" Partner="Category" />\r\n' +
-	'		</EntityType>\r\n' +
-	'		<EntityType Name="Food">\r\n' +
-	'			<Key>\r\n' +
-	'				<PropertyRef Name="FoodID" />\r\n' +
-	'			</Key>\r\n' +
-	'			<Property Name="Picture" Type="Edm.Stream" Nullable="false" />\r\n' +
-	'			<Property Name="FoodID" Type="Edm.Int32" Nullable="false" />\r\n' +
-	'			<Property Name="Name" Type="Edm.String" />\r\n' +
-	'			<Property Name="UnitPrice" Type="Edm.Double" Nullable="false" />\r\n' +
-	'			<Property Name="ServingSize" Type="Edm.Decimal" Nullable="false" />\r\n' +
-	'			<Property Name="MeasurementUnit" Type="Edm.String" />\r\n' +
-	'			<Property Name="ProteinGrams" Type="Edm.Byte" Nullable="false" />\r\n' +
-	'			<Property Name="FatGrams" Type="Edm.Int16" Nullable="false" />\r\n' +
-	'			<Property Name="CarbohydrateGrams" Type="Edm.Int32" Nullable="false" />\r\n' +
-	'			<Property Name="CaloriesPerServing" Type="Edm.Int64" Nullable="false" />\r\n' +
-	'			<Property Name="IsAvailable" Type="Edm.Boolean" Nullable="false" />\r\n' +
-	'			<Property Name="ExpirationDate" Type="Edm.DateTimeOffset" Nullable="false" />\r\n' +
-	'			<Property Name="ItemGUID" Type="Edm.Guid" Nullable="false" />\r\n' +
-	'			<Property Name="Weight" Type="Edm.Single" Nullable="false" />\r\n' +
-	'			<Property Name="AvailableUnits" Type="Edm.SByte" Nullable="false" />\r\n' +
-	'			<Property Name="Packaging" Type="DataJS.Tests.V4.Package" />\r\n' +
-	'			<Property Name="CookedSize" Type="DataJS.Tests.V4.CookedDimensions" />\r\n' +
-	'			<Property Name="AlternativeNames" Type="Collection(Edm.String)" Nullable="false" />\r\n' +
-	'			<Property Name="Providers" Type="Collection(DataJS.Tests.V4.Provider)" Nullable="false" />\r\n' +
-	'			<Property Name="SpatialData" Type="Edm.GeometryCollection" SRID="Variable" />\r\n' +
-	'			<NavigationProperty Name="Category" Type="DataJS.Tests.V4.Category" Partner="Foods" />\r\n' +
-	'		</EntityType>\r\n' +
-	'		<EntityType Name="PreparedFood" BaseType="DataJS.Tests.V4.Food">\r\n' +
-	'			<Property Name="Instructions" Type="Edm.String" />\r\n' +
-	'			<Property Name="NumberOfIngredients" Type="Edm.Single" Nullable="false" />\r\n' +
-	'		</EntityType>\r\n' +
-	'		<ComplexType Name="Package">\r\n' +
-	'			<Property Name="Type" Type="Edm.String" />\r\n' +
-	'			<Property Name="Color" Type="Edm.String" />\r\n' +
-	'			<Property Name="NumberPerPackage" Type="Edm.Int32" Nullable="false" />\r\n' +
-	'			<Property Name="RequiresRefridgeration" Type="Edm.Boolean" Nullable="false" />\r\n' +
-	'			<Property Name="ShipDate" Type="Edm.DateTimeOffset" Nullable="false" />\r\n' +
-	'			<Property Name="PackageDimensions" Type="DataJS.Tests.V4.Dimensions" />\r\n' +
-	'		</ComplexType>\r\n' +
-	'		<ComplexType Name="Dimensions">\r\n' +
-	'			<Property Name="Length" Type="Edm.Decimal" Nullable="false" />\r\n' +
-	'			<Property Name="Height" Type="Edm.Int16" Nullable="false" />\r\n' +
-	'			<Property Name="Width" Type="Edm.Int64" Nullable="false" />\r\n' +
-	'			<Property Name="Volume" Type="Edm.Double" Nullable="false" />\r\n' +
-	'		</ComplexType>\r\n' +
-	'		<ComplexType Name="CookedDimensions">\r\n' +
-	'			<Property Name="Length" Type="Edm.Decimal" Nullable="false" />\r\n' +
-	'			<Property Name="Height" Type="Edm.Int16" Nullable="false" />\r\n' +
-	'			<Property Name="Width" Type="Edm.Int64" Nullable="false" />\r\n' +
-	'			<Property Name="Volume" Type="Edm.Double" Nullable="false" />\r\n' +
-	'		</ComplexType>\r\n' +
-	'		<ComplexType Name="Provider">\r\n' +
-	'			<Property Name="Name" Type="Edm.String" />\r\n' +
-	'			<Property Name="Aliases" Type="Collection(Edm.String)" Nullable="false" />\r\n' +
-	'			<Property Name="Details" Type="DataJS.Tests.V4.ProviderDetails" />\r\n' +
-	'		</ComplexType>\r\n' +
-	'		<ComplexType Name="ProviderDetails">\r\n' +
-	'			<Property Name="Telephone" Type="Edm.String" />\r\n' +
-	'			<Property Name="PreferredCode" Type="Edm.Int32" Nullable="false" />\r\n' +
-	'		</ComplexType>\r\n' +
-	'		<Action Name="ResetData">\r\n' +
-	'			<ReturnType Type="Edm.String" />\r\n' +
-	'		</Action>\r\n' +
-	'		<Function Name="FoodsAvailable" IsComposable="true">\r\n' +
-	'			<ReturnType Type="Collection(Edm.String)" />\r\n' +
-	'		</Function>\r\n' +
-	'		<Function Name="PackagingTypes" IsComposable="true">\r\n' +
-	'			<ReturnType Type="Collection(DataJS.Tests.V4.Package)" />\r\n' +
-	'		</Function>\r\n' +
-	'		<Function Name="UserNameAndPassword">\r\n' +
-	'			<ReturnType Type="Edm.String" />\r\n' +
-	'		</Function>\r\n' +
-	'		<EntityContainer Name="FoodContainer">\r\n' +
-	'			<EntitySet Name="Categories" EntityType="DataJS.Tests.V4.Category">\r\n' +
-	'				<NavigationPropertyBinding Path="Foods" Target="Foods" />\r\n' +
-	'			</EntitySet>\r\n' +
-	'			<EntitySet Name="Foods" EntityType="DataJS.Tests.V4.Food">\r\n' +
-	'				<NavigationPropertyBinding Path="Category" Target="Categories" />\r\n' +
-	'			</EntitySet>\r\n' +
-	'			<ActionImport Name="ResetData" Action="DataJS.Tests.V4.ResetData" />\r\n' +
-	'			<FunctionImport Name="FoodsAvailable" Function="DataJS.Tests.V4.FoodsAvailable" IncludeInServiceDocument="true" />\r\n' +
-	'			<FunctionImport Name="PackagingTypes" Function="DataJS.Tests.V4.PackagingTypes" IncludeInServiceDocument="true" />\r\n' +
-	'			<FunctionImport Name="UserNameAndPassword" Function="DataJS.Tests.V4.UserNameAndPassword" IncludeInServiceDocument="true" />\r\n' +
-	'		</EntityContainer>\r\n' +
-	'	</Schema>\r\n' +
-	'</edmx:DataServices>\r\n' +
-    '</edmx:Edmx>';
-
-    djstest.addFullTest(true, function applyEntryCustomizationToEntryTest() {
-        var metadata = parseMetadataHelper(customerSampleMetadataText);
-        var data = { __metadata: { type: "Ns.Customer" }, Name: "Name", LastName: "Last Name", Address: { Street: "Street Value", City: "City Value" }, FavoriteNumber: 123 };
-        var request = { data: data, headers: { "Content-Type": "application/atom+xml"} };
-        OData.atomHandler.write(request, { metadata: metadata });
-
-        djstest.assert(request.body !== null, "request.body !== null");
-        djstest.assert(request.body.indexOf("<a:summary type=\"xhtml\">Name</a:summary>") !== -1, 'request.body.indexOf("<a:summary>Name</a:summary>") !== -1');
-        djstest.assert(request.body.indexOf('baz="Last Name"') !== -1, 'request.body.indexOf(baz="Last Name") !== -1');
-        djstest.assert(request.body.indexOf('city="City Value"') !== -1, 'request.body.indexOf(city="City Value") !== -1');
-        djstest.assert(request.body.indexOf('<prefix:foo ') !== -1, "request.body.indexOf('<prefix:foo ') !== -1");
-        djstest.assert(request.body.indexOf('term="Ns.Customer"') !== -1, "request.body.indexOf(term='Ns.Customer') !== -1");
-        djstest.assert(request.body.indexOf('>123</') !== -1, "request.body.indexOf(>123</) !== -1");
-
-        // Try with other mapping types.
-        metadata.dataServices.schema[0].entityType[0].property[1].FC_ContentKind = "html";
-        request.body = undefined;
-        OData.atomHandler.write(request, { metadata: metadata });
-        djstest.assert(request.body.indexOf("<a:summary type=\"html\">Name</a:summary>") !== -1, 'request.body.indexOf("<a:summary type="html">Name</a:summary>") !== -1');
-
-        // Try with a null value now.
-        request.data.FavoriteNumber = null;
-        request.body = null;
-        OData.atomHandler.write(request, { metadata: metadata });
-        djstest.assert(request.body.indexOf('>123</') === -1, "request.body.indexOf(>123</) === -1");
-        djstest.assert(request.body.indexOf('m:null="true"') !== -1, "request.body.indexOf(m:null=true) !== -1");
-
-        // Try with a null complex type now.
-        request.data.FavoriteNumber = 123;
-        request.data.Address = null;
-        request.body = null;
-        OData.atomHandler.write(request, { metadata: metadata });
-        djstest.assert(request.body.indexOf('Street') === -1, "request.body.indexOf(Street) === -1");
-        djstest.assert(request.body.indexOf('m:null="true"') !== -1, "request.body.indexOf(m:null=true) !== -1");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testParsePrimitivePropertiesBasic() {
-        var feed = "\
-        <entry xml:base=\'http://services.odata.org/OData/OData.svc/\' \r\n\
-               xmlns:d=\'http://schemas.microsoft.com/ado/2007/08/dataservices\' \r\n\
-               xmlns:m=\'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\' \r\n\
-               xmlns:atom=\'http://www.w3.org/2005/Atom\' \r\n\
-               xmlns:app=\'http://www.w3.org/2007/app\' \r\n\
-               xmlns=\'http://www.w3.org/2005/Atom\'>\r\n\
-           <id>http://services.odata.org/OData/OData.svc/the id</id> \r\n \
-           <content type='application/xml'>\r\n \
-            <m:properties xmlns=\'http://schemas.microsoft.com/ado/2007/08/dataservices\'>\r\n \
-             <Boolean m:type='Edm.Boolean'>true</Boolean>\r\n \
-             <Binary m:type='Edm.Binary'>01007A8A680D9E14A64EAC1242DD33C9DB05</Binary>\r\n \
-             <Byte m:type='Edm.Byte'>8</Byte>\r\n \
-             <DateTime m:type='Edm.DateTime'>2010-11-01T15:13:25</DateTime>\r\n \
-             <Decimal m:type='Edm.Decimal'>100.10</Decimal>\r\n \
-             <Guid m:type='Edm.Guid'>12345678-aaaa-bbbb-cccc-ddddeeeeffff</Guid>\r\n \
-             <!-- <Time m:type='Edm.Time'>P05DT12H30M05.125S</Time> --> \r\n \
-             <DateTimeOffset m:type='Edm.DateTimeOffset'>2010-11-01T15:13:25+10:00</DateTimeOffset>\r\n \
-             <Double m:type='Edm.Double'>1E+10</Double>\r\n \
-             <Single m:type='Edm.Single'>100.01</Single>\r\n \
-             <Int16 m:type='Edm.Int16'>16</Int16>\r\n \
-             <Int32 m:type='Edm.Int32'>32</Int32>\r\n \
-             <Int64 m:type='Edm.Int64'>64</Int64>\r\n \
-             <SByte m:type='Edm.SByte'>-8</SByte>\r\n \
-            </m:properties>\r\n \
-           </content>\r\n \
-        </entry>\r\n";
-
-        var response = { body: feed, headers: { "Content-Type": "application/atom+xml"} };
-        OData.atomHandler.read(response, {});
-
-        djstest.assertsExpected(1);
-        ODataReadOracle.readEntryLoopback(feed, function (expectedData) {
-            djstest.assertAreEqualDeep(response.data, expectedData, "Verify deserialized data");
-            djstest.done();
-        });
-    });
-
-    djstest.addFullTest(true, function deserializeCustomizationsNullAndXhtmlTest() {
-        var payload = "<entry " +
-        ' xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" \r\n' +
-        " xmlns:m='http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' \r\n" +
-        " xmlns=\"http://www.w3.org/2005/Atom\">\r\n" +
-        " <id>http://localhost/tests/endpoints/FoodDataService.svc/Foods(1)</id> " +
-        " <author><name>Customer #1</name></author>" +
-        " <summary><b>Name</b></summary>" +
-        " <category term='Ns.Customer' scheme='http://schemas.microsoft.com/ado/2007/08/dataservices/scheme' /> " +
-        " <content type='application/xml'><m:properties><d:ID m:type='Edm.Int32'>1</d:ID>" +
-        " <d:LastName m:null='true' /></m:properties></content>" +
-        "</entry>";
-        var metadata = parseMetadataHelper(customerSampleMetadataText);
-        var response = { body: payload, headers: { "Content-Type": "application/atom+xml"} };
-        OData.atomHandler.read(response, { metadata: metadata });
-
-        djstest.assertAreEqual(response.data.LastName, null, "last name is null");
-        djstest.assertAreEqual(response.data.Name, "<b xmlns=\"http://www.w3.org/2005/Atom\">Name</b>", "name includes tags");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function parseCustomizationSampleTest() {
-        var payload = foodServiceV4FoodsSampleText;
-        var metadata = parseMetadataHelper(foodServiceV4MetadataText);
-        var response = { body: payload, headers: { "Content-Type": "application/atom+xml"} };
-        OData.atomHandler.read(response, { metadata: metadata });
-
-        djstest.assert(response.data !== null, "response.data !== null");
-        djstest.assert(response.data.results !== null, "response.data.results !== null");
-
-        var r = response.data.results;
-        djstest.assertAreEqual(r[0].__metadata.type, "DataJS.Tests.V4.Food", "r[0].__metadata.type");
-        djstest.assertAreEqual(r[0].Name, "flour", "r[0].Name");
-        djstest.assertAreEqual(r[0].UnitPrice, 0.19999, "r[0].UnitPrice");
-        djstest.assertAreEqual(r[0].ServingSize, 1, "r[0].ServingSize");
-
-        // CONSIDER: we intended to have complex type have their type annotation out-of-band, but JSON has it in-line; do we want to normalize this out everywhere?
-        // djstest.assertAreEqual(r[0].Packaging.__metadata.type, "DataJS.Tests.PackageV4", "r[0].Packaging.__metadata.type");
-        djstest.assertAreEqual(r[0].Packaging.Type, null, "package type for flour is null");
-        djstest.assertAreEqual(r[0].Packaging.PackageDimensions.Height, 32767, "r[0].Packaging.PackageDimensions.Height");
-
-        djstest.assertAreEqual(r[0].CookedSize.Length, 2, "r[0].CookedSize.Length");
-        djstest.assertAreEqual(r[0].CookedSize.Volume, 6, "r[0].CookedSize.Volume");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function parseIntoPropertiesTest() {
-        var payload = '' +
-    '<entry xml:base="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity">' +
-	'<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(0)</id>' +
-	'<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
-	'<link rel="edit" title="Food" href="Foods(0)" />' +
-	'<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(0)/Category" />' +
-	'<title />' +
-	'<updated>2013-12-30T06:01:30Z</updated>' +
-	'<author>' +
-	'	<name />' +
-	'</author>' +
-	'<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
-	'<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(0)/Picture" m:etag="W/&quot;123456789&quot;" />' +
-	'<content type="application/xml">' +
-	'	<m:properties>' +
-	'		<d:FoodID m:type="Int32">0</d:FoodID>' +
-	'		<d:Name>flour</d:Name>' +
-	'		<d:UnitPrice m:type="Double">0.19999</d:UnitPrice>' +
-	'		<d:ServingSize m:type="Decimal">1</d:ServingSize>' +
-	'		<d:MeasurementUnit>Cup</d:MeasurementUnit>' +
-	'		<d:ProteinGrams m:type="Byte">3</d:ProteinGrams>' +
-	'		<d:FatGrams m:type="Int16">1</d:FatGrams>' +
-	'		<d:CarbohydrateGrams m:type="Int32">20</d:CarbohydrateGrams>' +
-	'		<d:CaloriesPerServing m:type="Int64">140</d:CaloriesPerServing>' +
-	'		<d:IsAvailable m:type="Boolean">true</d:IsAvailable>' +
-	'		<d:ExpirationDate m:type="DateTimeOffset">2010-12-25T12:00:00Z</d:ExpirationDate>' +
-	'		<d:ItemGUID m:type="Guid">27272727-2727-2727-2727-272727272727</d:ItemGUID>' +
-	'		<d:Weight m:type="Single">10</d:Weight>' +
-	'		<d:AvailableUnits m:type="SByte">1</d:AvailableUnits>' +
-	'		<d:Packaging m:type="#DataJS.Tests.V4.Package">' +
-	'			<d:Type m:null="true" />' +
-	'			<d:Color></d:Color>' +
-	'			<d:NumberPerPackage m:type="Int32">2147483647</d:NumberPerPackage>' +
-	'			<d:RequiresRefridgeration m:type="Boolean">false</d:RequiresRefridgeration>' +
-	'			<d:ShipDate m:type="DateTimeOffset">2000-12-29T00:00:00Z</d:ShipDate>' +
-	'			<d:PackageDimensions m:type="#DataJS.Tests.V4.Dimensions">' +
-	'				<d:Length m:type="Decimal">79228162514264337593543950335</d:Length>' +
-	'				<d:Height m:type="Int16">32767</d:Height>' +
-	'				<d:Width m:type="Int64">9223372036854775807</d:Width>' +
-	'				<d:Volume m:type="Double">1.7976931348623157E+308</d:Volume>' +
-	'			</d:PackageDimensions' +
-	'		</d:Packaging>' +
-	'		<d:CookedSize m:type="#DataJS.Tests.V4.CookedDimensions">' +
-	'			<d:Length m:type="Decimal">2</d:Length>' +
-	'			<d:Height m:type="Int16">1</d:Height>' +
-	'			<d:Width m:type="Int64">3</d:Width>' +
-	'			<d:Volume m:type="Double">6</d:Volume>' +
-	'		</d:CookedSize>' +
-	'		<d:AlternativeNames m:type="#Collection(String)">' +
-	'			<m:element>ground cereal</m:element>' +
-	'			<m:element>ground grain</m:element>' +
-	'		</d:AlternativeNames>' +
-	'		<d:Providers m:type="#Collection(DataJS.Tests.V4.Provider)">' +
-	'			<m:element>' +
-	'				<d:Name>Flour Provider</d:Name>' +
-	'				<d:Aliases m:type="#Collection(String)">' +
-	'					<m:element>fp1</m:element>' +
-	'					<m:element>flour provider1</m:element>' +
-	'				</d:Aliases' +
-	'				<d:Details m:type="#DataJS.Tests.V4.ProviderDetails">' +
-	'					<d:Telephone>555-555-555</d:Telephone>' +
-	'					<d:PreferredCode m:type="Int32">1001</d:PreferredCode>' +
-	'				</d:Details>' +
-	'			</m:element>' +
-	'			<m:element>' +
-	'				<d:Name>Ground Grains</d:Name>' +
-	'				<d:Aliases m:type="#Collection(String)" />' +
-	'				<d:Details m:null="true" />' +
-	'			</m:element>' +
-	'		</d:Providers>' +
-	'		<d:SpatialData m:type="GeometryCollection">' +
-	'			<gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326">' +
-	'				<gml:geometryMembers>' +
-	'					<gml:Point>' +
-	'						<gml:pos>5 5</gml:pos>' +
-	'					</gml:Point>' +
-	'				</gml:geometryMembers>' +
-	'			</gml:MultiGeometry>' +
-	'		</d:SpatialData>' +
-	'	</m:properties>' +
-	'</content>' +
-    '</entry>';
-
-        var metadata = parseMetadataHelper(foodServiceV4MetadataText);
-        var response = { body: payload, headers: { "Content-Type": "application/atom+xml"} };
-        OData.atomHandler.read(response, { metadata: metadata });
-
-        djstest.assert(response.data !== null, "response.data !== null");
-        djstest.assertAreEqual(response.data.__metadata.type, "DataJS.Tests.V4.Food", "types match");
-        djstest.assertAreEqual(response.data.UnitPrice, 0.19999, "Price is as expected");
-        djstest.assertAreEqual(response.data.__metadata.properties.UnitPrice.type, "Edm.Double", "Price was marked as a double");
-
-        djstest.assertAreEqual(response.data.CookedSize.__metadata.properties.Length.type, "Edm.Decimal", "CookedSize.Length was marked as a decimal");
-
-        // When properties are marked on complex type metadata, this assertion will be true as well.
-        // djstest.assertAreEqual(response.data.Packaging.__metadata.Type.type, "Edm.String", "Packaging type was marked as a string");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function parseNullInlineTest() {
-        // Shorter version of:
-        // OData.read("/tests/endpoints/FoodStoreDataService.svc/Foods?$expand=Category&$filter=Category eq null", function(data, response) {
-
-        var body = '' +
-    '<feed xml:base="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:context="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods">' +
-	'<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods</id>' +
-	'<title type="text">Foods</title>' +
-	'<updated>2013-12-30T06:09:18Z</updated>' +
-	'<link rel="self" title="Foods" href="Foods" />' +
-	'<entry>' +
-	'	<id>http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods(2)</id>' +
-	'	<category term="#DataJS.Tests.V4.Food" scheme="http://docs.oasis-open.org/odata/ns/scheme" />' +
-	'	<link rel="edit" title="Food" href="Foods(2)" />' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/related/Category" type="application/atom+xml;type=entry" title="Category" href="Foods(2)/Category">' +
-	'		<m:inline />' +
-	'	</link>' +
-	'	<title />' +
-	'	<updated>2013-12-30T06:09:18Z</updated>' +
-	'	<author>' +
-	'		<name />' +
-	'	</author>' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/mediaresource/Picture" type="image/png" title="Picture" href="http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Picture" />' +
-	'	<link rel="http://docs.oasis-open.org/odata/ns/edit-media/Picture" type="image/png" title="Picture" href="Foods(2)/Picture" m:etag="W/&quot;123456789&quot;" />' +
-	'	<content type="application/xml">' +
-	'		<m:properties>' +
-	'			<d:FoodID m:type="Int32">2</d:FoodID>' +
-	'			<d:Name>1 Chicken Egg</d:Name>' +
-	'			<d:UnitPrice m:type="Double">0.55</d:UnitPrice>' +
-	'			<d:ServingSize m:type="Decimal">1</d:ServingSize>' +
-	'			<d:MeasurementUnit m:null="true" />' +
-	'			<d:ProteinGrams m:type="Byte">6</d:ProteinGrams>' +
-	'		</m:properties>' +
-	'	</content>' +
-	'</entry>' +
-    '</feed>';
-        var response = { body: body, headers: { "Content-Type": "application/atom+xml"} };
-        OData.atomHandler.read(response, {});
-        var data = response.data;
-        var r = data.results[0];
-        djstest.assertAreEqual(r.Category, null, "r.Category is null as an empty inline entry");
-        djstest.assertAreEqual(r.FoodID, 2, "r.FoodID read correctly");
-        djstest.assertAreEqual(r.__metadata.properties.Category.extensions[0].name, "title", "Category title extension parsed");
-        djstest.assertAreEqual(r.__metadata.properties.Category.extensions[0].value, "Category", "Category title value parsed");
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function serializeEpmTest() {
-        var metadata = parseMetadataHelper(foodServiceV4MetadataText);
-        var data = { __metadata: { type: "DataJS.Tests.V4.Food" }, FoodID: 123, Name: "name", CookedSize: { Length: 1, Height: 2, Width: 3, Volume: 4} };
-        var request = { data: data, headers: { "Content-Type": "application/atom+xml"} };
-        OData.atomHandler.write(request, { metadata: metadata });
-        djstest.assert(request.body.indexOf("CookedSize") === -1, "CookedSize element is missing from payload");
-        djstest.assert(request.body.indexOf("length=") !== -1, "length is available as a mapped attribute");
-        djstest.assert(request.body.indexOf("height=") !== -1, "height is available as a mapped attribute");
-        djstest.assert(request.body.indexOf("width=") !== -1, "width is available as a mapped attribute");
-        djstest.assert(request.body.indexOf("volume>") !== -1, "volume is available as a mapped element");
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function writeNullComplexTypeTest() {
-
-        // Verify that the server can be updated to set a complex value to null.
-        var foodSetUrl = "./endpoints/FoodStoreDataServiceV4.svc/Foods";
-        resetFoodData();
-
-        // Without metadata, this will fail because the server version won't be set to 2.0.
-        var metadata = parseMetadataHelper(foodServiceV4MetadataText);
-        OData.read(foodSetUrl + "?$top=1", function (data) {
-            var item = data.results[0];
-            djstest.assert(item.Packaging, "item.Packaging is not null");
-            item.Packaging = null;
-
-            // The server will reject links for PUT operations.
-            delete item.Category;
-
-            OData.request({ method: "PUT", requestUri: item.__metadata.uri, data: item, headers: { "Content-Type": "application/atom+xml"} }, function (data) {
-                // Re-read the item.
-                OData.read(item.__metadata.uri, function (data) {
-                    djstest.assert(data, "data was read successfully again");
-                    djstest.assert(!data.Packaging, "!data.Packaging");
-                    resetFoodData();
-                    djstest.done();
-                }, djstest.failAndDoneCallback("Failed to read back food.", resetFoodData));
-            }, djstest.failAndDoneCallback("Failed to write food"), null, null, metadata);
-        }, djstest.failAndDoneCallback("Failed to read food"), null, null, metadata);
-    });
-
-    djstest.addFullTest(true, function writeNonNullLinkTest() {
-        // Verify that the server can be updated to set a link to null.
-        resetFoodData();
-        var foodSetUrl = "./endpoints/FoodStoreDataServiceV4.svc/Foods";
-        var metadata = parseMetadataHelper(foodServiceV4MetadataText);
-        OData.read(foodSetUrl + "?$top=1", function (data) {
-            var item = data.results[0];
-
-            // Turn this into something different.
-            delete item.__metadata.uri;
-            item.FoodID = 1001;
-
-            OData.request({ method: "POST", requestUri: foodSetUrl, data: item, headers: { "Content-Type": "application/atom+xml"} }, function (data) {
-                // Re-read the item.
-                OData.read(data.__metadata.uri + "?$expand=Category", function (data) {
-                    djstest.assert(data, "data was read successfully again");
-                    djstest.assert(data.Category, "data.Category");
-                    djstest.assert(data.Category.Name, "data.Category.Name");
-                    resetFoodData();
-                    djstest.done();
-                }, djstest.failAndDoneCallback("Failed to read back food.", resetFoodData));
-            }, djstest.failAndDoneCallback("Failed to add modified food"), null, null, metadata);
-        }, djstest.failAndDoneCallback("Failed to read food"), null, null, metadata);
-    });
-
-    djstest.addFullTest(true, function writeNullLinkTest() {
-        // Verify that the server can be updated to set a link to null.
-        resetFoodData();
-        var foodSetUrl = "./endpoints/FoodStoreDataServiceV4.svc/Foods";
-        var metadata = parseMetadataHelper(foodServiceV4MetadataText);
-        OData.read(foodSetUrl + "?$top=1", function (data) {
-            var item = data.results[0];
-
-            // Turn this into something different.
-            delete item.__metadata.uri;
-            item.FoodID = 1001;
-            item.Category = null;
-
-            OData.request({ method: "POST", requestUri: foodSetUrl, data: item, headers: { "Content-Type": "application/atom+xml"} }, function (data) {
-                // Re-read the item.
-                OData.read(data.__metadata.uri + "?$expand=Category", function (data) {
-                    djstest.assert(data, "data was read successfully again");
-                    djstest.assert(!data.Category, "data.Category");
-                    resetFoodData();
-                    djstest.done();
-                }, djstest.failAndDoneCallback("Failed to read back food.", resetFoodData));
-            }, djstest.failAndDoneCallback("Failed to add modified food"), null, null, metadata);
-        }, djstest.failAndDoneCallback("Failed to read food"), null, null, metadata);
-    });
-
-    // DATAJS INTERNAL START
-    djstest.addFullTest(true, function lookupEntityTypeInSchemaTest() {
-        var schemaEmpty = {};
-        var schemaZero = {
-            namespace: "Zero",
-            entityType: [
-                { name: "Genre" },
-                { name: "Language" }
-            ]
-        };
-        var schemaOne = {
-            namespace: "One",
-            entityType: [
-                { name: "Genre1" },
-                { name: "Language1" }
-            ]
-        };
-        var edmx = { dataServices: { schema: [schemaEmpty, schemaZero, schemaOne]} };
-
-        var lookupEntityTypeInSchema = function (name, schema) {
-            return OData.lookupInMetadata(name, schema, "entityType");
-        };
-
-        djstest.assertAreEqual(
-        lookupEntityTypeInSchema("Zero.Genre"),
-        null, "Expected null for missing metadata");
-        djstest.assertAreEqual(
-            lookupEntityTypeInSchema("", schemaEmpty),
-            null, "Expected null for empty type name");
-        djstest.assertAreEqual(
-            lookupEntityTypeInSchema("FooWar", schemaEmpty),
-            null, "Expected null for mismatched name/namespace");
-        djstest.assertAreEqual(
-            lookupEntityTypeInSchema("Zero", schemaZero),
-            null, "Expected null for unqualified type name");
-        djstest.assertAreEqual(
-            lookupEntityTypeInSchema("Zero.Something", schemaZero),
-            null, "Expected null for mismatched type name");
-        djstest.assertAreEqualDeep(
-            lookupEntityTypeInSchema("Zero.Genre", schemaZero),
-            { name: "Genre" }, "Found type by full name");
-
-        djstest.assertAreEqual(
-            lookupEntityTypeInSchema("Zero.Something", edmx),
-            null, "Expected null for mismatched type name in edmx");
-        djstest.assertAreEqualDeep(
-            lookupEntityTypeInSchema("Zero.Genre", edmx),
-            { name: "Genre" }, "Found type by full name in edmx");
-        djstest.assertAreEqualDeep(
-            lookupEntityTypeInSchema("One.Genre1", edmx),
-            { name: "Genre1" }, "Found type by full name in edmx");
-
-        djstest.assertAreEqual(
-            OData.lookupInMetadata("One.Genre1", edmx, "complexType"),
-            null, "Expected null for a complex type lookup of an entity type.");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testLookupEntityType() {
-        var schemaZero = {
-            namespace: "Zero",
-            entityType: [
-                { name: "Genre" },
-                { name: "Language" }
-            ]
-        };
-        var schemaOne = {
-            namespace: "One",
-            entityType: [
-                { name: "Genre1" },
-                { name: "Language1" }
-            ]
-        };
-        var schemaTwo = {
-            namespace: "Two",
-            entityType: [
-                { name: "Genre2" },
-                { name: "Language2" }
-            ]
-        };
-        var edmx = { dataServices: { schema: [schemaZero, schemaOne]} };
-        var metadata = [edmx, schemaTwo];
-
-        djstest.assertAreEqual(
-            OData.lookupEntityType("Zero.Something", metadata),
-            null, "Expected null for mismatched type name in metadata");
-        djstest.assertAreEqualDeep(
-            OData.lookupEntityType("Zero.Genre", null),
-            null, "Expected null for missing metadata");
-        djstest.assertAreEqualDeep(
-            OData.lookupEntityType(null, metadata),
-            null, "Expected null for missing name");
-        djstest.assertAreEqualDeep(
-            OData.lookupEntityType("Zero.Genre", metadata),
-            { name: "Genre" }, "Found type by full name in metadata");
-        djstest.assertAreEqualDeep(
-            OData.lookupEntityType("One.Genre1", metadata),
-            { name: "Genre1" }, "Found type by full name in metadata");
-        djstest.assertAreEqualDeep(
-            OData.lookupEntityType("One.Genre1", edmx),
-            { name: "Genre1" }, "Found type by full name in edmx");
-        djstest.assertAreEqualDeep(
-            OData.lookupEntityType("Two.Genre2", metadata),
-            { name: "Genre2" }, "Found type by full name in metadata");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testParseSimpleServiceDocument() {
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-           <workspace>\r\n\
-              <atom:title>Default</atom:title> \r\n\
-              <collection href=\"Products\">\r\n\
-                <atom:title>Products</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"Categories\">\r\n\
-                <atom:title>Categories</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"Suppliers\">\r\n\
-                <atom:title>Suppliers</atom:title> \r\n\
-              </collection>\r\n\
-            </workspace>\r\n\
-         </service>\r\n";
-
-        var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-
-        djstest.assertAreEqual(serviceDoc.workspaces.length, 1, "Incorrect number of workspaces");
-
-        var workspace = serviceDoc.workspaces[0];
-        djstest.assertAreEqual(workspace.title, "Default", "Incorrect service doc title");
-
-        var expectedCollections = [
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Products", expectedTitle: "Products" },
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Categories", expectedTitle: "Categories" },
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Suppliers", expectedTitle: "Suppliers" }
-        ];
-
-        djstest.assertAreEqual(workspace.collections.length, expectedCollections.length, "Incorrect number of collections in workspace");
-
-        var i, len;
-        for (i = 0, len = expectedCollections.length; i < len; i++) {
-            djstest.assertAreEqual(workspace.collections[i].href, expectedCollections[i].expectedHref, "Incorrect href on collection");
-            djstest.assertAreEqual(workspace.collections[i].title, expectedCollections[i].expectedTitle, "Incorrect title on collection");
-        }
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testServiceDocMustHaveAtLeastOneWorkspaceElement() {
-        // Construct a service doc with no workspaces and verify that the parser throws.
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-         </service>\r\n";
-
-        djstest.expectException(function () {
-            var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-        }, "Parsing service doc with no workspaces");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testServiceDocMayHaveMoreThanOneWorkspaceElement() {
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-           <workspace>\r\n\
-              <atom:title>Default</atom:title> \r\n\
-              <collection href=\"Products\">\r\n\
-                <atom:title>Products</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"Categories\">\r\n\
-                <atom:title>Categories</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"Suppliers\">\r\n\
-                <atom:title>Suppliers</atom:title> \r\n\
-              </collection>\r\n\
-            </workspace>\r\n\
-            <workspace>\r\n\
-              <atom:title>Second Workspace</atom:title> \r\n\
-              <collection href=\"Collection1\">\r\n\
-                <atom:title>Collection Number 1</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"Collection2\">\r\n\
-                <atom:title>Collection Number 2</atom:title> \r\n\
-              </collection>\r\n\
-            </workspace>\r\n\
-         </service>\r\n";
-
-        var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-
-        djstest.assertAreEqual(serviceDoc.workspaces.length, 2, "Incorrect number of workspaces");
-
-        var workspace = serviceDoc.workspaces[0];
-        djstest.assertAreEqual(workspace.title, "Default", "Incorrect service doc title");
-
-        var expectedCollections;
-        expectedCollections = [
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Products", expectedTitle: "Products" },
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Categories", expectedTitle: "Categories" },
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Suppliers", expectedTitle: "Suppliers" }
-        ];
-
-        djstest.assertAreEqual(workspace.collections.length, expectedCollections.length, "Incorrect number of collections in workspace");
-
-        var i, len;
-        for (i = 0, len = expectedCollections.length; i < len; i++) {
-            djstest.assertAreEqual(workspace.collections[i].href, expectedCollections[i].expectedHref, "Incorrect href on collection");
-            djstest.assertAreEqual(workspace.collections[i].title, expectedCollections[i].expectedTitle, "Incorrect title on collection");
-        }
-
-        workspace = serviceDoc.workspaces[1];
-        djstest.assertAreEqual(workspace.title, "Second Workspace", "Incorrect service doc title");
-
-        expectedCollections = [
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Collection1", expectedTitle: "Collection Number 1" },
-            { expectedHref: "http://services.odata.org/OData/OData.svc/Collection2", expectedTitle: "Collection Number 2" }
-        ];
-
-        djstest.assertAreEqual(workspace.collections.length, expectedCollections.length, "Incorrect number of collections in workspace");
-
-        for (i = 0, len = expectedCollections.length; i < len; i++) {
-            djstest.assertAreEqual(workspace.collections[i].href, expectedCollections[i].expectedHref, "Incorrect href on collection");
-            djstest.assertAreEqual(workspace.collections[i].title, expectedCollections[i].expectedTitle, "Incorrect title on collection");
-        }
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testCollectionTitlesAndHrefsMayBeDifferent() {
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-           <workspace>\r\n\
-              <atom:title>Default</atom:title> \r\n\
-              <collection href=\"abc\">\r\n\
-                <atom:title>xyz</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"blah\">\r\n\
-                <atom:title>foo</atom:title> \r\n\
-              </collection>\r\n\
-            </workspace>\r\n\
-         </service>\r\n";
-
-        var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-
-        djstest.assertAreEqual(serviceDoc.workspaces.length, 1, "Incorrect number of workspaces");
-
-        var workspace = serviceDoc.workspaces[0];
-        djstest.assertAreEqual(workspace.title, "Default", "Incorrect service doc title");
-
-        var expectedCollections = [
-            { expectedHref: "http://services.odata.org/OData/OData.svc/abc", expectedTitle: "xyz" },
-            { expectedHref: "http://services.odata.org/OData/OData.svc/blah", expectedTitle: "foo" }
-        ];
-
-        djstest.assertAreEqual(workspace.collections.length, expectedCollections.length, "Incorrect number of collections in workspace");
-
-        var i, len;
-        for (i = 0, len = expectedCollections.length; i < len; i++) {
-            djstest.assertAreEqual(workspace.collections[i].href, expectedCollections[i].expectedHref, "Incorrect href on collection");
-            djstest.assertAreEqual(workspace.collections[i].title, expectedCollections[i].expectedTitle, "Incorrect title on collection");
-        }
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testParserShouldTreatMissingWorkspaceTitleAsBlank() {
-        // Per RFC 5023 Section 8.3.2.1, the workspace element MUST have a title but
-        // in the interests of being permissive, we should treat this as blank.
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-           <workspace>\r\n\
-              <!-- No workspace title element -->\r\n\
-              <collection href=\"Products\">\r\n\
-                <atom:title>Products</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"Categories\">\r\n\
-                <atom:title>Categories</atom:title> \r\n\
-              </collection>\r\n\
-              <collection href=\"Suppliers\">\r\n\
-                <atom:title>Suppliers</atom:title> \r\n\
-              </collection>\r\n\
-            </workspace>\r\n\
-         </service>\r\n";
-
-        var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-
-        djstest.assertAreEqual(serviceDoc.workspaces.length, 1, "Incorrect number of workspaces");
-
-        var workspace = serviceDoc.workspaces[0];
-        djstest.assertAreEqual(workspace.title, "", "Incorrect service doc title");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testWorkspaceMayHaveNoCollections() {
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-           <workspace>\r\n\
-              <atom:title>Default</atom:title> \r\n\
-            </workspace>\r\n\
-         </service>\r\n";
-
-        var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-
-        djstest.assertAreEqual(serviceDoc.workspaces.length, 1, "Incorrect number of workspaces");
-
-        var workspace = serviceDoc.workspaces[0];
-        var expectedCollections = [];
-
-        djstest.assertAreEqual(workspace.collections.length, expectedCollections.length, "Incorrect number of collections in workspace");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testCollectionMustHaveTitleElement() {
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-           <workspace>\r\n\
-              <atom:title>Default</atom:title> \r\n\
-              <collection href=\"Products\">\r\n\
-                <!-- No title element -->\r\n\
-              </collection>\r\n\
-            </workspace>\r\n\
-         </service>\r\n";
-
-        djstest.expectException(function () {
-            var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-        }, "Parsing service doc with a collection with no title element");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function testCollectionMustHaveHrefAttribute() {
-        var serviceDocString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-           <workspace>\r\n\
-              <atom:title>Default</atom:title> \r\n\
-              <!-- href attribute missing below --> \r\n\
-              <collection>\r\n\
-                <atom:title>Products</atom:title> \r\n\
-              </collection>\r\n\
-            </workspace>\r\n\
-         </service>\r\n";
-
-        djstest.expectException(function () {
-            var serviceDoc = OData.atomParser(OData.atomHandler, serviceDocString, {});
-        }, "Parsing service doc with a collection with no href attribute");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadDocumentTest() {
-        var emptyServiceString = "\
-        <service xml:base=\"http://services.odata.org/OData/OData.svc/\" \r\n\
-                 xmlns:atom=\"http://www.w3.org/2005/Atom\" \r\n\
-                 xmlns:app=\"http://www.w3.org/2007/app\" \r\n\
-                 xmlns=\"http://www.w3.org/2007/app\">\r\n\
-          <workspace>\r\n\
-            <atom:title>empty service</atom:title> \r\n\
-          </workspace>\r\n\
-        </service>\r\n";
-
-        var emptyFeedString = "\
-        <feed xml:base=\'http://services.odata.org/OData/OData.svc/\' \r\n\
-              xmlns:app=\'http://www.w3.org/2007/app\' \r\n\
-              xmlns=\'http://www.w3.org/2005/Atom\'> \r\n\
-           <id>feed id</id> \r\n\
-           <title>empty feed</title> \r\n\
-        </feed> \r\n";
-
-        var emptyEntryString = "\
-        <entry xml:base=\'http://services.odata.org/OData/OData.svc/\' \r\n\
-              xmlns:app=\'http://www.w3.org/2007/app\' \r\n\
-              xmlns=\'http://www.w3.org/2005/Atom\'> \r\n\
-           <id>entry id</id> \r\n\
-           <title>empty entry</title> \r\n\
-        </entry> \r\n";
-
-        var nonAtomString = "\
-        <notAtom xml:base=\'http://services.odata.org/OData/OData.svc/\' \r\n\
-              xmlns:app=\'http://www.w3.org/2007/app\' \r\n\
-              xmlns=\'http://www.w3.org/2005/Atom\'> \r\n\
-           <id>entry id</id> \r\n\
-           <title>empty entry</title> \r\n\
-        </notAtom> \r\n";
-
-        var service = OData.atomReadDocument(datajs.xmlParse(emptyServiceString).documentElement);
-        var feed = OData.atomReadDocument(datajs.xmlParse(emptyFeedString).documentElement);
-        var entry = OData.atomReadDocument(datajs.xmlParse(emptyEntryString).documentElement);
-        var nonAtom = OData.atomReadDocument(datajs.xmlParse(nonAtomString).documentElement);
-
-        djstest.assert(service && service.workspaces.length === 1, "atomReadDocument deserialized a service document");
-        djstest.assert(feed && feed.results.length === 0, "atomReadDocument deserialized a feed document");
-        djstest.assert(entry && !entry.results && entry.__metadata.uri === "http://services.odata.org/OData/OData.svc/entry id", "atomReadDocument deserialized a entry document");
-        djstest.assertAreEqual(nonAtom, undefined, "atomReadDocument returns undefined with non Atom input");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadFeedWithActionsAndFunctionsTest() {
-        var feed = "\r\n\
-        <feed xml:base='http://services.odata.org/OData/OData.svc/' \r\n\
-              xmlns:app='http://www.w3.org/2007/app' \r\n\
-              xmlns:m='http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' \r\n\
-              xmlns:me='http://myExtensions' \r\n\
-              xmlns='http://www.w3.org/2005/Atom'> \r\n\
-           <id>feed id</id> \r\n\
-           <title>test feed</title> \r\n\
-           <m:action metadata='#EntityContainer.Action1' title='Action1' target='http://service/entities(0)/action' /> \r\n\
-           <m:action metadata='#EntityContainer.Action2' title='Action2' target='entities(0)/action2'/> \r\n\
-           <m:action metadata='http://someService/$metadata#Container.Action1' title='Action1' target='http://someService/action' /> \r\n\
-           <m:function metadata='#EntityContainer.Function1' title='Function1' target='http://service/entities(0)/function' /> \r\n\
-           <m:function metadata='#EntityContainer.Function2' title='Function2' target='entities(0)/function2' /> \r\n\
-           <m:function metadata='http://someService/$metadata#Container.Function1' title='Function1' target='http://someService/function' /> \r\n\
-        </feed> \r\n";
-
-        var expected = {
-            __metadata: {
-                uri: "http://services.odata.org/OData/OData.svc/feed id",
-                uri_extensions: [],
-                title: "test feed",
-                title_extensions: [],
-                feed_extensions: [],
-                actions: [
-                    {
-                        metadata: "#EntityContainer.Action1",
-                        title: "Action1",
-                        target: "http://service/entities(0)/action",
-                        extensions: []
-                    },
-                    {
-                        metadata: "#EntityContainer.Action2",
-                        title: "Action2",
-                        target: "http://services.odata.org/OData/OData.svc/entities(0)/action2",
-                        extensions: []
-                    },
-                    {
-                        metadata: "http://someService/$metadata#Container.Action1",
-                        title: "Action1",
-                        target: "http://someService/action",
-                        extensions: []
-                    }
-                ],
-                functions: [
-                    {
-                        metadata: "#EntityContainer.Function1",
-                        title: "Function1",
-                        target: "http://service/entities(0)/function",
-                        extensions: []
-                    },
-                    {
-                        metadata: "#EntityContainer.Function2",
-                        title: "Function2",
-                        target: "http://services.odata.org/OData/OData.svc/entities(0)/function2",
-                        extensions: []
-                    },
-                    {
-                        metadata: "http://someService/$metadata#Container.Function1",
-                        title: "Function1",
-                        target: "http://someService/function",
-                        extensions: []
-                    }
-                ]
-            },
-            results: []
-        };
-
-        var response = { headers: { "Content-Type": "application/atom+xml", "OData-Version": "4.0" }, body: feed };
-
-        OData.atomHandler.read(response);
-        djstest.assertAreEqualDeep(response.data, expected, "atomReadEntry didn't return the expected entry object");
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadFeedExtensionsTest() {
-        var feedWithExtensionsString = "\
-         <feed xml:base=\'http://services.odata.org/OData/OData.svc/\' \r\n\
-              xmlns:app=\'http://www.w3.org/2007/app\' \r\n\
-              xmlns:me=\'http://myExtensions' \r\n\
-              xmlns=\'http://www.w3.org/2005/Atom\' attr1=\'a1\' me:attr2=\'a2\'> \r\n\
-           <me:element1>e1</me:element1> \r\n\
-           <me:element2> \r\n\
-               <me:element21 attr3=\'a3\' me:attr4=\'a4\' >e1</me:element21> \r\n\
-           </me:element2> \r\n\
-           <id>feed id</id> \r\n\
-           <title>test feed</title> \r\n\
-        </feed> \r\n"
-
-        var feed = OData.atomReadFeed(datajs.xmlParse(feedWithExtensionsString).documentElement);
-        djstest.assert(feed, "atomReadFeed didn't return a feed object for a payload with feed extensions");
-        djstest.assertAreEqual(feed.__metadata.feed_extensions.length, 4, "atomReadFeed didn't return the expected number of extensions");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadFeedLinksTest() {
-        var feedLinksString = "\
-        <feed xml:base=\'http://services.odata.org/OData/OData.svc/\' \r\n\
-              xmlns:app=\'http://www.w3.org/2007/app\' \r\n\
-              xmlns:me=\'http://myExtensions\' \r\n\
-              xmlns=\'http://www.w3.org/2005/Atom\'> \r\n\
-          <link rel=\'next\' href=\'http://nexturi\' me:attr1=\'a1\' attr2=\'a2\'/> \r\n\
-          <link rel=\'self\' href=\'http://selfuri\' me:attr3=\'a1\' attr4=\'a2\'/> \r\n\
-          <link rel=\'alternate\' href=\'http://otheruri\'/> \r\n\
-        </feed> \r\n";
-
-        var root = datajs.xmlParse(feedLinksString).documentElement;
-        var feed = { __metadata: {} };
-        datajs.xmlChildElements(root, function (child) {
-            OData.atomReadFeedLink(child, feed);
-        });
-
-        djstest.assertAreEqual(feed.__next, "http://nexturi", "atomReadFeedLink didn't read the next link element");
-        djstest.assertAreEqual(feed.__metadata.next_extensions.length, 2, "atomReadFeedLink didn't return the expected number of next link extensions");
-        djstest.assertAreEqual(feed.__metadata.self, "http://selfuri", "atomReadFeedLink didn't read the self link element");
-        djstest.assertAreEqual(feed.__metadata.self_extensions.length, 2, "atomReadFeedLink didn't return the expected number of self link extensions");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadLinkTest() {
-        var linkString = "\
-        <link xmlns:me=\'http://myExtensions\' \r\n\
-              xmlns=\'http://www.w3.org/2005/Atom\' \r\n\
-              rel=\'next\' \r\n\
-              href=\'http://nexturi\' \r\n\
-              type=\'application/atom+xml;type=feed\' \r\n\
-              me:attr1=\'a1\' \r\n\
-              attr2=\'a2\'/> \r\n";
-
-        var link = OData.atomReadLink(datajs.xmlParse(linkString).documentElement);
-
-        djstest.assert(link, "atomReadLink didn't return a link object");
-        djstest.assertAreEqual(link.href, "http://nexturi", "atomReadLink, link object href field has an unexpected value");
-        djstest.assertAreEqual(link.rel, "next", "atomReadLink, link object rel field has an unexpected value");
-        djstest.assertAreEqual(link.type, "application/atom+xml;type=feed", "atomReadLink, link object type field has an unexpected value");
-        djstest.assertAreEqual(link.extensions.length, 2, "atomReadLink, link object extensions doesn't have the expected number of extensions");
-
-        djstest.done();
-
-    });
-
-    djstest.addFullTest(true, function atomReadLinkThrowHrefMissingTest() {
-        var linkString = "\
-        <link xmlns:me=\'http://myExtensions\' \r\n\
-              xmlns=\'http://www.w3.org/2005/Atom\' \r\n\
-              rel=\'next\' \r\n\
-              type=\'application/atom+xml;type=feed\' \r\n\
-              me:attr1=\'a1\' \r\n\
-              attr2=\'a2\'/> \r\n";
-
-
-        var linkRoot = datajs.xmlParse(linkString).documentElement;
-        djstest.expectException(function () {
-            OData.atomReadLink(linkRoot);
-        }, "atomReadLink didn't throw an exception when the link doesn't have the href attribute");
-        djstest.done();
-
-    });
-
-    djstest.addFullTest(true, function atomReadExtensionElementTest() {
-        var extensionString = "\
-        <me:ext xmlns:me=\'http://myExtensions\' me:attr1=\'a1\' attr2=\'a2\'> \r\n\
-          <ext>e1</ext> \r\n\
-        </me:ext> \r\n";
-
-        var validateExtension = function (ext, name, namespaceURI, attributeCount, childrenCount, value) {
-            djstest.assertAreEqual(ext.name, name, "atomReadExtensionElement, extension object name field has an unexpected value");
-            djstest.assertAreEqual(ext.namespaceURI, namespaceURI, "atomReadExtensionElement, extension object namespaceURI field has an unexpected value");
-            djstest.assertAreEqual(ext.attributes.length, attributeCount, "atomReadExtensionElement, extension object attributes doesn't have the expected number of attributes");
-            djstest.assertAreEqual(ext.children.length, childrenCount, "atomReadExtensionElement, extension object attributes doesn't have the expected number of children");
-            djstest.assertAreEqual(ext.value, value, "atomReadExtensionElement, extension object value field has an unexpected value");
-        };
-
-        var extension = OData.atomReadExtensionElement(datajs.xmlParse(extensionString).documentElement);
-        validateExtension(extension, "ext", "http://myExtensions", 2, 1);
-
-        extension = extension.children[0];
-        validateExtension(extension, "ext", null, 0, 0, "e1");
-
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadExtensionAttributesTest() {
-        var extensionString = "\
-        <me:ext xmlns:me=\'http://myExtensions\' me:attr1=\'a1\' attr2=\'a2\' /> \r\n";
-
-        var extensionAttributes = OData.atomReadExtensionAttributes(datajs.xmlParse(extensionString).documentElement);
-        djstest.assertAreEqual(extensionAttributes.length, 2, "atomReadExtensionAttribute, returned collection doesn't have the expected number of attributes");
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadExtensionAttributeTest() {
-
-        var tests = {
-            "extension with namespace": {
-                i: '<me:ext xmlns:me="http://myExtensions" me:attr1="a1" />',
-                e: { name: "attr1", namespaceURI: "http://myExtensions", value: "a1" }
-            },
-            "extension without namespace": {
-                i: '<me:ext xmlns:me="http://myExtensions" attr2="a2" />',
-                e: { name: "attr2", namespaceURI: null, value: "a2" }
-            }
-        };
-
-        for (var name in tests) {
-            var test = tests[name];
-            var xmlElement = datajs.xmlParse(test.i).documentElement;
-            var extensions = OData.atomReadExtensionAttributes(xmlElement);
-
-            djstest.assertAreEqualDeep(extensions[0], test.e, name + " - extension object is the expected one");
-        }
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadEntryTest() {
-        var entryString = "\
-        <entry xml:base=\'http://services.odata.org/OData/OData.svc/\' \r\n\
-               xmlns:d2=\'http://schemas.microsoft.com/ado/2007/08/dataservices\' \r\n\
-               xmlns:m2=\'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\' \r\n\
-               xmlns:atom=\'http://www.w3.org/2005/Atom\' \r\n\
-               xmlns:app=\'http://www.w3.org/2007/app\' \r\n\
-               xmlns=\'http://www.w3.org/2005/Atom\'> \r\n\
-           <id>the id</id> \r\n\
-           <category term=\'the type\' \r\n\
-                     scheme=\'http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\' /> \r\n\
-           <content type=\'application/xml\'> \r\n\
-            <m2:properties xmlns=\'http://schemas.microsoft.com/ado/2007/08/dataservices\'>\r\n\
-             <Untyped>untyped value</Untyped> \r\n\
-             <Typed m2:type='Edm.Int32'>100</Typed> \r\n\
-            </m2:properties> \r\n\
-           </content> \r\n\
-           <link rel=\'self\' href=\'http://selfuri\' /> \r\n\
-        </entry>\r\n";
-
-        var expectedEntry = {
-            __metadata: {
-                uri: "http://services.odata.org/OData/OData.svc/the id",
-                uri_extensions: [],
-                type: "the type",
-                type_extensions: [],
-                self: "http://selfuri",
-                self_link_extensions: [],
-                properties: {
-                    Untyped: {
-                        type: "Edm.String",
-                        extensions: []
-                    },
-                    Typed: {
-                        type: "Edm.Int32",
-                        extensions: []
-                    }
-                }
-            },
-            Untyped: "untyped value",
-            Typed: 100
-        };
-
-        var entry = OData.atomReadEntry(datajs.xmlParse(entryString).documentElement);
-
-        djstest.assert(entry, "atomReadEntry didn't return an entry object");
-        djstest.assertAreEqualDeep(entry, expectedEntry);
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadEntryGmlCRSValueTest() {
-        var entryXml =
-            "<entry                                                                          \r\n\
-               xmlns:m='http://schemas.microsoft.com/ado/2007/08/dataservices/metadata'      \r\n\
-               xmlns='http://www.w3.org/2005/Atom'>                                          \r\n\
-               <content type='application/xml'>                                              \r\n\
-               <m:properties xmlns='http://schemas.microsoft.com/ado/2007/08/dataservices'   \r\n\
-                           xmlns:gml='http://www.opengis.net/gml'>                           \r\n\
-                 <PointQualified>                                                            \r\n\
-                   <gml:Point gml:srsName='http://www.opengis.net/def/crs/EPSG/0/1234'>      \r\n\
-                      <gml:pos>1 2 3 4</gml:pos>                                             \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </PointQualified>                                                           \r\n\
-                 <PointUnQualified>                                                          \r\n\
-                   <gml:Point srsName='http://www.opengis.net/def/crs/EPSG/0/5678'>          \r\n\
-                      <gml:pos>5 6 7 8</gml:pos>                                             \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </PointUnQualified>                                                         \r\n\
-               </m:properties>                                                               \r\n\
-              </content>                                                                     \r\n\
-            </entry>";
-
-        var entry = {
-            __metadata: {
-                properties: {
-                    PointQualified: { type: "Edm.Geometry", extensions: [] },
-                    PointUnQualified: { type: "Edm.Geometry", extensions: [] }
-                }
-            },
-            PointQualified: {
-                __metadata: { type: "Edm.Geometry" },
-                crs: {
-                    type: "name",
-                    properties: {
-                        name: "EPSG:1234"
-                    }
-                },
-                type: "Point",
-                coordinates: [1, 2, 3, 4]
-            },
-            PointUnQualified: {
-                __metadata: { type: "Edm.Geometry" },
-                crs: {
-                    type: "name",
-                    properties: {
-                        name: "EPSG:5678"
-                    }
-                },
-                type: "Point",
-                coordinates: [5, 6, 7, 8]
-            }
-        };
-
-        var response = { headers: { "Content-Type": "application/atom+xml" }, body: entryXml };
-
-        OData.atomHandler.read(response);
-        djstest.assertAreEqualDeep(response.data, entry, "Entry was read successfully");
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadEntryGmlUnknownCRSValueThrowsTest() {
-        var entryXml =
-            "<entry                                                                          \r\n\
-               xmlns:m='http://schemas.microsoft.com/ado/2007/08/dataservices/metadata'      \r\n\
-               xmlns='http://www.w3.org/2005/Atom'>                                          \r\n\
-               <content type='application/xml'>                                              \r\n\
-               <m:properties xmlns='http://schemas.microsoft.com/ado/2007/08/dataservices'   \r\n\
-                           xmlns:gml='http://www.opengis.net/gml'>                           \r\n\
-                 <Point>                                                                     \r\n\
-                   <gml:Point srsName='http://www.opengis.net/def/crs/EPSG/1/1234'>          \r\n\
-                      <gml:pos>1 2 3 4</gml:pos>                                             \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </Point>                                                                     \r\n\
-               </m:properties>                                                               \r\n\
-              </content>                                                                     \r\n\
-            </entry>";
-
-        var response = { headers: { "Content-Type": "application/atom+xml" }, body: entryXml };
-
-        try {
-            OData.atomHandler.read(response);
-            djstest.fail("An exception was expected");
-        } catch (e) {
-            djstest.assert(e.message.indexOf("Unsupported srs name:") === 0, "Error is the expected one");
-        }
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadEntryGmlPointValueTest() {
-        var entryXml =
-            "<entry                                                                          \r\n\
-               xmlns:m='http://schemas.microsoft.com/ado/2007/08/dataservices/metadata'      \r\n\
-               xmlns='http://www.w3.org/2005/Atom'>                                          \r\n\
-               <content type='application/xml'>                                              \r\n\
-               <m:properties xmlns='http://schemas.microsoft.com/ado/2007/08/dataservices'   \r\n\
-                           xmlns:gml='http://www.opengis.net/gml'>                           \r\n\
-                 <Point>                                                                     \r\n\
-                   <gml:Point>                                                               \r\n\
-                      <gml:pos>1 2 -3 4</gml:pos>                                             \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </Point>                                                                    \r\n\
-                 <PointWithExtraTags>                                                        \r\n\
-                   <gml:Point>                                                               \r\n\
-                      <gml:name>the point</gml:name>                                         \r\n\
-                      <gml:pos>5 6 7 8</gml:pos>                                             \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </PointWithExtraTags>                                                       \r\n\
-                 <EmptyPoint >                                                               \r\n\
-                   <gml:Point>                                                               \r\n\
-                      <gml:pos/>                                                             \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </EmptyPoint>                                                               \r\n\
-                 <PointWithSpacesInValue>                                                    \r\n\
-                   <gml:Point>                                                               \r\n\
-                      <gml:pos>  8  9 10   11      12 </gml:pos>                             \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </PointWithSpacesInValue>                                                   \r\n\
-                 <PointWithSingleValue>                                                      \r\n\
-                   <gml:Point>                                                               \r\n\
-                      <gml:pos>13</gml:pos>                                                  \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </PointWithSingleValue>                                                     \r\n\
-                 <PointWithSingleValueAndSpaces>                                             \r\n\
-                   <gml:Point>                                                               \r\n\
-                      <gml:pos> 14 </gml:pos>                                                \r\n\
-                   </gml:Point>                                                              \r\n\
-                 </PointWithSingleValueAndSpaces>                                            \r\n\
-              </m:properties>                                                                \r\n\
-              </content>                                                                     \r\n\
-            </entry>";
-
-        var entry = {
-            __metadata: {
-                properties: {
-                    Point: { type: "Edm.Geometry", extensions: [] },
-                    PointWithExtraTags: { type: "Edm.Geometry", extensions: [] },
-                    EmptyPoint: { type: "Edm.Geometry", extensions: [] },
-                    PointWithSpacesInValue: { type: "Edm.Geometry", extensions: [] },
-                    PointWithSingleValue: { type: "Edm.Geometry", extensions: [] },
-                    PointWithSingleValueAndSpaces: { type: "Edm.Geometry", extensions: [] }
-                }
-            },
-            Point: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "Point",
-                coordinates: [1, 2, -3, 4]
-            },
-            PointWithExtraTags: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "Point",
-                coordinates: [5, 6, 7, 8]
-            },
-            EmptyPoint: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "Point",
-                coordinates: []
-            },
-            PointWithSpacesInValue: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "Point",
-                coordinates: [8, 9, 10, 11, 12]
-            },
-            PointWithSingleValue: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "Point",
-                coordinates: [13]
-            },
-            PointWithSingleValueAndSpaces: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "Point",
-                coordinates: [14]
-            }
-        };
-
-        var response = { headers: { "Content-Type": "application/atom+xml" }, body: entryXml };
-
-        OData.atomHandler.read(response);
-        djstest.assertAreEqualDeep(response.data, entry, "Entry was read successfully");
-        djstest.done();
-    });
-
-    djstest.addFullTest(true, function atomReadEntryGmlLineStringValueTest() {
-        var entryXml =
-            "<entry                                                                          \r\n\
-               xmlns:m='http://schemas.microsoft.com/ado/2007/08/dataservices/metadata'      \r\n\
-               xmlns='http://www.w3.org/2005/Atom'>                                          \r\n\
-               <content type='application/xml'>                                              \r\n\
-                <m:properties xmlns='http://schemas.microsoft.com/ado/2007/08/dataservices'  \r\n\
-                             xmlns:gml='http://www.opengis.net/gml'>                         \r\n\
-                 <LineStringExtraTags>                                                       \r\n\
-                   <gml:LineString>                                                          \r\n\
-                     <gml:name>the line</gml:name>                                           \r\n\
-                     <gml:posList>1.0 2.0 3.0 4.0</gml:posList>                              \r\n\
-                   </gml:LineString>                                                         \r\n\
-                 </LineStringExtraTags>                                                      \r\n\
-                 <LineStringPosList>                                                         \r\n\
-                   <gml:LineString>                                                          \r\n\
-                     <gml:posList>5.0 6.0 7.0 8.0</gml:posList>                              \r\n\
-                   </gml:LineString>                                                         \r\n\
-                 </LineStringPosList>                                                        \r\n\
-                 <LineStringEmptyPosList>                                                    \r\n\
-                   <gml:LineString>                                                          \r\n\
-                     <gml:posList/>                                                          \r\n\
-                   </gml:LineString>                                                         \r\n\
-                 </LineStringEmptyPosList>                                                   \r\n\
-                 <LineStringPosAndPoint>                                                     \r\n\
-                   <gml:LineString>                                                          \r\n\
-                     <gml:pos>7 8</gml:pos>                                                  \r\n\
-                     <gml:pointProperty>                                                     \r\n\
-                        <gml:Point>                                                          \r\n\
-                          <gml:pos>9 10 11 12</gml:pos>                                      \r\n\
-                        </gml:Point>                                                         \r\n\
-                     </gml:pointProperty>                                                    \r\n\
-                   </gml:LineString>                                                         \r\n\
-                 </LineStringPosAndPoint>                                                    \r\n\
-                 <LineStringEmptyPosAndPoint>                                                \r\n\
-                   <gml:LineString>                                                          \r\n\
-                     <gml:pos/>                                                              \r\n\
-                     <gml:pointProperty>                                                     \r\n\
-                        <gml:Point>                                                          \r\n\
-                          <gml:pos/>                                                         \r\n\
-                        </gml:Point>                                                         \r\n\
-                     </gml:pointProperty>                                                    \r\n\
-                   </gml:LineString>                                                         \r\n\
-                 </LineStringEmptyPosAndPoint>                                               \r\n\
-               </m:properties>                                                               \r\n\
-              </content>                                                                     \r\n\
-            </entry>";
-
-        var entry = {
-            __metadata: {
-                properties: {
-                    LineStringExtraTags: { type: "Edm.Geometry", extensions: [] },
-                    LineStringPosList: { type: "Edm.Geometry", extensions: [] },
-                    LineStringEmptyPosList: { type: "Edm.Geometry", extensions: [] },
-                    LineStringPosAndPoint: { type: "Edm.Geometry", extensions: [] },
-                    LineStringEmptyPosAndPoint: { type: "Edm.Geometry", extensions: [] }
-                }
-            },
-            LineStringExtraTags: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "LineString",
-                coordinates: [[1, 2], [3, 4]]
-            },
-            LineStringPosList: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "LineString",
-                coordinates: [[5, 6], [7, 8]]
-            },
-            LineStringEmptyPosList: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "LineString",
-                coordinates: []
-            },
-            LineStringPosAndPoint: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "LineString",
-                coordinates: [[7, 8], [9, 10, 11, 12]]
-            },
-            LineStringEmptyPosAndPoint: {
-                __metadata: { type: "Edm.Geometry" },
-                type: "LineString",
-           

<TRUNCATED>

[4/4] git commit: Remove the "Atom" related dev and test codes

Posted by bi...@apache.org.
Remove the "Atom" related dev and test codes


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/commit/014949ce
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/014949ce
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/014949ce

Branch: refs/heads/master
Commit: 014949ce96ce8e61366610ffcaef247003878610
Parents: 690b0d5
Author: Bing Li <bi...@apache.org>
Authored: Mon Jul 21 17:59:37 2014 +0800
Committer: Bing Li <bi...@apache.org>
Committed: Mon Jul 21 17:59:37 2014 +0800

----------------------------------------------------------------------
 datajs/JSLib.csproj                             |    3 -
 datajs/src/lib/odata.js                         |   12 +-
 datajs/src/lib/odata/atom.js                    | 1421 ------
 datajs/src/lib/odata/json.js                    |    2 +-
 datajs/tests/code/atomreader.cs                 |  815 ---
 datajs/tests/common/ODataReadOracle.js          |   27 +-
 datajs/tests/common/ODataReadOracle.svc         |   83 +-
 ...cache-large-collection-functional-tests.html |   24 +-
 ...s-cache-large-collection-functional-tests.js |    2 +-
 datajs/tests/datajs-cache-long-haul-tests.html  |   21 +-
 datajs/tests/datajs-startup-perf-test.html      |    3 +-
 datajs/tests/odata-atom-tests.js                | 4745 ------------------
 datajs/tests/odata-batch-functional-tests.js    |    2 +-
 datajs/tests/odata-batch-tests.js               |    8 +-
 .../odata-cache-filter-functional-tests.html    |   28 +-
 .../odata-cache-filter-functional-tests.js      |    2 +-
 datajs/tests/odata-cache-fperf-tests.html       |   28 +-
 datajs/tests/odata-cache-functional-tests.html  |   25 -
 datajs/tests/odata-cache-functional-tests.js    |    2 +-
 .../tests/odata-cache-rx-functional-tests.html  |   25 -
 datajs/tests/odata-cache-rx-functional-tests.js |    2 +-
 datajs/tests/odata-fuzz.html                    |   28 +-
 datajs/tests/odata-handler-tests.js             |   14 +-
 datajs/tests/odata-json-tests.js                |  120 +-
 datajs/tests/odata-links-functional-tests.html  |   16 -
 datajs/tests/odata-links-functional-tests.js    |    2 +-
 ...ata-metadata-awareness-functional-tests.html |   16 -
 ...odata-metadata-awareness-functional-tests.js |    4 +-
 datajs/tests/odata-perf-tests.html              |   16 -
 datajs/tests/odata-perf-tests.js                |    1 -
 datajs/tests/odata-qunit-tests.htm              |   26 -
 ...odata-read-crossdomain-functional-tests.html |   25 -
 .../odata-read-crossdomain-functional-tests.js  |    1 -
 datajs/tests/odata-read-functional-tests.html   |   16 -
 datajs/tests/odata-read-functional-tests.js     |    6 +-
 .../tests/odata-request-functional-tests.html   |   15 -
 datajs/tests/odata-request-functional-tests.js  |   26 +-
 datajs/tests/odata-tests.js                     |    2 +-
 38 files changed, 65 insertions(+), 7549 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/JSLib.csproj
----------------------------------------------------------------------
diff --git a/datajs/JSLib.csproj b/datajs/JSLib.csproj
index 2c196f2..e9c66fe 100644
--- a/datajs/JSLib.csproj
+++ b/datajs/JSLib.csproj
@@ -47,7 +47,6 @@
     <Content Include="src\lib\datajs\deferred.js" />
     <Content Include="src\lib\datajs\utils.js" />
     <Content Include="src\lib\datajs\xml.js" />
-    <Content Include="src\lib\odata\atom.js" />
     <Content Include="src\lib\odata\batch.js" />
     <Content Include="src\lib\odata\gml.js" />
     <Content Include="src\lib\odata\handler.js" />
@@ -87,7 +86,6 @@
     <Content Include="tests\datajs-cache-large-collection-functional-tests.html" />
     <Content Include="tests\datajs-cache-large-collection-functional-tests.js" />
     <Content Include="tests\datajs-cache-long-haul-tests.html" />
-    <Content Include="tests\odata-atom-tests.js" />
     <Content Include="tests\odata-batch-functional-tests.html" />
     <Content Include="tests\odata-batch-functional-tests.js" />
     <Content Include="tests\odata-batch-tests.js" />
@@ -130,7 +128,6 @@
     </Content>
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="tests\code\AtomReader.cs" />
     <Compile Include="tests\code\CsdlReader.cs" />
     <Compile Include="tests\code\JsDate.cs" />
     <Compile Include="tests\code\JsonObject.cs" />

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/src/lib/odata.js
----------------------------------------------------------------------
diff --git a/datajs/src/lib/odata.js b/datajs/src/lib/odata.js
index 0da9108..b1abcd6 100644
--- a/datajs/src/lib/odata.js
+++ b/datajs/src/lib/odata.js
@@ -24,7 +24,6 @@ var odataMetadata = exports.metadata  = require('./odata/metadata.js');
 var odataNet      = exports.net       = require('./odata/net.js');
                     exports.gml       = require('./odata/gml.js');
 var odataJson     = exports.json      = require('./odata/json.js');
-var odataAtom     = exports.atom      = require('./odata/atom.js');
 var odataXml      = exports.xml       = require('./odata/xml.js');
                     exports.batch     = require('./odata/batch.js');
                     
@@ -48,8 +47,7 @@ var metadataParser = odataMetadata.metadataParser;
 
 // CONTENT START
 
-// to do: disable atom scenario
-var handlers = [odataJson.jsonHandler/*, odata.atomHandler*/, odataXml.xmlHandler, odataHandler.textHandler];
+var handlers = [odataJson.jsonHandler, odataXml.xmlHandler, odataHandler.textHandler];
 
 var dispatchHandler = function (handlerMethod, requestOrResponse, context) {
     /// <summary>Dispatches an operation to handlers.</summary>
@@ -77,7 +75,7 @@ exports.defaultError = throwErrorCallback;
 
 exports.defaultHandler = {
         read: function (response, context) {
-            /// <summary>Reads the body of the specified response by delegating to JSON and ATOM handlers.</summary>
+            /// <summary>Reads the body of the specified response by delegating to JSON handlers.</summary>
             /// <param name="response">Response object.</param>
             /// <param name="context">Operation context.</param>
 
@@ -87,7 +85,7 @@ exports.defaultHandler = {
         },
 
         write: function (request, context) {
-            /// <summary>Write the body of the specified request by delegating to JSON and ATOM handlers.</summary>
+            /// <summary>Write the body of the specified request by delegating to JSON handlers.</summary>
             /// <param name="request">Reques tobject.</param>
             /// <param name="context">Operation context.</param>
 
@@ -95,7 +93,7 @@ exports.defaultHandler = {
         },
 
         maxDataServiceVersion: MAX_DATA_SERVICE_VERSION,
-        accept: "application/json;q=0.9, application/atomsvc+xml;q=0.8, */*;q=0.1"
+        accept: "application/json;q=0.9, */*;q=0.1"
     };
 
 exports.defaultMetadata = []; //TODO check why is the defaultMetadata an Array? and not an Object.
@@ -168,7 +166,7 @@ exports.request = function (request, success, error, handler, httpClient, metada
 
 exports.parseMetadata = function (csdlMetadataDocument) {
     /// <summary>Parses the csdl metadata to DataJS metatdata format. This method can be used when the metadata is retrieved using something other than DataJS</summary>
-    /// <param name="atomMetadata" type="string">A string that represents the entire csdl metadata.</param>
+    /// <param name="csdlMetadata" type="string">A string that represents the entire csdl metadata.</param>
     /// <returns type="Object">An object that has the representation of the metadata in Datajs format.</returns>
 
     return metadataParser(null, csdlMetadataDocument);

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/src/lib/odata/atom.js
----------------------------------------------------------------------
diff --git a/datajs/src/lib/odata/atom.js b/datajs/src/lib/odata/atom.js
deleted file mode 100644
index 7ce3686..0000000
--- a/datajs/src/lib/odata/atom.js
+++ /dev/null
@@ -1,1421 +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.
- */
-
-/* {
-    oldname:'odata-atom.js',
-    updated:'20140514 12:59'
-}*/
-
-var utils    = require('./../datajs.js').utils;
-var xml      = require('./../datajs.js').xml;
-//var xml      = require('./../datajs/xml.js').xml;
-var odataXML = require('./xml.js');
-var odataUtils = require('./utils.js');
-var odataHandler = require('./handler.js');
-
-
-// imports
-var contains  = utils.contains;
-var djsassert = utils.djsassert;
-var isArray   = utils.isArray;
-var isObject  = utils.isObject;
-var isXmlNSDeclaration = xml.isXmlNSDeclaration;
-var normalizeURI = utils.normalizeURI;
-var parseInt10 = utils.parseInt10;
-
-
-var xmlAppendChild = xml.xmlAppendChild;
-var xmlAppendChildren = xml.xmlAppendChildren
-var xmlAttributes = xml.xmlAttributes;
-var xmlAttributeNode = xml.xmlAttributeNode;
-var xmlAttributeValue = xml.xmlAttributeValue;
-var xmlBaseURI = xml.xmlBaseURI;
-var xmlChildElements = xml.xmlChildElements;
-var xmlDom = xml.xmlDom;
-var xmlFirstChildElement = xml.xmlFirstChildElement;
-var xmlFindElementByPath = xml.xmlFindElementByPath;
-var xmlFindNodeByPath = xml.xmlFindNodeByPath;
-var xmlInnerText = xml.xmlInnerText;
-var xmlLocalName = xml.xmlLocalName;
-var xmlNamespaceURI = xml.xmlNamespaceURI;
-var xmlNewAttribute = xml.xmlNewAttribute;
-var xmlNewElement = xml.xmlNewElement;
-var xmlNewFragment = xml.xmlNewFragment;
-var xmlNewNodeByPath = xml.xmlNewNodeByPath;
-var xmlNewNSDeclaration = xml.xmlNewNSDeclaration;
-var xmlNewText = xml.xmlNewText;
-var xmlNodeValue = xml.xmlNodeValue;
-var xmlNS = xml.xmlNS;
-var xmlnsNS = xml.xmlnsNS;
-var xmlQualifiedName = xml.xmlQualifiedName;
-var xmlParse = xml.xmlParse;
-var xmlSerialize = xml.xmlSerialize;
-var xmlSerializeDescendants = xml.xmlSerializeDescendants;
-var xmlSibling = xml.xmlSibling;
-
-
-var w3org = xml.w3org;
-
-var adoDs = odataXML.adoDs;
-var contentType = odataXML.contentType;
-var createAttributeExtension = odataXML.createAttributeExtension;
-var createElementExtension = odataXML.createElementExtension;
-var handler = odataHandler.handler;
-var isPrimitiveEdmType = odataUtils.isPrimitiveEdmType;
-var isFeed = odataUtils.isFeed;
-var isNamedStream = odataUtils.isNamedStream;
-var lookupEntityType = odataUtils.lookupEntityType;
-var lookupComplexType = odataUtils.lookupComplexType;
-var lookupProperty = odataUtils.lookupProperty;
-var navigationPropertyKind = odataUtils.navigationPropertyKind;
-
-var MAX_DATA_SERVICE_VERSION = odataHandler.MAX_DATA_SERVICE_VERSION;
-var maxVersion = odataXML.maxVersion;
-var odataXmlNs = odataXML.odataXmlNs;
-var odataMetaXmlNs = odataXML.odataMetaXmlNs;
-var odataMetaPrefix = odataXML.odataMetaPrefix;
-var odataPrefix = odataXML.odataPrefix;
-var odataRelatedPrefix = odataXML.odataRelatedPrefix;
-var odataScheme = odataXML.odataScheme;
-var parseBool = odataXML.parseBool;
-var parseDateTime = odataXML.parseDateTime;
-var parseDateTimeOffset = odataXML.parseDateTimeOffset;
-var parseDuration = odataXML.parseDuration;
-var parseTimezone = odataXML.parseTimezone;
-var xmlNewODataElement = odataXML.xmlNewODataElement;
-var xmlNewODataElementInfo = odataXML.xmlNewODataElementInfo;
-var xmlNewODataMetaAttribute = odataXML.xmlNewODataMetaAttribute;
-var xmlNewODataMetaElement = odataXML.xmlNewODataMetaElement;
-var xmlNewODataDataElement = odataXML.xmlNewODataDataElement;
-var xmlReadODataEdmPropertyValue = odataXML.xmlReadODataEdmPropertyValue;
-var xmlReadODataProperty = odataXML.xmlReadODataProperty;
-
-// CONTENT START
-
-var atomPrefix = "a";
-
-var atomXmlNs = w3org + "2005/Atom";                    // http://www.w3.org/2005/Atom
-var appXmlNs = w3org + "2007/app";                      // http://www.w3.org/2007/app
-
-var odataEditMediaPrefix = adoDs + "/edit-media/";        // http://docs.oasis-open.org/odata/ns/edit-media
-var odataMediaResourcePrefix = adoDs + "/mediaresource/"; // http://docs.oasis-open.org/odata/ns/mediaresource
-var odataRelatedLinksPrefix = adoDs + "/relatedlinks/";   // http://docs.oasis-open.org/odata/ns/relatedlinks
-
-var atomAcceptTypes = ["application/atom+xml", "application/atomsvc+xml", "application/xml"];
-var atomMediaType = atomAcceptTypes[0];
-
-// These are the namespaces that are not considered ATOM extension namespaces.
-var nonExtensionNamepaces = [atomXmlNs, appXmlNs, xmlNS, xmlnsNS];
-
-// These are entity property mapping paths that have well-known paths.
-var knownCustomizationPaths = {
-    SyndicationAuthorEmail: "author/email",
-    SyndicationAuthorName: "author/name",
-    SyndicationAuthorUri: "author/uri",
-    SyndicationContributorEmail: "contributor/email",
-    SyndicationContributorName: "contributor/name",
-    SyndicationContributorUri: "contributor/uri",
-    SyndicationPublished: "published",
-    SyndicationRights: "rights",
-    SyndicationSummary: "summary",
-    SyndicationTitle: "title",
-    SyndicationUpdated: "updated"
-};
-
-var expandedFeedCustomizationPath = function (path) {
-    /// <summary>Returns an expanded customization path if it's well-known.</summary>
-    /// <param name="path" type="String">Path to expand.</param>
-    /// <returns type="String">Expanded path or just 'path' otherwise.</returns>
-
-    return knownCustomizationPaths[path] || path;
-};
-
-var isExtensionNs = function (nsURI) {
-    /// <summary>Checks whether the specified namespace is an extension namespace to ATOM.</summary>
-    /// <param type="String" name="nsURI">Namespace to check.</param>
-    /// <returns type="Boolean">true if nsURI is an extension namespace to ATOM; false otherwise.</returns>
-
-    return !(contains(nonExtensionNamepaces, nsURI));
-};
-
-var atomFeedCustomization = function (customizationModel, entityType, model, propertyName, suffix) {
-    /// <summary>Creates an object describing a feed customization that was delcared in an OData conceptual schema.</summary>
-    /// <param name="customizationModel" type="Object">Object describing the customization delcared in the conceptual schema.</param>
-    /// <param name="entityType" type="Object">Object describing the entity type that owns the customization in an OData conceputal schema.</param>
-    /// <param name="model" type="Object">Object describing an OData conceptual schema.</param>
-    /// <param name="propertyName" type="String" optional="true">Name of the property to which this customization applies.</param>
-    /// <param name="suffix" type="String" optional="true">Suffix to feed customization properties in the conceptual schema.</param>
-    /// <returns type="Object">Object that describes an applicable feed customization.</returns>
-
-    suffix = suffix || "";
-    var targetPath = customizationModel["FC_TargetPath" + suffix];
-    if (!targetPath) {
-        return null;
-    }
-
-    var sourcePath = customizationModel["FC_SourcePath" + suffix];
-    var targetXmlPath = expandedFeedCustomizationPath(targetPath);
-
-    var propertyPath = propertyName ? propertyName + (sourcePath ? "/" + sourcePath : "") : sourcePath;
-    var propertyType = propertyPath && lookupPropertyType(model, entityType, propertyPath);
-    var nsURI = customizationModel["FC_NsUri" + suffix] || null;
-    var nsPrefix = customizationModel["FC_NsPrefix" + suffix] || null;
-    var keepinContent = customizationModel["FC_KeepInContent" + suffix] || "";
-
-    if (targetPath !== targetXmlPath) {
-        nsURI = atomXmlNs;
-        nsPrefix = atomPrefix;
-    }
-
-    return {
-        contentKind: customizationModel["FC_ContentKind" + suffix],
-        keepInContent: keepinContent.toLowerCase() === "true",
-        nsPrefix: nsPrefix,
-        nsURI: nsURI,
-        propertyPath: propertyPath,
-        propertyType: propertyType,
-        entryPath: targetXmlPath
-    };
-};
-
-var atomApplyAllFeedCustomizations = function (entityType, model, callback) {
-    /// <summary>Gets all the feed customizations that have to be applied to an entry as per the enity type declared in an OData conceptual schema.</summary>
-    /// <param name="entityType" type="Object">Object describing an entity type in a conceptual schema.</param>
-    /// <param name="model" type="Object">Object describing an OData conceptual schema.</param>
-    /// <param name="callback" type="Function">Callback function to be invoked for each feed customization that needs to be applied.</param>
-
-    var customizations = [];
-    while (entityType) {
-        var sourcePath = entityType.FC_SourcePath;
-        var customization = atomFeedCustomization(entityType, entityType, model);
-        if (customization) {
-            callback(customization);
-        }
-
-        var properties = entityType.property || [];
-        var i, len;
-        for (i = 0, len = properties.length; i < len; i++) {
-            var property = properties[i];
-            var suffixCounter = 0;
-            var suffix = "";
-
-            while (customization = atomFeedCustomization(property, entityType, model, property.name, suffix)) {
-                callback(customization);
-                suffixCounter++;
-                suffix = "_" + suffixCounter;
-            }
-        }
-        entityType = lookupEntityType(entityType.baseType, model);
-    }
-    return customizations;
-};
-
-var atomReadExtensionAttributes = function (domElement) {
-    /// <summary>Reads ATOM extension attributes (any attribute not in the Atom namespace) from a DOM element.</summary>
-    /// <param name="domElement">DOM element with zero or more extension attributes.</param>
-    /// <returns type="Array">An array of extension attribute representations.</returns>
-
-    var extensions = [];
-    xmlAttributes(domElement, function (attribute) {
-        var nsURI = xmlNamespaceURI(attribute);
-        if (isExtensionNs(nsURI)) {
-            extensions.push(createAttributeExtension(attribute, true));
-        }
-    });
-    return extensions;
-};
-
-var atomReadExtensionElement = function (domElement) {
-    /// <summary>Reads an ATOM extension element (an element not in the ATOM namespaces).</summary>
-    /// <param name="domElement">DOM element not part of the atom namespace.</param>
-    /// <returns type="Object">Object representing the extension element.</returns>
-
-    return createElementExtension(domElement, /*addNamespaceURI*/true);
-};
-
-var atomReadDocument = function (domElement, baseURI, model) {
-    /// <summary>Reads an ATOM entry, feed or service document, producing an object model in return.</summary>
-    /// <param name="domElement">Top-level ATOM DOM element to read.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the ATOM document.</param>
-    /// <param name="model" type="Object">Object that describes the conceptual schema.</param>
-    /// <returns type="Object">The object model representing the specified element, undefined if the top-level element is not part of the ATOM specification.</returns>
-
-    var nsURI = xmlNamespaceURI(domElement);
-    var localName = xmlLocalName(domElement);
-
-    // Handle service documents.
-    if (nsURI === appXmlNs && localName === "service") {
-        return atomReadServiceDocument(domElement, baseURI);
-    }
-
-    // Handle feed and entry elements.
-    if (nsURI === atomXmlNs) {
-        if (localName === "feed") {
-            return atomReadFeed(domElement, baseURI, model);
-        }
-        if (localName === "entry") {
-            return atomReadEntry(domElement, baseURI, model);
-        }
-    }
-
-    // Allow undefined to be returned.
-};
-
-var atomReadAdvertisedActionOrFunction = function (domElement, baseURI) {
-    /// <summary>Reads the DOM element for an action or a function in an OData Atom document.</summary>
-    /// <param name="domElement">DOM element to read.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing the action or function target url.</param>
-    /// <returns type="Object">Object with title, target, and metadata fields.</returns>
-
-    var extensions = [];
-    var result = { extensions: extensions };
-    xmlAttributes(domElement, function (attribute) {
-        var localName = xmlLocalName(attribute);
-        var nsURI = xmlNamespaceURI(attribute);
-        var value = xmlNodeValue(attribute);
-
-        if (nsURI === null) {
-            if (localName === "title" || localName === "metadata") {
-                result[localName] = value;
-                return;
-            }
-            if (localName === "target") {
-                result.target = normalizeURI(value, xmlBaseURI(domElement, baseURI));
-                return;
-            }
-        }
-
-        if (isExtensionNs(nsURI)) {
-            extensions.push(createAttributeExtension(attribute, true));
-        }
-    });
-    return result;
-};
-
-var atomReadAdvertisedAction = function (domElement, baseURI, parentMetadata) {
-    /// <summary>Reads the DOM element for an action in an OData Atom document.</summary>
-    /// <param name="domElement">DOM element to read.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing the action or target url.</param>
-    /// <param name="parentMetadata" type="Object">Object to update with the action metadata.</param>
-
-    var actions = parentMetadata.actions = parentMetadata.actions || [];
-    actions.push(atomReadAdvertisedActionOrFunction(domElement, baseURI));
-};
-
-var atomReadAdvertisedFunction = function (domElement, baseURI, parentMetadata) {
-    /// <summary>Reads the DOM element for an action in an OData Atom document.</summary>
-    /// <param name="domElement">DOM element to read.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing the action or target url.</param>
-    /// <param name="parentMetadata" type="Object">Object to update with the action metadata.</param>
-
-    var functions = parentMetadata.functions = parentMetadata.functions || [];
-    functions.push(atomReadAdvertisedActionOrFunction(domElement, baseURI));
-};
-
-var atomReadFeed = function (domElement, baseURI, model) {
-    /// <summary>Reads a DOM element for an ATOM feed, producing an object model in return.</summary>
-    /// <param name="domElement">ATOM feed DOM element.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the ATOM feed.</param>
-    /// <param name="model">Metadata that describes the conceptual schema.</param>
-    /// <returns type="Object">A new object representing the feed.</returns>
-
-    var extensions = atomReadExtensionAttributes(domElement);
-    var feedMetadata = { feed_extensions: extensions };
-    var results = [];
-
-    var feed = { __metadata: feedMetadata, results: results };
-
-    baseURI = xmlBaseURI(domElement, baseURI);
-
-    xmlChildElements(domElement, function (child) {
-        var nsURI = xmlNamespaceURI(child);
-        var localName = xmlLocalName(child);
-
-        if (nsURI === odataMetaXmlNs) {
-            if (localName === "count") {
-                feed.__count = parseInt(xmlInnerText(child), 10);
-                return;
-            }
-            if (localName === "action") {
-                atomReadAdvertisedAction(child, baseURI, feedMetadata);
-                return;
-            }
-            if (localName === "function") {
-                atomReadAdvertisedFunction(child, baseURI, feedMetadata);
-                return;
-            }
-        }
-
-        if (isExtensionNs(nsURI)) {
-            extensions.push(createElementExtension(child));
-            return;
-        }
-
-        // The element should belong to the ATOM namespace.
-        djsassert(nsURI === atomXmlNs, "atomReadFeed - child feed element is not in the atom namespace!!");
-
-        if (localName === "entry") {
-            results.push(atomReadEntry(child, baseURI, model));
-            return;
-        }
-        if (localName === "link") {
-            atomReadFeedLink(child, feed, baseURI);
-            return;
-        }
-        if (localName === "id") {
-            feedMetadata.uri = normalizeURI(xmlInnerText(child), baseURI);
-            feedMetadata.uri_extensions = atomReadExtensionAttributes(child);
-            return;
-        }
-        if (localName === "title") {
-            feedMetadata.title = xmlInnerText(child) || "";
-            feedMetadata.title_extensions = atomReadExtensionAttributes(child);
-            return;
-        }
-    });
-
-    return feed;
-};
-
-var atomReadFeedLink = function (domElement, feed, baseURI) {
-    /// <summary>Reads an ATOM link DOM element for a feed.</summary>
-    /// <param name="domElement">ATOM link DOM element.</param>
-    /// <param name="feed">Feed object to be annotated with the link data.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the payload.</param>
-
-    var link = atomReadLink(domElement, baseURI);
-    var href = link.href;
-    var rel = link.rel;
-    var extensions = link.extensions;
-    var metadata = feed.__metadata;
-
-    if (rel === "next") {
-        feed.__next = href;
-        metadata.next_extensions = extensions;
-        return;
-    }
-    if (rel === "self") {
-        metadata.self = href;
-        metadata.self_extensions = extensions;
-        return;
-    }
-};
-
-var atomReadLink = function (domElement, baseURI) {
-    /// <summary>Reads an ATOM link DOM element.</summary>
-    /// <param name="linkElement">DOM element to read.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing the link href.</param>
-    /// <returns type="Object">A link element representation.</returns>
-
-    baseURI = xmlBaseURI(domElement, baseURI);
-
-    var extensions = [];
-    var link = { extensions: extensions, baseURI: baseURI };
-
-    xmlAttributes(domElement, function (attribute) {
-        var nsURI = xmlNamespaceURI(attribute);
-        var localName = xmlLocalName(attribute);
-        var value = attribute.value;
-
-        if (localName === "href") {
-            link.href = normalizeURI(value, baseURI);
-            return;
-        }
-        if (localName === "type" || localName === "rel") {
-            link[localName] = value;
-            return;
-        }
-
-        if (isExtensionNs(nsURI)) {
-            extensions.push(createAttributeExtension(attribute, true));
-        }
-    });
-
-    if (!link.href) {
-        throw { error: "href attribute missing on link element", element: domElement };
-    }
-
-    return link;
-};
-
-var atomGetObjectValueByPath = function (path, item) {
-    /// <summary>Gets a slashed path value from the specified item.</summary>
-    /// <param name="path" type="String">Property path to read ('/'-separated).</param>
-    /// <param name="item" type="Object">Object to get value from.</param>
-    /// <returns>The property value, possibly undefined if any path segment is missing.</returns>
-
-    // Fast path.
-    if (path.indexOf('/') === -1) {
-        return item[path];
-    } else {
-        var parts = path.split('/');
-        var i, len;
-        for (i = 0, len = parts.length; i < len; i++) {
-            // Avoid traversing a null object.
-            if (item === null) {
-                return undefined;
-            }
-
-            item = item[parts[i]];
-            if (item === undefined) {
-                return item;
-            }
-        }
-
-        return item;
-    }
-};
-
-var atomSetEntryValueByPath = function (path, target, value, propertyType) {
-    /// <summary>Sets a slashed path value on the specified target.</summary>
-    /// <param name="path" type="String">Property path to set ('/'-separated).</param>
-    /// <param name="target" type="Object">Object to set value on.</param>
-    /// <param name="value">Value to set.</param>
-    /// <param name="propertyType" type="String" optional="true">Property type to set in metadata.</param>
-
-    var propertyName;
-    if (path.indexOf('/') === -1) {
-        target[path] = value;
-        propertyName = path;
-    } else {
-        var parts = path.split('/');
-        var i, len;
-        for (i = 0, len = (parts.length - 1); i < len; i++) {
-            // We construct each step of the way if the property is missing;
-            // if it's already initialized to null, we stop further processing.
-            var next = target[parts[i]];
-            if (next === undefined) {
-                next = {};
-                target[parts[i]] = next;
-            } else if (next === null) {
-                return;
-            }
-            target = next;
-        }
-        propertyName = parts[i];
-        target[propertyName] = value;
-    }
-
-    if (propertyType) {
-        var metadata = target.__metadata = target.__metadata || {};
-        var properties = metadata.properties = metadata.properties || {};
-        var property = properties[propertyName] = properties[propertyName] || {};
-        property.type = propertyType;
-    }
-};
-
-var atomApplyCustomizationToEntryObject = function (customization, domElement, entry) {
-    /// <summary>Applies a specific feed customization item to an object.</summary>
-    /// <param name="customization">Object with customization description.</param>
-    /// <param name="sourcePath">Property path to set ('source' in the description).</param>
-    /// <param name="entryElement">XML element for the entry that corresponds to the object being read.</param>
-    /// <param name="entryObject">Object being read.</param>
-    /// <param name="propertyType" type="String">Name of property type to set.</param>
-    /// <param name="suffix" type="String">Suffix to feed customization properties.</param>
-
-    var propertyPath = customization.propertyPath;
-    // If keepInConent equals true or the property value is null we do nothing as this overrides any other customization.
-    if (customization.keepInContent || atomGetObjectValueByPath(propertyPath, entry) === null) {
-        return;
-    }
-
-    var xmlNode = xmlFindNodeByPath(domElement, customization.nsURI, customization.entryPath);
-
-    // If the XML tree does not contain the necessary elements to read the value,
-    // then it shouldn't be considered null, but rather ignored at all. This prevents
-    // the customization from generating the object path down to the property.
-    if (!xmlNode) {
-        return;
-    }
-
-    var propertyType = customization.propertyType;
-    var propertyValue;
-
-    if (customization.contentKind === "xhtml") {
-        // Treat per XHTML in http://tools.ietf.org/html/rfc4287#section-3.1.1, including the DIV
-        // in the content.
-        propertyValue = xmlSerializeDescendants(xmlNode);
-    } else {
-        propertyValue = xmlReadODataEdmPropertyValue(xmlNode, propertyType || "Edm.String");
-    }
-    // Set the value on the entry.
-    atomSetEntryValueByPath(propertyPath, entry, propertyValue, propertyType);
-};
-
-var lookupPropertyType = function (metadata, owningType, path) {
-    /// <summary>Looks up the type of a property given its path in an entity type.</summary>
-    /// <param name="metadata">Metadata in which to search for base and complex types.</param>
-    /// <param name="owningType">Type to which property belongs.</param>
-    /// <param name="path" type="String" mayBeNull="false">Property path to look at.</param>
-    /// <returns type="String">The name of the property type; possibly null.</returns>
-
-    var parts = path.split("/");
-    var i, len;
-    while (owningType) {
-        // Keep track of the type being traversed, necessary for complex types.
-        var traversedType = owningType;
-
-        for (i = 0, len = parts.length; i < len; i++) {
-            // Traverse down the structure as necessary.
-            var properties = traversedType.property;
-            if (!properties) {
-                break;
-            }
-
-            // Find the property by scanning the property list (might be worth pre-processing).
-            var propertyFound = lookupProperty(properties, parts[i]);
-            if (!propertyFound) {
-                break;
-            }
-
-            var propertyType = propertyFound.type;
-
-            // We could in theory still be missing types, but that would
-            // be caused by a malformed path.
-            if (!propertyType || isPrimitiveEdmType(propertyType)) {
-                return propertyType || null;
-            }
-
-            traversedType = lookupComplexType(propertyType, metadata);
-            if (!traversedType) {
-                return null;
-            }
-        }
-
-        // Traverse up the inheritance chain.
-        owningType = lookupEntityType(owningType.baseType, metadata);
-    }
-
-    return null;
-};
-
-var atomReadEntry = function (domElement, baseURI, model) {
-    /// <summary>Reads a DOM element for an ATOM entry, producing an object model in return.</summary>
-    /// <param name="domElement">ATOM entry DOM element.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the ATOM entry.</param>
-    /// <param name="model">Metadata that describes the conceptual schema.</param>
-    /// <returns type="Object">A new object representing the entry.</returns>
-
-    var entryMetadata = {};
-    var entry = { __metadata: entryMetadata };
-
-    var etag = xmlAttributeValue(domElement, "etag", odataMetaXmlNs);
-    if (etag) {
-        entryMetadata.etag = etag;
-    }
-
-    baseURI = xmlBaseURI(domElement, baseURI);
-
-    xmlChildElements(domElement, function (child) {
-        var nsURI = xmlNamespaceURI(child);
-        var localName = xmlLocalName(child);
-
-        if (nsURI === atomXmlNs) {
-            if (localName === "id") {
-                atomReadEntryId(child, entryMetadata, baseURI);
-                return;
-            }
-            if (localName === "category") {
-                atomReadEntryType(child, entryMetadata);
-                return;
-            }
-            if (localName === "content") {
-                atomReadEntryContent(child, entry, entryMetadata, baseURI);
-                return;
-            }
-            if (localName === "link") {
-                atomReadEntryLink(child, entry, entryMetadata, baseURI, model);
-                return;
-            }
-            return;
-        }
-
-        if (nsURI === odataMetaXmlNs) {
-            if (localName === "properties") {
-                atomReadEntryStructuralObject(child, entry, entryMetadata);
-                return;
-            }
-            if (localName === "action") {
-                atomReadAdvertisedAction(child, baseURI, entryMetadata);
-                return;
-            }
-            if (localName === "function") {
-                atomReadAdvertisedFunction(child, baseURI, entryMetadata);
-                return;
-            }
-        }
-    });
-
-    // Apply feed customizations if applicable
-    var entityType = lookupEntityType(entryMetadata.type, model);
-    atomApplyAllFeedCustomizations(entityType, model, function (customization) {
-        atomApplyCustomizationToEntryObject(customization, domElement, entry);
-    });
-
-    return entry;
-};
-
-var atomReadEntryId = function (domElement, entryMetadata, baseURI) {
-    /// <summary>Reads an ATOM entry id DOM element.</summary>
-    /// <param name="domElement">ATOM id DOM element.</param>
-    /// <param name="entryMetadata">Entry metadata object to update with the id information.</param>
-
-    entryMetadata.uri = normalizeURI(xmlInnerText(domElement), xmlBaseURI(domElement, baseURI));
-    entryMetadata.uri_extensions = atomReadExtensionAttributes(domElement);
-};
-
-var atomReadEntryType = function (domElement, entryMetadata) {
-    /// <summary>Reads type information from an ATOM category DOM element.</summary>
-    /// <param name="domElement">ATOM category DOM element.</param>
-    /// <param name="entryMetadata">Entry metadata object to update with the type information.</param>
-
-    if (xmlAttributeValue(domElement, "scheme") === odataScheme) {
-        if (entryMetadata.type) {
-            throw { message: "Invalid AtomPub document: multiple category elements defining the entry type were encounterd withing an entry", element: domElement };
-        }
-
-        var typeExtensions = [];
-        xmlAttributes(domElement, function (attribute) {
-            var nsURI = xmlNamespaceURI(attribute);
-            var localName = xmlLocalName(attribute);
-
-            if (!nsURI) {
-                if (localName !== "scheme" && localName !== "term") {
-                    typeExtensions.push(createAttributeExtension(attribute, true));
-                }
-                return;
-            }
-
-            if (isExtensionNs(nsURI)) {
-                typeExtensions.push(createAttributeExtension(attribute, true));
-            }
-        });
-
-        entryMetadata.type = xmlAttributeValue(domElement, "term");
-        entryMetadata.type_extensions = typeExtensions;
-    }
-};
-
-var atomReadEntryContent = function (domElement, entry, entryMetadata, baseURI) {
-    /// <summary>Reads an ATOM content DOM element.</summary>
-    /// <param name="domElement">ATOM content DOM element.</param>
-    /// <param name="entry">Entry object to update with information.</param>
-    /// <param name="entryMetadata">Entry metadata object to update with the content information.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the Atom entry content.</param>
-
-    var src = xmlAttributeValue(domElement, "src");
-    var type = xmlAttributeValue(domElement, "type");
-
-    if (src) {
-        if (!type) {
-            throw {
-                message: "Invalid AtomPub document: content element must specify the type attribute if the src attribute is also specified",
-                element: domElement
-            };
-        }
-
-        entryMetadata.media_src = normalizeURI(src, xmlBaseURI(domElement, baseURI));
-        entryMetadata.content_type = type;
-    }
-
-    xmlChildElements(domElement, function (child) {
-        if (src) {
-            throw { message: "Invalid AtomPub document: content element must not have child elements if the src attribute is specified", element: domElement };
-        }
-
-        if (xmlNamespaceURI(child) === odataMetaXmlNs && xmlLocalName(child) === "properties") {
-            atomReadEntryStructuralObject(child, entry, entryMetadata);
-        }
-    });
-};
-
-var atomReadEntryLink = function (domElement, entry, entryMetadata, baseURI, model) {
-    /// <summary>Reads a link element on an entry.</summary>
-    /// <param name="atomEntryLink">'link' element on the entry.</param>
-    /// <param name="entry" type="Object">Entry object to update with the link data.</param>
-    /// <param name="entryMetadata">Entry metadata object to update with the link metadata.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing the link href.</param>
-    /// <param name="model" type="Object">Metadata that describes the conceptual schema.</param>
-
-    var link = atomReadLink(domElement, baseURI);
-
-    var rel = link.rel;
-    var href = link.href;
-    var extensions = link.extensions;
-
-    if (rel === "self") {
-        entryMetadata.self = href;
-        entryMetadata.self_link_extensions = extensions;
-        return;
-    }
-
-    if (rel === "edit") {
-        entryMetadata.edit = href;
-        entryMetadata.edit_link_extensions = extensions;
-        return;
-    }
-
-    if (rel === "edit-media") {
-        entryMetadata.edit_media = link.href;
-        entryMetadata.edit_media_extensions = extensions;
-        atomReadLinkMediaEtag(link, entryMetadata);
-        return;
-    }
-
-    // This might be a named stream edit link
-    if (rel.indexOf(odataEditMediaPrefix) === 0) {
-        atomReadNamedStreamEditLink(link, entry, entryMetadata);
-        return;
-    }
-
-    // This might be a named stram media resource (read) link
-    if (rel.indexOf(odataMediaResourcePrefix) === 0) {
-        atomReadNamedStreamSelfLink(link, entry, entryMetadata);
-        return;
-    }
-
-    // This might be a navigation property
-    if (rel.indexOf(odataRelatedPrefix) === 0) {
-        atomReadNavPropLink(domElement, link, entry, entryMetadata, model);
-        return;
-    }
-
-    if (rel.indexOf(odataRelatedLinksPrefix) === 0) {
-        atomReadNavPropRelatedLink(link, entryMetadata);
-        return;
-    }
-};
-
-var atomReadNavPropRelatedLink = function (link, entryMetadata) {
-    /// <summary>Reads a link represnting the links related to a navigation property in an OData Atom document.</summary>
-    /// <param name="link" type="Object">Object representing the parsed link DOM element.</param>
-    /// <param name="entryMetadata" type="Object">Entry metadata object to update with the related links information.</param>
-
-    var propertyName = link.rel.substring(odataRelatedLinksPrefix.length);
-    djsassert(propertyName, "atomReadNavPropRelatedLink - property name is null, empty or undefined!");
-
-    // Set the extra property information on the entry object metadata.
-    entryMetadata.properties = entryMetadata.properties || {};
-    var propertyMetadata = entryMetadata.properties[propertyName] = entryMetadata.properties[propertyName] || {};
-
-    propertyMetadata.associationuri = link.href;
-    propertyMetadata.associationuri_extensions = link.extensions;
-};
-
-var atomReadNavPropLink = function (domElement, link, entry, entryMetadata, model) {
-    /// <summary>Reads a link representing a navigation property in an OData Atom document.</summary>
-    /// <param name="domElement">DOM element for a navigation property in an OData Atom document.</summary>
-    /// <param name="link" type="Object">Object representing the parsed link DOM element.</param>
-    /// <param name="entry" type="Object">Entry object to update with the navigation property.</param>
-    /// <param name="entryMetadata">Entry metadata object to update with the navigation property metadata.</param>
-    /// <param name="model" type="Object">Metadata that describes the conceptual schema.</param>
-
-    // Get any inline data.
-    var inlineData;
-    var inlineElement = xmlFirstChildElement(domElement, odataMetaXmlNs, "inline");
-    if (inlineElement) {
-        var inlineDocRoot = xmlFirstChildElement(inlineElement);
-        var inlineBaseURI = xmlBaseURI(inlineElement, link.baseURI);
-        inlineData = inlineDocRoot ? atomReadDocument(inlineDocRoot, inlineBaseURI, model) : null;
-    } else {
-        // If the link has no inline content, we consider it deferred.
-        inlineData = { __deferred: { uri: link.href} };
-    }
-
-    var propertyName = link.rel.substring(odataRelatedPrefix.length);
-
-    // Set the property value on the entry object.
-    entry[propertyName] = inlineData;
-
-    // Set the extra property information on the entry object metadata.
-    entryMetadata.properties = entryMetadata.properties || {};
-    var propertyMetadata = entryMetadata.properties[propertyName] = entryMetadata.properties[propertyName] || {};
-
-    propertyMetadata.extensions = link.extensions;
-};
-
-var atomReadNamedStreamEditLink = function (link, entry, entryMetadata) {
-    /// <summary>Reads a link representing the edit-media url of a named stream in an OData Atom document.</summary>
-    /// <param name="link" type="Object">Object representing the parsed link DOM element.</param>
-    /// <param name="entry" type="Object">Entry object to update with the named stream data.</param>
-    /// <param name="entryMetadata">Entry metadata object to update with the named stream metadata.</param>
-
-    var propertyName = link.rel.substring(odataEditMediaPrefix.length);
-    djsassert(propertyName, "atomReadNamedStreamEditLink - property name is null, empty or undefined!");
-
-    var namedStreamMediaResource = atomGetEntryNamedStreamMediaResource(propertyName, entry, entryMetadata);
-    var mediaResource = namedStreamMediaResource.value;
-    var mediaResourceMetadata = namedStreamMediaResource.metadata;
-
-    var editMedia = link.href;
-
-    mediaResource.edit_media = editMedia;
-    mediaResource.content_type = link.type;
-    mediaResourceMetadata.edit_media_extensions = link.extensions;
-
-    // If there is only the edit link, make it the media self link as well.
-    mediaResource.media_src = mediaResource.media_src || editMedia;
-    mediaResourceMetadata.media_src_extensions = mediaResourceMetadata.media_src_extensions || [];
-
-    atomReadLinkMediaEtag(link, mediaResource);
-};
-
-var atomReadNamedStreamSelfLink = function (link, entry, entryMetadata) {
-    /// <summary>Reads a link representing the self url of a named stream in an OData Atom document.</summary>
-    /// <param name="link" type="Object">Object representing the parsed link DOM element.</param>
-    /// <param name="entry" type="Object">Entry object to update with the named stream data.</param>
-    /// <param name="entryMetadata">Entry metadata object to update with the named stream metadata.</param>
-
-    var propertyName = link.rel.substring(odataMediaResourcePrefix.length);
-    djsassert(propertyName, "atomReadNamedStreamEditLink - property name is null, empty or undefined!");
-
-    var namedStreamMediaResource = atomGetEntryNamedStreamMediaResource(propertyName, entry, entryMetadata);
-    var mediaResource = namedStreamMediaResource.value;
-    var mediaResourceMetadata = namedStreamMediaResource.metadata;
-
-    mediaResource.media_src = link.href;
-    mediaResourceMetadata.media_src_extensions = link.extensions;
-    mediaResource.content_type = link.type;
-};
-
-var atomGetEntryNamedStreamMediaResource = function (name, entry, entryMetadata) {
-    /// <summary>Gets the media resource object and metadata object for a named stream in an entry object.</summary>
-    /// <param name="link" type="Object">Object representing the parsed link DOM element.</param>
-    /// <param name="entry" type="Object">Entry object from which the media resource object will be obtained.</param>
-    /// <param name="entryMetadata" type="Object">Entry metadata object from which the media resource metadata object will be obtained.</param>
-    /// <remarks>
-    ///    If the entry doest' have a media resource for the named stream indicated by the name argument, then this function will create a new
-    ///    one along with its metadata object.
-    /// <remarks>
-    /// <returns type="Object"> Object containing the value and metadata of the named stream's media resource. <returns>
-
-    entryMetadata.properties = entryMetadata.properties || {};
-
-    var mediaResourceMetadata = entryMetadata.properties[name];
-    var mediaResource = entry[name] && entry[name].__mediaresource;
-
-    if (!mediaResource) {
-        mediaResource = {};
-        entry[name] = { __mediaresource: mediaResource };
-        entryMetadata.properties[name] = mediaResourceMetadata = {};
-    }
-    return { value: mediaResource, metadata: mediaResourceMetadata };
-};
-
-var atomReadLinkMediaEtag = function (link, mediaResource) {
-    /// <summary>Gets the media etag from the link extensions and updates the media resource object with it.</summary>
-    /// <param name="link" type="Object">Object representing the parsed link DOM element.</param>
-    /// <param name="mediaResource" type="Object">Object containing media information for an OData Atom entry.</param>
-    /// <remarks>
-    ///    The function will remove the extension object for the etag if it finds it in the link extensions and will set
-    ///    its value under the media_etag property of the mediaResource object.
-    /// <remarks>
-    /// <returns type="Object"> Object containing the value and metadata of the named stream's media resource. <returns>
-
-    var extensions = link.extensions;
-    var i, len;
-    for (i = 0, len = extensions.length; i < len; i++) {
-        if (extensions[i].namespaceURI === odataMetaXmlNs && extensions[i].name === "etag") {
-            mediaResource.media_etag = extensions[i].value;
-            extensions.splice(i, 1);
-            return;
-        }
-    }
-};
-
-var atomReadEntryStructuralObject = function (domElement, parent, parentMetadata) {
-    /// <summary>Reads an atom entry's property as a structural object and sets its value in the parent and the metadata in the parentMetadata objects.</summary>
-    /// <param name="propertiesElement">XML element for the 'properties' node.</param>
-    /// <param name="parent">
-    ///     Object that will contain the property value. It can be either an antom entry or
-    ///     an atom complex property object.
-    /// </param>
-    /// <param name="parentMetadata">Object that will contain the property metadata. It can be either an atom entry metadata or a complex property metadata object</param>
-
-    xmlChildElements(domElement, function (child) {
-        var property = xmlReadODataProperty(child);
-        if (property) {
-            var propertyName = property.name;
-            var propertiesMetadata = parentMetadata.properties = parentMetadata.properties || {};
-            propertiesMetadata[propertyName] = property.metadata;
-            parent[propertyName] = property.value;
-        }
-    });
-};
-
-var atomReadServiceDocument = function (domElement, baseURI) {
-    /// <summary>Reads an AtomPub service document</summary>
-    /// <param name="atomServiceDoc">DOM element for the root of an AtomPub service document</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the AtomPub service document.</param>
-    /// <returns type="Object">An object that contains the properties of the service document</returns>
-
-    var workspaces = [];
-    var extensions = [];
-
-    baseURI = xmlBaseURI(domElement, baseURI);
-    // Find all the workspace elements.
-    xmlChildElements(domElement, function (child) {
-        if (xmlNamespaceURI(child) === appXmlNs && xmlLocalName(child) === "workspace") {
-            workspaces.push(atomReadServiceDocumentWorkspace(child, baseURI));
-            return;
-        }
-        extensions.push(createElementExtension(child));
-    });
-
-    // AtomPub (RFC 5023 Section 8.3.1) says a service document MUST contain one or
-    // more workspaces. Throw if we don't find any.
-    if (workspaces.length === 0) {
-        throw { message: "Invalid AtomPub service document: No workspace element found.", element: domElement };
-    }
-
-    return { workspaces: workspaces, extensions: extensions };
-};
-
-var atomReadServiceDocumentWorkspace = function (domElement, baseURI) {
-    /// <summary>Reads a single workspace element from an AtomPub service document</summary>
-    /// <param name="domElement">DOM element that represents a workspace of an AtomPub service document</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the AtomPub service document workspace.</param>
-    /// <returns type="Object">An object that contains the properties of the workspace</returns>
-
-    var collections = [];
-    var extensions = [];
-    var title; // = undefined;
-
-    baseURI = xmlBaseURI(domElement, baseURI);
-
-    xmlChildElements(domElement, function (child) {
-        var nsURI = xmlNamespaceURI(child);
-        var localName = xmlLocalName(child);
-
-        if (nsURI === atomXmlNs) {
-            if (localName === "title") {
-                if (title !== undefined) {
-                    throw { message: "Invalid AtomPub service document: workspace has more than one child title element", element: child };
-                }
-
-                title = xmlInnerText(child);
-                return;
-            }
-        }
-
-        if (nsURI === appXmlNs) {
-            if (localName === "collection") {
-                collections.push(atomReadServiceDocumentCollection(child, baseURI));
-            }
-            return;
-        }
-        extensions.push(atomReadExtensionElement(child));
-    });
-
-    return { title: title || "", collections: collections, extensions: extensions };
-};
-
-var atomReadServiceDocumentCollection = function (domElement, baseURI) {
-    /// <summary>Reads a service document collection element into an object.</summary>
-    /// <param name="domElement">DOM element that represents a collection of an AtomPub service document.</param>
-    /// <param name="baseURI" type="String">Base URI for normalizing relative URIs found in the AtomPub service document collection.</param>
-    /// <returns type="Object">An object that contains the properties of the collection.</returns>
-
-
-    var href = xmlAttributeValue(domElement, "href");
-
-    if (!href) {
-        throw { message: "Invalid AtomPub service document: collection has no href attribute", element: domElement };
-    }
-
-    baseURI = xmlBaseURI(domElement, baseURI);
-    href = normalizeURI(href, xmlBaseURI(domElement, baseURI));
-    var extensions = [];
-    var title; // = undefined;
-
-    xmlChildElements(domElement, function (child) {
-        var nsURI = xmlNamespaceURI(child);
-        var localName = xmlLocalName(child);
-
-        if (nsURI === atomXmlNs) {
-            if (localName === "title") {
-                if (title !== undefined) {
-                    throw { message: "Invalid AtomPub service document: collection has more than one child title element", element: child };
-                }
-                title = xmlInnerText(child);
-            }
-            return;
-        }
-
-        if (nsURI !== appXmlNs) {
-            extensions.push(atomReadExtensionElement(domElement));
-        }
-    });
-
-    // AtomPub (RFC 5023 Section 8.3.3) says the collection element MUST contain
-    // a title element. It's likely to be problematic if the service doc doesn't
-    // have one so here we throw.
-    if (!title) {
-        throw { message: "Invalid AtomPub service document: collection has no title element", element: domElement };
-    }
-
-    return { title: title, href: href, extensions: extensions };
-};
-
-var atomNewElement = function (dom, name, children) {
-    /// <summary>Creates a new DOM element in the Atom namespace.</summary>
-    /// <param name="dom">DOM document used for creating the new DOM Element.</param>
-    /// <param name="name" type="String">Local name of the Atom element to create.</param>
-    /// <param name="children" type="Array">Array containing DOM nodes or string values that will be added as children of the new DOM element.</param>
-    /// <returns>New DOM element in the Atom namespace.</returns>
-    /// <remarks>
-    ///    If a value in the children collection is a string, then a new DOM text node is going to be created
-    ///    for it and then appended as a child of the new DOM Element.
-    /// </remarks>
-
-    return xmlNewElement(dom, atomXmlNs, xmlQualifiedName(atomPrefix, name), children);
-};
-
-var atomNewAttribute = function (dom, name, value) {
-    /// <summary>Creates a new DOM attribute for an Atom element in the default namespace.</summary>
-    /// <param name="dom">DOM document used for creating the new DOM Element.</param>
-    /// <param name="name" type="String">Local name of the OData attribute to create.</param>
-    /// <param name="value">Attribute value.</param>
-    /// <returns>New DOM attribute in the default namespace.</returns>
-
-    return xmlNewAttribute(dom, null, name, value);
-};
-
-var atomCanRemoveProperty = function (propertyElement) {
-    /// <summary>Checks whether the property represented by domElement can be removed from the atom document DOM tree.</summary>
-    /// <param name="propertyElement">DOM element for the property to test.</param>
-    /// <remarks>
-    ///     The property can only be removed if it doens't have any children and only has namespace or type declaration attributes.
-    /// </remarks>
-    /// <returns type="Boolean">True is the property can be removed; false otherwise.</returns>
-
-    if (propertyElement.childNodes.length > 0) {
-        return false;
-    }
-
-    var isEmpty = true;
-    var attributes = propertyElement.attributes;
-    var i, len;
-    for (i = 0, len = attributes.length; i < len && isEmpty; i++) {
-        var attribute = attributes[i];
-
-        isEmpty = isEmpty && isXmlNSDeclaration(attribute) ||
-             (xmlNamespaceURI(attribute) == odataMetaXmlNs && xmlLocalName(attribute) === "type");
-    }
-    return isEmpty;
-};
-
-var atomNewODataNavigationProperty = function (dom, name, kind, value, model) {
-    /// <summary>Creates a new Atom link DOM element for a navigation property in an OData Atom document.</summary>
-    /// <param name="dom">DOM document used for creating the new DOM Element.</param>
-    /// <param name="name" type="String">Property name.</param>
-    /// <param name="kind" type="String">Navigation property kind. Expected values are "deferred", "entry", or "feed".</param>
-    /// <param name="value" optional="true" mayBeNull="true">Value of the navigation property, if any.</param>
-    /// <param name="model" type="Object" optional="true">Object describing an OData conceptual schema.</param>
-    /// <returns type="Object">
-    ///     Object containing the new Atom link DOM element for the navigation property and the
-    ///     required data service version for this property.
-    /// </returns>
-
-    var linkType = null;
-    var linkContent = null;
-    var linkContentBodyData = null;
-    var href = "";
-
-    if (kind !== "deferred") {
-        linkType = atomNewAttribute(dom, "type", "application/atom+xml;type=" + kind);
-        linkContent = xmlNewODataMetaElement(dom, "inline");
-
-        if (value) {
-            href = value.__metadata && value.__metadata.uri || "";
-            linkContentBodyData =
-                atomNewODataFeed(dom, value, model) ||
-                atomNewODataEntry(dom, value, model);
-            xmlAppendChild(linkContent, linkContentBodyData.element);
-        }
-    } else {
-        href = value.__deferred.uri;
-    }
-
-    var navProp = atomNewElement(dom, "link", [
-        atomNewAttribute(dom, "href", href),
-        atomNewAttribute(dom, "rel", normalizeURI(name, odataRelatedPrefix)),
-        linkType,
-        linkContent
-    ]);
-
-    return xmlNewODataElementInfo(navProp, linkContentBodyData ? linkContentBodyData.dsv : "1.0");
-};
-
-var atomNewODataEntryDataItem = function (dom, name, value, dataItemMetadata, dataItemModel, model) {
-    /// <summary>Creates a new DOM element for a data item in an entry, complex property, or collection property.</summary>
-    /// <param name="dom">DOM document used for creating the new DOM Element.</param>
-    /// <param name="name" type="String">Data item name.</param>
-    /// <param name="value" optional="true" mayBeNull="true">Value of the data item, if any.</param>
-    /// <param name="dataItemMetadata" type="Object" optional="true">Object containing metadata about the data item.</param>
-    /// <param name="dataItemModel" type="Object" optional="true">Object describing the data item in an OData conceptual schema.</param>
-    /// <param name="model" type="Object" optional="true">Object describing an OData conceptual schema.</param>
-    /// <returns type="Object">
-    ///     Object containing the new DOM element in the appropriate namespace for the data item and the
-    ///     required data service version for it.
-    /// </returns>
-
-    if (isNamedStream(value)) {
-        return null;
-    }
-
-    var dataElement = xmlNewODataDataElement(dom, name, value, dataItemMetadata, dataItemModel, model);
-    if (!dataElement) {
-        // This may be a navigation property.
-        var navPropKind = navigationPropertyKind(value, dataItemModel);
-        djsassert(navPropKind !== null, "atomNewODataEntryDataItem - navigation property kind is null for property " + name);
-
-        dataElement = atomNewODataNavigationProperty(dom, name, navPropKind, value, model);
-    }
-    return dataElement;
-};
-
-var atomEntryCustomization = function (dom, entry, entryProperties, customization) {
-    /// <summary>Applies a feed customization by transforming an Atom entry DOM element as needed.</summary>
-    /// <param name="dom">DOM document used for creating any new DOM nodes required by the customization.</param>
-    /// <param name="entry">DOM element for the Atom entry to which the customization is going to be applied.</param>
-    /// <param name="entryProperties">DOM element containing the properties of the Atom entry.</param>
-    /// <param name="customization" type="Object">Object describing an applicable feed customization.</param>
-    /// <remarks>
-    ///     Look into the atomfeedCustomization function for a description of the customization object.
-    /// </remarks>
-    /// <returns type="String">Data service version required by the applied customization</returns>
-
-    var atomProperty = xmlFindElementByPath(entryProperties, odataXmlNs, customization.propertyPath);
-    var atomPropertyNullAttribute = atomProperty && xmlAttributeNode(atomProperty, "null", odataMetaXmlNs);
-    var atomPropertyValue;
-    var dataServiceVersion = "1.0";
-
-    if (atomPropertyNullAttribute && atomPropertyNullAttribute.value === "true") {
-        return dataServiceVersion;
-    }
-
-    if (atomProperty) {
-        atomPropertyValue = xmlInnerText(atomProperty) || "";
-        if (!customization.keepInContent) {
-            dataServiceVersion = "2.0";
-            var parent = atomProperty.parentNode;
-            var candidate = parent;
-
-            parent.removeChild(atomProperty);
-            while (candidate !== entryProperties && atomCanRemoveProperty(candidate)) {
-                parent = candidate.parentNode;
-                parent.removeChild(candidate);
-                candidate = parent;
-            }
-        }
-    }
-
-    var targetNode = xmlNewNodeByPath(dom, entry,
-        customization.nsURI, customization.nsPrefix, customization.entryPath);
-
-    if (targetNode.nodeType === 2) {
-        targetNode.value = atomPropertyValue;
-        return dataServiceVersion;
-    }
-
-    var contentKind = customization.contentKind;
-    xmlAppendChildren(targetNode, [
-            contentKind && xmlNewAttribute(dom, null, "type", contentKind),
-            contentKind === "xhtml" ? xmlNewFragment(dom, atomPropertyValue) : atomPropertyValue
-    ]);
-
-    return dataServiceVersion;
-};
-
-var atomNewODataEntry = function (dom, data, model) {
-    /// <summary>Creates a new DOM element for an Atom entry.</summary>
-    /// <param name="dom">DOM document used for creating the new DOM Element.</param>
-    /// <param name="data" type="Object">Entry object in the library's internal representation.</param>
-    /// <param name="model" type="Object" optional="true">Object describing an OData conceptual schema.</param>
-    /// <returns type="Object">
-    ///     Object containing the new DOM element for the Atom entry and the required data service version for it.
-    /// </returns>
-
-    var payloadMetadata = data.__metadata || {};
-    var propertiesMetadata = payloadMetadata.properties || {};
-
-    var etag = payloadMetadata.etag;
-    var uri = payloadMetadata.uri;
-    var typeName = payloadMetadata.type;
-    var entityType = lookupEntityType(typeName, model);
-
-    var properties = xmlNewODataMetaElement(dom, "properties");
-    var entry = atomNewElement(dom, "entry", [
-        atomNewElement(dom, "author",
-            atomNewElement(dom, "name")
-        ),
-        etag && xmlNewODataMetaAttribute(dom, "etag", etag),
-        uri && atomNewElement(dom, "id", uri),
-        typeName && atomNewElement(dom, "category", [
-            atomNewAttribute(dom, "term", typeName),
-            atomNewAttribute(dom, "scheme", odataScheme)
-        ]),
-    // TODO: MLE support goes here.
-        atomNewElement(dom, "content", [
-            atomNewAttribute(dom, "type", "application/xml"),
-            properties
-        ])
-    ]);
-
-    var dataServiceVersion = "1.0";
-    for (var name in data) {
-        if (name !== "__metadata") {
-            var entryDataItemMetadata = propertiesMetadata[name] || {};
-            var entryDataItemModel = entityType && (
-                lookupProperty(entityType.property, name) ||
-                lookupProperty(entityType.navigationProperty, name));
-
-            var entryDataItem = atomNewODataEntryDataItem(dom, name, data[name], entryDataItemMetadata, entryDataItemModel, model);
-            if (entryDataItem) {
-                var entryElement = entryDataItem.element;
-                var entryElementParent = (xmlNamespaceURI(entryElement) === atomXmlNs) ? entry : properties;
-
-                xmlAppendChild(entryElementParent, entryElement);
-                dataServiceVersion = maxVersion(dataServiceVersion, entryDataItem.dsv);
-            }
-        }
-    }
-
-    atomApplyAllFeedCustomizations(entityType, model, function (customization) {
-        var customizationDsv = atomEntryCustomization(dom, entry, properties, customization);
-        dataServiceVersion = maxVersion(dataServiceVersion, customizationDsv);
-    });
-
-    return xmlNewODataElementInfo(entry, dataServiceVersion);
-};
-
-var atomNewODataFeed = function (dom, data, model) {
-    /// <summary>Creates a new DOM element for an Atom feed.</summary>
-    /// <param name="dom">DOM document used for creating the new DOM Element.</param>
-    /// <param name="data" type="Object">Feed object in the library's internal representation.</param>
-    /// <param name="model" type="Object" optional="true">Object describing an OData conceptual schema.</param>
-    /// <returns type="Object">
-    ///     Object containing the new DOM element for the Atom feed and the required data service version for it.
-    /// </returns>
-
-    var entries = isArray(data) ? data : data.results;
-
-    if (!entries) {
-        return null;
-    }
-
-    var dataServiceVersion = "1.0";
-    var atomFeed = atomNewElement(dom, "feed");
-
-    var i, len;
-    for (i = 0, len = entries.length; i < len; i++) {
-        var atomEntryData = atomNewODataEntry(dom, entries[i], model);
-        xmlAppendChild(atomFeed, atomEntryData.element);
-        dataServiceVersion = maxVersion(dataServiceVersion, atomEntryData.dsv);
-    }
-    return xmlNewODataElementInfo(atomFeed, dataServiceVersion);
-};
-
-var atomNewODataDocument = function (data, model) {
-    /// <summary>Creates a new OData Atom document.</summary>
-    /// <param name="data" type="Object">Feed or entry object in the libary's internal representaion.</param>
-    /// <param name="model" type="Object" optional="true">Object describing an OData conceptual schema.</param>
-    /// <returns type="Object">
-    ///     Object containing the new DOM document for the Atom document and the required data service version for it.
-    /// </returns>
-
-    if (data) {
-        var atomRootWriter = isFeed(data) && atomNewODataFeed ||
-            isObject(data) && atomNewODataEntry;
-
-        if (atomRootWriter) {
-            var dom = xmlDom();
-            var atomRootData = atomRootWriter(dom, data, model);
-
-            if (atomRootData) {
-                var atomRootElement = atomRootData.element;
-                xmlAppendChildren(atomRootElement, [
-                    xmlNewNSDeclaration(dom, odataMetaXmlNs, odataMetaPrefix),
-                    xmlNewNSDeclaration(dom, odataXmlNs, odataPrefix)
-                ]);
-                return xmlNewODataElementInfo(xmlAppendChild(dom, atomRootElement), atomRootData.dsv);
-            }
-        }
-    }
-    return null;
-};
-
-var atomParser = function (handler, text, context) {
-    /// <summary>Parses an ATOM document (feed, entry or service document).</summary>
-    /// <param name="handler">This handler.</param>
-    /// <param name="text" type="String">Document text.</param>
-    /// <param name="context" type="Object">Object with parsing context.</param>
-    /// <returns>An object representation of the document; undefined if not applicable.</returns>
-
-    if (text) {
-        var atomDoc = xmlParse(text);
-        var atomRoot = xmlFirstChildElement(atomDoc);
-        if (atomRoot) {
-            return atomReadDocument(atomRoot, null, context.metadata);
-        }
-    }
-};
-
-var atomSerializer = function (handler, data, context) {
-    /// <summary>Serializes an ATOM object into a document (feed or entry).</summary>
-    /// <param name="handler">This handler.</param>
-    /// <param name="data" type="Object">Representation of feed or entry.</param>
-    /// <param name="context" type="Object">Object with parsing context.</param>
-    /// <returns>An text representation of the data object; undefined if not applicable.</returns>
-
-    var cType = context.contentType = context.contentType || contentType(atomMediaType);
-    if (cType && cType.mediaType === atomMediaType) {
-        var atomDoc = atomNewODataDocument(data, context.metadata);
-        if (atomDoc) {
-            context.dataServiceVersion = maxVersion(context.dataServiceVersion || "1.0", atomDoc.dsv);
-            return xmlSerialize(atomDoc.element);
-        }
-    }
-    // Allow undefined to be returned.
-};
-
-exports.atomHandler = handler(atomParser, atomSerializer, atomAcceptTypes.join(","), MAX_DATA_SERVICE_VERSION);
-
-// DATAJS INTERNAL START
-exports.atomParser = atomParser;
-exports.atomSerializer = atomSerializer;
-exports.atomReadDocument = atomReadDocument;
-exports.atomReadFeed = atomReadFeed;
-exports.atomReadFeedLink = atomReadFeedLink;
-exports.atomReadLink = atomReadLink;
-exports.atomReadExtensionElement = atomReadExtensionElement;
-exports.atomReadExtensionAttributes = atomReadExtensionAttributes;
-exports.atomReadEntry = atomReadEntry;
-exports.atomReadEntryType = atomReadEntryType;
-exports.atomReadEntryContent = atomReadEntryContent;
-exports.atomReadEntryLink = atomReadEntryLink;
-exports.atomReadEntryStructuralObject = atomReadEntryStructuralObject;
-exports.atomReadServiceDocument = atomReadServiceDocument;
-exports.atomReadServiceDocumentWorkspace = atomReadServiceDocumentWorkspace;
-exports.atomReadServiceDocumentCollection = atomReadServiceDocumentCollection;
-exports.expandedFeedCustomizationPath = expandedFeedCustomizationPath;
-exports.lookupPropertyType = lookupPropertyType;
-exports.atomSetEntryValueByPath = atomSetEntryValueByPath;
-// DATAJS INTERNAL END
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/014949ce/datajs/src/lib/odata/json.js
----------------------------------------------------------------------
diff --git a/datajs/src/lib/odata/json.js b/datajs/src/lib/odata/json.js
index 11cd7fa..370c23d 100644
--- a/datajs/src/lib/odata/json.js
+++ b/datajs/src/lib/odata/json.js
@@ -851,7 +851,7 @@ var readPayloadMinimalObject = function (data, objectInfo, baseURI, model, deman
     return data;
 };
 
-var jsonLightSerializableMetadata = ["@odata.type", "@odata.etag", "@odata.mediaEditLink", "@odata.mediaReadLink", "@odata.mediaContentType", "@odata.mediaEtag"];
+var jsonLightSerializableMetadata = ["@odata.id"];
 
 var isJsonLightSerializableProperty = function (property) {
     if (!property) {