olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chri...@apache.org
Subject [2/3] olingo-odata4 git commit: [OLINGO-603] Delete core dependecies in Tec Scenario
Date Tue, 07 Apr 2015 12:20:10 GMT
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/EntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/EntitySetImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/EntitySetImpl.java
deleted file mode 100755
index 7898a8c..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/EntitySetImpl.java
+++ /dev/null
@@ -1,73 +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.
- */
-package org.apache.olingo.commons.core.data;
-
-import org.apache.olingo.commons.api.data.Entity;
-import org.apache.olingo.commons.api.data.EntitySet;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class EntitySetImpl extends AbstractODataObject implements EntitySet {
-
-  private Integer count;
-
-  private final List<Entity> entities = new ArrayList<Entity>();
-
-  private URI next;
-
-  private URI deltaLink;
-
-  @Override
-  public void setCount(final Integer count) {
-    this.count = count;
-  }
-
-  @Override
-  public Integer getCount() {
-    return count;
-  }
-
-  @Override
-  public List<Entity> getEntities() {
-    return entities;
-  }
-
-  @Override
-  public void setNext(final URI next) {
-    this.next = next;
-  }
-
-  @Override
-  public URI getNext() {
-    return next;
-  }
-
-  @Override
-  public URI getDeltaLink() {
-    return deltaLink;
-  }
-
-  @Override
-  public void setDeltaLink(final URI deltaLink) {
-    this.deltaLink = deltaLink;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/LinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/LinkImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/LinkImpl.java
deleted file mode 100644
index 5d096d6..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/LinkImpl.java
+++ /dev/null
@@ -1,129 +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.
- */
-package org.apache.olingo.commons.core.data;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.commons.api.data.Entity;
-import org.apache.olingo.commons.api.data.EntitySet;
-import org.apache.olingo.commons.api.data.Link;
-
-public class LinkImpl extends AbstractAnnotatedObject implements Link {
-
-  private String title;
-  private String rel;
-  private String href;
-  private String type;
-  private String mediaETag;
-  private Entity entity;
-  private EntitySet entitySet;
-  private String bindingLink;
-  private List<String> bindingLinks = new ArrayList<String>();
-
-  @Override
-  public String getTitle() {
-    return title;
-  }
-
-  @Override
-  public void setTitle(final String title) {
-    this.title = title;
-  }
-
-  @Override
-  public String getRel() {
-    return rel;
-  }
-
-  @Override
-  public void setRel(final String rel) {
-    this.rel = rel;
-  }
-
-  @Override
-  public String getHref() {
-    return href;
-  }
-
-  @Override
-  public void setHref(final String href) {
-    this.href = href;
-  }
-
-  @Override
-  public String getType() {
-    return type;
-  }
-
-  @Override
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  @Override
-  public String getMediaETag() {
-    return mediaETag;
-  }
-
-  @Override
-  public void setMediaETag(final String mediaETag) {
-    this.mediaETag = mediaETag;
-  }
-
-  @Override
-  public Entity getInlineEntity() {
-    return entity;
-  }
-
-  @Override
-  public void setInlineEntity(final Entity entity) {
-    this.entity = entity;
-  }
-
-  @Override
-  public EntitySet getInlineEntitySet() {
-    return entitySet;
-  }
-
-  @Override
-  public void setInlineEntitySet(final EntitySet entitySet) {
-    this.entitySet = entitySet;
-  }
-
-  @Override
-  public String getBindingLink() {
-    return bindingLink;
-  }
-
-  @Override
-  public List<String> getBindingLinks() {
-    return bindingLinks;
-  }
-
-  @Override
-  public void setBindingLink(String bindingLink) {
-    this.bindingLink = bindingLink;
-  }
-
-  @Override
-  public void setBindingLinks(List<String> bindingLinks) {
-    this.bindingLinks = bindingLinks;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ParameterImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ParameterImpl.java
deleted file mode 100644
index fc2a1a9..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/ParameterImpl.java
+++ /dev/null
@@ -1,47 +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.
- */
-package org.apache.olingo.commons.core.data;
-
-import org.apache.olingo.commons.api.data.Entity;
-import org.apache.olingo.commons.api.data.Parameter;
-import org.apache.olingo.commons.api.data.ValueType;
-
-public class ParameterImpl extends AbstractValuable implements Parameter {
-
-  String name;
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  @Override
-  public boolean isEntity() {
-    return getValueType() == ValueType.ENTITY;
-  }
-
-  @Override
-  public Entity asEntity() {
-    return isEntity() ? (Entity) getValue() : null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/PropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/PropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/PropertyImpl.java
deleted file mode 100755
index 7b31da7..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/PropertyImpl.java
+++ /dev/null
@@ -1,54 +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.
- */
-package org.apache.olingo.commons.core.data;
-
-import org.apache.olingo.commons.api.data.Property;
-import org.apache.olingo.commons.api.data.ValueType;
-
-public class PropertyImpl extends AbstractValuable implements Property {
-
-  private String name;
-
-  public PropertyImpl() {}
-
-  public PropertyImpl(final String type, final String name) {
-    this.name = name;
-    super.setType(type);
-  }
-
-  public PropertyImpl(String type, String name, ValueType valueType, Object value) {
-    this(type, name);
-    setValue(valueType, value);
-  }
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  @Override
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public boolean isNull() {
-    return getValue() == null || "Edm.Null".equals(getType());
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
index 1a50c26..cd5210a 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
@@ -36,12 +36,16 @@ import javax.xml.stream.events.XMLEvent;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.data.AbstractODataObject;
 import org.apache.olingo.commons.api.data.Annotation;
 import org.apache.olingo.commons.api.data.ComplexValue;
+import org.apache.olingo.commons.api.data.DeletedEntity;
 import org.apache.olingo.commons.api.data.DeletedEntity.Reason;
 import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.DeltaLink;
 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.Property;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.data.Valuable;
@@ -56,16 +60,6 @@ import org.apache.olingo.commons.api.edm.geo.Geospatial;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.serialization.ODataDeserializer;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-import org.apache.olingo.commons.core.data.AbstractODataObject;
-import org.apache.olingo.commons.core.data.AnnotationImpl;
-import org.apache.olingo.commons.core.data.ComplexValueImpl;
-import org.apache.olingo.commons.core.data.DeletedEntityImpl;
-import org.apache.olingo.commons.core.data.DeltaImpl;
-import org.apache.olingo.commons.core.data.DeltaLinkImpl;
-import org.apache.olingo.commons.core.data.EntityImpl;
-import org.apache.olingo.commons.core.data.EntitySetImpl;
-import org.apache.olingo.commons.core.data.LinkImpl;
-import org.apache.olingo.commons.core.data.PropertyImpl;
 import org.apache.olingo.commons.core.edm.provider.EdmTypeInfo;
 
 import com.fasterxml.aalto.stax.InputFactoryImpl;
@@ -128,11 +122,11 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
 
       if (event.isStartElement()) {
         if (value == null) {
-          value = new ComplexValueImpl();
+          value = new ComplexValue();
         }
 
         if (Constants.QNAME_ATOM_ELEM_LINK.equals(event.asStartElement().getName())) {
-          final LinkImpl link = new LinkImpl();
+          final Link link = new Link();
           final Attribute rel = event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_REL));
           if (rel != null) {
             link.setRel(rel.getValue());
@@ -260,7 +254,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
   private Property property(final XMLEventReader reader, final StartElement start)
       throws XMLStreamException, EdmPrimitiveTypeException {
 
-    final PropertyImpl property = new PropertyImpl();
+    final Property property = new Property();
 
     if (propertyValueQName.equals(start.getName())) {
       // retrieve name from context
@@ -379,7 +373,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
     }
   }
 
-  private void inline(final XMLEventReader reader, final StartElement start, final LinkImpl link)
+  private void inline(final XMLEventReader reader, final StartElement start, final Link link)
       throws XMLStreamException, EdmPrimitiveTypeException {
 
     boolean foundEndElement = false;
@@ -434,7 +428,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
     if (!Constants.QNAME_ATOM_ELEM_FEED.equals(start.getName())) {
       return null;
     }
-    final DeltaImpl delta = new DeltaImpl();
+    final Delta delta = new Delta();
     final Attribute xmlBase = start.getAttributeByName(Constants.QNAME_ATTR_XML_BASE);
     if (xmlBase != null) {
       delta.setBaseURI(xmlBase.getValue());
@@ -473,7 +467,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
         } else if (Constants.QNAME_ATOM_ELEM_ENTRY.equals(event.asStartElement().getName())) {
           delta.getEntities().add(entity(reader, event.asStartElement()));
         } else if (deletedEntryQName.equals(event.asStartElement().getName())) {
-          final DeletedEntityImpl deletedEntity = new DeletedEntityImpl();
+          final DeletedEntity deletedEntity = new DeletedEntity();
 
           final Attribute ref = event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_REF));
           if (ref != null) {
@@ -488,7 +482,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
         } else if (linkQName.equals(event.asStartElement().getName())
             || deletedLinkQName.equals(event.asStartElement().getName())) {
 
-          final DeltaLinkImpl link = new DeltaLinkImpl();
+          final DeltaLink link = new DeltaLink();
 
           final Attribute source = event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_SOURCE));
           if (source != null) {
@@ -520,7 +514,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
     return delta;
   }
 
-  private void properties(final XMLEventReader reader, final StartElement start, final EntityImpl entity)
+  private void properties(final XMLEventReader reader, final StartElement start, final Entity entity)
       throws XMLStreamException, EdmPrimitiveTypeException {
 
     final Map<String, List<Annotation>> annotations = new HashMap<String, List<Annotation>>();
@@ -557,7 +551,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
   private Annotation annotation(final XMLEventReader reader, final StartElement start)
       throws XMLStreamException, EdmPrimitiveTypeException {
 
-    final Annotation annotation = new AnnotationImpl();
+    final Annotation annotation = new Annotation();
 
     annotation.setTerm(start.getAttributeByName(QName.valueOf(Constants.ATOM_ATTR_TERM)).getValue());
     valuable(annotation, reader, start);
@@ -565,8 +559,8 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
     return annotation;
   }
 
-  private EntityImpl entityRef(final StartElement start) throws XMLStreamException {
-    final EntityImpl entity = new EntityImpl();
+  private Entity entityRef(final StartElement start) throws XMLStreamException {
+    final Entity entity = new Entity();
 
     final Attribute entityRefId = start.getAttributeByName(Constants.QNAME_ATOM_ATTR_ID);
     if (entityRefId != null) {
@@ -578,11 +572,11 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
 
   private Entity entity(final XMLEventReader reader, final StartElement start)
       throws XMLStreamException, EdmPrimitiveTypeException {
-    final EntityImpl entity;
+    final Entity entity;
     if (entryRefQName.equals(start.getName())) {
       entity = entityRef(start);
     } else if (Constants.QNAME_ATOM_ELEM_ENTRY.equals(start.getName())) {
-      entity = new EntityImpl();
+      entity = new Entity();
       final Attribute xmlBase = start.getAttributeByName(Constants.QNAME_ATTR_XML_BASE);
       if (xmlBase != null) {
         entity.setBaseURI(xmlBase.getValue());
@@ -612,7 +606,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
               entity.setType(new EdmTypeInfo.Builder().setTypeExpression(term.getValue()).build().internal());
             }
           } else if (Constants.QNAME_ATOM_ELEM_LINK.equals(event.asStartElement().getName())) {
-            final LinkImpl link = new LinkImpl();
+            final Link link = new Link();
             final Attribute rel = event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_REL));
             if (rel != null) {
               link.setRel(rel.getValue());
@@ -740,7 +734,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
     if (!Constants.QNAME_ATOM_ELEM_FEED.equals(start.getName())) {
       return null;
     }
-    final EntitySetImpl entitySet = new EntitySetImpl();
+    final EntitySet entitySet = new EntitySet();
     final Attribute xmlBase = start.getAttributeByName(Constants.QNAME_ATTR_XML_BASE);
     if (xmlBase != null) {
       entitySet.setBaseURI(xmlBase.getValue());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
index de06008..196a46e 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
@@ -31,6 +31,7 @@ import javax.xml.stream.XMLStreamWriter;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.data.AbstractODataObject;
 import org.apache.olingo.commons.api.data.Annotation;
 import org.apache.olingo.commons.api.data.ComplexValue;
 import org.apache.olingo.commons.api.data.ContextURL;
@@ -47,10 +48,6 @@ import org.apache.olingo.commons.api.edm.geo.Geospatial;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.serialization.ODataSerializer;
 import org.apache.olingo.commons.api.serialization.ODataSerializerException;
-import org.apache.olingo.commons.core.data.AbstractODataObject;
-import org.apache.olingo.commons.core.data.EntityImpl;
-import org.apache.olingo.commons.core.data.EntitySetImpl;
-import org.apache.olingo.commons.core.data.LinkImpl;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 import org.apache.olingo.commons.core.edm.provider.EdmTypeInfo;
 
@@ -288,9 +285,7 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize
     }
     writer.writeEndElement();
 
-    if (entity instanceof AbstractODataObject) {
-      common(writer, (AbstractODataObject) entity);
-    }
+    common(writer, entity);
 
     if (serverMode) {
       if (entity.getEditLink() != null) {
@@ -416,9 +411,7 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize
       writer.writeEndElement();
     }
 
-    if (entitySet instanceof AbstractODataObject) {
-      common(writer, (AbstractODataObject) entitySet);
-    }
+    common(writer, entitySet);
 
     for (Entity entity : entitySet.getEntities()) {
       if (entity.getType() == null && entity.getProperties().isEmpty()) {
@@ -433,14 +426,14 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize
 
     if (serverMode) {
       if (entitySet.getNext() != null) {
-        final LinkImpl next = new LinkImpl();
+        final Link next = new Link();
         next.setRel(Constants.NEXT_LINK_REL);
         next.setHref(entitySet.getNext().toASCIIString());
 
         links(writer, Collections.<Link> singletonList(next));
       }
       if (entitySet.getDeltaLink() != null) {
-        final LinkImpl next = new LinkImpl();
+        final Link next = new Link();
         next.setRel(Constants.NS_DELTA_LINK_REL);
         next.setHref(entitySet.getDeltaLink().toASCIIString());
 
@@ -559,10 +552,10 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize
       final ContextURL contextURL = ContextURLParser.parse(container.getContextURL());
       String base = contextURL.getServiceRoot().toASCIIString();
       if (container.getPayload() instanceof EntitySet) {
-        ((EntitySetImpl) container.getPayload()).setBaseURI(base);
+        ((EntitySet) container.getPayload()).setBaseURI(base);
       }
       if (container.getPayload() instanceof Entity) {
-        ((EntityImpl) container.getPayload()).setBaseURI(base);
+        ((Entity) container.getPayload()).setBaseURI(base);
       }
 
       writer.writeAttribute(namespaceMetadata, Constants.CONTEXT,

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java
index de79cf7..313d32d 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeltaDeserializer.java
@@ -25,12 +25,11 @@ import java.net.URI;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.data.ContextURL;
+import org.apache.olingo.commons.api.data.DeletedEntity;
 import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.DeltaLink;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-import org.apache.olingo.commons.core.data.DeletedEntityImpl;
-import org.apache.olingo.commons.core.data.DeltaImpl;
-import org.apache.olingo.commons.core.data.DeltaLinkImpl;
 
 import com.fasterxml.jackson.core.JsonFactory;
 import com.fasterxml.jackson.core.JsonParser;
@@ -48,7 +47,7 @@ public class JsonDeltaDeserializer extends JsonDeserializer {
 
     final ObjectNode tree = parser.getCodec().readTree(parser);
 
-    final DeltaImpl delta = new DeltaImpl();
+    final Delta delta = new Delta();
 
     final URI contextURL = tree.hasNonNull(Constants.JSON_CONTEXT) ?
         URI.create(tree.get(Constants.JSON_CONTEXT).textValue()) : null;
@@ -77,11 +76,11 @@ public class JsonDeltaDeserializer extends JsonDeserializer {
         if (itemContextURL == null || itemContextURL.isEntity()) {
           delta.getEntities().add(entityDeserializer.doDeserialize(item.traverse(parser.getCodec())).getPayload());
         } else if (itemContextURL.isDeltaDeletedEntity()) {
-          delta.getDeletedEntities().add(parser.getCodec().treeToValue(item, DeletedEntityImpl.class));
+          delta.getDeletedEntities().add(parser.getCodec().treeToValue(item, DeletedEntity.class));
         } else if (itemContextURL.isDeltaLink()) {
-          delta.getAddedLinks().add(parser.getCodec().treeToValue(item, DeltaLinkImpl.class));
+          delta.getAddedLinks().add(parser.getCodec().treeToValue(item, DeltaLink.class));
         } else if (itemContextURL.isDeltaDeletedLink()) {
-          delta.getDeletedLinks().add(parser.getCodec().treeToValue(item, DeltaLinkImpl.class));
+          delta.getDeletedLinks().add(parser.getCodec().treeToValue(item, DeltaLink.class));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
index 9641623..1db725b 100755
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
@@ -37,6 +37,7 @@ 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.Property;
 import org.apache.olingo.commons.api.data.ResWrap;
@@ -51,11 +52,6 @@ import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.geo.Geospatial;
 import org.apache.olingo.commons.api.serialization.ODataDeserializer;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-import org.apache.olingo.commons.core.data.AnnotationImpl;
-import org.apache.olingo.commons.core.data.ComplexValueImpl;
-import org.apache.olingo.commons.core.data.EntitySetImpl;
-import org.apache.olingo.commons.core.data.LinkImpl;
-import org.apache.olingo.commons.core.data.PropertyImpl;
 import org.apache.olingo.commons.core.edm.provider.EdmTypeInfo;
 
 import com.fasterxml.jackson.core.JsonFactory;
@@ -96,7 +92,7 @@ public class JsonDeserializer implements ODataDeserializer {
   }
 
   protected String setInline(final String name, final String suffix, final JsonNode tree,
-      final ObjectCodec codec, final LinkImpl link) throws IOException {
+      final ObjectCodec codec, final Link link) throws IOException {
 
     final String entityNamePrefix = name.substring(0, name.indexOf(suffix));
     if (tree.has(entityNamePrefix)) {
@@ -110,7 +106,7 @@ public class JsonDeserializer implements ODataDeserializer {
       } else if (inline instanceof ArrayNode) {
         link.setType(ODataLinkType.ENTITY_SET_NAVIGATION.toString());
 
-        final EntitySet entitySet = new EntitySetImpl();
+        final EntitySet entitySet = new EntitySet();
         for (final Iterator<JsonNode> entries = inline.elements(); entries.hasNext();) {
           entitySet.getEntities().add(entityDeserializer.doDeserialize(entries.next().traverse(codec)).getPayload());
         }
@@ -134,7 +130,7 @@ public class JsonDeserializer implements ODataDeserializer {
       final JsonNode tree, final ObjectCodec codec) throws IOException {
 
     if (field.getKey().endsWith(Constants.JSON_NAVIGATION_LINK)) {
-      final LinkImpl link = new LinkImpl();
+      final Link link = new Link();
       link.setTitle(getTitle(field));
       link.setRel(Constants.NS_NAVIGATION_LINK_REL + getTitle(field));
 
@@ -148,7 +144,7 @@ public class JsonDeserializer implements ODataDeserializer {
       toRemove.add(field.getKey());
       toRemove.add(setInline(field.getKey(), Constants.JSON_NAVIGATION_LINK, tree, codec, link));
     } else if (field.getKey().endsWith(Constants.JSON_ASSOCIATION_LINK)) {
-      final LinkImpl link = new LinkImpl();
+      final Link link = new Link();
       link.setTitle(getTitle(field));
       link.setRel(Constants.NS_ASSOCIATION_LINK_REL + getTitle(field));
       link.setHref(field.getValue().textValue());
@@ -168,7 +164,7 @@ public class JsonDeserializer implements ODataDeserializer {
       if (field.getValue().isValueNode()) {
         final String suffix = field.getKey().replaceAll("^.*@", "@");
 
-        final LinkImpl link = new LinkImpl();
+        final Link link = new Link();
         link.setTitle(getTitle(field));
         link.setRel(Constants.NS_NAVIGATION_LINK_REL + getTitle(field));
         link.setHref(field.getValue().textValue());
@@ -180,7 +176,7 @@ public class JsonDeserializer implements ODataDeserializer {
         for (final Iterator<JsonNode> itor = field.getValue().elements(); itor.hasNext();) {
           final JsonNode node = itor.next();
 
-          final LinkImpl link = new LinkImpl();
+          final Link link = new Link();
           link.setTitle(getTitle(field));
           link.setRel(Constants.NS_NAVIGATION_LINK_REL + getTitle(field));
           link.setHref(node.asText());
@@ -243,7 +239,7 @@ public class JsonDeserializer implements ODataDeserializer {
       final Matcher customAnnotation = CUSTOM_ANNOTATION.matcher(field.getKey());
 
       if (field.getKey().charAt(0) == '@') {
-        final Annotation entityAnnot = new AnnotationImpl();
+        final Annotation entityAnnot = new Annotation();
         entityAnnot.setTerm(field.getKey().substring(1));
 
         value(entityAnnot, field.getValue(), codec);
@@ -253,11 +249,11 @@ public class JsonDeserializer implements ODataDeserializer {
       } else if (type == null && field.getKey().endsWith(getJSONAnnotation(Constants.JSON_TYPE))) {
         type = field.getValue().asText();
       } else if (annotation == null && customAnnotation.matches() && !"odata".equals(customAnnotation.group(2))) {
-        annotation = new AnnotationImpl();
+        annotation = new Annotation();
         annotation.setTerm(customAnnotation.group(2) + "." + customAnnotation.group(3));
         value(annotation, field.getValue(), codec);
       } else {
-        final PropertyImpl property = new PropertyImpl();
+        final Property property = new Property();
         property.setName(field.getKey());
         property.setType(type == null
             ? null
@@ -289,7 +285,7 @@ public class JsonDeserializer implements ODataDeserializer {
   private Object fromComplex(final ObjectNode node, final ObjectCodec codec)
       throws IOException, EdmPrimitiveTypeException {
 
-    final ComplexValue complexValue = new ComplexValueImpl();
+    final ComplexValue complexValue = new ComplexValue();
     final Set<String> toRemove = new HashSet<String>();
     for (final Iterator<Map.Entry<String, JsonNode>> itor = node.fields(); itor.hasNext();) {
       final Map.Entry<String, JsonNode> field = itor.next();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
index 228ac06..bf54cda 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
@@ -38,9 +38,6 @@ import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
 import org.apache.olingo.commons.api.domain.ODataOperation;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
-import org.apache.olingo.commons.core.data.AnnotationImpl;
-import org.apache.olingo.commons.core.data.EntityImpl;
-import org.apache.olingo.commons.core.data.LinkImpl;
 import org.apache.olingo.commons.core.edm.provider.EdmTypeInfo;
 
 import com.fasterxml.jackson.core.JsonParseException;
@@ -67,7 +64,7 @@ public class JsonEntityDeserializer extends JsonDeserializer {
       throw new JsonParseException("Expected OData Entity, found EntitySet", parser.getCurrentLocation());
     }
 
-    final EntityImpl entity = new EntityImpl();
+    final Entity entity = new Entity();
 
     final URI contextURL;
     if (tree.hasNonNull(Constants.JSON_CONTEXT)) {
@@ -108,7 +105,7 @@ public class JsonEntityDeserializer extends JsonDeserializer {
     }
 
     if (tree.hasNonNull(Constants.JSON_READ_LINK)) {
-      final LinkImpl link = new LinkImpl();
+      final Link link = new Link();
       link.setRel(Constants.SELF_LINK_REL);
       link.setHref(tree.get(Constants.JSON_READ_LINK).textValue());
       entity.setSelfLink(link);
@@ -117,7 +114,7 @@ public class JsonEntityDeserializer extends JsonDeserializer {
     }
 
     if (tree.hasNonNull(Constants.JSON_EDIT_LINK)) {
-      final LinkImpl link = new LinkImpl();
+      final Link link = new Link();
       if (serverMode) {
         link.setRel(Constants.EDIT_LINK_REL);
       }
@@ -153,7 +150,7 @@ public class JsonEntityDeserializer extends JsonDeserializer {
 
       links(field, entity, toRemove, tree, parser.getCodec());
       if (field.getKey().endsWith(getJSONAnnotation(Constants.JSON_MEDIA_EDIT_LINK))) {
-        final LinkImpl link = new LinkImpl();
+        final Link link = new Link();
         link.setTitle(getTitle(field));
         link.setRel(Constants.NS_MEDIA_EDIT_LINK_REL + getTitle(field));
         link.setHref(field.getValue().textValue());
@@ -188,7 +185,7 @@ public class JsonEntityDeserializer extends JsonDeserializer {
 
         toRemove.add(field.getKey());
       } else if (customAnnotation.matches() && !"odata".equals(customAnnotation.group(2))) {
-        final Annotation annotation = new AnnotationImpl();
+        final Annotation annotation = new Annotation();
         annotation.setTerm(customAnnotation.group(2) + "." + customAnnotation.group(3));
         try {
           value(annotation, field.getValue(), parser.getCodec());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java
index 1e844b5..f260369 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySetDeserializer.java
@@ -29,8 +29,6 @@ import org.apache.olingo.commons.api.data.Annotation;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
-import org.apache.olingo.commons.core.data.AnnotationImpl;
-import org.apache.olingo.commons.core.data.EntitySetImpl;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.JsonNode;
@@ -55,7 +53,7 @@ public class JsonEntitySetDeserializer extends JsonDeserializer {
       return null;
     }
 
-    final EntitySetImpl entitySet = new EntitySetImpl();
+    final EntitySet entitySet = new EntitySet();
 
     URI contextURL;
     if (tree.hasNonNull(Constants.JSON_CONTEXT)) {
@@ -105,7 +103,7 @@ public class JsonEntitySetDeserializer extends JsonDeserializer {
     for (final Iterator<Map.Entry<String, JsonNode>> itor = tree.fields(); itor.hasNext();) {
       final Map.Entry<String, JsonNode> field = itor.next();
       if (field.getKey().charAt(0) == '@') {
-        final Annotation annotation = new AnnotationImpl();
+        final Annotation annotation = new Annotation();
         annotation.setTerm(field.getKey().substring(1));
 
         try {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java
index e0732d5..47c4387 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonPropertyDeserializer.java
@@ -30,8 +30,6 @@ import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.data.ValueType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
-import org.apache.olingo.commons.core.data.AnnotationImpl;
-import org.apache.olingo.commons.core.data.PropertyImpl;
 import org.apache.olingo.commons.core.edm.provider.EdmTypeInfo;
 
 import com.fasterxml.jackson.core.JsonParser;
@@ -53,7 +51,7 @@ public class JsonPropertyDeserializer extends JsonDeserializer {
 
     final String metadataETag;
     final URI contextURL;
-    final PropertyImpl property = new PropertyImpl();
+    final Property property = new Property();
 
     if (tree.hasNonNull(Constants.JSON_METADATA_ETAG)) {
       metadataETag = tree.get(Constants.JSON_METADATA_ETAG).textValue();
@@ -99,7 +97,7 @@ public class JsonPropertyDeserializer extends JsonDeserializer {
     for (final Iterator<Map.Entry<String, JsonNode>> itor = tree.fields(); itor.hasNext();) {
       final Map.Entry<String, JsonNode> field = itor.next();
       if (field.getKey().charAt(0) == '@') {
-        final Annotation annotation = new AnnotationImpl();
+        final Annotation annotation = new Annotation();
         annotation.setTerm(field.getKey().substring(1));
 
         try {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/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 fd3fda1..e749736 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
@@ -205,13 +205,13 @@ public class JsonSerializer implements ODataSerializer {
   }
 
   protected void serverLinks(final Linked linked, final JsonGenerator jgen)
-          throws IOException, EdmPrimitiveTypeException {
+      throws IOException, EdmPrimitiveTypeException {
     if (linked instanceof Entity) {
       for (Link link : ((Entity) linked).getMediaEditLinks()) {
         if (StringUtils.isNotBlank(link.getHref())) {
           jgen.writeStringField(
-                  link.getTitle() + StringUtils.prependIfMissing(Constants.JSON_MEDIA_EDIT_LINK, "@"),
-                  link.getHref());
+              link.getTitle() + StringUtils.prependIfMissing(Constants.JSON_MEDIA_EDIT_LINK, "@"),
+              link.getHref());
         }
       }
     }
@@ -219,8 +219,8 @@ public class JsonSerializer implements ODataSerializer {
     for (Link link : linked.getAssociationLinks()) {
       if (StringUtils.isNotBlank(link.getHref())) {
         jgen.writeStringField(
-                link.getTitle() + Constants.JSON_ASSOCIATION_LINK,
-                link.getHref());
+            link.getTitle() + Constants.JSON_ASSOCIATION_LINK,
+            link.getHref());
       }
     }
 
@@ -231,8 +231,8 @@ public class JsonSerializer implements ODataSerializer {
 
       if (StringUtils.isNotBlank(link.getHref())) {
         jgen.writeStringField(
-                link.getTitle() + Constants.JSON_NAVIGATION_LINK,
-                link.getHref());
+            link.getTitle() + Constants.JSON_NAVIGATION_LINK,
+            link.getHref());
       }
 
       if (link.getInlineEntity() != null) {
@@ -359,8 +359,8 @@ public class JsonSerializer implements ODataSerializer {
 
       String type = valuable.getType();
       if ((!valuable.isCollection() &&
-              StringUtils.isBlank(type) &&
-              valuable.isPrimitive()) || valuable.isNull()) {
+          StringUtils.isBlank(type) &&
+          valuable.isPrimitive()) || valuable.isNull()) {
         type = EdmPrimitiveTypeKind.String.getFullQualifiedName().toString();
       }
       if (StringUtils.isNotBlank(type) && format != ODataFormat.JSON_NO_METADATA) {
@@ -370,10 +370,8 @@ public class JsonSerializer implements ODataSerializer {
       }
     }
 
-    if (valuable instanceof Annotatable) {
-      for (Annotation annotation : ((Annotatable) valuable).getAnnotations()) {
-        valuable(jgen, annotation, name + "@" + annotation.getTerm());
-      }
+    for (Annotation annotation : ((Annotatable) valuable).getAnnotations()) {
+      valuable(jgen, annotation, name + "@" + annotation.getTerm());
     }
 
     jgen.writeFieldName(name);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
index 8db1ada..1f6ff8e 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
@@ -21,6 +21,8 @@ package org.apache.olingo.server.api;
 import java.util.List;
 
 import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.provider.EdmProvider;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.server.api.deserializer.DeserializerException;
@@ -99,5 +101,17 @@ public abstract class OData {
    */
   public abstract UriHelper createUriHelper();
 
+  /**
+   * Creates a new deserializer object for reading content in the specified format.
+   * Deserializer are used in Processor implementations.
+   *
+   * @param format any format supported by Olingo (XML, JSON ...)
+   */
   public abstract ODataDeserializer createDeserializer(ODataFormat format) throws DeserializerException;
+  
+  /**
+   * @param kind
+   * @return a {@link EdmPrimitiveType} instance for the type kind
+   */
+  public abstract EdmPrimitiveType createPrimitiveTypeInstance(EdmPrimitiveTypeKind kind);
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
index c05b4ae..80bed2f 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
@@ -20,8 +20,11 @@ package org.apache.olingo.server.core;
 
 import java.util.List;
 
+import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.provider.EdmProvider;
 import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.ODataHttpHandler;
 import org.apache.olingo.server.api.ServiceMetadata;
@@ -105,4 +108,9 @@ public class ODataImpl extends OData {
 
     return serializer;
   }
+
+  @Override
+  public EdmPrimitiveType createPrimitiveTypeInstance(EdmPrimitiveTypeKind kind) {
+    return EdmPrimitiveTypeFactory.getInstance(kind);
+  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
index 538e95c..fa2f6a5 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
@@ -50,12 +50,6 @@ import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.EdmProperty;
 import org.apache.olingo.commons.api.edm.EdmType;
 import org.apache.olingo.commons.api.edm.EdmTypeDefinition;
-import org.apache.olingo.commons.core.data.ComplexValueImpl;
-import org.apache.olingo.commons.core.data.EntityImpl;
-import org.apache.olingo.commons.core.data.EntitySetImpl;
-import org.apache.olingo.commons.core.data.LinkImpl;
-import org.apache.olingo.commons.core.data.ParameterImpl;
-import org.apache.olingo.commons.core.data.PropertyImpl;
 import org.apache.olingo.server.api.deserializer.DeserializerException;
 import org.apache.olingo.server.api.deserializer.DeserializerResult;
 import org.apache.olingo.server.api.deserializer.ODataDeserializer;
@@ -80,13 +74,13 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   private static final String ODATA_CONTROL_INFORMATION_PREFIX = "@odata.";
 
   @Override
-  public DeserializerResult entityCollection(InputStream stream, EdmEntityType edmEntityType) 
+  public DeserializerResult entityCollection(InputStream stream, EdmEntityType edmEntityType)
       throws DeserializerException {
     try {
       final ObjectNode tree = parseJsonTree(stream);
-      
+
       return DeserializerResultImpl.with().entityCollection(consumeEntitySetNode(edmEntityType, tree, null))
-                                          .build();
+          .build();
     } catch (JsonParseException e) {
       throw new DeserializerException("An JsonParseException occurred", e,
           DeserializerException.MessageKeys.JSON_SYNTAX_EXCEPTION);
@@ -98,9 +92,9 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     }
   }
 
-  private EntitySet consumeEntitySetNode(EdmEntityType edmEntityType, final ObjectNode tree, 
+  private EntitySet consumeEntitySetNode(EdmEntityType edmEntityType, final ObjectNode tree,
       final ExpandTreeBuilder expandBuilder) throws DeserializerException {
-    EntitySetImpl entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
     // Consume entities
     JsonNode jsonNode = tree.get(Constants.VALUE);
@@ -137,7 +131,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     return entitySet;
   }
 
-  private List<Entity> consumeEntitySetArray(EdmEntityType edmEntityType, JsonNode jsonNode, 
+  private List<Entity> consumeEntitySetArray(EdmEntityType edmEntityType, JsonNode jsonNode,
       final ExpandTreeBuilder expandBuilder) throws DeserializerException {
     List<Entity> entities = new ArrayList<Entity>();
     for (JsonNode arrayElement : jsonNode) {
@@ -156,10 +150,10 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     try {
       final ObjectNode tree = parseJsonTree(stream);
       final ExpandTreeBuilderImpl expandBuilder = new ExpandTreeBuilderImpl();
-      
+
       return DeserializerResultImpl.with().entity(consumeEntityNode(edmEntityType, tree, expandBuilder))
-                                          .expandOption(expandBuilder.build())
-                                          .build();
+          .expandOption(expandBuilder.build())
+          .build();
 
     } catch (JsonParseException e) {
       throw new DeserializerException("An JsonParseException occurred", e,
@@ -173,9 +167,9 @@ public class ODataJsonDeserializer implements ODataDeserializer {
 
   }
 
-  private Entity consumeEntityNode(EdmEntityType edmEntityType, final ObjectNode tree, 
+  private Entity consumeEntityNode(EdmEntityType edmEntityType, final ObjectNode tree,
       final ExpandTreeBuilder expandBuilder) throws DeserializerException {
-    EntityImpl entity = new EntityImpl();
+    Entity entity = new Entity();
     entity.setType(edmEntityType.getFullQualifiedName().getFullQualifiedNameAsString());
 
     // Check and consume all Properties
@@ -193,7 +187,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   }
 
   @Override
-  public DeserializerResult actionParameters(InputStream stream, final EdmAction edmAction) 
+  public DeserializerResult actionParameters(InputStream stream, final EdmAction edmAction)
       throws DeserializerException {
     try {
       ObjectNode tree = parseJsonTree(stream);
@@ -214,7 +208,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     }
   }
 
-  private ObjectNode parseJsonTree(InputStream stream) 
+  private ObjectNode parseJsonTree(InputStream stream)
       throws IOException, JsonParseException, JsonProcessingException {
     ObjectMapper objectMapper = new ObjectMapper();
     objectMapper.configure(DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY, true);
@@ -232,7 +226,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
     }
     for (final String name : parameterNames) {
       final EdmParameter edmParameter = edmAction.getParameter(name);
-      ParameterImpl parameter = new ParameterImpl();
+      Parameter parameter = new Parameter();
       parameter.setName(name);
       JsonNode jsonNode = node.get(name);
 
@@ -281,7 +275,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
    * @throws DeserializerException if an exception during consummation occurs
    */
   private void consumeRemainingJsonNodeFields(final EdmEntityType edmEntityType, final ObjectNode node,
-      final EntityImpl entity) throws DeserializerException {
+      final Entity entity) throws DeserializerException {
     final List<String> toRemove = new ArrayList<String>();
     Iterator<Entry<String, JsonNode>> fieldsIterator = node.fields();
     while (fieldsIterator.hasNext()) {
@@ -304,7 +298,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   }
 
   private void consumeEntityProperties(final EdmEntityType edmEntityType, final ObjectNode node,
-      final EntityImpl entity) throws DeserializerException {
+      final Entity entity) throws DeserializerException {
     List<String> propertyNames = edmEntityType.getPropertyNames();
     for (String propertyName : propertyNames) {
       JsonNode jsonNode = node.get(propertyName);
@@ -326,7 +320,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   }
 
   private void consumeExpandedNavigationProperties(final EdmEntityType edmEntityType, final ObjectNode node,
-      final EntityImpl entity, final ExpandTreeBuilder expandBuilder) throws DeserializerException {
+      final Entity entity, final ExpandTreeBuilder expandBuilder) throws DeserializerException {
     List<String> navigationPropertyNames = edmEntityType.getNavigationPropertyNames();
     for (String navigationPropertyName : navigationPropertyNames) {
       // read expanded navigation property
@@ -339,22 +333,22 @@ public class ODataJsonDeserializer implements ODataDeserializer {
               DeserializerException.MessageKeys.INVALID_NULL_PROPERTY, navigationPropertyName);
         }
 
-        LinkImpl link = new LinkImpl();
+        Link link = new Link();
         link.setTitle(navigationPropertyName);
-        final ExpandTreeBuilder childExpandBuilder = (expandBuilder != null) ? 
-                                                                expandBuilder.expand(edmNavigationProperty) : null;
+        final ExpandTreeBuilder childExpandBuilder = (expandBuilder != null) ?
+            expandBuilder.expand(edmNavigationProperty) : null;
         if (jsonNode.isArray() && edmNavigationProperty.isCollection()) {
           link.setType(ODataLinkType.ENTITY_SET_NAVIGATION.toString());
-          EntitySetImpl inlineEntitySet = new EntitySetImpl();
-          inlineEntitySet.getEntities().addAll(consumeEntitySetArray(edmNavigationProperty.getType(), jsonNode, 
-                                                                     childExpandBuilder));
+          EntitySet inlineEntitySet = new EntitySet();
+          inlineEntitySet.getEntities().addAll(consumeEntitySetArray(edmNavigationProperty.getType(), jsonNode,
+              childExpandBuilder));
           link.setInlineEntitySet(inlineEntitySet);
         } else if (!jsonNode.isArray() && (!jsonNode.isValueNode() || jsonNode.isNull())
             && !edmNavigationProperty.isCollection()) {
           link.setType(ODataLinkType.ENTITY_NAVIGATION.toString());
           if (!jsonNode.isNull()) {
-            Entity inlineEntity = consumeEntityNode(edmNavigationProperty.getType(), (ObjectNode) jsonNode, 
-                                                    childExpandBuilder);
+            Entity inlineEntity = consumeEntityNode(edmNavigationProperty.getType(), (ObjectNode) jsonNode,
+                childExpandBuilder);
             link.setInlineEntity(inlineEntity);
           }
         } else {
@@ -377,7 +371,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
       throw new DeserializerException("Invalid navigationPropertyName: " + navigationPropertyName,
           DeserializerException.MessageKeys.NAVIGATION_PROPERTY_NOT_FOUND, navigationPropertyName);
     }
-    LinkImpl bindingLink = new LinkImpl();
+    Link bindingLink = new Link();
     bindingLink.setTitle(navigationPropertyName);
 
     if (edmNavigationProperty.isCollection()) {
@@ -419,7 +413,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
   private Property consumePropertyNode(final String name, final EdmType type, final boolean isCollection,
       final boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale,
       final boolean isUnicode, final EdmMapping mapping, JsonNode jsonNode) throws DeserializerException {
-    Property property = new PropertyImpl();
+    Property property = new Property();
     property.setName(name);
     property.setType(type.getFullQualifiedName().getFullQualifiedNameAsString());
     if (isCollection) {
@@ -552,7 +546,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
           DeserializerException.MessageKeys.INVALID_JSON_TYPE_FOR_PROPERTY, name);
     }
     // Even if there are no properties defined we have to give back an empty list
-    ComplexValueImpl complexValue = new ComplexValueImpl();
+    ComplexValue complexValue = new ComplexValue();
     EdmComplexType edmType = (EdmComplexType) type;
     // Check and consume all Properties
     for (String propertyName : edmType.getPropertyNames()) {
@@ -795,9 +789,9 @@ public class ODataJsonDeserializer implements ODataDeserializer {
       JsonNode jsonNode = tree.get(Constants.VALUE);
       if (jsonNode != null) {
         if (jsonNode.isArray()) {
-          ArrayNode arrayNode = (ArrayNode)jsonNode;
+          ArrayNode arrayNode = (ArrayNode) jsonNode;
           Iterator<JsonNode> it = arrayNode.iterator();
-          while(it.hasNext()) {
+          while (it.hasNext()) {
             parsedValues.add(new URI(it.next().get(key).asText()));
           }
         } else {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
index 1fc89e8..c7ae99d 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
@@ -33,8 +33,6 @@ import org.apache.olingo.commons.api.data.ContextURL;
 import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.data.ValueType;
 import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.core.data.ComplexValueImpl;
-import org.apache.olingo.commons.core.data.PropertyImpl;
 import org.apache.olingo.server.api.serializer.ComplexSerializerOptions;
 import org.junit.Test;
 
@@ -44,7 +42,7 @@ public class ODataJsonSerializerTest {
     final List<ComplexValue> col = new ArrayList<ComplexValue>();
     col.add(getValues(1));
     col.add(getValues(2));
-    final Property complexCollection = new PropertyImpl(null, "ComplexCol", ValueType.COLLECTION_COMPLEX, col);
+    final Property complexCollection = new Property(null, "ComplexCol", ValueType.COLLECTION_COMPLEX, col);
     
     final ODataJsonSerializer serializer = new ODataJsonSerializer(ODataFormat.APPLICATION_JSON);
     final ComplexSerializerOptions options = ComplexSerializerOptions.with()
@@ -66,9 +64,9 @@ public class ODataJsonSerializerTest {
   }
 
   private ComplexValue getValues(int i) {
-    ComplexValue value = new ComplexValueImpl();
-    value.getValue().add(new PropertyImpl(null, "prop1", ValueType.PRIMITIVE, "test" + i));
-    value.getValue().add(new PropertyImpl(null, "prop2", ValueType.PRIMITIVE, "test" + i + i));
+    ComplexValue value = new ComplexValue();
+    value.getValue().add(new Property(null, "prop1", ValueType.PRIMITIVE, "test" + i));
+    value.getValue().add(new Property(null, "prop2", ValueType.PRIMITIVE, "test" + i + i));
     return value;
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/server-tecsvc/pom.xml
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/pom.xml b/lib/server-tecsvc/pom.xml
index f74f78c..817745f 100644
--- a/lib/server-tecsvc/pom.xml
+++ b/lib/server-tecsvc/pom.xml
@@ -133,6 +133,7 @@
       <groupId>org.apache.olingo</groupId>
       <artifactId>odata-commons-core</artifactId>
       <version>${project.version}</version>
+	  <scope>runtime</scope>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/Encoder.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/Encoder.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/Encoder.java
new file mode 100644
index 0000000..82bb775
--- /dev/null
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/Encoder.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+package org.apache.olingo.server.tecsvc;
+
+import java.io.UnsupportedEncodingException;
+
+/**
+ * Encodes a Java String (in its internal UTF-16 encoding) into its
+ * percent-encoded UTF-8 representation according to
+ * <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>
+ * (with consideration of its predecessor RFC 2396).
+ * 
+ */
+public class Encoder {
+
+  //TODO: Should we really copy this class?
+  
+  /**
+   * Encodes a Java String (in its internal UTF-16 encoding) into its
+   * percent-encoded UTF-8 representation according to
+   * <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>,
+   * suitable for parts of an OData path segment.
+   * @param value the Java String
+   * @return the encoded String
+   */
+  public static String encode(final String value) {
+    return encoder.encodeInternal(value);
+  }
+
+  // OData has special handling for "'", so we allow that to remain unencoded.
+  // Other sub-delims not used neither by JAX-RS nor by OData could be added
+  // if the encoding is considered to be too aggressive.
+  // RFC 3986 would also allow the gen-delims ":" and "@" to appear literally
+  // in path-segment parts.
+  private static final String ODATA_UNENCODED = "'";
+
+  // Character classes from RFC 3986
+  private final static String UNRESERVED = "-._~"; // + ALPHA + DIGIT
+  // RFC 3986 says: "For consistency, URI producers and normalizers should
+  // use uppercase hexadecimal digits for all percent-encodings."
+  private final static String[] hex = { "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", "%08", "%09", "%0A",
+      "%0B", "%0C", "%0D", "%0E", "%0F", "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", "%18", "%19", "%1A",
+      "%1B", "%1C", "%1D", "%1E", "%1F", "%20", "%21", "%22", "%23", "%24", "%25", "%26", "%27", "%28", "%29", "%2A",
+      "%2B", "%2C", "%2D", "%2E", "%2F", "%30", "%31", "%32", "%33", "%34", "%35", "%36", "%37", "%38", "%39", "%3A",
+      "%3B", "%3C", "%3D", "%3E", "%3F", "%40", "%41", "%42", "%43", "%44", "%45", "%46", "%47", "%48", "%49", "%4A",
+      "%4B", "%4C", "%4D", "%4E", "%4F", "%50", "%51", "%52", "%53", "%54", "%55", "%56", "%57", "%58", "%59", "%5A",
+      "%5B", "%5C", "%5D", "%5E", "%5F", "%60", "%61", "%62", "%63", "%64", "%65", "%66", "%67", "%68", "%69", "%6A",
+      "%6B", "%6C", "%6D", "%6E", "%6F", "%70", "%71", "%72", "%73", "%74", "%75", "%76", "%77", "%78", "%79", "%7A",
+      "%7B", "%7C", "%7D", "%7E", "%7F", "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", "%88",
+      "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", "%98",
+      "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", "%A8",
+      "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", "%B8",
+      "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", "%C8",
+      "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", "%D8",
+      "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", "%E8",
+      "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", "%F8",
+      "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF" };
+
+  private static final Encoder encoder = new Encoder(ODATA_UNENCODED);
+
+  /** characters to remain unencoded in addition to {@link #UNRESERVED} */
+  private final String unencoded;
+
+  private Encoder(final String unencoded) {
+    this.unencoded = unencoded == null ? "" : unencoded;
+  }
+
+  /**
+   * <p>Returns the percent-encoded UTF-8 representation of a String.</p>
+   * <p>In order to avoid producing percent-encoded CESU-8 (as described in
+   * the Unicode Consortium's <a href="http://www.unicode.org/reports/tr26/">
+   * Technical Report #26</a>), this is done in two steps:
+   * <ol>
+   * <li>Re-encode the characters from their Java-internal UTF-16 representations
+   * into their UTF-8 representations.</li>
+   * <li>Percent-encode each of the bytes in the UTF-8 representation.
+   * This is possible on byte level because all characters that do not have
+   * a <code>%xx</code> representation are represented in one byte in UTF-8.</li>
+   * </ol></p>
+   * @param input input String
+   * @return encoded representation
+   */
+  private String encodeInternal(final String input) {
+    StringBuilder resultStr = new StringBuilder();
+
+    try {
+      for (byte utf8Byte : input.getBytes("UTF-8")) {
+        final char character = (char) utf8Byte;
+        if (isUnreserved(character)) {
+          resultStr.append(character);
+        } else if (isUnencoded(character)) {
+          resultStr.append(character);
+        } else if (utf8Byte >= 0) {
+          resultStr.append(hex[utf8Byte]);
+        } else {
+          // case UTF-8 continuation byte
+          resultStr.append(hex[256 + utf8Byte]); // index adjusted for the usage of signed bytes
+        }
+      }
+    } catch (final UnsupportedEncodingException e) { // should never happen; UTF-8 is always there
+      return null;
+    }
+    return resultStr.toString();
+  }
+
+  private static boolean isUnreserved(final char character) {
+    return 'A' <= character && character <= 'Z' // case A..Z
+        || 'a' <= character && character <= 'z' // case a..z
+        || '0' <= character && character <= '9' // case 0..9
+        || UNRESERVED.indexOf(character) >= 0;
+  }
+
+  private boolean isUnencoded(final char character) {
+    return unencoded.indexOf(character) >= 0;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/05935a0c/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
index 7de80e7..06da176 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
@@ -36,11 +36,6 @@ import org.apache.olingo.commons.api.data.Link;
 import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.data.ValueType;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.core.data.ComplexValueImpl;
-import org.apache.olingo.commons.core.data.EntityImpl;
-import org.apache.olingo.commons.core.data.EntitySetImpl;
-import org.apache.olingo.commons.core.data.LinkImpl;
-import org.apache.olingo.commons.core.data.PropertyImpl;
 
 public class DataCreator {
 
@@ -64,19 +59,19 @@ public class DataCreator {
     data.put("ESServerSidePaging", createESServerSidePaging());
 
     // No data available but to allow an insert operation create empty EntitySets
-    data.put("ESAllNullable", new EntitySetImpl());
-    data.put("ESMixEnumDefCollComp", new EntitySetImpl());
-    data.put("ESTwoBase", new EntitySetImpl());
-    data.put("ESBaseTwoKeyNav", new EntitySetImpl());
-    data.put("ESBaseTwoKeyTwoPrim", new EntitySetImpl());
-    data.put("ESTwoKeyTwoPrim", new EntitySetImpl());
-    data.put("ESCompCollAllPrim", new EntitySetImpl());
-    data.put("ESKeyTwoKeyComp", new EntitySetImpl());
-    data.put("ESFourKeyAlias", new EntitySetImpl());
-    data.put("ESBase", new EntitySetImpl());
-    data.put("ESTwoBaseTwoKeyTwoPrim", new EntitySetImpl());
-    data.put("ESInvisible", new EntitySetImpl());
-    data.put("ESCompMixPrimCollComp", new EntitySetImpl());
+    data.put("ESAllNullable", new EntitySet());
+    data.put("ESMixEnumDefCollComp", new EntitySet());
+    data.put("ESTwoBase", new EntitySet());
+    data.put("ESBaseTwoKeyNav", new EntitySet());
+    data.put("ESBaseTwoKeyTwoPrim", new EntitySet());
+    data.put("ESTwoKeyTwoPrim", new EntitySet());
+    data.put("ESCompCollAllPrim", new EntitySet());
+    data.put("ESKeyTwoKeyComp", new EntitySet());
+    data.put("ESFourKeyAlias", new EntitySet());
+    data.put("ESBase", new EntitySet());
+    data.put("ESTwoBaseTwoKeyTwoPrim", new EntitySet());
+    data.put("ESInvisible", new EntitySet());
+    data.put("ESCompMixPrimCollComp", new EntitySet());
 
     linkESTwoPrim(data);
     linkESAllPrim(data);
@@ -89,10 +84,10 @@ public class DataCreator {
   }
 
   private EntitySet createESServerSidePaging() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
     for (int i = 1; i <= 503; i++) {
-      entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", i))
+      entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", i))
           .addProperty(createPrimitive("PropertyString", "Number:" + i)));
     }
 
@@ -100,7 +95,7 @@ public class DataCreator {
   }
 
   private EntitySet createESKeyNav() {
-    final EntitySet entitySet = new EntitySetImpl();
+    final EntitySet entitySet = new EntitySet();
 
     entitySet.getEntities().add(createETKeyNavEntity(1, "I am String Property 1"));
     entitySet.getEntities().add(createETKeyNavEntity(2, "I am String Property 2"));
@@ -111,7 +106,7 @@ public class DataCreator {
 
   @SuppressWarnings("unchecked")
   private Entity createETKeyNavEntity(int propertyInt16, String propertyString) {
-    return new EntityImpl().addProperty(createPrimitive("PropertyInt16", propertyInt16))
+    return new Entity().addProperty(createPrimitive("PropertyInt16", propertyInt16))
         .addProperty(createPrimitive("PropertyString", propertyString))
         .addProperty(createComplex("PropertyCompNav", createPrimitive("PropertyInt16", 1)))
         .addProperty(createKeyNavAllPrimComplexValue("PropertyCompAllPrim")).addProperty(
@@ -129,7 +124,7 @@ public class DataCreator {
   }
 
   private EntitySet createESTwoKeyNav() {
-    final EntitySet entitySet = new EntitySetImpl();
+    final EntitySet entitySet = new EntitySet();
 
     entitySet.getEntities().add(createESTwoKeyNavEntity(1, "1"));
     entitySet.getEntities().add(createESTwoKeyNavEntity(1, "2"));
@@ -141,7 +136,7 @@ public class DataCreator {
 
   @SuppressWarnings("unchecked")
   private Entity createESTwoKeyNavEntity(int propertyInt16, String propertyString) {
-    return new EntityImpl().addProperty(createPrimitive("PropertyInt16", propertyInt16))
+    return new Entity().addProperty(createPrimitive("PropertyInt16", propertyInt16))
         .addProperty(createPrimitive("PropertyString", propertyString)).addProperty(
             createComplex("PropertyComp", createPrimitive("PropertyInt16", 11),
                 createComplex("PropertyComp", createPrimitive("PropertyString", "StringValue"),
@@ -180,9 +175,9 @@ public class DataCreator {
 
   @SuppressWarnings("unchecked")
   private EntitySet createESCompCollComp() {
-    final EntitySet entitySet = new EntitySetImpl();
+    final EntitySet entitySet = new EntitySet();
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
         .addProperty(createComplex("PropertyComp", createComplexCollection("CollPropertyComp", Arrays
             .asList(createPrimitive("PropertyInt16", 555),
                 createPrimitive("PropertyString", "1 Test Complex in Complex Property")), Arrays
@@ -191,7 +186,7 @@ public class DataCreator {
             .asList(createPrimitive("PropertyInt16", 777),
                 createPrimitive("PropertyString", "3 Test Complex in Complex Property"))))));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", 12345)).addProperty(
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", 12345)).addProperty(
         createComplex("PropertyComp", createComplexCollection("CollPropertyComp", Arrays
             .asList(createPrimitive("PropertyInt16", 888),
                 createPrimitive("PropertyString", "11 Test Complex in Complex Property")), Arrays
@@ -204,27 +199,27 @@ public class DataCreator {
   }
 
   private EntitySet createESTwoPrim() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", 32766))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", 32766))
         .addProperty(createPrimitive("PropertyString", "Test String1")));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", -365))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", -365))
         .addProperty(createPrimitive("PropertyString", "Test String2")));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", -32766))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", -32766))
         .addProperty(createPrimitive("PropertyString", null)));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
         .addProperty(createPrimitive("PropertyString", "Test String4")));
 
     return entitySet;
   }
 
   private EntitySet createESAllPrim() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
         .addProperty(createPrimitive("PropertyString", "First Resource - positive values"))
         .addProperty(createPrimitive("PropertyBoolean", true)).addProperty(createPrimitive("PropertyByte", 255))
         .addProperty(createPrimitive("PropertySByte", Byte.MAX_VALUE))
@@ -239,7 +234,7 @@ public class DataCreator {
         .addProperty(createPrimitive("PropertyDuration", 6)).addProperty(createPrimitive("PropertyGuid", GUID))
         .addProperty(createPrimitive("PropertyTimeOfDay", getTime(3, 26, 5))));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", Short.MIN_VALUE))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", Short.MIN_VALUE))
         .addProperty(createPrimitive("PropertyString", "Second Resource - negative values"))
         .addProperty(createPrimitive("PropertyBoolean", false)).addProperty(createPrimitive("PropertyByte", 0))
         .addProperty(createPrimitive("PropertySByte", Byte.MIN_VALUE))
@@ -255,7 +250,7 @@ public class DataCreator {
         .addProperty(createPrimitive("PropertyGuid", UUID.fromString("76543201-23ab-cdef-0123-456789dddfff")))
         .addProperty(createPrimitive("PropertyTimeOfDay", getTime(23, 49, 14))));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", 0))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", 0))
         .addProperty(createPrimitive("PropertyString", "")).addProperty(createPrimitive("PropertyBoolean", false))
         .addProperty(createPrimitive("PropertyByte", 0)).addProperty(createPrimitive("PropertySByte", 0))
         .addProperty(createPrimitive("PropertyInt32", 0)).addProperty(createPrimitive("PropertyInt64", 0))
@@ -272,9 +267,9 @@ public class DataCreator {
   }
 
   private EntitySet createESCompAllPrim() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    Entity entity = new EntityImpl();
+    Entity entity = new Entity();
     entity.addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE));
     entity.addProperty(createComplex("PropertyComp", createPrimitive("PropertyString", "First Resource - first"),
         createPrimitive("PropertyBinary",
@@ -289,7 +284,7 @@ public class DataCreator {
         createPrimitive("PropertySByte", Byte.MAX_VALUE), createPrimitive("PropertyTimeOfDay", getTime(1, 0, 1))));
     entitySet.getEntities().add(entity);
 
-    entity = new EntityImpl();
+    entity = new Entity();
     entity.addProperty(createPrimitive("PropertyInt16", 7));
     entity.addProperty(createComplex("PropertyComp", createPrimitive("PropertyString", "Second Resource - second"),
         createPrimitive("PropertyBinary",
@@ -305,7 +300,7 @@ public class DataCreator {
         createPrimitive("PropertyTimeOfDay", getTimestamp(1, 1, 1, 7, 45, 12, 765432100))));
     entitySet.getEntities().add(entity);
 
-    entity = new EntityImpl();
+    entity = new Entity();
     entity.addProperty(createPrimitive("PropertyInt16", 0));
     entity.addProperty(createComplex("PropertyComp", createPrimitive("PropertyString", "Third Resource - third"),
         createPrimitive("PropertyBinary",
@@ -324,9 +319,9 @@ public class DataCreator {
   }
 
   private EntitySet createESCollAllPrim() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", 1)).addProperty(
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", 1)).addProperty(
         createPrimitiveCollection("CollPropertyString", "Employee1@company.example", "Employee2@company.example",
             "Employee3@company.example"))
         .addProperty(createPrimitiveCollection("CollPropertyBoolean", true, false, true))
@@ -353,12 +348,12 @@ public class DataCreator {
             createPrimitiveCollection("CollPropertyTimeOfDay", getTime(4, 14, 13), getTime(23, 59, 59),
                 getTime(1, 12, 33))));
 
-    Entity entity = new EntityImpl();
+    Entity entity = new Entity();
     entity.getProperties().addAll(entitySet.getEntities().get(0).getProperties());
     entity.getProperties().set(0, createPrimitive("PropertyInt16", 2));
     entitySet.getEntities().add(entity);
 
-    entity = new EntityImpl();
+    entity = new Entity();
     entity.getProperties().addAll(entitySet.getEntities().get(0).getProperties());
     entity.getProperties().set(0, createPrimitive("PropertyInt16", 3));
     entitySet.getEntities().add(entity);
@@ -372,22 +367,22 @@ public class DataCreator {
         Arrays.asList(createPrimitive("PropertyInt16", 456), createPrimitive("PropertyString", "TEST 2")),
         Arrays.asList(createPrimitive("PropertyInt16", 789), createPrimitive("PropertyString", "TEST 3")));
 
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
         .addProperty(
             createPrimitiveCollection("CollPropertyString", "Employee1@company.example", "Employee2@company.example",
                 "Employee3@company.example")).addProperty(
             createComplex("PropertyComp", createPrimitive("PropertyInt16", 111),
                 createPrimitive("PropertyString", "TEST A"))).addProperty(complexCollection));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", 7)).addProperty(
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", 7)).addProperty(
         createPrimitiveCollection("CollPropertyString", "Employee1@company.example", "Employee2@company.example",
             "Employee3@company.example")).addProperty(
         createComplex("PropertyComp", createPrimitive("PropertyInt16", 222),
             createPrimitive("PropertyString", "TEST B"))).addProperty(complexCollection));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyInt16", 0)).addProperty(
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyInt16", 0)).addProperty(
         createPrimitiveCollection("CollPropertyString", "Employee1@company.example", "Employee2@company.example",
             "Employee3@company.example")).addProperty(
         createComplex("PropertyComp", createPrimitive("PropertyInt16", 333),
@@ -397,9 +392,9 @@ public class DataCreator {
   }
 
   private EntitySet createESAllKey() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyString", "First"))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyString", "First"))
         .addProperty(createPrimitive("PropertyBoolean", true)).addProperty(createPrimitive("PropertyByte", 255))
         .addProperty(createPrimitive("PropertySByte", Byte.MAX_VALUE))
         .addProperty(createPrimitive("PropertyInt16", Short.MAX_VALUE))
@@ -411,7 +406,7 @@ public class DataCreator {
         .addProperty(createPrimitive("PropertyDuration", 6)).addProperty(createPrimitive("PropertyGuid", GUID))
         .addProperty(createPrimitive("PropertyTimeOfDay", getTime(2, 48, 21))));
 
-    entitySet.getEntities().add(new EntityImpl().addProperty(createPrimitive("PropertyString", "Second"))
+    entitySet.getEntities().add(new Entity().addProperty(createPrimitive("PropertyString", "Second"))
         .addProperty(createPrimitive("PropertyBoolean", true)).addProperty(createPrimitive("PropertyByte", 254))
         .addProperty(createPrimitive("PropertySByte", 124)).addProperty(createPrimitive("PropertyInt16", 32764))
         .addProperty(createPrimitive("PropertyInt32", 2147483644))
@@ -426,16 +421,16 @@ public class DataCreator {
   }
 
   private EntitySet createESCompComp() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    Entity entity = new EntityImpl();
+    Entity entity = new Entity();
     entity.addProperty(createPrimitive("PropertyInt16", 1));
     entity.addProperty(createComplex("PropertyComp",
         createComplex("PropertyComp", createPrimitive("PropertyInt16", 123),
             createPrimitive("PropertyString", "String 1"))));
     entitySet.getEntities().add(entity);
 
-    entity = new EntityImpl();
+    entity = new Entity();
     entity.addProperty(createPrimitive("PropertyInt16", 2));
     entity.addProperty(createComplex("PropertyComp",
         createComplex("PropertyComp", createPrimitive("PropertyInt16", 987),
@@ -446,24 +441,24 @@ public class DataCreator {
   }
 
   private EntitySet createESMedia() {
-    EntitySet entitySet = new EntitySetImpl();
+    EntitySet entitySet = new EntitySet();
 
-    Entity entity = new EntityImpl().addProperty(createPrimitive("PropertyInt16", 1))
+    Entity entity = new Entity().addProperty(createPrimitive("PropertyInt16", 1))
         .addProperty(createPrimitive(DataProvider.MEDIA_PROPERTY_NAME, createImage("darkturquoise")));
     entity.setMediaContentType("image/svg+xml");
     entitySet.getEntities().add(entity);
 
-    entity = new EntityImpl().addProperty(createPrimitive("PropertyInt16", 2))
+    entity = new Entity().addProperty(createPrimitive("PropertyInt16", 2))
         .addProperty(createPrimitive(DataProvider.MEDIA_PROPERTY_NAME, createImage("royalblue")));
     entity.setMediaContentType("image/svg+xml");
     entitySet.getEntities().add(entity);
 
-    entity = new EntityImpl().addProperty(createPrimitive("PropertyInt16", 3))
+    entity = new Entity().addProperty(createPrimitive("PropertyInt16", 3))
         .addProperty(createPrimitive(DataProvider.MEDIA_PROPERTY_NAME, createImage("crimson")));
     entity.setMediaContentType("image/svg+xml");
     entitySet.getEntities().add(entity);
 
-    entity = new EntityImpl().addProperty(createPrimitive("PropertyInt16", 4))
+    entity = new Entity().addProperty(createPrimitive("PropertyInt16", 4))
         .addProperty(createPrimitive(DataProvider.MEDIA_PROPERTY_NAME, createImage("black")));
     entity.setMediaContentType("image/svg+xml");
     entitySet.getEntities().add(entity);
@@ -558,29 +553,29 @@ public class DataCreator {
   }
 
   protected static Property createPrimitive(final String name, final Object value) {
-    return new PropertyImpl(null, name, ValueType.PRIMITIVE, value);
+    return new Property(null, name, ValueType.PRIMITIVE, value);
   }
 
   protected static Property createPrimitiveCollection(final String name, final Object... values) {
-    return new PropertyImpl(null, name, ValueType.COLLECTION_PRIMITIVE, Arrays.asList(values));
+    return new Property(null, name, ValueType.COLLECTION_PRIMITIVE, Arrays.asList(values));
   }
 
   protected static Property createComplex(final String name, final Property... properties) {
-    ComplexValue complexValue = new ComplexValueImpl();
+    ComplexValue complexValue = new ComplexValue();
     for (final Property property : properties) {
       complexValue.getValue().add(property);
     }
-    return new PropertyImpl(null, name, ValueType.COMPLEX, complexValue);
+    return new Property(null, name, ValueType.COMPLEX, complexValue);
   }
 
   protected static Property createComplexCollection(final String name, final List<Property>... propertiesList) {
     List<ComplexValue> complexCollection = new ArrayList<ComplexValue>();
     for (final List<Property> properties : propertiesList) {
-      ComplexValue complexValue = new ComplexValueImpl();
+      ComplexValue complexValue = new ComplexValue();
       complexValue.getValue().addAll(properties);
       complexCollection.add(complexValue);
     }
-    return new PropertyImpl(null, name, ValueType.COLLECTION_COMPLEX, complexCollection);
+    return new Property(null, name, ValueType.COLLECTION_COMPLEX, complexCollection);
   }
 
   private Calendar getDateTime(final int year, final int month, final int day,
@@ -610,7 +605,7 @@ public class DataCreator {
   protected static void setLink(Entity entity, final String navigationPropertyName, final Entity target) {
     Link link = entity.getNavigationLink(navigationPropertyName);
     if (link == null) {
-      link = new LinkImpl();
+      link = new Link();
       link.setType(ODataLinkType.ENTITY_NAVIGATION.toString());
       link.setTitle(navigationPropertyName);
       entity.getNavigationLinks().add(link);
@@ -621,10 +616,10 @@ public class DataCreator {
   protected static void setLinks(Entity entity, final String navigationPropertyName, final Entity... targets) {
     Link link = entity.getNavigationLink(navigationPropertyName);
     if (link == null) {
-      link = new LinkImpl();
+      link = new Link();
       link.setType(ODataLinkType.ENTITY_SET_NAVIGATION.toString());
       link.setTitle(navigationPropertyName);
-      EntitySet target = new EntitySetImpl();
+      EntitySet target = new EntitySet();
       target.getEntities().addAll(Arrays.asList(targets));
       link.setInlineEntitySet(target);
       entity.getNavigationLinks().add(link);


Mime
View raw message