olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chri...@apache.org
Subject [1/3] olingo-odata4 git commit: [OLINGO-575] Cleanup service version enum
Date Thu, 05 Mar 2015 15:51:38 GMT
Repository: olingo-odata4
Updated Branches:
  refs/heads/master 3c36eaeae -> a3789c7cc


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/a3789c7c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
index 6a50ad3..f054be5 100755
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
@@ -1,36 +1,41 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.olingo.commons.core.serialization;
 
-import com.fasterxml.jackson.core.JsonFactory;
-import com.fasterxml.jackson.core.JsonGenerator;
+import java.io.IOException;
+import java.io.Writer;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.data.Annotatable;
 import org.apache.olingo.commons.api.data.Annotation;
+import org.apache.olingo.commons.api.data.ComplexValue;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.Link;
 import org.apache.olingo.commons.api.data.Linked;
-import org.apache.olingo.commons.api.data.ComplexValue;
 import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.data.Valuable;
@@ -38,7 +43,6 @@ import org.apache.olingo.commons.api.data.ValueType;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.edm.geo.Geospatial;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.serialization.ODataSerializer;
@@ -46,13 +50,8 @@ import org.apache.olingo.commons.api.serialization.ODataSerializerException;
 import org.apache.olingo.commons.core.edm.EdmTypeInfo;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 
-import java.io.IOException;
-import java.io.Writer;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
 
 public class JsonSerializer implements ODataSerializer {
 
@@ -65,18 +64,15 @@ public class JsonSerializer implements ODataSerializer {
 
   private final JsonGeoValueSerializer geoSerializer = new JsonGeoValueSerializer();
 
-  protected ODataServiceVersion version;
-
   protected boolean serverMode;
 
   protected ODataFormat format;
 
-  public JsonSerializer(final ODataServiceVersion version, final boolean serverMode) {
-    this(version, serverMode, ODataFormat.JSON_FULL_METADATA);
+  public JsonSerializer(final boolean serverMode) {
+    this(serverMode, ODataFormat.JSON_FULL_METADATA);
   }
 
-  public JsonSerializer(final ODataServiceVersion version, final boolean serverMode, ODataFormat
format) {
-    this.version = version;
+  public JsonSerializer(final boolean serverMode, ODataFormat format) {
     this.serverMode = serverMode;
     this.format = format;
   }
@@ -86,11 +82,11 @@ public class JsonSerializer implements ODataSerializer {
     try {
       final JsonGenerator json = new JsonFactory().createGenerator(writer);
       if (obj instanceof EntitySet) {
-        new JsonEntitySetSerializer(version, serverMode).doSerialize((EntitySet) obj, json);
+        new JsonEntitySetSerializer(serverMode).doSerialize((EntitySet) obj, json);
       } else if (obj instanceof Entity) {
-        new JsonEntitySerializer(version, serverMode, format).doSerialize((Entity) obj, json);
+        new JsonEntitySerializer(serverMode, format).doSerialize((Entity) obj, json);
       } else if (obj instanceof Property) {
-        new JsonPropertySerializer(version, serverMode).doSerialize((Property) obj, json);
+        new JsonPropertySerializer(serverMode).doSerialize((Property) obj, json);
       } else if (obj instanceof Link) {
         link((Link) obj, json);
       }
@@ -102,12 +98,12 @@ public class JsonSerializer implements ODataSerializer {
     }
   }
 
-  private void reference(ResWrap<URI>container, JsonGenerator json) throws IOException
{
+  private void reference(ResWrap<URI> container, JsonGenerator json) throws IOException
{
     json.writeStartObject();
-    
+
     json.writeStringField(Constants.JSON_CONTEXT, container.getContextURL().toASCIIString());
     json.writeStringField(Constants.JSON_ID, container.getPayload().toASCIIString());
-    
+
     json.writeEndObject();
   }
 
@@ -118,14 +114,14 @@ public class JsonSerializer implements ODataSerializer {
     try {
       final JsonGenerator json = new JsonFactory().createGenerator(writer);
       if (obj instanceof EntitySet) {
-        new JsonEntitySetSerializer(version, serverMode).doContainerSerialize((ResWrap<EntitySet>)
container, json);
+        new JsonEntitySetSerializer(serverMode).doContainerSerialize((ResWrap<EntitySet>)
container, json);
       } else if (obj instanceof Entity) {
-        new JsonEntitySerializer(version, serverMode).doContainerSerialize((ResWrap<Entity>)
container, json);
+        new JsonEntitySerializer(serverMode).doContainerSerialize((ResWrap<Entity>)
container, json);
       } else if (obj instanceof Property) {
-        new JsonPropertySerializer(version, serverMode).doContainerSerialize((ResWrap<Property>)
container, json);
+        new JsonPropertySerializer(serverMode).doContainerSerialize((ResWrap<Property>)
container, json);
       } else if (obj instanceof Link) {
         link((Link) obj, json);
-      } else if(obj instanceof URI) {
+      } else if (obj instanceof URI) {
         reference((ResWrap<URI>) container, json);
       }
       json.flush();
@@ -143,7 +139,7 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   protected void links(final Linked linked, final JsonGenerator jgen)
-          throws IOException, EdmPrimitiveTypeException {
+      throws IOException, EdmPrimitiveTypeException {
 
     if (serverMode) {
       serverLinks(linked, jgen);
@@ -153,7 +149,7 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   protected void clientLinks(final Linked linked, final JsonGenerator jgen)
-          throws IOException, EdmPrimitiveTypeException {
+      throws IOException, EdmPrimitiveTypeException {
 
     final Map<String, List<String>> entitySetLinks = new HashMap<String, List<String>>();
     for (Link link : linked.getNavigationLinks()) {
@@ -163,7 +159,7 @@ public class JsonSerializer implements ODataSerializer {
 
       ODataLinkType type = null;
       try {
-        type = ODataLinkType.fromString(version, link.getRel(), link.getType());
+        type = ODataLinkType.fromString(link.getRel(), link.getType());
       } catch (IllegalArgumentException e) {
         // ignore
       }
@@ -187,10 +183,10 @@ public class JsonSerializer implements ODataSerializer {
 
       if (link.getInlineEntity() != null) {
         jgen.writeFieldName(link.getTitle());
-        new JsonEntitySerializer(version, serverMode).doSerialize(link.getInlineEntity(),
jgen);
+        new JsonEntitySerializer(serverMode).doSerialize(link.getInlineEntity(), jgen);
       } else if (link.getInlineEntitySet() != null) {
         jgen.writeArrayFieldStart(link.getTitle());
-        final JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode);
+        final JsonEntitySerializer entitySerializer = new JsonEntitySerializer(serverMode);
         for (Entity subEntry : link.getInlineEntitySet().getEntities()) {
           entitySerializer.doSerialize(subEntry, jgen);
         }
@@ -214,8 +210,7 @@ public class JsonSerializer implements ODataSerializer {
       for (Link link : ((Entity) linked).getMediaEditLinks()) {
         if (StringUtils.isNotBlank(link.getHref())) {
           jgen.writeStringField(
-                  link.getTitle() + StringUtils.prependIfMissing(
-                          version.getJsonName(ODataServiceVersion.JsonKey.MEDIA_EDIT_LINK),
"@"),
+                  link.getTitle() + StringUtils.prependIfMissing(Constants.JSON_MEDIA_EDIT_LINK,
"@"),
                   link.getHref());
         }
       }
@@ -224,7 +219,7 @@ public class JsonSerializer implements ODataSerializer {
     for (Link link : linked.getAssociationLinks()) {
       if (StringUtils.isNotBlank(link.getHref())) {
         jgen.writeStringField(
-                link.getTitle() + version.getJsonName(ODataServiceVersion.JsonKey.ASSOCIATION_LINK),
+                link.getTitle() + Constants.JSON_ASSOCIATION_LINK,
                 link.getHref());
       }
     }
@@ -236,16 +231,16 @@ public class JsonSerializer implements ODataSerializer {
 
       if (StringUtils.isNotBlank(link.getHref())) {
         jgen.writeStringField(
-                link.getTitle() + version.getJsonName(ODataServiceVersion.JsonKey.NAVIGATION_LINK),
+                link.getTitle() + Constants.JSON_NAVIGATION_LINK,
                 link.getHref());
       }
 
       if (link.getInlineEntity() != null) {
         jgen.writeFieldName(link.getTitle());
-        new JsonEntitySerializer(version, serverMode).doSerialize(link.getInlineEntity(),
jgen);
+        new JsonEntitySerializer(serverMode).doSerialize(link.getInlineEntity(), jgen);
       } else if (link.getInlineEntitySet() != null) {
         jgen.writeArrayFieldStart(link.getTitle());
-        JsonEntitySerializer entitySerializer = new JsonEntitySerializer(version, serverMode);
+        JsonEntitySerializer entitySerializer = new JsonEntitySerializer(serverMode);
         for (Entity subEntry : link.getInlineEntitySet().getEntities()) {
           entitySerializer.doSerialize(subEntry, jgen);
         }
@@ -255,36 +250,36 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   private void collection(final JsonGenerator jgen, final EdmTypeInfo typeInfo,
-                          final ValueType valueType, final List<?> value)
+      final ValueType valueType, final List<?> value)
       throws IOException, EdmPrimitiveTypeException {
 
     jgen.writeStartArray();
 
     for (Object item : value) {
       final EdmTypeInfo itemTypeInfo = typeInfo == null
-              ? null
-              : new EdmTypeInfo.Builder().setTypeExpression(typeInfo.getFullQualifiedName().toString()).build();
+          ? null
+          : new EdmTypeInfo.Builder().setTypeExpression(typeInfo.getFullQualifiedName().toString()).build();
       switch (valueType) {
-        case COLLECTION_PRIMITIVE:
-          primitiveValue(jgen, itemTypeInfo, item);
-          break;
-
-        case COLLECTION_GEOSPATIAL:
-          jgen.writeStartObject();
-          geoSerializer.serialize(jgen, (Geospatial) item);
-          jgen.writeEndObject();
-          break;
-
-        case COLLECTION_ENUM:
-          jgen.writeString(item.toString());
-          break;
-
-        case COLLECTION_COMPLEX:
-          final ComplexValue complexItem2 = (ComplexValue) item;
-          complexValue(jgen, itemTypeInfo, complexItem2.getValue(), complexItem2);
-          break;
-
-        default:
+      case COLLECTION_PRIMITIVE:
+        primitiveValue(jgen, itemTypeInfo, item);
+        break;
+
+      case COLLECTION_GEOSPATIAL:
+        jgen.writeStartObject();
+        geoSerializer.serialize(jgen, (Geospatial) item);
+        jgen.writeEndObject();
+        break;
+
+      case COLLECTION_ENUM:
+        jgen.writeString(item.toString());
+        break;
+
+      case COLLECTION_COMPLEX:
+        final ComplexValue complexItem2 = (ComplexValue) item;
+        complexValue(jgen, itemTypeInfo, complexItem2.getValue(), complexItem2);
+        break;
+
+      default:
       }
     }
 
@@ -292,7 +287,7 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   protected void primitiveValue(final JsonGenerator jgen, final EdmTypeInfo typeInfo, final
Object value)
-          throws IOException, EdmPrimitiveTypeException {
+      throws IOException, EdmPrimitiveTypeException {
 
     final EdmPrimitiveTypeKind kind = typeInfo == null ? null : typeInfo.getPrimitiveTypeKind();
     final boolean isNumber = kind == null ? value instanceof Number : ArrayUtils.contains(NUMBER_TYPES,
kind);
@@ -304,9 +299,9 @@ public class JsonSerializer implements ODataSerializer {
       jgen.writeBoolean((Boolean) value);
     } else {
       final String serialized = kind == null
-              ? value.toString()
-              // TODO: add facets
-              : EdmPrimitiveTypeFactory.getInstance(kind).
+          ? value.toString()
+          // TODO: add facets
+          : EdmPrimitiveTypeFactory.getInstance(kind).
               valueToString(value, null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE,
null);
       if (isNumber) {
         jgen.writeNumber(serialized);
@@ -317,12 +312,12 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   private void complexValue(final JsonGenerator jgen, final EdmTypeInfo typeInfo,
-                            final List<Property> value, final Linked linked)
+      final List<Property> value, final Linked linked)
       throws IOException, EdmPrimitiveTypeException {
     jgen.writeStartObject();
 
     if (typeInfo != null && format != ODataFormat.JSON_NO_METADATA) {
-      jgen.writeStringField(version.getJsonName(ODataServiceVersion.JsonKey.TYPE), typeInfo.external(version));
+      jgen.writeStringField(Constants.JSON_TYPE, typeInfo.external());
     }
 
     for (Property property : value) {
@@ -336,7 +331,7 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   private void value(final JsonGenerator jgen, final String type, final Valuable value)
-          throws IOException, EdmPrimitiveTypeException {
+      throws IOException, EdmPrimitiveTypeException {
     final EdmTypeInfo typeInfo = type == null ? null : new EdmTypeInfo.Builder().setTypeExpression(type).build();
 
     if (value.isNull()) {
@@ -357,10 +352,10 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   protected void valuable(final JsonGenerator jgen, final Valuable valuable, final String
name)
-          throws IOException, EdmPrimitiveTypeException {
+      throws IOException, EdmPrimitiveTypeException {
 
     if (!Constants.VALUE.equals(name) && !(valuable instanceof Annotation)
-            && !valuable.isComplex() && !valuable.isComplex()) {
+        && !valuable.isComplex() && !valuable.isComplex()) {
 
       String type = valuable.getType();
       if (StringUtils.isBlank(type) && valuable.isPrimitive() || valuable.isNull())
{
@@ -368,8 +363,8 @@ public class JsonSerializer implements ODataSerializer {
       }
       if (StringUtils.isNotBlank(type) && format != ODataFormat.JSON_NO_METADATA)
{
         jgen.writeFieldName(
-                name + StringUtils.prependIfMissing(version.getJsonName(ODataServiceVersion.JsonKey.TYPE),
"@"));
-        jgen.writeString(new EdmTypeInfo.Builder().setTypeExpression(type).build().external(version));
+            name + StringUtils.prependIfMissing(Constants.JSON_TYPE, "@"));
+        jgen.writeString(new EdmTypeInfo.Builder().setTypeExpression(type).build().external());
       }
     }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/a3789c7c/lib/commons-core/src/test/java/org/apache/olingo/commons/core/serialization/AtomDeserializerTest.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/serialization/AtomDeserializerTest.java
b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/serialization/AtomDeserializerTest.java
index 3126fc2..0c47160 100644
--- a/lib/commons-core/src/test/java/org/apache/olingo/commons/core/serialization/AtomDeserializerTest.java
+++ b/lib/commons-core/src/test/java/org/apache/olingo/commons/core/serialization/AtomDeserializerTest.java
@@ -18,7 +18,9 @@
  */
 package org.apache.olingo.commons.core.serialization;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
@@ -26,7 +28,6 @@ import java.io.InputStream;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.junit.Test;
 
 public class AtomDeserializerTest {
@@ -35,23 +36,23 @@ public class AtomDeserializerTest {
   public void emptyInlineEntityOlingo540() throws Exception {
     final String content = "" + 
         "<entry xmlns=\"http://www.w3.org/2005/Atom\" "
-        + "xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" " 
-        + "xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" " 
+        + "xmlns:data=\"http://docs.oasis-open.org/odata/ns/data\" " 
+        + "xmlns:metadata=\"http://docs.oasis-open.org/odata/ns/metadata\" " 
         + "xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"
"
         + "xml:base=\"http://services.odata.org/V3/OData/OData.svc/\">\r\n" + 
         "    <id>http://services.odata.org/V3/OData/OData.svc/Products(3)</id>\r\n"
+ 
         "    <category term=\"ODataDemo.Product\" "
-        + "scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\r\n"
+ 
+        + "scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" />\r\n" + 
         "    \r\n" + 
         "    <link rel=\"edit\" title=\"Product\" href=\"Products\" />\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Categories\" "
         + "type=\"application/atom+xml;type=feed\" title=\"Categories\" href=\"Products(3)/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Supplier\" "
         + "type=\"application/atom+xml;type=entry\" title=\"Supplier\" href=\"Products(3)/Supplier\">\r\n"
+ 
-        "    <m:inline>\r\n" + 
-        "    </m:inline>\r\n" + 
+        "    <metadata:inline>\r\n" + 
+        "    </metadata:inline>\r\n" + 
         "    </link>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail\""
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/ProductDetail\""
         + " type=\"application/atom+xml;type=entry\" title=\"ProductDetail\" "
         + "href=\"Products(3)/ProductDetail\" />\r\n" + 
         "    <title type=\"text\">Havina Cola</title>\r\n" + 
@@ -60,24 +61,25 @@ public class AtomDeserializerTest {
         "    <author>\r\n" + 
         "        <name />\r\n" + 
         "    </author>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Categories\"
"
         + "type=\"application/xml\" title=\"Categories\" href=\"Products(3)/$links/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Supplier\" "
         + "type=\"application/xml\" title=\"Supplier\" href=\"Products(3)/$links/Supplier\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail\""
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/ProductDetail\""
         + " type=\"application/xml\" title=\"ProductDetail\" href=\"Products(3)/$links/ProductDetail\"
/>\r\n" + 
         "    <content type=\"application/xml\">\r\n" + 
-        "        <m:properties>\r\n" + 
-        "            <d:ID m:type=\"Edm.Int32\">3</d:ID>\r\n" + 
-        "            <d:ReleaseDate m:type=\"Edm.DateTime\">2005-10-01T00:00:00</d:ReleaseDate>\r\n"
+ 
-        "            <d:DiscontinuedDate m:type=\"Edm.DateTime\">2006-10-01T00:00:00</d:DiscontinuedDate>\r\n"
+ 
-        "            <d:Rating m:type=\"Edm.Int16\">3</d:Rating>\r\n" + 
-        "            <d:Price m:type=\"Edm.Double\">19.9</d:Price>\r\n" + 
-        "        </m:properties>\r\n" + 
+        "        <metadata:properties>\r\n" + 
+        "            <data:ID metadata:type=\"Edm.Int32\">3</data:ID>\r\n" +

+        "            <data:ReleaseDate metadata:type=\"Edm.DateTime\">2005-10-01T00:00:00</data:ReleaseDate>\r\n"
+ 
+        "  <data:DiscontinuedDate metadata:type=\"Edm.DateTime\">2006-10-01T00:00:00</data:DiscontinuedDate>\r\n"
+ 
+        "            <data:Rating metadata:type=\"Edm.Int16\">3</data:Rating>\r\n"
+ 
+        "            <data:Price metadata:type=\"Edm.Double\">19.9</data:Price>\r\n"
+ 
+        "        </metadata:properties>\r\n" + 
         "    </content>\r\n" + 
         " </entry>";
 
-    final AtomDeserializer deserializer = new AtomDeserializer(ODataServiceVersion.V30);
+    //TODO: THis was a test for V3
+    final AtomDeserializer deserializer = new AtomDeserializer();
     final InputStream in = new ByteArrayInputStream(content.getBytes("UTF-8"));
     final ResWrap<Entity> entity = deserializer.toEntity(in);
     
@@ -89,58 +91,58 @@ public class AtomDeserializerTest {
   public void filledInlineEntity() throws Exception {
     final String content = "" + 
         "<entry xmlns=\"http://www.w3.org/2005/Atom\" "
-        + "xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" "
-        + "xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" "
+        + "xmlns:data=\"http://docs.oasis-open.org/odata/ns/data\" "
+        + "xmlns:metadata=\"http://docs.oasis-open.org/odata/ns/metadata\" "
         + "xmlns:georss=\"http://www.georss.org/georss\" "
         + "xmlns:gml=\"http://www.opengis.net/gml\" "
-        + "xml:base=\"http://services.odata.org/V3/OData/OData.svc/\">\r\n" + 
-        "    <id>http://services.odata.org/V3/OData/OData.svc/Products(3)</id>\r\n"
+ 
-        "    <category term=\"ODataDemo.Product\" "
-        + "scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\r\n"
+ 
+        + "xml:base=\"http://services.odata.org/V4/OData/OData.svc/\">\r\n" + 
+        "    <id>http://services.odata.org/V4/OData/OData.svc/Products(3)</id>\r\n"
+ 
+        "    <category term=\"#ODataDemo.Product\" "
+        + "scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" />\r\n" + 
         "    \r\n" + 
         "    <link rel=\"edit\" title=\"Product\" href=\"Products\" />\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Categories\" "
         + "type=\"application/atom+xml;type=feed\" title=\"Categories\" href=\"Products(3)/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Supplier\" "
         + "type=\"application/atom+xml;type=entry\" title=\"Supplier\" href=\"Products(3)/Supplier\">\r\n"
+ 
-        "    <m:inline>\r\n" + 
+        "    <metadata:inline>\r\n" + 
         "       <entry>\r\n" + 
-        "            <id>http://services.odata.org/V3/OData/OData.svc/Suppliers(0)</id>\r\n"
+ 
+        "            <id>http://services.odata.org/V4/OData/OData.svc/Suppliers(0)</id>\r\n"
+ 
         "            <category term=\"ODataDemo.Supplier\" "
-        + "scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\r\n"
+ 
+        + "scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" />\r\n" + 
         "            <link rel=\"edit\" title=\"Supplier\" href=\"Suppliers(0)\" />\r\n"
+ 
-        "            <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products\"
"
+        "            <link rel=\"http://docs.oasis-open.org/odata/ns/related/Products\"
"
         + "type=\"application/atom+xml;type=feed\" title=\"Products\" href=\"Suppliers(0)/Products\"
/>\r\n" + 
         "            <title type=\"text\">Exotic Liquids</title>\r\n" + 
         "            <updated>2015-01-26T08:57:02Z</updated>\r\n" + 
         "            <author>\r\n" + 
         "                <name />\r\n" + 
         "            </author>\r\n" + 
-        "            <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Products\"
"
+        "            <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Products\"
"
         + "type=\"application/xml\" title=\"Products\" href=\"Suppliers(0)/$links/Products\"
/>\r\n" + 
         "            <content type=\"application/xml\">\r\n" + 
-        "                 <m:properties>\r\n" + 
-        "                    <d:ID m:type=\"Edm.Int32\">0</d:ID>\r\n" + 
-        "                    <d:Name>Exotic Liquids</d:Name>\r\n" + 
-        "                     <d:Address m:type=\"ODataDemo.Address\">\r\n" + 
-        "                    <d:Street>NE 228th</d:Street>\r\n" + 
-        "                    <d:City>Sammamish</d:City>\r\n" + 
-        "                    <d:State>WA</d:State>\r\n" + 
-        "                    <d:ZipCode>98074</d:ZipCode>\r\n" + 
-        "                    <d:Country>USA</d:Country>\r\n" + 
-        "                     </d:Address>\r\n" + 
-        "                    <d:Location m:type=\"Edm.GeographyPoint\">\r\n" + 
+        "                 <metadata:properties>\r\n" + 
+        "                    <data:ID metadata:type=\"Edm.Int32\">0</data:ID>\r\n"
+ 
+        "                    <data:Name>Exotic Liquids</data:Name>\r\n" + 
+        "                    <data:Address metadata:type=\"ODataDemo.Address\">\r\n"
+ 
+        "                    <data:Street>NE 228th</data:Street>\r\n" + 
+        "                    <data:City>Sammamish</data:City>\r\n" + 
+        "                    <data:State>WA</data:State>\r\n" + 
+        "                    <data:ZipCode>98074</data:ZipCode>\r\n" + 
+        "                    <data:Country>USA</data:Country>\r\n" + 
+        "                     </data:Address>\r\n" + 
+        "                    <data:Location metadata:type=\"Edm.GeographyPoint\">\r\n"
+ 
         "                    <gml:Point gml:srsName=\"http://www.opengis.net/def/crs/EPSG/0/4326\">\r\n"
+ 
         "                    <gml:pos>47.6316604614258 -122.03547668457</gml:pos>\r\n"
+ 
         "                    </gml:Point>\r\n" + 
-        "                    </d:Location>\r\n" + 
-        "                    <d:Concurrency m:type=\"Edm.Int32\">0</d:Concurrency>\r\n"
+ 
-        "                 </m:properties>\r\n" + 
+        "                    </data:Location>\r\n" + 
+        "                    <data:Concurrency metadata:type=\"Edm.Int32\">0</data:Concurrency>\r\n"
+ 
+        "                 </metadata:properties>\r\n" + 
         "            </content>\r\n" + 
         "         </entry>" + 
-        "    </m:inline>\r\n" + 
+        "    </metadata:inline>\r\n" + 
         "    </link>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/ProductDetail\" "
         + "type=\"application/atom+xml;type=entry\" "
         + "title=\"ProductDetail\" href=\"Products(3)/ProductDetail\" />\r\n" + 
         "    <title type=\"text\">Havina Cola</title>\r\n" + 
@@ -149,24 +151,23 @@ public class AtomDeserializerTest {
         "    <author>\r\n" + 
         "        <name />\r\n" + 
         "    </author>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Categories\"
"
         + "type=\"application/xml\" title=\"Categories\" href=\"Products(3)/$links/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Supplier\" "
         + "type=\"application/xml\" title=\"Supplier\" href=\"Products(3)/$links/Supplier\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/ProductDetail\"
"
         + "type=\"application/xml\" title=\"ProductDetail\" href=\"Products(3)/$links/ProductDetail\"
/>\r\n" + 
         "    <content type=\"application/xml\">\r\n" + 
-        "        <m:properties>\r\n" + 
-        "            <d:ID m:type=\"Edm.Int32\">3</d:ID>\r\n" + 
-        "            <d:ReleaseDate m:type=\"Edm.DateTime\">2005-10-01T00:00:00</d:ReleaseDate>\r\n"
+ 
-        "            <d:DiscontinuedDate m:type=\"Edm.DateTime\">2006-10-01T00:00:00</d:DiscontinuedDate>\r\n"
+ 
-        "            <d:Rating m:type=\"Edm.Int16\">3</d:Rating>\r\n" + 
-        "            <d:Price m:type=\"Edm.Double\">19.9</d:Price>\r\n" + 
-        "        </m:properties>\r\n" + 
+        "        <metadata:properties>\r\n" + 
+        "            <data:ID metadata:type=\"Edm.Int32\">3</data:ID>\r\n" +

+        "            <data:ReleaseDate metadata:type=\"Edm.DateTime\">2005-10-01T00:00:00</data:ReleaseDate>\r\n"
+ 
+        "  <data:DiscontinuedDate metadata:type=\"Edm.DateTime\">2006-10-01T00:00:00</data:DiscontinuedDate>\r\n"
+ 
+        "            <data:Rating metadata:type=\"Edm.Int16\">3</data:Rating>\r\n"
+ 
+        "            <data:Price metadata:type=\"Edm.Double\">19.9</data:Price>\r\n"
+ 
+        "        </metadata:properties>\r\n" + 
         "    </content>\r\n" + 
         " </entry>";
-
-    final AtomDeserializer deserializer = new AtomDeserializer(ODataServiceVersion.V30);
+    final AtomDeserializer deserializer = new AtomDeserializer();
     final InputStream in = new ByteArrayInputStream(content.getBytes("UTF-8"));
     final ResWrap<Entity> entity = deserializer.toEntity(in);
     
@@ -182,25 +183,25 @@ public class AtomDeserializerTest {
   public void emptyInlineEntityCollection() throws Exception {
     final String content = "" + 
         "<entry xmlns=\"http://www.w3.org/2005/Atom\" "
-        + "xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" "
-        + "xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" "
+        + "xmlns:data=\"http://docs.oasis-open.org/odata/ns/data\" "
+        + "xmlns:metadata=\"http://docs.oasis-open.org/odata/ns/metadata\" "
         + "xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"
"
         + "xml:base=\"http://services.odata.org/V3/OData/OData.svc/\">\r\n" + 
         "    <id>http://services.odata.org/V3/OData/OData.svc/Products(3)</id>\r\n"
+ 
         "    <category term=\"ODataDemo.Product\" "
-        + "scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\r\n"
+ 
+        + "scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" />\r\n" + 
         "    \r\n" + 
         "    <link rel=\"edit\" title=\"Product\" href=\"Products(3)\" />\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Categories\" "
         + "type=\"application/atom+xml;type=feed\" title=\"Categories\" href=\"Products(3)/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Supplier\" "
         + "type=\"application/atom+xml;type=feed\" title=\"Supplier\" href=\"Products(3)/Supplier\">\r\n"
+ 
-        "    <m:inline>\r\n" + 
+        "    <metadata:inline>\r\n" + 
         "        <feed>\r\n" + 
         "         </feed>\r\n" + 
-        "    </m:inline>\r\n" + 
+        "    </metadata:inline>\r\n" + 
         "    </link>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/ProductDetail\" "
         + "type=\"application/atom+xml;type=entry\" "
         +  "title=\"ProductDetail\" href=\"Products(3)/ProductDetail\" />\r\n" + 
         "    <title type=\"text\">Havina Cola</title>\r\n" + 
@@ -209,24 +210,24 @@ public class AtomDeserializerTest {
         "    <author>\r\n" + 
         "        <name />\r\n" + 
         "    </author>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Categories\"
"
         + "type=\"application/xml\" title=\"Categories\" href=\"Products(3)/$links/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Supplier\" "
         + "type=\"application/xml\" title=\"Supplier\" href=\"Products(3)/$links/Supplier\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/ProductDetail\"
"
         + "type=\"application/xml\" title=\"ProductDetail\" href=\"Products(3)/$links/ProductDetail\"
/>\r\n" + 
         "    <content type=\"application/xml\">\r\n" + 
-        "        <m:properties>\r\n" + 
-        "            <d:ID m:type=\"Edm.Int32\">3</d:ID>\r\n" + 
-        "            <d:ReleaseDate m:type=\"Edm.DateTime\">2005-10-01T00:00:00</d:ReleaseDate>\r\n"
+ 
-        "            <d:DiscontinuedDate m:type=\"Edm.DateTime\">2006-10-01T00:00:00</d:DiscontinuedDate>\r\n"
+ 
-        "            <d:Rating m:type=\"Edm.Int16\">3</d:Rating>\r\n" + 
-        "            <d:Price m:type=\"Edm.Double\">19.9</d:Price>\r\n" + 
-        "        </m:properties>\r\n" + 
+        "        <metadata:properties>\r\n" + 
+        "            <data:ID metadata:type=\"Edm.Int32\">3</data:ID>\r\n" +

+        "            <data:ReleaseDate metadata:type=\"Edm.DateTime\">2005-10-01T00:00:00</data:ReleaseDate>\r\n"
+ 
+        "  <data:DiscontinuedDate metadata:type=\"Edm.DateTime\">2006-10-01T00:00:00</data:DiscontinuedDate>\r\n"
+ 
+        "            <data:Rating metadata:type=\"Edm.Int16\">3</data:Rating>\r\n"
+ 
+        "            <data:Price metadata:type=\"Edm.Double\">19.9</data:Price>\r\n"
+ 
+        "        </metadata:properties>\r\n" + 
         "    </content>\r\n" + 
         " </entry>";
-
-    final AtomDeserializer deserializer = new AtomDeserializer(ODataServiceVersion.V30);
+    //TODO: THis was a test for V3
+    final AtomDeserializer deserializer = new AtomDeserializer();
     final InputStream in = new ByteArrayInputStream(content.getBytes("UTF-8"));
     final ResWrap<Entity> entity = deserializer.toEntity(in);
     
@@ -240,59 +241,59 @@ public class AtomDeserializerTest {
   public void filledInlineEntityCollection() throws Exception {
     final String content = "" + 
         "<entry xmlns=\"http://www.w3.org/2005/Atom\" "
-        + "xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" "
-        + "xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" "
+        + "xmlns:data=\"http://docs.oasis-open.org/odata/ns/data\" "
+        + "xmlns:metadata=\"http://docs.oasis-open.org/odata/ns/metadata\" "
         + "xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"
"
         + "xml:base=\"http://services.odata.org/V3/OData/OData.svc/\">\r\n" + 
         "    <id>http://services.odata.org/V3/OData/OData.svc/Products(3)</id>\r\n"
+ 
         "    <category term=\"ODataDemo.Product\" "
-        + "scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\r\n"
+ 
+        + "scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" />\r\n" + 
         "    \r\n" + 
         "    <link rel=\"edit\" title=\"Product\" href=\"Products(3)\" />\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Categories\" "
         + "type=\"application/atom+xml;type=feed\" title=\"Categories\" href=\"Products(3)/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/Supplier\" "
         + "type=\"application/atom+xml;type=feed\" title=\"Supplier\" href=\"Products(3)/Supplier\">\r\n"
+ 
-        "    <m:inline>\r\n" + 
+        "    <metadata:inline>\r\n" + 
         "        <feed>\r\n" + 
         "        <entry>\r\n" + 
         "            <id>http://services.odata.org/V3/OData/OData.svc/Suppliers(0)</id>\r\n"
+ 
         "            <category term=\"ODataDemo.Supplier\" "
-        + "scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\r\n"
+ 
+        + "scheme=\"http://docs.oasis-open.org/odata/ns/scheme\" />\r\n" + 
         "            <link rel=\"edit\" title=\"Supplier\" href=\"Suppliers(0)\" />\r\n"
+ 
-        "            <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products\"
"
+        "            <link rel=\"http://docs.oasis-open.org/odata/ns/related/Products\"
"
         + "type=\"application/atom+xml;type=feed\" title=\"Products\" href=\"Suppliers(0)/Products\"
/>\r\n" + 
         "            <title type=\"text\">Exotic Liquids</title>\r\n" + 
         "            <updated>2015-01-26T08:57:02Z</updated>\r\n" + 
         "            <author>\r\n" + 
         "                <name />\r\n" + 
         "            </author>\r\n" + 
-        "            <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Products\"
"
+        "            <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Products\"
"
         + "type=\"application/xml\" title=\"Products\" href=\"Suppliers(0)/$links/Products\"
/>\r\n" + 
         "            <content type=\"application/xml\">\r\n" + 
-        "                 <m:properties>\r\n" + 
-        "                    <d:ID m:type=\"Edm.Int32\">0</d:ID>\r\n" + 
-        "                    <d:Name>Exotic Liquids</d:Name>\r\n" + 
-        "                    <d:Address m:type=\"ODataDemo.Address\">\r\n" + 
-        "                    <d:Street>NE 228th</d:Street>\r\n" + 
-        "                    <d:City>Sammamish</d:City>\r\n" + 
-        "                    <d:State>WA</d:State>\r\n" + 
-        "                    <d:ZipCode>98074</d:ZipCode>\r\n" + 
-        "                    <d:Country>USA</d:Country>\r\n" + 
-        "                     </d:Address>\r\n" + 
-        "                    <d:Location m:type=\"Edm.GeographyPoint\">\r\n" + 
+        "                 <metadata:properties>\r\n" + 
+        "                    <data:ID metadata:type=\"Edm.Int32\">0</data:ID>\r\n"
+ 
+        "                    <data:Name>Exotic Liquids</data:Name>\r\n" + 
+        "                    <data:Address metadata:type=\"ODataDemo.Address\">\r\n"
+ 
+        "                    <data:Street>NE 228th</data:Street>\r\n" + 
+        "                    <data:City>Sammamish</data:City>\r\n" + 
+        "                    <data:State>WA</data:State>\r\n" + 
+        "                    <data:ZipCode>98074</data:ZipCode>\r\n" + 
+        "                    <data:Country>USA</data:Country>\r\n" + 
+        "                     </data:Address>\r\n" + 
+        "                    <data:Location metadata:type=\"Edm.GeographyPoint\">\r\n"
+ 
         "                    <gml:Point gml:srsName=\"http://www.opengis.net/def/crs/EPSG/0/4326\">\r\n"
+ 
         "                    <gml:pos>47.6316604614258 -122.03547668457</gml:pos>\r\n"
+ 
         "                    </gml:Point>\r\n" + 
-        "                    </d:Location>\r\n" + 
-        "                    <d:Concurrency m:type=\"Edm.Int32\">0</d:Concurrency>\r\n"
+ 
-        "                 </m:properties>\r\n" + 
+        "                    </data:Location>\r\n" + 
+        "                    <data:Concurrency metadata:type=\"Edm.Int32\">0</data:Concurrency>\r\n"
+ 
+        "                 </metadata:properties>\r\n" + 
         "            </content>\r\n" + 
         "         </entry>\r\n" +
         "         </feed>\r\n" + 
-        "    </m:inline>\r\n" + 
+        "    </metadata:inline>\r\n" + 
         "    </link>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/related/ProductDetail\" "
         + "type=\"application/atom+xml;type=entry\" "
         + "title=\"ProductDetail\" href=\"Products(3)/ProductDetail\" />\r\n" + 
         "    <title type=\"text\">Havina Cola</title>\r\n" + 
@@ -301,24 +302,24 @@ public class AtomDeserializerTest {
         "    <author>\r\n" + 
         "        <name />\r\n" + 
         "    </author>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Categories\"
"
         + "type=\"application/xml\" title=\"Categories\" href=\"Products(3)/$links/Categories\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/Supplier\" "
         + "type=\"application/xml\" title=\"Supplier\" href=\"Products(3)/$links/Supplier\"
/>\r\n" + 
-        "    <link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail\"
"
+        "    <link rel=\"http://docs.oasis-open.org/odata/ns/relatedlinks/ProductDetail\"
"
         + "type=\"application/xml\" title=\"ProductDetail\" href=\"Products(3)/$links/ProductDetail\"
/>\r\n" + 
         "    <content type=\"application/xml\">\r\n" + 
-        "        <m:properties>\r\n" + 
-        "            <d:ID m:type=\"Edm.Int32\">3</d:ID>\r\n" + 
-        "            <d:ReleaseDate m:type=\"Edm.DateTime\">2005-10-01T00:00:00</d:ReleaseDate>\r\n"
+ 
-        "            <d:DiscontinuedDate m:type=\"Edm.DateTime\">2006-10-01T00:00:00</d:DiscontinuedDate>\r\n"
+ 
-        "            <d:Rating m:type=\"Edm.Int16\">3</d:Rating>\r\n" + 
-        "            <d:Price m:type=\"Edm.Double\">19.9</d:Price>\r\n" + 
-        "        </m:properties>\r\n" + 
+        "        <metadata:properties>\r\n" + 
+        "            <data:ID metadata:type=\"Edm.Int32\">3</data:ID>\r\n" +

+        "            <data:ReleaseDate metadata:type=\"Edm.DateTime\">2005-10-01T00:00:00</data:ReleaseDate>\r\n"
+ 
+        "  <data:DiscontinuedDate metadata:type=\"Edm.DateTime\">2006-10-01T00:00:00</data:DiscontinuedDate>\r\n"
+ 
+        "            <data:Rating metadata:type=\"Edm.Int16\">3</data:Rating>\r\n"
+ 
+        "            <data:Price metadata:type=\"Edm.Double\">19.9</data:Price>\r\n"
+ 
+        "        </metadata:properties>\r\n" + 
         "    </content>\r\n" + 
         " </entry>";
-
-    final AtomDeserializer deserializer = new AtomDeserializer(ODataServiceVersion.V30);
+    //TODO: THis was a test for V3
+    final AtomDeserializer deserializer = new AtomDeserializer();
     final InputStream in = new ByteArrayInputStream(content.getBytes("UTF-8"));
     final ResWrap<Entity> entity = deserializer.toEntity(in);
     


Mime
View raw message