You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/02/18 17:29:12 UTC

[01/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Repository: olingo-odata4
Updated Branches:
  refs/heads/master c8865db8e -> 111239d7c


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java
deleted file mode 100644
index d994855..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterFactoryImpl.java
+++ /dev/null
@@ -1,52 +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.client.core.uri.v4;
-
-import org.apache.olingo.client.api.uri.FilterArg;
-import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
-import org.apache.olingo.client.api.uri.v4.FilterFactory;
-import org.apache.olingo.client.core.uri.AbstractFilterFactory;
-import org.apache.olingo.client.core.uri.FilterProperty;
-import org.apache.olingo.client.core.uri.HasFilter;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public class FilterFactoryImpl extends AbstractFilterFactory implements FilterFactory {
-
-  public FilterFactoryImpl(ODataServiceVersion version) {
-    super(version);
-  }
-
-  @Override
-  public FilterArgFactory getArgFactory() {
-    return new FilterArgFactoryImpl(version);
-  }
-
-  @Override
-  public URIFilter has(final String key, final EdmEnumType enumType, final String memberName) {
-    return has(getArgFactory().property(key), enumType, memberName);
-  }
-
-  @Override
-  public URIFilter has(final FilterArg left, final EdmEnumType enumType, final String memberName) {
-    return new HasFilter(left, new FilterProperty(enumType.toUriLiteral(memberName)));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java
deleted file mode 100644
index e5a156c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/URIBuilderImpl.java
+++ /dev/null
@@ -1,145 +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.client.core.uri.v4;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.olingo.client.api.Configuration;
-import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.client.api.uri.SegmentType;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.uri.v4.URISearch;
-import org.apache.olingo.client.core.uri.AbstractURIBuilder;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public class URIBuilderImpl extends AbstractURIBuilder<URIBuilder> implements URIBuilder {
-
-  public URIBuilderImpl(
-      final ODataServiceVersion version, final Configuration configuration, final String serviceRoot) {
-    super(version, configuration, serviceRoot);
-  }
-
-  @Override
-  public URIBuilder appendKeySegment(final EdmEnumType enumType, final String memberName) {
-    return appendKeySegment(enumType.toUriLiteral(memberName));
-  }
-
-  @Override
-  public URIBuilder appendKeySegment(final Map<String, Pair<EdmEnumType, String>> enumValues,
-          final Map<String, Object> segmentValues) {
-
-    final Map<String, Object> values = new LinkedHashMap<String, Object>();
-    for (Map.Entry<String, Pair<EdmEnumType, String>> entry : enumValues.entrySet()) {
-      values.put(entry.getKey(), entry.getValue().getKey().toUriLiteral(entry.getValue().getValue()));
-    }
-    values.putAll(segmentValues);
-
-    return appendKeySegment(values);
-  }
-
-  @Override
-  protected URIBuilder getThis() {
-    return this;
-  }
-
-  @Override
-  protected String noKeysWrapper() {
-    return "()";
-  }
-
-  @Override
-  protected char getBoundOperationSeparator() {
-    return '.';
-  }
-
-  @Override
-  protected String getOperationInvokeMarker() {
-    return "()";
-  }
-
-  @Override
-  public URIBuilder appendSingletonSegment(final String segmentValue) {
-    segments.add(new Segment(SegmentType.SINGLETON, segmentValue));
-    return getThis();
-  }
-
-  @Override
-  public URIBuilder appendEntityIdSegment(final String segmentValue) {
-    segments.add(new Segment(SegmentType.ENTITY, null));
-    return addQueryOption(QueryOption.ID, segmentValue);
-  }
-
-  @Override
-  public URIBuilder appendRefSegment() {
-    segments.add(new Segment(SegmentType.REF, SegmentType.REF.getValue()));
-    return getThis();
-  }
-
-  @Override
-  public URIBuilder appendCrossjoinSegment(final String... segmentValues) {
-    final StringBuilder segValue = new StringBuilder(SegmentType.CROSS_JOIN.getValue()).
-            append('(').append(StringUtils.join(segmentValues, ",")).append(')');
-    segments.add(new Segment(SegmentType.CROSS_JOIN, segValue.toString()));
-    return getThis();
-  }
-
-  @Override
-  public URIBuilder appendAllSegment() {
-    segments.add(new Segment(SegmentType.ALL, SegmentType.ALL.getValue()));
-    return getThis();
-  }
-
-  @Override
-  public URIBuilder id(final String idValue) {
-    return addQueryOption(QueryOption.ID, idValue);
-  }
-
-  @Override
-  public URIBuilder search(final URISearch search) {
-    return search(search.build());
-  }
-
-  @Override
-  public URIBuilder search(final String expression) {
-    return addQueryOption(QueryOption.SEARCH, expression);
-  }
-
-  @Override
-  public URIBuilder count(final boolean value) {
-    return addQueryOption(QueryOption.COUNT, Boolean.toString(value));
-  }
-
-  @Override
-  public URIBuilder expandWithOptions(final String expandItem, final Map<QueryOption, Object> options) {
-    final Map<String, Object> _options = new LinkedHashMap<String, Object>();
-    for (Map.Entry<QueryOption, Object> entry : options.entrySet()) {
-      _options.put("$" + entry.getKey().toString(), entry.getValue());
-    }
-    return expand(expandItem + buildMultiKeySegment(_options, false));
-  }
-
-  @Override
-  public URIBuilder expandWithSelect(final String expandItem, final String... selectItems) {
-    return expand(expandItem + "($select=" + StringUtils.join(selectItems, ",") + ")");
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/AndSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/AndSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/AndSearch.java
deleted file mode 100644
index 1dc4e51..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/AndSearch.java
+++ /dev/null
@@ -1,42 +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.client.core.v4;
-
-import org.apache.olingo.client.api.uri.v4.URISearch;
-
-public class AndSearch implements URISearch {
-
-  private final URISearch left;
-
-  private final URISearch right;
-
-  AndSearch(final URISearch left, final URISearch right) {
-    this.left = left;
-    this.right = right;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder().
-            append('(').append(left.build()).
-            append(" AND ").
-            append(right.build()).append(')').
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/EdmEnabledODataClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/EdmEnabledODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/EdmEnabledODataClientImpl.java
deleted file mode 100644
index 5baac81..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/EdmEnabledODataClientImpl.java
+++ /dev/null
@@ -1,86 +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.client.core.v4;
-
-import org.apache.olingo.client.api.communication.request.invoke.EdmEnabledInvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.EdmMetadataRequest;
-import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.core.communication.request.invoke.v4.EdmEnabledInvokeRequestFactoryImpl;
-import org.apache.olingo.client.core.uri.v4.URIBuilderImpl;
-import org.apache.olingo.commons.api.edm.Edm;
-
-public class EdmEnabledODataClientImpl extends ODataClientImpl implements EdmEnabledODataClient {
-
-  private final String serviceRoot;
-
-  private Edm edm;
-
-  private String metadataETag;
-
-  private EdmEnabledInvokeRequestFactory edmEnabledInvokeRequestFactory;
-
-  public EdmEnabledODataClientImpl(final String serviceRoot, final Edm edm, final String metadataETag) {
-    super();
-
-    this.serviceRoot = serviceRoot;
-    this.edm = edm;
-    this.metadataETag = metadataETag;
-  }
-
-  @Override
-  public String getServiceRoot() {
-    return serviceRoot;
-  }
-
-  @Override
-  public Edm getEdm(final String metadataETag) {
-    synchronized (this) {
-      if (this.edm == null || (metadataETag != null && !metadataETag.equals(this.metadataETag))) {
-        final EdmMetadataRequest metadataReq = getRetrieveRequestFactory().getMetadataRequest(serviceRoot);
-        final ODataRetrieveResponse<Edm> metadataRes = metadataReq.execute();
-        this.metadataETag = metadataRes.getETag();
-        this.edm = metadataRes.getBody();
-      }
-    }
-    return this.edm;
-  }
-
-  @Override
-  public Edm getCachedEdm() {
-    if (this.edm == null) {
-      getEdm(null);
-    }
-    return this.edm;
-  }
-
-  @Override
-  public URIBuilder newURIBuilder() {
-    return new URIBuilderImpl(getServiceVersion(), configuration, serviceRoot);
-  }
-
-  @Override
-  public EdmEnabledInvokeRequestFactory getInvokeRequestFactory() {
-    if (edmEnabledInvokeRequestFactory == null) {
-      edmEnabledInvokeRequestFactory = new EdmEnabledInvokeRequestFactoryImpl(this);
-    }
-    return edmEnabledInvokeRequestFactory;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/LiteralSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/LiteralSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/LiteralSearch.java
deleted file mode 100644
index 011698c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/LiteralSearch.java
+++ /dev/null
@@ -1,35 +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.client.core.v4;
-
-import org.apache.olingo.client.api.uri.v4.URISearch;
-
-public class LiteralSearch implements URISearch {
-
-  private final String value;
-
-  LiteralSearch(final String value) {
-    this.value = value;
-  }
-
-  @Override
-  public String build() {
-    return value;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/NotSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/NotSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/NotSearch.java
deleted file mode 100644
index 39d0fe3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/NotSearch.java
+++ /dev/null
@@ -1,35 +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.client.core.v4;
-
-import org.apache.olingo.client.api.uri.v4.URISearch;
-
-public class NotSearch implements URISearch {
-
-  private final URISearch filter;
-
-  NotSearch(final URISearch left) {
-    this.filter = left;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder("NOT (").append(filter.build()).append(')').toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java
deleted file mode 100644
index d88a63b..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/ODataClientImpl.java
+++ /dev/null
@@ -1,157 +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.client.core.v4;
-
-import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.header.ODataHeaders;
-import org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
-import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.v4.AsyncRequestFactory;
-import org.apache.olingo.client.api.serialization.v4.ODataBinder;
-import org.apache.olingo.client.api.serialization.v4.ODataDeserializer;
-import org.apache.olingo.client.api.serialization.v4.ODataReader;
-import org.apache.olingo.client.api.uri.v4.FilterFactory;
-import org.apache.olingo.client.api.uri.v4.SearchFactory;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.AbstractODataClient;
-import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
-import org.apache.olingo.client.core.communication.request.batch.v4.BatchRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.cud.v4.CUDRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.invoke.v4.InvokeRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.retrieve.v4.RetrieveRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.v4.AsyncRequestFactoryImpl;
-import org.apache.olingo.client.core.serialization.v4.ODataBinderImpl;
-import org.apache.olingo.client.core.serialization.v4.ODataDeserializerImpl;
-import org.apache.olingo.client.core.serialization.v4.ODataReaderImpl;
-import org.apache.olingo.client.core.uri.v4.FilterFactoryImpl;
-import org.apache.olingo.client.core.uri.v4.URIBuilderImpl;
-import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.serialization.ODataSerializer;
-import org.apache.olingo.commons.core.domain.v4.ODataObjectFactoryImpl;
-import org.apache.olingo.commons.core.serialization.AtomSerializer;
-import org.apache.olingo.commons.core.serialization.JsonSerializer;
-
-public class ODataClientImpl extends AbstractODataClient<UpdateType> implements ODataClient {
-
-  private final FilterFactory filterFactory = new FilterFactoryImpl(getServiceVersion());
-
-  private final SearchFactory searchFactory = new SearchFactoryImpl();
-
-  private final ODataReader reader = new ODataReaderImpl(this);
-
-  private final ODataBinder binder = new ODataBinderImpl(this);
-
-  private final ODataObjectFactory objectFactory = new ODataObjectFactoryImpl(getServiceVersion());
-
-  private final AsyncRequestFactory asyncReqFact = new AsyncRequestFactoryImpl(this);
-
-  private final RetrieveRequestFactory retrieveReqFact = new RetrieveRequestFactoryImpl(this);
-
-  private final CUDRequestFactory cudReqFact = new CUDRequestFactoryImpl(this);
-
-  private final InvokeRequestFactory invokeReqFact = new InvokeRequestFactoryImpl(this);
-
-  private final BatchRequestFactory batchReqFact = new BatchRequestFactoryImpl(this);
-
-  @Override
-  public ODataServiceVersion getServiceVersion() {
-    return ODataServiceVersion.V40;
-  }
-
-  @Override
-  public ODataHeaders newVersionHeaders() {
-    final ODataHeadersImpl odataHeaders = new ODataHeadersImpl();
-    odataHeaders.setHeader(HeaderName.odataMaxVersion, ODataServiceVersion.V40.toString());
-    odataHeaders.setHeader(HeaderName.odataVersion, ODataServiceVersion.V40.toString());
-    return odataHeaders;
-  }
-
-  @Override
-  public URIBuilder newURIBuilder(final String serviceRoot) {
-    return new URIBuilderImpl(getServiceVersion(), getConfiguration(), serviceRoot);
-  }
-  
-  @Override
-  public FilterFactory getFilterFactory() {
-    return filterFactory;
-  }
-
-  @Override
-  public SearchFactory getSearchFactory() {
-    return searchFactory;
-  }
-
-  @Override
-  public ODataDeserializer getDeserializer(final ODataFormat format) {
-    return new ODataDeserializerImpl(getServiceVersion(), false, format);
-  }
-
-  @Override
-  public ODataSerializer getSerializer(final ODataFormat format) {
-    return format == ODataFormat.ATOM || format == ODataFormat.XML ?
-        new AtomSerializer(getServiceVersion()) :
-        new JsonSerializer(getServiceVersion(), false, format);
-  }
-
-  @Override
-  public ODataReader getReader() {
-    return reader;
-  }
-
-  @Override
-  public ODataBinder getBinder() {
-    return binder;
-  }
-
-  @Override
-  public ODataObjectFactory getObjectFactory() {
-    return objectFactory;
-  }
-
-  @Override
-  public AsyncRequestFactory getAsyncRequestFactory() {
-    return asyncReqFact;
-  }
-
-  @Override
-  public RetrieveRequestFactory getRetrieveRequestFactory() {
-    return retrieveReqFact;
-  }
-
-  @Override
-  public CUDRequestFactory getCUDRequestFactory() {
-    return cudReqFact;
-  }
-
-  @Override
-  public InvokeRequestFactory getInvokeRequestFactory() {
-    return invokeReqFact;
-  }
-
-  @Override
-  public BatchRequestFactory getBatchRequestFactory() {
-    return batchReqFact;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/OrSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/OrSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/OrSearch.java
deleted file mode 100644
index 862142c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/OrSearch.java
+++ /dev/null
@@ -1,42 +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.client.core.v4;
-
-import org.apache.olingo.client.api.uri.v4.URISearch;
-
-public class OrSearch implements URISearch {
-
-  private final URISearch left;
-
-  private final URISearch right;
-
-  OrSearch(final URISearch left, final URISearch right) {
-    this.left = left;
-    this.right = right;
-  }
-
-  @Override
-  public String build() {
-    return new StringBuilder().
-            append('(').append(left.build()).
-            append(" OR ").
-            append(right.build()).append(')').
-            toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/SearchFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/SearchFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/SearchFactoryImpl.java
deleted file mode 100644
index e37c05e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/v4/SearchFactoryImpl.java
+++ /dev/null
@@ -1,46 +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.client.core.v4;
-
-import org.apache.olingo.client.api.uri.v4.SearchFactory;
-import org.apache.olingo.client.api.uri.v4.URISearch;
-
-public class SearchFactoryImpl implements SearchFactory {
-
-  @Override
-  public URISearch literal(final String value) {
-    return new LiteralSearch(value);
-  }
-
-  @Override
-  public URISearch and(final URISearch left, final URISearch right) {
-    return new AndSearch(left, right);
-  }
-
-  @Override
-  public URISearch or(final URISearch left, final URISearch right) {
-    return new OrSearch(left, right);
-  }
-
-  @Override
-  public URISearch not(final URISearch filter) {
-    return new NotSearch(filter);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
index ccb544c..0dc980b 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/AbstractTest.java
@@ -25,7 +25,7 @@ import org.junit.BeforeClass;
 
 public abstract class AbstractTest {
 
-  protected static org.apache.olingo.client.api.v4.ODataClient v4Client;
+  protected static org.apache.olingo.client.api.ODataClient v4Client;
 
   protected abstract CommonODataClient<?> getClient();
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIEscapeTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIEscapeTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIEscapeTest.java
index 43072ba..37cb309 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIEscapeTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIEscapeTest.java
@@ -19,7 +19,7 @@
 package org.apache.olingo.client.core.uri;
 
 import org.apache.olingo.client.core.edm.EdmEnumTypeImpl;
-import org.apache.olingo.client.core.edm.xml.v4.EnumTypeImpl;
+import org.apache.olingo.client.core.edm.xml.EnumTypeImpl;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.edm.EdmEnumType;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/FilterFactoryTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/FilterFactoryTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/FilterFactoryTest.java
index dff0d34..f6b3f9c 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/FilterFactoryTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/FilterFactoryTest.java
@@ -18,13 +18,13 @@
  */
 package org.apache.olingo.client.core.uri.v4;
 
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.uri.FilterArgFactory;
+import org.apache.olingo.client.api.uri.FilterFactory;
 import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
-import org.apache.olingo.client.api.uri.v4.FilterFactory;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.client.core.edm.EdmEnumTypeImpl;
-import org.apache.olingo.client.core.edm.xml.v4.EnumTypeImpl;
+import org.apache.olingo.client.core.edm.xml.EnumTypeImpl;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.edm.EdmEnumType;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/URIBuilderTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/URIBuilderTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/URIBuilderTest.java
index 3a37b91..6686963 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/URIBuilderTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/v4/URIBuilderTest.java
@@ -18,9 +18,9 @@
  */
 package org.apache.olingo.client.core.uri.v4;
 
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.AbstractTest;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/AtomTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/AtomTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/AtomTest.java
index 9998398..3d445d8 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/AtomTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/AtomTest.java
@@ -21,15 +21,17 @@ package org.apache.olingo.client.core.v4;
 import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AtomLinksQualifier;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.custommonkey.xmlunit.Diff;
+
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
+
 import java.io.ByteArrayInputStream;
 import java.io.StringWriter;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
index 4407815..bd0158f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.v4;
 
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.ResWrap;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
index 4760103..8f6f253 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
@@ -26,9 +26,11 @@ import static org.junit.Assert.assertTrue;
 import java.io.InputStream;
 import java.net.URI;
 import java.util.Iterator;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.api.v4.ODataClient;
+
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
+import org.apache.olingo.client.core.EdmEnabledODataClientImpl;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
index cfd8f65..c0067bc 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.v4;
 
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.domain.ODataError;
 import org.apache.olingo.commons.api.format.ODataFormat;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
index 27abb6f..d70a07f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
@@ -25,14 +25,16 @@ import static org.junit.Assert.assertTrue;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
+
 import java.io.ByteArrayInputStream;
 import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.data.Delta;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
index ab58fff..8a4da6f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
@@ -18,30 +18,32 @@
  */
 package org.apache.olingo.client.core.v4;
 
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Annotations;
-import org.apache.olingo.client.api.edm.xml.v4.ComplexType;
-import org.apache.olingo.client.api.edm.xml.v4.EntityContainer;
-import org.apache.olingo.client.api.edm.xml.v4.EntityType;
-import org.apache.olingo.client.api.edm.xml.v4.Function;
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Schema;
-import org.apache.olingo.client.api.edm.xml.v4.Singleton;
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Apply;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Collection;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.ConstantAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.TwoParamsOpDynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.UrlRef;
-import org.apache.olingo.client.api.v4.ODataClient;
+import java.util.List;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotations;
+import org.apache.olingo.client.api.edm.xml.ComplexType;
+import org.apache.olingo.client.api.edm.xml.EntityContainer;
+import org.apache.olingo.client.api.edm.xml.EntityType;
+import org.apache.olingo.client.api.edm.xml.Function;
+import org.apache.olingo.client.api.edm.xml.FunctionImport;
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.client.api.edm.xml.Singleton;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.edm.xml.annotation.Apply;
+import org.apache.olingo.client.api.edm.xml.annotation.Collection;
+import org.apache.olingo.client.api.edm.xml.annotation.ConstantAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.TwoParamsOpDynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.UrlRef;
 import org.apache.olingo.client.core.AbstractTest;
-import org.apache.olingo.client.core.edm.xml.v4.annotation.ConstantAnnotationExpressionImpl;
-import org.apache.olingo.client.core.edm.xml.v4.annotation.PathImpl;
+import org.apache.olingo.client.core.edm.xml.annotation.ConstantAnnotationExpressionImpl;
+import org.apache.olingo.client.core.edm.xml.annotation.PathImpl;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
@@ -67,8 +69,6 @@ import org.apache.olingo.commons.core.edm.primitivetype.EdmInt32;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 import org.junit.Test;
 
-import java.util.List;
-
 public class MetadataTest extends AbstractTest {
 
   @Override

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
index 82509ac..5728812 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.v4;
 
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
index 0aab3c7..91d0752 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.v4;
 
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
index 67154ab..096591c 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
@@ -18,8 +18,8 @@
  */
 package org.apache.olingo.client.core.v4;
 
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.domain.ODataServiceDocument;


[05/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyDeserializer.java
new file mode 100644
index 0000000..8f8ac86
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyDeserializer.java
@@ -0,0 +1,57 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class ApplyDeserializer extends AbstractEdmDeserializer<ApplyImpl> {
+
+  @Override
+  protected ApplyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final ApplyImpl apply = new ApplyImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Function".equals(jp.getCurrentName())) {
+          apply.setFunction(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          apply.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        } else if (isAnnotationConstExprConstruct(jp)) {
+          apply.getParameters().add(parseAnnotationConstExprConstruct(jp));
+        } else {
+          apply.getParameters().add(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return apply;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyImpl.java
new file mode 100644
index 0000000..60ed4ae
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ApplyImpl.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.Apply;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = ApplyDeserializer.class)
+public class ApplyImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Apply {
+
+  private static final long serialVersionUID = 4358398303405059879L;
+
+  private String function;
+
+  private final List<AnnotationExpression> parameters = new ArrayList<AnnotationExpression>();
+
+  @Override
+  public String getFunction() {
+    return function;
+  }
+
+  public void setFunction(final String function) {
+    this.function = function;
+  }
+
+  @Override
+  public List<AnnotationExpression> getParameters() {
+    return parameters;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastDeserializer.java
new file mode 100644
index 0000000..87e4c84
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastDeserializer.java
@@ -0,0 +1,69 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class CastDeserializer extends AbstractEdmDeserializer<CastImpl> {
+
+  @Override
+  protected CastImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final CastImpl cast = new CastImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Type".equals(jp.getCurrentName())) {
+          cast.setType(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          cast.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        } else if ("MaxLength".equals(jp.getCurrentName())) {
+          final String maxLenght = jp.nextTextValue();
+          cast.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          cast.setPrecision(Integer.valueOf(jp.nextTextValue()));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          final String scale = jp.nextTextValue();
+          cast.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          final String srid = jp.nextTextValue();
+          if (srid != null) {
+            cast.setSrid(SRID.valueOf(srid));
+          }
+        } else {
+          cast.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return cast;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastImpl.java
new file mode 100644
index 0000000..48fd310
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CastImpl.java
@@ -0,0 +1,98 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.Cast;
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = CastDeserializer.class)
+public class CastImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Cast {
+
+  private static final long serialVersionUID = 3312415984116005313L;
+
+  private String type;
+
+  private Integer maxLength;
+
+  private Integer precision;
+
+  private Integer scale;
+
+  private SRID srid;
+
+  private DynamicAnnotationExpression value;
+
+  @Override
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  @Override
+  public Integer getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final Integer maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  @Override
+  public Integer getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final Integer precision) {
+    this.precision = precision;
+  }
+
+  @Override
+  public Integer getScale() {
+    return scale;
+  }
+
+  public void setScale(final Integer scale) {
+    this.scale = scale;
+  }
+
+  @Override
+  public SRID getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final SRID srid) {
+    this.srid = srid;
+  }
+
+  @Override
+  public DynamicAnnotationExpression getValue() {
+    return value;
+  }
+
+  public void setValue(final DynamicAnnotationExpression value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionDeserializer.java
new file mode 100644
index 0000000..330c7e0
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionDeserializer.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class CollectionDeserializer extends AbstractEdmDeserializer<CollectionImpl> {
+
+  @Override
+  protected CollectionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final CollectionImpl collection = new CollectionImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if (isAnnotationConstExprConstruct(jp)) {
+          collection.getItems().add(parseAnnotationConstExprConstruct(jp));
+        } else {
+          collection.getItems().add(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return collection;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionImpl.java
new file mode 100644
index 0000000..0dfe18e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/CollectionImpl.java
@@ -0,0 +1,41 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.Collection;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = CollectionDeserializer.class)
+public class CollectionImpl extends AbstractDynamicAnnotationExpression implements Collection {
+
+  private static final long serialVersionUID = -724749123749715643L;
+
+  private final List<AnnotationExpression> items = new ArrayList<AnnotationExpression>();
+
+  @Override
+  public List<AnnotationExpression> getItems() {
+    return items;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ConstantAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ConstantAnnotationExpressionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ConstantAnnotationExpressionImpl.java
new file mode 100644
index 0000000..7530e48
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ConstantAnnotationExpressionImpl.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.ConstantAnnotationExpression;
+
+public class ConstantAnnotationExpressionImpl
+        extends AbstractAnnotationExpression implements ConstantAnnotationExpression {
+
+  private static final long serialVersionUID = 5618680702707972904L;
+
+  private Type type;
+
+  private String value;
+
+  @Override
+  public Type getType() {
+    return type;
+  }
+
+  @Override
+  public void setType(final Type type) {
+    this.type = type;
+  }
+
+  @Override
+  public String getValue() {
+    return value;
+  }
+
+  @Override
+  public void setValue(final String value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/DynamicAnnotationExpressionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/DynamicAnnotationExpressionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/DynamicAnnotationExpressionDeserializer.java
new file mode 100644
index 0000000..7328487
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/DynamicAnnotationExpressionDeserializer.java
@@ -0,0 +1,175 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.ClassUtils;
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationPath;
+import org.apache.olingo.client.api.edm.xml.annotation.Apply;
+import org.apache.olingo.client.api.edm.xml.annotation.Cast;
+import org.apache.olingo.client.api.edm.xml.annotation.Collection;
+import org.apache.olingo.client.api.edm.xml.annotation.If;
+import org.apache.olingo.client.api.edm.xml.annotation.IsOf;
+import org.apache.olingo.client.api.edm.xml.annotation.LabeledElement;
+import org.apache.olingo.client.api.edm.xml.annotation.NavigationPropertyPath;
+import org.apache.olingo.client.api.edm.xml.annotation.Null;
+import org.apache.olingo.client.api.edm.xml.annotation.Path;
+import org.apache.olingo.client.api.edm.xml.annotation.PropertyPath;
+import org.apache.olingo.client.api.edm.xml.annotation.Record;
+import org.apache.olingo.client.api.edm.xml.annotation.TwoParamsOpDynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.UrlRef;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+
+import com.fasterxml.jackson.core.JsonLocation;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class DynamicAnnotationExpressionDeserializer
+        extends AbstractEdmDeserializer<AbstractDynamicAnnotationExpression> {
+
+  private static final String[] EL_OR_ATTR = {
+    AnnotationPath.class.getSimpleName(), NavigationPropertyPath.class.getSimpleName(),
+    Path.class.getSimpleName(), PropertyPath.class.getSimpleName()
+  };
+
+  private static final String APPLY = Apply.class.getSimpleName();
+
+  private static final String CAST = Cast.class.getSimpleName();
+
+  private static final String COLLECTION = Collection.class.getSimpleName();
+
+  private static final String IF = If.class.getSimpleName();
+
+  private static final String IS_OF = IsOf.class.getSimpleName();
+
+  private static final String LABELED_ELEMENT = LabeledElement.class.getSimpleName();
+
+  private static final String NULL = Null.class.getSimpleName();
+
+  private static final String RECORD = Record.class.getSimpleName();
+
+  private static final String URL_REF = UrlRef.class.getSimpleName();
+
+  private AbstractElementOrAttributeExpression getElementOrAttributeExpressio(final String simpleClassName)
+          throws JsonParseException {
+
+    try {
+      @SuppressWarnings("unchecked")
+      Class<? extends AbstractElementOrAttributeExpression> elOrAttrClass =
+              (Class<? extends AbstractElementOrAttributeExpression>) ClassUtils.getClass(
+                      getClass().getPackage().getName() + "." + simpleClassName + "Impl");
+      return elOrAttrClass.newInstance();
+    } catch (Exception e) {
+      throw new JsonParseException("Could not instantiate " + simpleClassName, JsonLocation.NA, e);
+    }
+  }
+
+  private AbstractAnnotationExpression parseConstOrEnumExpression(final JsonParser jp) throws IOException {
+    AbstractAnnotationExpression result;
+    if (isAnnotationConstExprConstruct(jp)) {
+      result = parseAnnotationConstExprConstruct(jp);
+    } else {
+      result = jp.readValueAs(AbstractDynamicAnnotationExpression.class);
+    }
+    jp.nextToken();
+
+    return result;
+  }
+
+  @Override
+  protected AbstractDynamicAnnotationExpression doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    AbstractDynamicAnnotationExpression expression = null;
+
+    if ("Not".equals(jp.getCurrentName())) {
+      final NotImpl not = new NotImpl();
+
+      jp.nextToken();
+      for (; jp.getCurrentToken() != JsonToken.FIELD_NAME; jp.nextToken()) {
+      }
+      not.setExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+      for (; jp.getCurrentToken() != JsonToken.END_OBJECT || !jp.getCurrentName().equals("Not"); jp.nextToken()) {
+      }
+
+      expression = not;
+    } else if (TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()) != null) {
+      final TwoParamsOpDynamicAnnotationExpressionImpl dynExprDoubleParamOp =
+              new TwoParamsOpDynamicAnnotationExpressionImpl();
+      dynExprDoubleParamOp.setType(TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()));
+
+      jp.nextToken();
+      for (; jp.getCurrentToken() != JsonToken.FIELD_NAME; jp.nextToken()) {
+      }
+      dynExprDoubleParamOp.setLeftExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+      dynExprDoubleParamOp.setRightExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+      for (; jp.getCurrentToken() != JsonToken.END_OBJECT
+              || !jp.getCurrentName().equals(dynExprDoubleParamOp.getType().name()); jp.nextToken()) {
+      }
+
+      expression = dynExprDoubleParamOp;
+    } else if (ArrayUtils.contains(EL_OR_ATTR, jp.getCurrentName())) {
+      final AbstractElementOrAttributeExpression elOrAttr = getElementOrAttributeExpressio(jp.getCurrentName());
+      elOrAttr.setValue(jp.nextTextValue());
+
+      expression = elOrAttr;
+    } else if (APPLY.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(ApplyImpl.class);
+    } else if (CAST.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(CastImpl.class);
+    } else if (COLLECTION.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(CollectionImpl.class);
+    } else if (IF.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      jp.nextToken();
+
+      final IfImpl _if = new IfImpl();
+      _if.setGuard(parseConstOrEnumExpression(jp));
+      _if.setThen(parseConstOrEnumExpression(jp));
+      _if.setElse(parseConstOrEnumExpression(jp));
+
+      expression = _if;
+    } else if (IS_OF.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(IsOfImpl.class);
+    } else if (LABELED_ELEMENT.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(LabeledElementImpl.class);
+    } else if (NULL.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(NullImpl.class);
+    } else if (RECORD.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(RecordImpl.class);
+    } else if (URL_REF.equals(jp.getCurrentName())) {
+      jp.nextToken();
+      expression = jp.readValueAs(UrlRefImpl.class);
+    }
+
+    return expression;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IfImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IfImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IfImpl.java
new file mode 100644
index 0000000..dd62bd4
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IfImpl.java
@@ -0,0 +1,61 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.If;
+
+public class IfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements If {
+
+  private static final long serialVersionUID = -8571383625077590656L;
+
+  private AnnotationExpression guard;
+
+  private AnnotationExpression _then;
+
+  private AnnotationExpression _else;
+
+  @Override
+  public AnnotationExpression getGuard() {
+    return guard;
+  }
+
+  public void setGuard(final AnnotationExpression guard) {
+    this.guard = guard;
+  }
+
+  @Override
+  public AnnotationExpression getThen() {
+    return _then;
+  }
+
+  public void setThen(final AnnotationExpression _then) {
+    this._then = _then;
+  }
+
+  @Override
+  public AnnotationExpression getElse() {
+    return _else;
+  }
+
+  public void setElse(final AnnotationExpression _else) {
+    this._else = _else;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfDeserializer.java
new file mode 100644
index 0000000..0b1ce80
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfDeserializer.java
@@ -0,0 +1,69 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class IsOfDeserializer extends AbstractEdmDeserializer<IsOfImpl> {
+
+  @Override
+  protected IsOfImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final IsOfImpl isof = new IsOfImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Type".equals(jp.getCurrentName())) {
+          isof.setType(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          isof.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        } else if ("MaxLength".equals(jp.getCurrentName())) {
+          final String maxLenght = jp.nextTextValue();
+          isof.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          isof.setPrecision(Integer.valueOf(jp.nextTextValue()));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          final String scale = jp.nextTextValue();
+          isof.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          final String srid = jp.nextTextValue();
+          if (srid != null) {
+            isof.setSrid(SRID.valueOf(srid));
+          }
+        } else {
+          isof.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return isof;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfImpl.java
new file mode 100644
index 0000000..1c41c77
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/IsOfImpl.java
@@ -0,0 +1,98 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.IsOf;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = IsOfDeserializer.class)
+public class IsOfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements IsOf {
+
+  private static final long serialVersionUID = -893355856129761174L;
+
+  private String type;
+
+  private Integer maxLength;
+
+  private Integer precision;
+
+  private Integer scale;
+
+  private SRID srid;
+
+  private DynamicAnnotationExpression value;
+
+  @Override
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  @Override
+  public Integer getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final Integer maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  @Override
+  public Integer getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final Integer precision) {
+    this.precision = precision;
+  }
+
+  @Override
+  public Integer getScale() {
+    return scale;
+  }
+
+  public void setScale(final Integer scale) {
+    this.scale = scale;
+  }
+
+  @Override
+  public SRID getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final SRID srid) {
+    this.srid = srid;
+  }
+
+  @Override
+  public DynamicAnnotationExpression getValue() {
+    return value;
+  }
+
+  public void setValue(final DynamicAnnotationExpression value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementDeserializer.java
new file mode 100644
index 0000000..5c68abd
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementDeserializer.java
@@ -0,0 +1,55 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class LabeledElementDeserializer extends AbstractEdmDeserializer<LabeledElementImpl> {
+
+  @Override
+  protected LabeledElementImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final LabeledElementImpl element = new LabeledElementImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          element.setName(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          element.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        } else {
+          element.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return element;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementImpl.java
new file mode 100644
index 0000000..9b5a6d2
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementImpl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.LabeledElement;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = LabeledElementDeserializer.class)
+public class LabeledElementImpl
+        extends AbstractAnnotatableDynamicAnnotationExpression implements LabeledElement {
+
+  private static final long serialVersionUID = 4909387630253341824L;
+
+  private String name;
+
+  private DynamicAnnotationExpression value;
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  @Override
+  public DynamicAnnotationExpression getValue() {
+    return value;
+  }
+
+  public void setValue(final DynamicAnnotationExpression value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementReferenceImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementReferenceImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementReferenceImpl.java
new file mode 100644
index 0000000..0da0ce5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/LabeledElementReferenceImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.LabeledElementReference;
+
+public class LabeledElementReferenceImpl
+        extends AbstractElementOrAttributeExpression implements LabeledElementReference {
+
+  private static final long serialVersionUID = 7560525604021670529L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NavigationPropertyPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NavigationPropertyPathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NavigationPropertyPathImpl.java
new file mode 100644
index 0000000..c93cd09
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NavigationPropertyPathImpl.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.NavigationPropertyPath;
+
+public class NavigationPropertyPathImpl extends AbstractElementOrAttributeExpression implements NavigationPropertyPath {
+
+  private static final long serialVersionUID = 879840502446301312L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NotImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NotImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NotImpl.java
new file mode 100644
index 0000000..7013e30
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NotImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.Not;
+
+public class NotImpl extends AbstractDynamicAnnotationExpression implements Not {
+
+  private static final long serialVersionUID = -437788415922966812L;
+
+  private DynamicAnnotationExpression expression;
+
+  @Override
+  public DynamicAnnotationExpression getExpression() {
+    return expression;
+  }
+
+  public void setExpression(final DynamicAnnotationExpression expression) {
+    this.expression = expression;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullDeserializer.java
new file mode 100644
index 0000000..0364a8b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullDeserializer.java
@@ -0,0 +1,51 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class NullDeserializer extends AbstractEdmDeserializer<NullImpl> {
+
+  @Override
+  protected NullImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final NullImpl _null = new NullImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Annotation".equals(jp.getCurrentName())) {
+          _null.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return _null;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullImpl.java
new file mode 100644
index 0000000..f779b5f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/NullImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.Null;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = NullDeserializer.class)
+public class NullImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Null {
+
+  private static final long serialVersionUID = -3148516847180393142L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PathImpl.java
new file mode 100644
index 0000000..73e9571
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PathImpl.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.Path;
+
+public class PathImpl extends AbstractElementOrAttributeExpression implements Path {
+
+  private static final long serialVersionUID = 6020168217561402545L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyPathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyPathImpl.java
new file mode 100644
index 0000000..f8d1916
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyPathImpl.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.PropertyPath;
+
+public class PropertyPathImpl extends AbstractElementOrAttributeExpression implements PropertyPath {
+
+  private static final long serialVersionUID = -9133862135834738470L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueDeserializer.java
new file mode 100644
index 0000000..6c3d151
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueDeserializer.java
@@ -0,0 +1,57 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class PropertyValueDeserializer extends AbstractEdmDeserializer<PropertyValueImpl> {
+
+  @Override
+  protected PropertyValueImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final PropertyValueImpl propValue = new PropertyValueImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Property".equals(jp.getCurrentName())) {
+          propValue.setProperty(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          propValue.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        } else if (isAnnotationConstExprConstruct(jp)) {
+          propValue.setValue(parseAnnotationConstExprConstruct(jp));
+        } else {
+          propValue.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return propValue;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueImpl.java
new file mode 100644
index 0000000..61cf85d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/PropertyValueImpl.java
@@ -0,0 +1,53 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.PropertyValue;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = PropertyValueDeserializer.class)
+public class PropertyValueImpl extends AbstractAnnotatableDynamicAnnotationExpression implements PropertyValue {
+
+  private static final long serialVersionUID = -8437649215282645228L;
+
+  private String property;
+
+  private AnnotationExpression value;
+
+  @Override
+  public String getProperty() {
+    return property;
+  }
+
+  public void setProperty(final String property) {
+    this.property = property;
+  }
+
+  @Override
+  public AnnotationExpression getValue() {
+    return value;
+  }
+
+  public void setValue(final AnnotationExpression value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordDeserializer.java
new file mode 100644
index 0000000..d680248
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordDeserializer.java
@@ -0,0 +1,55 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.client.core.edm.xml.AnnotationImpl;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class RecordDeserializer extends AbstractEdmDeserializer<RecordImpl> {
+
+  @Override
+  protected RecordImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final RecordImpl record = new RecordImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Type".equals(jp.getCurrentName())) {
+          record.setType(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          record.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        } else {
+          record.getPropertyValues().add(jp.readValueAs(PropertyValueImpl.class));
+        }
+      }
+    }
+
+    return record;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordImpl.java
new file mode 100644
index 0000000..46f322b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/RecordImpl.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.annotation.PropertyValue;
+import org.apache.olingo.client.api.edm.xml.annotation.Record;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = RecordDeserializer.class)
+public class RecordImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Record {
+
+  private static final long serialVersionUID = 4275271751615410709L;
+
+  private String type;
+
+  private final List<PropertyValue> propertyValues = new ArrayList<PropertyValue>();
+
+  @Override
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  @Override
+  public List<PropertyValue> getPropertyValues() {
+    return propertyValues;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java
new file mode 100644
index 0000000..5b1f7fa
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java
@@ -0,0 +1,62 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.TwoParamsOpDynamicAnnotationExpression;
+
+public class TwoParamsOpDynamicAnnotationExpressionImpl
+        extends AbstractDynamicAnnotationExpression implements TwoParamsOpDynamicAnnotationExpression {
+
+  private static final long serialVersionUID = 6241842185452451946L;
+
+  private Type type;
+
+  private DynamicAnnotationExpression left;
+
+  private DynamicAnnotationExpression right;
+
+  @Override
+  public Type getType() {
+    return type;
+  }
+
+  public void setType(final Type type) {
+    this.type = type;
+  }
+
+  @Override
+  public DynamicAnnotationExpression getLeftExpression() {
+    return left;
+  }
+
+  public void setLeftExpression(final DynamicAnnotationExpression left) {
+    this.left = left;
+  }
+
+  @Override
+  public DynamicAnnotationExpression getRightExpression() {
+    return right;
+  }
+
+  public void setRightExpression(final DynamicAnnotationExpression right) {
+    this.right = right;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefDeserializer.java
new file mode 100644
index 0000000..1ca1241
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefDeserializer.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class UrlRefDeserializer extends AbstractEdmDeserializer<UrlRefImpl> {
+
+  @Override
+  protected UrlRefImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final UrlRefImpl urlref = new UrlRefImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if (isAnnotationConstExprConstruct(jp)) {
+          urlref.setValue(parseAnnotationConstExprConstruct(jp));
+        } else {
+          urlref.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return urlref;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefImpl.java
new file mode 100644
index 0000000..3e7eeba
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/UrlRefImpl.java
@@ -0,0 +1,42 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.UrlRef;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = UrlRefDeserializer.class)
+public class UrlRefImpl extends AbstractDynamicAnnotationExpression implements UrlRef {
+
+  private static final long serialVersionUID = -7693224811739000440L;
+
+  private AnnotationExpression value;
+
+  @Override
+  public AnnotationExpression getValue() {
+    return value;
+  }
+
+  public void setValue(final AnnotationExpression value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatable.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatable.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatable.java
deleted file mode 100644
index 257ed39..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatable.java
+++ /dev/null
@@ -1,39 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-
-public abstract class AbstractAnnotatable extends AbstractEdmItem implements Annotatable {
-
-  private static final long serialVersionUID = 3739284381932173905L;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java
deleted file mode 100644
index ed2793c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionDeserializer.java
+++ /dev/null
@@ -1,62 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class ActionDeserializer extends AbstractEdmDeserializer<ActionImpl> {
-
-  @Override
-  protected ActionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final ActionImpl action = new ActionImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          action.setName(jp.nextTextValue());
-        } else if ("IsBound".equals(jp.getCurrentName())) {
-          action.setBound(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("EntitySetPath".equals(jp.getCurrentName())) {
-          action.setEntitySetPath(jp.nextTextValue());
-        } else if ("Parameter".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          action.getParameters().add(jp.readValueAs(ParameterImpl.class));
-        } else if ("ReturnType".equals(jp.getCurrentName())) {
-          action.setReturnType(parseReturnType(jp, "Action"));
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          action.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return action;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImpl.java
deleted file mode 100644
index 4ab6159..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImpl.java
+++ /dev/null
@@ -1,91 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Action;
-import org.apache.olingo.client.api.edm.xml.v4.Parameter;
-import org.apache.olingo.client.api.edm.xml.v4.ReturnType;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = ActionDeserializer.class)
-public class ActionImpl extends AbstractAnnotatable implements Action {
-
-  private static final long serialVersionUID = 5321541275349234088L;
-
-  private String name;
-
-  private boolean bound = false;
-
-  private String entitySetPath;
-
-  private final List<Parameter> parameters = new ArrayList<Parameter>();
-
-  private ReturnType returnType;
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public boolean isBound() {
-    return bound;
-  }
-
-  public void setBound(final boolean bound) {
-    this.bound = bound;
-  }
-
-  @Override
-  public String getEntitySetPath() {
-    return entitySetPath;
-  }
-
-  public void setEntitySetPath(final String entitySetPath) {
-    this.entitySetPath = entitySetPath;
-  }
-
-  @Override
-  public Parameter getParameter(final String name) {
-    return getOneByName(name, getParameters());
-  }
-
-  @Override
-  public List<Parameter> getParameters() {
-    return parameters;
-  }
-
-  @Override
-  public ReturnType getReturnType() {
-    return returnType;
-  }
-
-  public void setReturnType(final ReturnType returnType) {
-    this.returnType = returnType;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImportImpl.java
deleted file mode 100644
index 87644b3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ActionImportImpl.java
+++ /dev/null
@@ -1,66 +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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class ActionImportImpl extends AbstractAnnotatable implements ActionImport {
-
-  private static final long serialVersionUID = 2971468441177647068L;
-
-  @JsonProperty(value = "Name", required = true)
-  private String name;
-
-  @JsonProperty(value = "Action", required = true)
-  private String action;
-
-  @JsonProperty(value = "EntitySet")
-  private String entitySet;
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public String getAction() {
-    return action;
-  }
-
-  public void setAction(final String action) {
-    this.action = action;
-  }
-
-  @Override
-  public String getEntitySet() {
-    return entitySet;
-  }
-
-  @Override
-  public void setEntitySet(final String entitySet) {
-    this.entitySet = entitySet;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java
deleted file mode 100644
index fa93dab..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationDeserializer.java
+++ /dev/null
@@ -1,62 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.annotation.AbstractDynamicAnnotationExpression;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class AnnotationDeserializer extends AbstractEdmDeserializer<AnnotationImpl> {
-
-  @Override
-  protected AnnotationImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final AnnotationImpl annotation = new AnnotationImpl();
-
-    for (; jp.getCurrentToken() != null && jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Term".equals(jp.getCurrentName())) {
-          annotation.setTerm(jp.nextTextValue());
-        } else if ("Qualifier".equals(jp.getCurrentName())) {
-          annotation.setQualifier(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          annotation.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        } else if (isAnnotationConstExprConstruct(jp)) {
-          // Constant Expressions
-          annotation.setAnnotationExpression(parseAnnotationConstExprConstruct(jp));
-        } else {
-          // Dynamic Expressions
-          annotation.setAnnotationExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return annotation;
-  }
-
-}


[02/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java
deleted file mode 100644
index f77fbd8..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueDeserializer.java
+++ /dev/null
@@ -1,57 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class PropertyValueDeserializer extends AbstractEdmDeserializer<PropertyValueImpl> {
-
-  @Override
-  protected PropertyValueImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final PropertyValueImpl propValue = new PropertyValueImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Property".equals(jp.getCurrentName())) {
-          propValue.setProperty(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          propValue.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        } else if (isAnnotationConstExprConstruct(jp)) {
-          propValue.setValue(parseAnnotationConstExprConstruct(jp));
-        } else {
-          propValue.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return propValue;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueImpl.java
deleted file mode 100644
index 2d7011d..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValueImpl.java
+++ /dev/null
@@ -1,53 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyValue;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = PropertyValueDeserializer.class)
-public class PropertyValueImpl extends AbstractAnnotatableDynamicAnnotationExpression implements PropertyValue {
-
-  private static final long serialVersionUID = -8437649215282645228L;
-
-  private String property;
-
-  private AnnotationExpression value;
-
-  @Override
-  public String getProperty() {
-    return property;
-  }
-
-  public void setProperty(final String property) {
-    this.property = property;
-  }
-
-  @Override
-  public AnnotationExpression getValue() {
-    return value;
-  }
-
-  public void setValue(final AnnotationExpression value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java
deleted file mode 100644
index 2ff277d..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordDeserializer.java
+++ /dev/null
@@ -1,55 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class RecordDeserializer extends AbstractEdmDeserializer<RecordImpl> {
-
-  @Override
-  protected RecordImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final RecordImpl record = new RecordImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Type".equals(jp.getCurrentName())) {
-          record.setType(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          record.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        } else {
-          record.getPropertyValues().add(jp.readValueAs(PropertyValueImpl.class));
-        }
-      }
-    }
-
-    return record;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordImpl.java
deleted file mode 100644
index eb4e736..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordImpl.java
+++ /dev/null
@@ -1,52 +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.client.core.edm.xml.v4.annotation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyValue;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Record;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = RecordDeserializer.class)
-public class RecordImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Record {
-
-  private static final long serialVersionUID = 4275271751615410709L;
-
-  private String type;
-
-  private final List<PropertyValue> propertyValues = new ArrayList<PropertyValue>();
-
-  @Override
-  public String getType() {
-    return type;
-  }
-
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  @Override
-  public List<PropertyValue> getPropertyValues() {
-    return propertyValues;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java
deleted file mode 100644
index 6852967..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpressionImpl.java
+++ /dev/null
@@ -1,62 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.TwoParamsOpDynamicAnnotationExpression;
-
-public class TwoParamsOpDynamicAnnotationExpressionImpl
-        extends AbstractDynamicAnnotationExpression implements TwoParamsOpDynamicAnnotationExpression {
-
-  private static final long serialVersionUID = 6241842185452451946L;
-
-  private Type type;
-
-  private DynamicAnnotationExpression left;
-
-  private DynamicAnnotationExpression right;
-
-  @Override
-  public Type getType() {
-    return type;
-  }
-
-  public void setType(final Type type) {
-    this.type = type;
-  }
-
-  @Override
-  public DynamicAnnotationExpression getLeftExpression() {
-    return left;
-  }
-
-  public void setLeftExpression(final DynamicAnnotationExpression left) {
-    this.left = left;
-  }
-
-  @Override
-  public DynamicAnnotationExpression getRightExpression() {
-    return right;
-  }
-
-  public void setRightExpression(final DynamicAnnotationExpression right) {
-    this.right = right;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java
deleted file mode 100644
index b6c9e71..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefDeserializer.java
+++ /dev/null
@@ -1,52 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class UrlRefDeserializer extends AbstractEdmDeserializer<UrlRefImpl> {
-
-  @Override
-  protected UrlRefImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final UrlRefImpl urlref = new UrlRefImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if (isAnnotationConstExprConstruct(jp)) {
-          urlref.setValue(parseAnnotationConstExprConstruct(jp));
-        } else {
-          urlref.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return urlref;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefImpl.java
deleted file mode 100644
index a7308a9..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRefImpl.java
+++ /dev/null
@@ -1,42 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.UrlRef;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = UrlRefDeserializer.class)
-public class UrlRefImpl extends AbstractDynamicAnnotationExpression implements UrlRef {
-
-  private static final long serialVersionUID = -7693224811739000440L;
-
-  private AnnotationExpression value;
-
-  @Override
-  public AnnotationExpression getValue() {
-    return value;
-  }
-
-  public void setValue(final AnnotationExpression value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java
index 23587af..7a93bbe 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/AbstractODataBinder.java
@@ -27,10 +27,10 @@ import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.api.data.ServiceDocument;
 import org.apache.olingo.client.api.data.ServiceDocumentItem;
 import org.apache.olingo.client.api.serialization.CommonODataBinder;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.data.ContextURL;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
new file mode 100644
index 0000000..b14ea6b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
@@ -0,0 +1,430 @@
+/*
+ * 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.client.core.serialization;
+
+import java.net.URI;
+import java.util.List;
+
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.data.ServiceDocumentItem;
+import org.apache.olingo.client.api.serialization.ODataBinder;
+import org.apache.olingo.client.core.uri.URIUtils;
+import org.apache.olingo.commons.api.data.Annotatable;
+import org.apache.olingo.commons.api.data.Annotation;
+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.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.LinkedComplexValue;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.data.Valuable;
+import org.apache.olingo.commons.api.data.ValueType;
+import org.apache.olingo.commons.api.domain.CommonODataEntity;
+import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
+import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataInlineEntity;
+import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLinked;
+import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.domain.v4.ODataAnnotatable;
+import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity.Reason;
+import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataLink;
+import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.edm.EdmComplexType;
+import org.apache.olingo.commons.api.edm.EdmElement;
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+import org.apache.olingo.commons.api.edm.EdmTerm;
+import org.apache.olingo.commons.api.edm.EdmType;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.geo.Geospatial;
+import org.apache.olingo.commons.core.data.AnnotationImpl;
+import org.apache.olingo.commons.core.data.LinkedComplexValueImpl;
+import org.apache.olingo.commons.core.data.PropertyImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataAnnotationImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataDeletedEntityImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataDeltaLinkImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataPropertyImpl;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.core.serialization.ContextURLParser;
+
+public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder {
+
+  public ODataBinderImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public boolean add(final CommonODataEntity entity, final CommonODataProperty property) {
+    return ((ODataEntity) entity).getProperties().add((ODataProperty) property);
+  }
+
+  @Override
+  protected boolean add(final CommonODataEntitySet entitySet, final CommonODataEntity entity) {
+    return ((ODataEntitySet) entitySet).getEntities().add((ODataEntity) entity);
+  }
+
+  @Override
+  public ODataServiceDocument getODataServiceDocument(final ServiceDocument resource) {
+    final ODataServiceDocument serviceDocument = super.getODataServiceDocument(resource);
+
+    for (ServiceDocumentItem functionImport : resource.getFunctionImports()) {
+      serviceDocument.getFunctionImports().put(
+              functionImport.getName() == null ? functionImport.getUrl() : functionImport.getName(),
+              URIUtils.getURI(resource.getBaseURI(), functionImport.getUrl()));
+    }
+    for (ServiceDocumentItem singleton : resource.getSingletons()) {
+      serviceDocument.getSingletons().put(
+              singleton.getName() == null ? singleton.getUrl() : singleton.getName(),
+              URIUtils.getURI(resource.getBaseURI(), singleton.getUrl()));
+    }
+    for (ServiceDocumentItem sdoc : resource.getRelatedServiceDocuments()) {
+      serviceDocument.getRelatedServiceDocuments().put(
+              sdoc.getName() == null ? sdoc.getUrl() : sdoc.getName(),
+              URIUtils.getURI(resource.getBaseURI(), sdoc.getUrl()));
+    }
+
+    return serviceDocument;
+  }
+
+  private void updateValuable(final Valuable propertyResource, final ODataValuable odataValuable) {
+    final Object propertyValue = getValue(odataValuable.getValue());
+    if (odataValuable.hasPrimitiveValue()) {
+      propertyResource.setType(odataValuable.getPrimitiveValue().getTypeName());
+      propertyResource.setValue(
+              propertyValue instanceof Geospatial ? ValueType.GEOSPATIAL : ValueType.PRIMITIVE,
+              propertyValue);
+    } else if (odataValuable.hasEnumValue()) {
+      propertyResource.setType(odataValuable.getEnumValue().getTypeName());
+      propertyResource.setValue(ValueType.ENUM, propertyValue);
+    } else if (odataValuable.hasComplexValue()) {
+      propertyResource.setType(odataValuable.getComplexValue().getTypeName());
+      propertyResource.setValue(
+              propertyValue instanceof LinkedComplexValue ? ValueType.LINKED_COMPLEX : ValueType.COMPLEX,
+              propertyValue);
+    } else if (odataValuable.hasCollectionValue()) {
+      final ODataCollectionValue<org.apache.olingo.commons.api.domain.v4.ODataValue> collectionValue =
+              odataValuable.getCollectionValue();
+      propertyResource.setType(collectionValue.getTypeName());
+      final org.apache.olingo.commons.api.domain.v4.ODataValue value =
+              collectionValue.iterator().hasNext() ? collectionValue.iterator().next() : null;
+      ValueType valueType = ValueType.COLLECTION_PRIMITIVE;
+      if (value == null) {
+        valueType = ValueType.COLLECTION_PRIMITIVE;
+      } else if (value.isPrimitive()) {
+        valueType = value.asPrimitive().toValue() instanceof Geospatial
+                ? ValueType.COLLECTION_GEOSPATIAL : ValueType.COLLECTION_PRIMITIVE;
+      } else if (value.isEnum()) {
+        valueType = ValueType.COLLECTION_ENUM;
+      } else if (value.isLinkedComplex()) {
+        valueType = ValueType.COLLECTION_LINKED_COMPLEX;
+      } else if (value.isComplex()) {
+        valueType = ValueType.COLLECTION_COMPLEX;
+      }
+      propertyResource.setValue(valueType, propertyValue);
+    }
+  }
+
+  private void annotations(final ODataAnnotatable odataAnnotatable, final Annotatable annotatable) {
+    for (ODataAnnotation odataAnnotation : odataAnnotatable.getAnnotations()) {
+      final Annotation annotation = new AnnotationImpl();
+
+      annotation.setTerm(odataAnnotation.getTerm());
+      annotation.setType(odataAnnotation.getValue().getTypeName());
+      updateValuable(annotation, odataAnnotation);
+
+      annotatable.getAnnotations().add(annotation);
+    }
+  }
+
+  @Override
+  public EntitySet getEntitySet(final CommonODataEntitySet odataEntitySet) {
+    final EntitySet entitySet = super.getEntitySet(odataEntitySet);
+    entitySet.setDeltaLink(((ODataEntitySet) odataEntitySet).getDeltaLink());
+    annotations((ODataEntitySet) odataEntitySet, entitySet);
+    return entitySet;
+  }
+
+  @Override
+  protected void links(final ODataLinked odataLinked, final Linked linked) {
+    super.links(odataLinked, linked);
+
+    for (Link link : linked.getNavigationLinks()) {
+      final org.apache.olingo.commons.api.domain.ODataLink odataLink = odataLinked.getNavigationLink(link.getTitle());
+      if (!(odataLink instanceof ODataInlineEntity) && !(odataLink instanceof ODataInlineEntitySet)) {
+        annotations((ODataLink) odataLink, link);
+      }
+    }
+  }
+
+  @Override
+  public Entity getEntity(final CommonODataEntity odataEntity) {
+    final Entity entity = super.getEntity(odataEntity);
+    entity.setId(((ODataEntity) odataEntity).getId());
+    annotations((ODataEntity) odataEntity, entity);
+    return entity;
+  }
+
+  @Override
+  public Property getProperty(final CommonODataProperty property) {
+    final ODataProperty _property = (ODataProperty) property;
+
+    final Property propertyResource = new PropertyImpl();
+    propertyResource.setName(_property.getName());
+    updateValuable(propertyResource, _property);
+    annotations(_property, propertyResource);
+
+    return propertyResource;
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  protected Object getValue(final ODataValue value) {
+    Object valueResource;
+    if (value instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
+            && ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).isEnum()) {
+
+      valueResource =
+              ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).asEnum().getValue();
+    } else {
+      valueResource = super.getValue(value);
+
+      if (value instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
+              && ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).isLinkedComplex()) {
+
+        final LinkedComplexValue lcValueResource = new LinkedComplexValueImpl();
+        lcValueResource.getValue().addAll((List<Property>) valueResource);
+
+        final ODataLinkedComplexValue linked =
+                ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).asLinkedComplex();
+        annotations(linked, lcValueResource);
+        links(linked, lcValueResource);
+
+        valueResource = lcValueResource;
+      }
+    }
+    return valueResource;
+  }
+
+  private void odataAnnotations(final Annotatable annotatable, final ODataAnnotatable odataAnnotatable) {
+    for (Annotation annotation : annotatable.getAnnotations()) {
+      FullQualifiedName fqn = null;
+      if (client instanceof EdmEnabledODataClient) {
+        final EdmTerm term = ((EdmEnabledODataClient) client).getCachedEdm().
+                getTerm(new FullQualifiedName(annotation.getTerm()));
+        if (term != null) {
+          fqn = term.getType().getFullQualifiedName();
+        }
+      }
+
+      if (fqn == null && annotation.getType() != null) {
+        final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setTypeExpression(annotation.getType()).build();
+        if (typeInfo.isPrimitiveType()) {
+          fqn = typeInfo.getPrimitiveTypeKind().getFullQualifiedName();
+        }
+      }
+
+      final ODataAnnotation odataAnnotation = new ODataAnnotationImpl(annotation.getTerm(),
+              (org.apache.olingo.commons.api.domain.v4.ODataValue) getODataValue(fqn, annotation, null, null));
+      odataAnnotatable.getAnnotations().add(odataAnnotation);
+    }
+  }
+
+  @Override
+  public ODataEntitySet getODataEntitySet(final ResWrap<EntitySet> resource) {
+    final ODataEntitySet entitySet = (ODataEntitySet) super.getODataEntitySet(resource);
+
+    if (resource.getPayload().getDeltaLink() != null) {
+      final URI base = resource.getContextURL() == null
+              ? resource.getPayload().getBaseURI()
+              : ContextURLParser.parse(resource.getContextURL()).getServiceRoot();
+      entitySet.setDeltaLink(URIUtils.getURI(base, resource.getPayload().getDeltaLink()));
+    }
+    odataAnnotations(resource.getPayload(), entitySet);
+
+    return entitySet;
+  }
+
+  @Override
+  protected void odataNavigationLinks(final EdmType edmType,
+          final Linked linked, final ODataLinked odataLinked, final String metadataETag, final URI base) {
+
+    super.odataNavigationLinks(edmType, linked, odataLinked, metadataETag, base);
+    for (org.apache.olingo.commons.api.domain.ODataLink link : odataLinked.getNavigationLinks()) {
+      if (!(link instanceof ODataInlineEntity) && !(link instanceof ODataInlineEntitySet)) {
+        odataAnnotations(linked.getNavigationLink(link.getName()), (ODataAnnotatable) link);
+      }
+    }
+  }
+
+  @Override
+  public ODataEntity getODataEntity(final ResWrap<Entity> resource) {
+    final ODataEntity entity = (ODataEntity) super.getODataEntity(resource);
+
+    entity.setId(resource.getPayload().getId());
+    odataAnnotations(resource.getPayload(), entity);
+
+    return entity;
+  }
+
+  @Override
+  public ODataProperty getODataProperty(final ResWrap<Property> resource) {
+    final Property payload = resource.getPayload();
+    final EdmTypeInfo typeInfo = buildTypeInfo(ContextURLParser.parse(resource.getContextURL()),
+            resource.getMetadataETag(), payload.getName(), payload.getType());
+
+    final ODataProperty property = new ODataPropertyImpl(payload.getName(),
+            getODataValue(typeInfo == null ? null : typeInfo.getFullQualifiedName(),
+                    payload, resource.getContextURL(), resource.getMetadataETag()));
+    odataAnnotations(payload, property);
+
+    return property;
+  }
+
+  @Override
+  protected ODataProperty getODataProperty(final EdmType type, final Property resource) {
+    final EdmTypeInfo typeInfo = buildTypeInfo(type == null ? null : type.getFullQualifiedName(), resource.getType());
+
+    final ODataProperty property = new ODataPropertyImpl(resource.getName(),
+            getODataValue(typeInfo == null ? null : typeInfo.getFullQualifiedName(),
+                    resource, null, null));
+    odataAnnotations(resource, property);
+
+    return property;
+  }
+
+  @Override
+  protected ODataValue getODataValue(final FullQualifiedName type,
+          final Valuable valuable, final URI contextURL, final String metadataETag) {
+
+    // fixes enum values treated as primitive when no type information is available
+    if (client instanceof EdmEnabledODataClient && type != null) {
+      final EdmEnumType edmType = ((EdmEnabledODataClient) client).getEdm(metadataETag).getEnumType(type);
+      if (valuable.isPrimitive() && edmType != null) {
+        valuable.setValue(ValueType.ENUM, valuable.asPrimitive());
+      }
+    }
+
+    ODataValue value;
+    if (valuable.isEnum()) {
+      value = ((ODataClient) client).getObjectFactory().newEnumValue(type == null ? null : type.toString(),
+              valuable.asEnum().toString());
+    } else if (valuable.isLinkedComplex()) {
+      final ODataLinkedComplexValue lcValue =
+              ((ODataClient) client).getObjectFactory().newLinkedComplexValue(type == null ? null : type.toString());
+
+      EdmComplexType edmType = null;
+      if (client instanceof EdmEnabledODataClient && type != null) {
+        edmType = ((EdmEnabledODataClient) client).getEdm(metadataETag).getComplexType(type);
+      }
+
+      for (Property property : valuable.asLinkedComplex().getValue()) {
+        EdmType edmPropertyType = null;
+        if (edmType != null) {
+          final EdmElement edmProp = edmType.getProperty(property.getName());
+          if (edmProp != null) {
+            edmPropertyType = edmProp.getType();
+          }
+        }
+        lcValue.add(getODataProperty(edmPropertyType, property));
+      }
+
+      odataNavigationLinks(edmType, valuable.asLinkedComplex(), lcValue, metadataETag, contextURL);
+      odataAnnotations(valuable.asLinkedComplex(), lcValue);
+
+      value = lcValue;
+    } else {
+      value = super.getODataValue(type, valuable, contextURL, metadataETag);
+    }
+
+    return value;
+  }
+
+  @Override
+  public ODataDelta getODataDelta(final ResWrap<Delta> resource) {
+    final URI base = resource.getContextURL() == null
+            ? resource.getPayload().getBaseURI()
+            : ContextURLParser.parse(resource.getContextURL()).getServiceRoot();
+
+    final URI next = resource.getPayload().getNext();
+
+    final ODataDelta delta = next == null
+            ? ((ODataClient) client).getObjectFactory().newDelta()
+            : ((ODataClient) client).getObjectFactory().newDelta(URIUtils.getURI(base, next.toASCIIString()));
+
+    if (resource.getPayload().getCount() != null) {
+      delta.setCount(resource.getPayload().getCount());
+    }
+
+    if (resource.getPayload().getDeltaLink() != null) {
+      delta.setDeltaLink(URIUtils.getURI(base, resource.getPayload().getDeltaLink()));
+    }
+
+    for (Entity entityResource : resource.getPayload().getEntities()) {
+      add(delta, getODataEntity(
+              new ResWrap<Entity>(resource.getContextURL(), resource.getMetadataETag(), entityResource)));
+    }
+    for (DeletedEntity deletedEntity : resource.getPayload().getDeletedEntities()) {
+      final ODataDeletedEntityImpl impl = new ODataDeletedEntityImpl();
+      impl.setId(URIUtils.getURI(base, deletedEntity.getId()));
+      impl.setReason(Reason.valueOf(deletedEntity.getReason().name()));
+
+      delta.getDeletedEntities().add(impl);
+    }
+
+    odataAnnotations(resource.getPayload(), delta);
+
+    for (DeltaLink link : resource.getPayload().getAddedLinks()) {
+      final ODataDeltaLink impl = new ODataDeltaLinkImpl();
+      impl.setRelationship(link.getRelationship());
+      impl.setSource(URIUtils.getURI(base, link.getSource()));
+      impl.setTarget(URIUtils.getURI(base, link.getTarget()));
+
+      odataAnnotations(link, impl);
+
+      delta.getAddedLinks().add(impl);
+    }
+    for (DeltaLink link : resource.getPayload().getDeletedLinks()) {
+      final ODataDeltaLink impl = new ODataDeltaLinkImpl();
+      impl.setRelationship(link.getRelationship());
+      impl.setSource(URIUtils.getURI(base, link.getSource()));
+      impl.setTarget(URIUtils.getURI(base, link.getTarget()));
+
+      odataAnnotations(link, impl);
+
+      delta.getDeletedLinks().add(impl);
+    }
+
+    return delta;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataDeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataDeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataDeserializerImpl.java
new file mode 100644
index 0000000..abf3ceb
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataDeserializerImpl.java
@@ -0,0 +1,78 @@
+/*
+ * 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.client.core.serialization;
+
+import java.io.InputStream;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.olingo.client.api.data.ServiceDocument;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.serialization.ODataDeserializer;
+import org.apache.olingo.client.core.data.JSONServiceDocumentDeserializer;
+import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer;
+import org.apache.olingo.client.core.edm.xml.EdmxImpl;
+import org.apache.olingo.client.core.edm.xml.XMLMetadataImpl;
+import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+import org.apache.olingo.commons.core.serialization.AtomDeserializer;
+import org.apache.olingo.commons.core.serialization.JsonDeltaDeserializer;
+
+public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
+
+  private final ODataFormat format;
+
+  public ODataDeserializerImpl(final ODataServiceVersion version, final boolean serverMode, final ODataFormat format) {
+    super(version, serverMode, format);
+    this.format = format;
+  }
+
+  @Override
+  public XMLMetadata toMetadata(final InputStream input) {
+    try {
+      return new XMLMetadataImpl(getXmlMapper().readValue(input, EdmxImpl.class));
+    } catch (Exception e) {
+      throw new IllegalArgumentException("Could not parse as Edmx document", e);
+    }
+  }
+
+  @Override
+  public ResWrap<ServiceDocument> toServiceDocument(final InputStream input) throws ODataDeserializerException {
+    return format == ODataFormat.XML ?
+        new XMLServiceDocumentDeserializer(version, false).toServiceDocument(input) :
+        new JSONServiceDocumentDeserializer(version, false).toServiceDocument(input);
+  }
+
+  @Override
+  public ResWrap<Delta> toDelta(final InputStream input) throws ODataDeserializerException {
+    try {
+      return format == ODataFormat.ATOM ?
+          new AtomDeserializer(version).delta(input) :
+          new JsonDeltaDeserializer(version, false).toDelta(input);
+    } catch (XMLStreamException e) {
+      throw new ODataDeserializerException(e);
+    } catch (final EdmPrimitiveTypeException e) {
+      throw new ODataDeserializerException(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
new file mode 100644
index 0000000..1480556
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.client.core.serialization;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.serialization.ODataReader;
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public class ODataReaderImpl extends AbstractODataReader implements ODataReader {
+
+  public ODataReaderImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public ODataEntitySet readEntitySet(final InputStream input, final ODataFormat format)
+      throws ODataDeserializerException {
+    return ((ODataClient) client).getBinder().getODataEntitySet(client.getDeserializer(format).toEntitySet(input));
+  }
+
+  @Override
+  public ODataEntity readEntity(final InputStream input, final ODataFormat format)
+      throws ODataDeserializerException {
+    return ((ODataClient) client).getBinder().getODataEntity(client.getDeserializer(format).toEntity(input));
+  }
+
+  @Override
+  public ODataProperty readProperty(final InputStream input, final ODataFormat format)
+      throws ODataDeserializerException {
+    return ((ODataClient) client).getBinder().getODataProperty(client.getDeserializer(format).toProperty(input));
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataBinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataBinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataBinderImpl.java
deleted file mode 100644
index c9baa58..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataBinderImpl.java
+++ /dev/null
@@ -1,431 +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.client.core.serialization.v4;
-
-import java.net.URI;
-import java.util.List;
-
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.data.ServiceDocumentItem;
-import org.apache.olingo.client.api.serialization.v4.ODataBinder;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.serialization.AbstractODataBinder;
-import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.data.Annotatable;
-import org.apache.olingo.commons.api.data.Annotation;
-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.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.LinkedComplexValue;
-import org.apache.olingo.commons.api.data.Property;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.data.Valuable;
-import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.CommonODataEntity;
-import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
-import org.apache.olingo.commons.api.domain.CommonODataProperty;
-import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.ODataInlineEntity;
-import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ODataLinked;
-import org.apache.olingo.commons.api.domain.ODataServiceDocument;
-import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotatable;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity.Reason;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
-import org.apache.olingo.commons.api.edm.EdmComplexType;
-import org.apache.olingo.commons.api.edm.EdmElement;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-import org.apache.olingo.commons.api.edm.EdmTerm;
-import org.apache.olingo.commons.api.edm.EdmType;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.geo.Geospatial;
-import org.apache.olingo.commons.core.data.AnnotationImpl;
-import org.apache.olingo.commons.core.data.LinkedComplexValueImpl;
-import org.apache.olingo.commons.core.data.PropertyImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataAnnotationImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeletedEntityImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeltaLinkImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataPropertyImpl;
-import org.apache.olingo.commons.core.edm.EdmTypeInfo;
-import org.apache.olingo.commons.core.serialization.ContextURLParser;
-
-public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder {
-
-  public ODataBinderImpl(final ODataClient client) {
-    super(client);
-  }
-
-  @Override
-  public boolean add(final CommonODataEntity entity, final CommonODataProperty property) {
-    return ((ODataEntity) entity).getProperties().add((ODataProperty) property);
-  }
-
-  @Override
-  protected boolean add(final CommonODataEntitySet entitySet, final CommonODataEntity entity) {
-    return ((ODataEntitySet) entitySet).getEntities().add((ODataEntity) entity);
-  }
-
-  @Override
-  public ODataServiceDocument getODataServiceDocument(final ServiceDocument resource) {
-    final ODataServiceDocument serviceDocument = super.getODataServiceDocument(resource);
-
-    for (ServiceDocumentItem functionImport : resource.getFunctionImports()) {
-      serviceDocument.getFunctionImports().put(
-              functionImport.getName() == null ? functionImport.getUrl() : functionImport.getName(),
-              URIUtils.getURI(resource.getBaseURI(), functionImport.getUrl()));
-    }
-    for (ServiceDocumentItem singleton : resource.getSingletons()) {
-      serviceDocument.getSingletons().put(
-              singleton.getName() == null ? singleton.getUrl() : singleton.getName(),
-              URIUtils.getURI(resource.getBaseURI(), singleton.getUrl()));
-    }
-    for (ServiceDocumentItem sdoc : resource.getRelatedServiceDocuments()) {
-      serviceDocument.getRelatedServiceDocuments().put(
-              sdoc.getName() == null ? sdoc.getUrl() : sdoc.getName(),
-              URIUtils.getURI(resource.getBaseURI(), sdoc.getUrl()));
-    }
-
-    return serviceDocument;
-  }
-
-  private void updateValuable(final Valuable propertyResource, final ODataValuable odataValuable) {
-    final Object propertyValue = getValue(odataValuable.getValue());
-    if (odataValuable.hasPrimitiveValue()) {
-      propertyResource.setType(odataValuable.getPrimitiveValue().getTypeName());
-      propertyResource.setValue(
-              propertyValue instanceof Geospatial ? ValueType.GEOSPATIAL : ValueType.PRIMITIVE,
-              propertyValue);
-    } else if (odataValuable.hasEnumValue()) {
-      propertyResource.setType(odataValuable.getEnumValue().getTypeName());
-      propertyResource.setValue(ValueType.ENUM, propertyValue);
-    } else if (odataValuable.hasComplexValue()) {
-      propertyResource.setType(odataValuable.getComplexValue().getTypeName());
-      propertyResource.setValue(
-              propertyValue instanceof LinkedComplexValue ? ValueType.LINKED_COMPLEX : ValueType.COMPLEX,
-              propertyValue);
-    } else if (odataValuable.hasCollectionValue()) {
-      final ODataCollectionValue<org.apache.olingo.commons.api.domain.v4.ODataValue> collectionValue =
-              odataValuable.getCollectionValue();
-      propertyResource.setType(collectionValue.getTypeName());
-      final org.apache.olingo.commons.api.domain.v4.ODataValue value =
-              collectionValue.iterator().hasNext() ? collectionValue.iterator().next() : null;
-      ValueType valueType = ValueType.COLLECTION_PRIMITIVE;
-      if (value == null) {
-        valueType = ValueType.COLLECTION_PRIMITIVE;
-      } else if (value.isPrimitive()) {
-        valueType = value.asPrimitive().toValue() instanceof Geospatial
-                ? ValueType.COLLECTION_GEOSPATIAL : ValueType.COLLECTION_PRIMITIVE;
-      } else if (value.isEnum()) {
-        valueType = ValueType.COLLECTION_ENUM;
-      } else if (value.isLinkedComplex()) {
-        valueType = ValueType.COLLECTION_LINKED_COMPLEX;
-      } else if (value.isComplex()) {
-        valueType = ValueType.COLLECTION_COMPLEX;
-      }
-      propertyResource.setValue(valueType, propertyValue);
-    }
-  }
-
-  private void annotations(final ODataAnnotatable odataAnnotatable, final Annotatable annotatable) {
-    for (ODataAnnotation odataAnnotation : odataAnnotatable.getAnnotations()) {
-      final Annotation annotation = new AnnotationImpl();
-
-      annotation.setTerm(odataAnnotation.getTerm());
-      annotation.setType(odataAnnotation.getValue().getTypeName());
-      updateValuable(annotation, odataAnnotation);
-
-      annotatable.getAnnotations().add(annotation);
-    }
-  }
-
-  @Override
-  public EntitySet getEntitySet(final CommonODataEntitySet odataEntitySet) {
-    final EntitySet entitySet = super.getEntitySet(odataEntitySet);
-    entitySet.setDeltaLink(((ODataEntitySet) odataEntitySet).getDeltaLink());
-    annotations((ODataEntitySet) odataEntitySet, entitySet);
-    return entitySet;
-  }
-
-  @Override
-  protected void links(final ODataLinked odataLinked, final Linked linked) {
-    super.links(odataLinked, linked);
-
-    for (Link link : linked.getNavigationLinks()) {
-      final org.apache.olingo.commons.api.domain.ODataLink odataLink = odataLinked.getNavigationLink(link.getTitle());
-      if (!(odataLink instanceof ODataInlineEntity) && !(odataLink instanceof ODataInlineEntitySet)) {
-        annotations((ODataLink) odataLink, link);
-      }
-    }
-  }
-
-  @Override
-  public Entity getEntity(final CommonODataEntity odataEntity) {
-    final Entity entity = super.getEntity(odataEntity);
-    entity.setId(((ODataEntity) odataEntity).getId());
-    annotations((ODataEntity) odataEntity, entity);
-    return entity;
-  }
-
-  @Override
-  public Property getProperty(final CommonODataProperty property) {
-    final ODataProperty _property = (ODataProperty) property;
-
-    final Property propertyResource = new PropertyImpl();
-    propertyResource.setName(_property.getName());
-    updateValuable(propertyResource, _property);
-    annotations(_property, propertyResource);
-
-    return propertyResource;
-  }
-
-  @Override
-  @SuppressWarnings("unchecked")
-  protected Object getValue(final ODataValue value) {
-    Object valueResource;
-    if (value instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
-            && ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).isEnum()) {
-
-      valueResource =
-              ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).asEnum().getValue();
-    } else {
-      valueResource = super.getValue(value);
-
-      if (value instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
-              && ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).isLinkedComplex()) {
-
-        final LinkedComplexValue lcValueResource = new LinkedComplexValueImpl();
-        lcValueResource.getValue().addAll((List<Property>) valueResource);
-
-        final ODataLinkedComplexValue linked =
-                ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).asLinkedComplex();
-        annotations(linked, lcValueResource);
-        links(linked, lcValueResource);
-
-        valueResource = lcValueResource;
-      }
-    }
-    return valueResource;
-  }
-
-  private void odataAnnotations(final Annotatable annotatable, final ODataAnnotatable odataAnnotatable) {
-    for (Annotation annotation : annotatable.getAnnotations()) {
-      FullQualifiedName fqn = null;
-      if (client instanceof EdmEnabledODataClient) {
-        final EdmTerm term = ((EdmEnabledODataClient) client).getCachedEdm().
-                getTerm(new FullQualifiedName(annotation.getTerm()));
-        if (term != null) {
-          fqn = term.getType().getFullQualifiedName();
-        }
-      }
-
-      if (fqn == null && annotation.getType() != null) {
-        final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setTypeExpression(annotation.getType()).build();
-        if (typeInfo.isPrimitiveType()) {
-          fqn = typeInfo.getPrimitiveTypeKind().getFullQualifiedName();
-        }
-      }
-
-      final ODataAnnotation odataAnnotation = new ODataAnnotationImpl(annotation.getTerm(),
-              (org.apache.olingo.commons.api.domain.v4.ODataValue) getODataValue(fqn, annotation, null, null));
-      odataAnnotatable.getAnnotations().add(odataAnnotation);
-    }
-  }
-
-  @Override
-  public ODataEntitySet getODataEntitySet(final ResWrap<EntitySet> resource) {
-    final ODataEntitySet entitySet = (ODataEntitySet) super.getODataEntitySet(resource);
-
-    if (resource.getPayload().getDeltaLink() != null) {
-      final URI base = resource.getContextURL() == null
-              ? resource.getPayload().getBaseURI()
-              : ContextURLParser.parse(resource.getContextURL()).getServiceRoot();
-      entitySet.setDeltaLink(URIUtils.getURI(base, resource.getPayload().getDeltaLink()));
-    }
-    odataAnnotations(resource.getPayload(), entitySet);
-
-    return entitySet;
-  }
-
-  @Override
-  protected void odataNavigationLinks(final EdmType edmType,
-          final Linked linked, final ODataLinked odataLinked, final String metadataETag, final URI base) {
-
-    super.odataNavigationLinks(edmType, linked, odataLinked, metadataETag, base);
-    for (org.apache.olingo.commons.api.domain.ODataLink link : odataLinked.getNavigationLinks()) {
-      if (!(link instanceof ODataInlineEntity) && !(link instanceof ODataInlineEntitySet)) {
-        odataAnnotations(linked.getNavigationLink(link.getName()), (ODataAnnotatable) link);
-      }
-    }
-  }
-
-  @Override
-  public ODataEntity getODataEntity(final ResWrap<Entity> resource) {
-    final ODataEntity entity = (ODataEntity) super.getODataEntity(resource);
-
-    entity.setId(resource.getPayload().getId());
-    odataAnnotations(resource.getPayload(), entity);
-
-    return entity;
-  }
-
-  @Override
-  public ODataProperty getODataProperty(final ResWrap<Property> resource) {
-    final Property payload = resource.getPayload();
-    final EdmTypeInfo typeInfo = buildTypeInfo(ContextURLParser.parse(resource.getContextURL()),
-            resource.getMetadataETag(), payload.getName(), payload.getType());
-
-    final ODataProperty property = new ODataPropertyImpl(payload.getName(),
-            getODataValue(typeInfo == null ? null : typeInfo.getFullQualifiedName(),
-                    payload, resource.getContextURL(), resource.getMetadataETag()));
-    odataAnnotations(payload, property);
-
-    return property;
-  }
-
-  @Override
-  protected ODataProperty getODataProperty(final EdmType type, final Property resource) {
-    final EdmTypeInfo typeInfo = buildTypeInfo(type == null ? null : type.getFullQualifiedName(), resource.getType());
-
-    final ODataProperty property = new ODataPropertyImpl(resource.getName(),
-            getODataValue(typeInfo == null ? null : typeInfo.getFullQualifiedName(),
-                    resource, null, null));
-    odataAnnotations(resource, property);
-
-    return property;
-  }
-
-  @Override
-  protected ODataValue getODataValue(final FullQualifiedName type,
-          final Valuable valuable, final URI contextURL, final String metadataETag) {
-
-    // fixes enum values treated as primitive when no type information is available
-    if (client instanceof EdmEnabledODataClient && type != null) {
-      final EdmEnumType edmType = ((EdmEnabledODataClient) client).getEdm(metadataETag).getEnumType(type);
-      if (valuable.isPrimitive() && edmType != null) {
-        valuable.setValue(ValueType.ENUM, valuable.asPrimitive());
-      }
-    }
-
-    ODataValue value;
-    if (valuable.isEnum()) {
-      value = ((ODataClient) client).getObjectFactory().newEnumValue(type == null ? null : type.toString(),
-              valuable.asEnum().toString());
-    } else if (valuable.isLinkedComplex()) {
-      final ODataLinkedComplexValue lcValue =
-              ((ODataClient) client).getObjectFactory().newLinkedComplexValue(type == null ? null : type.toString());
-
-      EdmComplexType edmType = null;
-      if (client instanceof EdmEnabledODataClient && type != null) {
-        edmType = ((EdmEnabledODataClient) client).getEdm(metadataETag).getComplexType(type);
-      }
-
-      for (Property property : valuable.asLinkedComplex().getValue()) {
-        EdmType edmPropertyType = null;
-        if (edmType != null) {
-          final EdmElement edmProp = edmType.getProperty(property.getName());
-          if (edmProp != null) {
-            edmPropertyType = edmProp.getType();
-          }
-        }
-        lcValue.add(getODataProperty(edmPropertyType, property));
-      }
-
-      odataNavigationLinks(edmType, valuable.asLinkedComplex(), lcValue, metadataETag, contextURL);
-      odataAnnotations(valuable.asLinkedComplex(), lcValue);
-
-      value = lcValue;
-    } else {
-      value = super.getODataValue(type, valuable, contextURL, metadataETag);
-    }
-
-    return value;
-  }
-
-  @Override
-  public ODataDelta getODataDelta(final ResWrap<Delta> resource) {
-    final URI base = resource.getContextURL() == null
-            ? resource.getPayload().getBaseURI()
-            : ContextURLParser.parse(resource.getContextURL()).getServiceRoot();
-
-    final URI next = resource.getPayload().getNext();
-
-    final ODataDelta delta = next == null
-            ? ((ODataClient) client).getObjectFactory().newDelta()
-            : ((ODataClient) client).getObjectFactory().newDelta(URIUtils.getURI(base, next.toASCIIString()));
-
-    if (resource.getPayload().getCount() != null) {
-      delta.setCount(resource.getPayload().getCount());
-    }
-
-    if (resource.getPayload().getDeltaLink() != null) {
-      delta.setDeltaLink(URIUtils.getURI(base, resource.getPayload().getDeltaLink()));
-    }
-
-    for (Entity entityResource : resource.getPayload().getEntities()) {
-      add(delta, getODataEntity(
-              new ResWrap<Entity>(resource.getContextURL(), resource.getMetadataETag(), entityResource)));
-    }
-    for (DeletedEntity deletedEntity : resource.getPayload().getDeletedEntities()) {
-      final ODataDeletedEntityImpl impl = new ODataDeletedEntityImpl();
-      impl.setId(URIUtils.getURI(base, deletedEntity.getId()));
-      impl.setReason(Reason.valueOf(deletedEntity.getReason().name()));
-
-      delta.getDeletedEntities().add(impl);
-    }
-
-    odataAnnotations(resource.getPayload(), delta);
-
-    for (DeltaLink link : resource.getPayload().getAddedLinks()) {
-      final ODataDeltaLink impl = new ODataDeltaLinkImpl();
-      impl.setRelationship(link.getRelationship());
-      impl.setSource(URIUtils.getURI(base, link.getSource()));
-      impl.setTarget(URIUtils.getURI(base, link.getTarget()));
-
-      odataAnnotations(link, impl);
-
-      delta.getAddedLinks().add(impl);
-    }
-    for (DeltaLink link : resource.getPayload().getDeletedLinks()) {
-      final ODataDeltaLink impl = new ODataDeltaLinkImpl();
-      impl.setRelationship(link.getRelationship());
-      impl.setSource(URIUtils.getURI(base, link.getSource()));
-      impl.setTarget(URIUtils.getURI(base, link.getTarget()));
-
-      odataAnnotations(link, impl);
-
-      delta.getDeletedLinks().add(impl);
-    }
-
-    return delta;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataDeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataDeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataDeserializerImpl.java
deleted file mode 100644
index 30f4cb0..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataDeserializerImpl.java
+++ /dev/null
@@ -1,79 +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.client.core.serialization.v4;
-
-import java.io.InputStream;
-
-import javax.xml.stream.XMLStreamException;
-
-import org.apache.olingo.client.api.data.ServiceDocument;
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-import org.apache.olingo.client.api.serialization.v4.ODataDeserializer;
-import org.apache.olingo.client.core.data.JSONServiceDocumentDeserializer;
-import org.apache.olingo.client.core.data.XMLServiceDocumentDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.EdmxImpl;
-import org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl;
-import org.apache.olingo.client.core.serialization.AbstractODataDeserializer;
-import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-import org.apache.olingo.commons.core.serialization.AtomDeserializer;
-import org.apache.olingo.commons.core.serialization.JsonDeltaDeserializer;
-
-public class ODataDeserializerImpl extends AbstractODataDeserializer implements ODataDeserializer {
-
-  private final ODataFormat format;
-
-  public ODataDeserializerImpl(final ODataServiceVersion version, final boolean serverMode, final ODataFormat format) {
-    super(version, serverMode, format);
-    this.format = format;
-  }
-
-  @Override
-  public XMLMetadata toMetadata(final InputStream input) {
-    try {
-      return new XMLMetadataImpl(getXmlMapper().readValue(input, EdmxImpl.class));
-    } catch (Exception e) {
-      throw new IllegalArgumentException("Could not parse as Edmx document", e);
-    }
-  }
-
-  @Override
-  public ResWrap<ServiceDocument> toServiceDocument(final InputStream input) throws ODataDeserializerException {
-    return format == ODataFormat.XML ?
-        new XMLServiceDocumentDeserializer(version, false).toServiceDocument(input) :
-        new JSONServiceDocumentDeserializer(version, false).toServiceDocument(input);
-  }
-
-  @Override
-  public ResWrap<Delta> toDelta(final InputStream input) throws ODataDeserializerException {
-    try {
-      return format == ODataFormat.ATOM ?
-          new AtomDeserializer(version).delta(input) :
-          new JsonDeltaDeserializer(version, false).toDelta(input);
-    } catch (XMLStreamException e) {
-      throw new ODataDeserializerException(e);
-    } catch (final EdmPrimitiveTypeException e) {
-      throw new ODataDeserializerException(e);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataReaderImpl.java
deleted file mode 100644
index 795108b..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/v4/ODataReaderImpl.java
+++ /dev/null
@@ -1,55 +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.client.core.serialization.v4;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.serialization.v4.ODataReader;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.serialization.AbstractODataReader;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-
-public class ODataReaderImpl extends AbstractODataReader implements ODataReader {
-
-  public ODataReaderImpl(final ODataClient client) {
-    super(client);
-  }
-
-  @Override
-  public ODataEntitySet readEntitySet(final InputStream input, final ODataFormat format)
-      throws ODataDeserializerException {
-    return ((ODataClient) client).getBinder().getODataEntitySet(client.getDeserializer(format).toEntitySet(input));
-  }
-
-  @Override
-  public ODataEntity readEntity(final InputStream input, final ODataFormat format)
-      throws ODataDeserializerException {
-    return ((ODataClient) client).getBinder().getODataEntity(client.getDeserializer(format).toEntity(input));
-  }
-
-  @Override
-  public ODataProperty readProperty(final InputStream input, final ODataFormat format)
-      throws ODataDeserializerException {
-    return ((ODataClient) client).getBinder().getODataProperty(client.getDeserializer(format).toProperty(input));
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterArgFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterArgFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterArgFactoryImpl.java
new file mode 100644
index 0000000..be828b3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterArgFactoryImpl.java
@@ -0,0 +1,112 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.FilterArgFactory;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class FilterArgFactoryImpl extends AbstractFilterArgFactory implements FilterArgFactory {
+
+  public FilterArgFactoryImpl(final ODataServiceVersion version) {
+    super(version);
+  }
+
+  @Override
+  public FilterArg contains(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("contains", first, second);
+  }
+
+  @Override
+  public FilterArg fractionalseconds(final FilterArg param) {
+    return new FilterFunction("fractionalseconds", param);
+  }
+
+  @Override
+  public FilterArg date(final FilterArg param) {
+    return new FilterFunction("date", param);
+  }
+
+  @Override
+  public FilterArg time(final FilterArg param) {
+    return new FilterFunction("time", param);
+  }
+
+  @Override
+  public FilterArg totaloffsetminutes(final FilterArg param) {
+    return new FilterFunction("totaloffsetminutes", param);
+  }
+
+  @Override
+  public FilterArg now() {
+    return new FilterFunction("now");
+  }
+
+  @Override
+  public FilterArg mindatetime() {
+    return new FilterFunction("mindatetime");
+  }
+
+  @Override
+  public FilterArg maxdatetime() {
+    return new FilterFunction("maxdatetime");
+  }
+
+  @Override
+  public FilterArg totalseconds(final FilterArg param) {
+    return new FilterFunction("totalseconds", param);
+  }
+
+  @Override
+  public FilterArg cast(final FilterArg type) {
+    return new FilterFunction("cast", type);
+  }
+
+  @Override
+  public FilterArg cast(final FilterArg expression, final FilterArg type) {
+    return new FilterFunction("cast", expression, type);
+  }
+
+  @Override
+  public FilterArg geoDistance(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("geo.distance", first, second);
+  }
+
+  @Override
+  public FilterArg geoIntersects(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("geo.intersects", first, second);
+  }
+
+  @Override
+  public FilterArg geoLength(final FilterArg first, final FilterArg second) {
+    return new FilterFunction("geo.length", first, second);
+  }
+
+  @Override
+  public FilterArg any(final FilterArg collection, final URIFilter expression) {
+    return new FilterLambda(collection, "any", expression);
+  }
+
+  @Override
+  public FilterArg all(final FilterArg collection, final URIFilter expression) {
+    return new FilterLambda(collection, "all", expression);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFactoryImpl.java
new file mode 100644
index 0000000..5e9d24d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/FilterFactoryImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.client.core.uri;
+
+import org.apache.olingo.client.api.uri.FilterArg;
+import org.apache.olingo.client.api.uri.FilterArgFactory;
+import org.apache.olingo.client.api.uri.FilterFactory;
+import org.apache.olingo.client.api.uri.URIFilter;
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class FilterFactoryImpl extends AbstractFilterFactory implements FilterFactory {
+
+  public FilterFactoryImpl(ODataServiceVersion version) {
+    super(version);
+  }
+
+  @Override
+  public FilterArgFactory getArgFactory() {
+    return new FilterArgFactoryImpl(version);
+  }
+
+  @Override
+  public URIFilter has(final String key, final EdmEnumType enumType, final String memberName) {
+    return has(getArgFactory().property(key), enumType, memberName);
+  }
+
+  @Override
+  public URIFilter has(final FilterArg left, final EdmEnumType enumType, final String memberName) {
+    return new HasFilter(left, new FilterProperty(enumType.toUriLiteral(memberName)));
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIBuilderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIBuilderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIBuilderImpl.java
new file mode 100644
index 0000000..0955cac
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIBuilderImpl.java
@@ -0,0 +1,144 @@
+/*
+ * 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.client.core.uri;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.olingo.client.api.Configuration;
+import org.apache.olingo.client.api.uri.QueryOption;
+import org.apache.olingo.client.api.uri.SegmentType;
+import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.URISearch;
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class URIBuilderImpl extends AbstractURIBuilder<URIBuilder> implements URIBuilder {
+
+  public URIBuilderImpl(
+      final ODataServiceVersion version, final Configuration configuration, final String serviceRoot) {
+    super(version, configuration, serviceRoot);
+  }
+
+  @Override
+  public URIBuilder appendKeySegment(final EdmEnumType enumType, final String memberName) {
+    return appendKeySegment(enumType.toUriLiteral(memberName));
+  }
+
+  @Override
+  public URIBuilder appendKeySegment(final Map<String, Pair<EdmEnumType, String>> enumValues,
+          final Map<String, Object> segmentValues) {
+
+    final Map<String, Object> values = new LinkedHashMap<String, Object>();
+    for (Map.Entry<String, Pair<EdmEnumType, String>> entry : enumValues.entrySet()) {
+      values.put(entry.getKey(), entry.getValue().getKey().toUriLiteral(entry.getValue().getValue()));
+    }
+    values.putAll(segmentValues);
+
+    return appendKeySegment(values);
+  }
+
+  @Override
+  protected URIBuilder getThis() {
+    return this;
+  }
+
+  @Override
+  protected String noKeysWrapper() {
+    return "()";
+  }
+
+  @Override
+  protected char getBoundOperationSeparator() {
+    return '.';
+  }
+
+  @Override
+  protected String getOperationInvokeMarker() {
+    return "()";
+  }
+
+  @Override
+  public URIBuilder appendSingletonSegment(final String segmentValue) {
+    segments.add(new Segment(SegmentType.SINGLETON, segmentValue));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder appendEntityIdSegment(final String segmentValue) {
+    segments.add(new Segment(SegmentType.ENTITY, null));
+    return addQueryOption(QueryOption.ID, segmentValue);
+  }
+
+  @Override
+  public URIBuilder appendRefSegment() {
+    segments.add(new Segment(SegmentType.REF, SegmentType.REF.getValue()));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder appendCrossjoinSegment(final String... segmentValues) {
+    final StringBuilder segValue = new StringBuilder(SegmentType.CROSS_JOIN.getValue()).
+            append('(').append(StringUtils.join(segmentValues, ",")).append(')');
+    segments.add(new Segment(SegmentType.CROSS_JOIN, segValue.toString()));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder appendAllSegment() {
+    segments.add(new Segment(SegmentType.ALL, SegmentType.ALL.getValue()));
+    return getThis();
+  }
+
+  @Override
+  public URIBuilder id(final String idValue) {
+    return addQueryOption(QueryOption.ID, idValue);
+  }
+
+  @Override
+  public URIBuilder search(final URISearch search) {
+    return search(search.build());
+  }
+
+  @Override
+  public URIBuilder search(final String expression) {
+    return addQueryOption(QueryOption.SEARCH, expression);
+  }
+
+  @Override
+  public URIBuilder count(final boolean value) {
+    return addQueryOption(QueryOption.COUNT, Boolean.toString(value));
+  }
+
+  @Override
+  public URIBuilder expandWithOptions(final String expandItem, final Map<QueryOption, Object> options) {
+    final Map<String, Object> _options = new LinkedHashMap<String, Object>();
+    for (Map.Entry<QueryOption, Object> entry : options.entrySet()) {
+      _options.put("$" + entry.getKey().toString(), entry.getValue());
+    }
+    return expand(expandItem + buildMultiKeySegment(_options, false));
+  }
+
+  @Override
+  public URIBuilder expandWithSelect(final String expandItem, final String... selectItems) {
+    return expand(expandItem + "($select=" + StringUtils.join(selectItems, ",") + ")");
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java
deleted file mode 100644
index 15bb9e9..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/v4/FilterArgFactoryImpl.java
+++ /dev/null
@@ -1,115 +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.client.core.uri.v4;
-
-import org.apache.olingo.client.api.uri.FilterArg;
-import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
-import org.apache.olingo.client.core.uri.AbstractFilterArgFactory;
-import org.apache.olingo.client.core.uri.FilterFunction;
-import org.apache.olingo.client.core.uri.FilterLambda;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public class FilterArgFactoryImpl extends AbstractFilterArgFactory implements FilterArgFactory {
-
-  public FilterArgFactoryImpl(final ODataServiceVersion version) {
-    super(version);
-  }
-
-  @Override
-  public FilterArg contains(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("contains", first, second);
-  }
-
-  @Override
-  public FilterArg fractionalseconds(final FilterArg param) {
-    return new FilterFunction("fractionalseconds", param);
-  }
-
-  @Override
-  public FilterArg date(final FilterArg param) {
-    return new FilterFunction("date", param);
-  }
-
-  @Override
-  public FilterArg time(final FilterArg param) {
-    return new FilterFunction("time", param);
-  }
-
-  @Override
-  public FilterArg totaloffsetminutes(final FilterArg param) {
-    return new FilterFunction("totaloffsetminutes", param);
-  }
-
-  @Override
-  public FilterArg now() {
-    return new FilterFunction("now");
-  }
-
-  @Override
-  public FilterArg mindatetime() {
-    return new FilterFunction("mindatetime");
-  }
-
-  @Override
-  public FilterArg maxdatetime() {
-    return new FilterFunction("maxdatetime");
-  }
-
-  @Override
-  public FilterArg totalseconds(final FilterArg param) {
-    return new FilterFunction("totalseconds", param);
-  }
-
-  @Override
-  public FilterArg cast(final FilterArg type) {
-    return new FilterFunction("cast", type);
-  }
-
-  @Override
-  public FilterArg cast(final FilterArg expression, final FilterArg type) {
-    return new FilterFunction("cast", expression, type);
-  }
-
-  @Override
-  public FilterArg geoDistance(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("geo.distance", first, second);
-  }
-
-  @Override
-  public FilterArg geoIntersects(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("geo.intersects", first, second);
-  }
-
-  @Override
-  public FilterArg geoLength(final FilterArg first, final FilterArg second) {
-    return new FilterFunction("geo.length", first, second);
-  }
-
-  @Override
-  public FilterArg any(final FilterArg collection, final URIFilter expression) {
-    return new FilterLambda(collection, "any", expression);
-  }
-
-  @Override
-  public FilterArg all(final FilterArg collection, final URIFilter expression) {
-    return new FilterLambda(collection, "all", expression);
-  }
-
-}


[10/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SearchFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SearchFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SearchFactory.java
new file mode 100644
index 0000000..aefd1f4
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/SearchFactory.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.uri;
+
+public interface SearchFactory {
+
+  URISearch literal(String value);
+
+  URISearch and(URISearch left, URISearch right);
+
+  URISearch or(URISearch left, URISearch right);
+
+  URISearch not(URISearch filter);
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java
new file mode 100644
index 0000000..efedbfe
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URIBuilder.java
@@ -0,0 +1,143 @@
+/*
+ * 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.client.api.uri;
+
+import java.util.Map;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+
+public interface URIBuilder extends CommonURIBuilder<URIBuilder> {
+
+  /**
+   * Appends enum key segment to the URI.
+   *
+   * @param enumType enum type
+   * @param memberName enum member name
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendKeySegment(EdmEnumType enumType, String memberName);
+
+  /**
+   * Appends key segment to the URI, for multiple keys.
+   *
+   * @param enumValues enum segment values.
+   * @param segmentValues segment values.
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendKeySegment(Map<String, Pair<EdmEnumType, String>> enumValues, Map<String, Object> segmentValues);
+
+  /**
+   * Appends Singleton segment to the URI.
+   *
+   * @param segmentValue segment value.
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendSingletonSegment(String segmentValue);
+
+  /**
+   * Appends entity-id segment to the URI.
+   *
+   * @param segmentValue segment value
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendEntityIdSegment(String segmentValue);
+
+  /**
+   * Appends ref segment to the URI.
+   *
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendRefSegment();
+
+  /**
+   * Appends cross join segment to the URI.
+   *
+   * @param segmentValues segment values.
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendCrossjoinSegment(String... segmentValues);
+
+  /**
+   * Appends all segment to the URI.
+   *
+   * @return current URIBuilder instance
+   */
+  URIBuilder appendAllSegment();
+
+  /**
+   * Adds id query option.
+   *
+   * @param idValue opaque token.
+   * @return current URIBuilder instance
+   * @see org.apache.olingo.client.api.uri.QueryOption#ID
+   */
+  URIBuilder id(String idValue);
+
+  /**
+   * Appends count query option.
+   *
+   * @param value true or false
+   * @return current URIBuilder instance
+   * @see org.apache.olingo.client.api.uri.QueryOption#COUNT
+   */
+  URIBuilder count(boolean value);
+
+  /**
+   * Appends search query option.
+   *
+   * @param search search expression
+   * @return current URIBuilder instance
+   * @see org.apache.olingo.client.api.uri.QueryOption#SEARCH
+   */
+  URIBuilder search(URISearch search);
+  
+  /**
+   * Appends search query option.
+   *
+   * @param expression search expression
+   * @return current URIBuilder instance
+   * @see org.apache.olingo.client.api.uri.QueryOption#SEARCH
+   */
+  URIBuilder search(String expression);
+
+  /**
+   * The set of expanded entities can be refined through the application of expand options, expressed as a
+   * semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].
+   *
+   * @param expandItem item to be expanded.
+   * @param options System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count,
+   * $search, $expand, and $levels.
+   * @return current URIBuilder instance.
+   * @see org.apache.olingo.client.api.uri.QueryOption#EXPAND
+   */
+  URIBuilder expandWithOptions(String expandItem, Map<QueryOption, Object> options);
+  
+  /**
+   * Properties of related entities can be specified by including the $select query option within the $expand.
+   * <br />
+   * <tt>http://host/service/Products?$expand=Category($select=Name)</tt>
+   * @param expandItem related entity name.
+   * @param selectItems properties to be selected.
+   * @return current URIBuilder instance.
+   * @see org.apache.olingo.client.api.uri.QueryOption#EXPAND
+   * @see org.apache.olingo.client.api.uri.QueryOption#SELECT
+   */
+  URIBuilder expandWithSelect(String expandItem, String... selectItems);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URISearch.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URISearch.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URISearch.java
new file mode 100644
index 0000000..0d6af3e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/URISearch.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.api.uri;
+
+/**
+ * Interface for <tt>$search</tt>; obtain instances via <tt>SearchFactory</tt>.
+ *
+ * @see SearchFactory
+ */
+public interface URISearch {
+
+  /**
+   * @return String representation of this search.
+   */
+  String build();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java
deleted file mode 100644
index 456507c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterArgFactory.java
+++ /dev/null
@@ -1,59 +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.client.api.uri.v4;
-
-import org.apache.olingo.client.api.uri.CommonFilterArgFactory;
-import org.apache.olingo.client.api.uri.FilterArg;
-import org.apache.olingo.client.api.uri.URIFilter;
-
-public interface FilterArgFactory extends CommonFilterArgFactory {
-
-  FilterArg contains(FilterArg first, FilterArg second);
-
-  FilterArg fractionalseconds(FilterArg param);
-
-  FilterArg date(FilterArg param);
-
-  FilterArg time(FilterArg param);
-
-  FilterArg totaloffsetminutes(FilterArg param);
-
-  FilterArg now();
-
-  FilterArg mindatetime();
-
-  FilterArg maxdatetime();
-
-  FilterArg totalseconds(FilterArg param);
-
-  FilterArg cast(FilterArg type);
-
-  FilterArg cast(FilterArg expression, FilterArg type);
-
-  FilterArg geoDistance(FilterArg first, FilterArg second);
-
-  FilterArg geoIntersects(FilterArg first, FilterArg second);
-
-  FilterArg geoLength(FilterArg first, FilterArg second);
-
-  FilterArg any(FilterArg collection, URIFilter expression);
-
-  FilterArg all(FilterArg collection, URIFilter expression);
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java
deleted file mode 100644
index c66b0c5..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/FilterFactory.java
+++ /dev/null
@@ -1,35 +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.client.api.uri.v4;
-
-import org.apache.olingo.client.api.uri.CommonFilterFactory;
-import org.apache.olingo.client.api.uri.FilterArg;
-import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-
-public interface FilterFactory extends CommonFilterFactory {
-
-  @Override
-  FilterArgFactory getArgFactory();
-
-  URIFilter has(String key, EdmEnumType enumType, String memberName);
-
-  URIFilter has(FilterArg left, EdmEnumType enumType, String memberName);
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/SearchFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/SearchFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/SearchFactory.java
deleted file mode 100644
index 61689e1..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/SearchFactory.java
+++ /dev/null
@@ -1,31 +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.client.api.uri.v4;
-
-public interface SearchFactory {
-
-  URISearch literal(String value);
-
-  URISearch and(URISearch left, URISearch right);
-
-  URISearch or(URISearch left, URISearch right);
-
-  URISearch not(URISearch filter);
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java
deleted file mode 100644
index 0271f44..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URIBuilder.java
+++ /dev/null
@@ -1,145 +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.client.api.uri.v4;
-
-import java.util.Map;
-
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.olingo.client.api.uri.CommonURIBuilder;
-import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-
-public interface URIBuilder extends CommonURIBuilder<URIBuilder> {
-
-  /**
-   * Appends enum key segment to the URI.
-   *
-   * @param enumType enum type
-   * @param memberName enum member name
-   * @return current URIBuilder instance
-   */
-  URIBuilder appendKeySegment(EdmEnumType enumType, String memberName);
-
-  /**
-   * Appends key segment to the URI, for multiple keys.
-   *
-   * @param enumValues enum segment values.
-   * @param segmentValues segment values.
-   * @return current URIBuilder instance
-   */
-  URIBuilder appendKeySegment(Map<String, Pair<EdmEnumType, String>> enumValues, Map<String, Object> segmentValues);
-
-  /**
-   * Appends Singleton segment to the URI.
-   *
-   * @param segmentValue segment value.
-   * @return current URIBuilder instance
-   */
-  URIBuilder appendSingletonSegment(String segmentValue);
-
-  /**
-   * Appends entity-id segment to the URI.
-   *
-   * @param segmentValue segment value
-   * @return current URIBuilder instance
-   */
-  URIBuilder appendEntityIdSegment(String segmentValue);
-
-  /**
-   * Appends ref segment to the URI.
-   *
-   * @return current URIBuilder instance
-   */
-  URIBuilder appendRefSegment();
-
-  /**
-   * Appends cross join segment to the URI.
-   *
-   * @param segmentValues segment values.
-   * @return current URIBuilder instance
-   */
-  URIBuilder appendCrossjoinSegment(String... segmentValues);
-
-  /**
-   * Appends all segment to the URI.
-   *
-   * @return current URIBuilder instance
-   */
-  URIBuilder appendAllSegment();
-
-  /**
-   * Adds id query option.
-   *
-   * @param idValue opaque token.
-   * @return current URIBuilder instance
-   * @see org.apache.olingo.client.api.uri.QueryOption#ID
-   */
-  URIBuilder id(String idValue);
-
-  /**
-   * Appends count query option.
-   *
-   * @param value true or false
-   * @return current URIBuilder instance
-   * @see org.apache.olingo.client.api.uri.QueryOption#COUNT
-   */
-  URIBuilder count(boolean value);
-
-  /**
-   * Appends search query option.
-   *
-   * @param search search expression
-   * @return current URIBuilder instance
-   * @see org.apache.olingo.client.api.uri.QueryOption#SEARCH
-   */
-  URIBuilder search(URISearch search);
-  
-  /**
-   * Appends search query option.
-   *
-   * @param expression search expression
-   * @return current URIBuilder instance
-   * @see org.apache.olingo.client.api.uri.QueryOption#SEARCH
-   */
-  URIBuilder search(String expression);
-
-  /**
-   * The set of expanded entities can be refined through the application of expand options, expressed as a
-   * semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].
-   *
-   * @param expandItem item to be expanded.
-   * @param options System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count,
-   * $search, $expand, and $levels.
-   * @return current URIBuilder instance.
-   * @see org.apache.olingo.client.api.uri.QueryOption#EXPAND
-   */
-  URIBuilder expandWithOptions(String expandItem, Map<QueryOption, Object> options);
-  
-  /**
-   * Properties of related entities can be specified by including the $select query option within the $expand.
-   * <br />
-   * <tt>http://host/service/Products?$expand=Category($select=Name)</tt>
-   * @param expandItem related entity name.
-   * @param selectItems properties to be selected.
-   * @return current URIBuilder instance.
-   * @see org.apache.olingo.client.api.uri.QueryOption#EXPAND
-   * @see org.apache.olingo.client.api.uri.QueryOption#SELECT
-   */
-  URIBuilder expandWithSelect(String expandItem, String... selectItems);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URISearch.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URISearch.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URISearch.java
deleted file mode 100644
index 2249498..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/v4/URISearch.java
+++ /dev/null
@@ -1,32 +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.client.api.uri.v4;
-
-/**
- * Interface for <tt>$search</tt>; obtain instances via <tt>SearchFactory</tt>.
- *
- * @see SearchFactory
- */
-public interface URISearch {
-
-  /**
-   * @return String representation of this search.
-   */
-  String build();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/EdmEnabledODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/EdmEnabledODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/EdmEnabledODataClient.java
deleted file mode 100644
index 2e9e8c2..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/EdmEnabledODataClient.java
+++ /dev/null
@@ -1,33 +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.client.api.v4;
-
-import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
-import org.apache.olingo.client.api.communication.request.invoke.EdmEnabledInvokeRequestFactory;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-
-public interface EdmEnabledODataClient extends CommonEdmEnabledODataClient<UpdateType>, ODataClient {
-
-  @Override
-  URIBuilder newURIBuilder();
-
-  @Override
-  EdmEnabledInvokeRequestFactory getInvokeRequestFactory();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
deleted file mode 100644
index eff5ad9..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/v4/ODataClient.java
+++ /dev/null
@@ -1,68 +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.client.api.v4;
-
-import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
-import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.v4.AsyncRequestFactory;
-import org.apache.olingo.client.api.serialization.v4.ODataBinder;
-import org.apache.olingo.client.api.serialization.v4.ODataDeserializer;
-import org.apache.olingo.client.api.serialization.v4.ODataReader;
-import org.apache.olingo.client.api.uri.v4.FilterFactory;
-import org.apache.olingo.client.api.uri.v4.SearchFactory;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
-import org.apache.olingo.commons.api.format.ODataFormat;
-
-public interface ODataClient extends CommonODataClient<UpdateType> {
-
-  @Override
-  ODataDeserializer getDeserializer(ODataFormat format);
-
-  @Override
-  ODataReader getReader();
-
-  @Override
-  ODataBinder getBinder();
-
-  @Override
-  URIBuilder newURIBuilder(String serviceRoot);
-  
-  @Override
-  FilterFactory getFilterFactory();
-
-  SearchFactory getSearchFactory();
-
-  @Override
-  ODataObjectFactory getObjectFactory();
-
-  AsyncRequestFactory getAsyncRequestFactory();
-
-  @Override
-  RetrieveRequestFactory getRetrieveRequestFactory();
-
-  @Override
-  CUDRequestFactory getCUDRequestFactory();
-
-  @Override
-  BatchRequestFactory getBatchRequestFactory();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/AndSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/AndSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/AndSearch.java
new file mode 100644
index 0000000..fc9f476
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/AndSearch.java
@@ -0,0 +1,42 @@
+/*
+ * 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.client.core;
+
+import org.apache.olingo.client.api.uri.URISearch;
+
+public class AndSearch implements URISearch {
+
+  private final URISearch left;
+
+  private final URISearch right;
+
+  AndSearch(final URISearch left, final URISearch right) {
+    this.left = left;
+    this.right = right;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder().
+            append('(').append(left.build()).
+            append(" AND ").
+            append(right.build()).append(')').
+            toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/EdmEnabledODataClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/EdmEnabledODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/EdmEnabledODataClientImpl.java
new file mode 100644
index 0000000..b254473
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/EdmEnabledODataClientImpl.java
@@ -0,0 +1,86 @@
+/*
+ * 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.client.core;
+
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.EdmEnabledInvokeRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.EdmMetadataRequest;
+import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
+import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.core.communication.request.invoke.EdmEnabledInvokeRequestFactoryImpl;
+import org.apache.olingo.client.core.uri.URIBuilderImpl;
+import org.apache.olingo.commons.api.edm.Edm;
+
+public class EdmEnabledODataClientImpl extends ODataClientImpl implements EdmEnabledODataClient {
+
+  private final String serviceRoot;
+
+  private Edm edm;
+
+  private String metadataETag;
+
+  private EdmEnabledInvokeRequestFactory edmEnabledInvokeRequestFactory;
+
+  public EdmEnabledODataClientImpl(final String serviceRoot, final Edm edm, final String metadataETag) {
+    super();
+
+    this.serviceRoot = serviceRoot;
+    this.edm = edm;
+    this.metadataETag = metadataETag;
+  }
+
+  @Override
+  public String getServiceRoot() {
+    return serviceRoot;
+  }
+
+  @Override
+  public Edm getEdm(final String metadataETag) {
+    synchronized (this) {
+      if (this.edm == null || (metadataETag != null && !metadataETag.equals(this.metadataETag))) {
+        final EdmMetadataRequest metadataReq = getRetrieveRequestFactory().getMetadataRequest(serviceRoot);
+        final ODataRetrieveResponse<Edm> metadataRes = metadataReq.execute();
+        this.metadataETag = metadataRes.getETag();
+        this.edm = metadataRes.getBody();
+      }
+    }
+    return this.edm;
+  }
+
+  @Override
+  public Edm getCachedEdm() {
+    if (this.edm == null) {
+      getEdm(null);
+    }
+    return this.edm;
+  }
+
+  @Override
+  public URIBuilder newURIBuilder() {
+    return new URIBuilderImpl(getServiceVersion(), configuration, serviceRoot);
+  }
+
+  @Override
+  public EdmEnabledInvokeRequestFactory getInvokeRequestFactory() {
+    if (edmEnabledInvokeRequestFactory == null) {
+      edmEnabledInvokeRequestFactory = new EdmEnabledInvokeRequestFactoryImpl(this);
+    }
+    return edmEnabledInvokeRequestFactory;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/LiteralSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/LiteralSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/LiteralSearch.java
new file mode 100644
index 0000000..3d64d6f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/LiteralSearch.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.core;
+
+import org.apache.olingo.client.api.uri.URISearch;
+
+public class LiteralSearch implements URISearch {
+
+  private final String value;
+
+  LiteralSearch(final String value) {
+    this.value = value;
+  }
+
+  @Override
+  public String build() {
+    return value;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/NotSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/NotSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/NotSearch.java
new file mode 100644
index 0000000..07f4b0c
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/NotSearch.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.core;
+
+import org.apache.olingo.client.api.uri.URISearch;
+
+public class NotSearch implements URISearch {
+
+  private final URISearch filter;
+
+  NotSearch(final URISearch left) {
+    this.filter = left;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder("NOT (").append(filter.build()).append(')').toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
index 804466a..e4cf2e7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java
@@ -18,16 +18,15 @@
  */
 package org.apache.olingo.client.core;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.v4.EdmEnabledODataClientImpl;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.format.ODataFormat;
 
 public final class ODataClientFactory {
 
   public static ODataClient getV4() {
-    return new org.apache.olingo.client.core.v4.ODataClientImpl();
+    return new org.apache.olingo.client.core.ODataClientImpl();
   }
 
   public static EdmEnabledODataClient getEdmEnabledV4(final String serviceRoot) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java
new file mode 100644
index 0000000..7db4856
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java
@@ -0,0 +1,156 @@
+/*
+ * 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.client.core;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.header.ODataHeaders;
+import org.apache.olingo.client.api.communication.request.AsyncRequestFactory;
+import org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
+import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
+import org.apache.olingo.client.api.serialization.ODataBinder;
+import org.apache.olingo.client.api.serialization.ODataDeserializer;
+import org.apache.olingo.client.api.serialization.ODataReader;
+import org.apache.olingo.client.api.uri.FilterFactory;
+import org.apache.olingo.client.api.uri.SearchFactory;
+import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
+import org.apache.olingo.client.core.communication.request.AsyncRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.batch.BatchRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.cud.CUDRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.invoke.InvokeRequestFactoryImpl;
+import org.apache.olingo.client.core.communication.request.retrieve.RetrieveRequestFactoryImpl;
+import org.apache.olingo.client.core.serialization.ODataBinderImpl;
+import org.apache.olingo.client.core.serialization.ODataDeserializerImpl;
+import org.apache.olingo.client.core.serialization.ODataReaderImpl;
+import org.apache.olingo.client.core.uri.FilterFactoryImpl;
+import org.apache.olingo.client.core.uri.URIBuilderImpl;
+import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.serialization.ODataSerializer;
+import org.apache.olingo.commons.core.domain.v4.ODataObjectFactoryImpl;
+import org.apache.olingo.commons.core.serialization.AtomSerializer;
+import org.apache.olingo.commons.core.serialization.JsonSerializer;
+
+public class ODataClientImpl extends AbstractODataClient<UpdateType> implements ODataClient {
+
+  private final FilterFactory filterFactory = new FilterFactoryImpl(getServiceVersion());
+
+  private final SearchFactory searchFactory = new SearchFactoryImpl();
+
+  private final ODataReader reader = new ODataReaderImpl(this);
+
+  private final ODataBinder binder = new ODataBinderImpl(this);
+
+  private final ODataObjectFactory objectFactory = new ODataObjectFactoryImpl(getServiceVersion());
+
+  private final AsyncRequestFactory asyncReqFact = new AsyncRequestFactoryImpl(this);
+
+  private final RetrieveRequestFactory retrieveReqFact = new RetrieveRequestFactoryImpl(this);
+
+  private final CUDRequestFactory cudReqFact = new CUDRequestFactoryImpl(this);
+
+  private final InvokeRequestFactory invokeReqFact = new InvokeRequestFactoryImpl(this);
+
+  private final BatchRequestFactory batchReqFact = new BatchRequestFactoryImpl(this);
+
+  @Override
+  public ODataServiceVersion getServiceVersion() {
+    return ODataServiceVersion.V40;
+  }
+
+  @Override
+  public ODataHeaders newVersionHeaders() {
+    final ODataHeadersImpl odataHeaders = new ODataHeadersImpl();
+    odataHeaders.setHeader(HeaderName.odataMaxVersion, ODataServiceVersion.V40.toString());
+    odataHeaders.setHeader(HeaderName.odataVersion, ODataServiceVersion.V40.toString());
+    return odataHeaders;
+  }
+
+  @Override
+  public URIBuilder newURIBuilder(final String serviceRoot) {
+    return new URIBuilderImpl(getServiceVersion(), getConfiguration(), serviceRoot);
+  }
+  
+  @Override
+  public FilterFactory getFilterFactory() {
+    return filterFactory;
+  }
+
+  @Override
+  public SearchFactory getSearchFactory() {
+    return searchFactory;
+  }
+
+  @Override
+  public ODataDeserializer getDeserializer(final ODataFormat format) {
+    return new ODataDeserializerImpl(getServiceVersion(), false, format);
+  }
+
+  @Override
+  public ODataSerializer getSerializer(final ODataFormat format) {
+    return format == ODataFormat.ATOM || format == ODataFormat.XML ?
+        new AtomSerializer(getServiceVersion()) :
+        new JsonSerializer(getServiceVersion(), false, format);
+  }
+
+  @Override
+  public ODataReader getReader() {
+    return reader;
+  }
+
+  @Override
+  public ODataBinder getBinder() {
+    return binder;
+  }
+
+  @Override
+  public ODataObjectFactory getObjectFactory() {
+    return objectFactory;
+  }
+
+  @Override
+  public AsyncRequestFactory getAsyncRequestFactory() {
+    return asyncReqFact;
+  }
+
+  @Override
+  public RetrieveRequestFactory getRetrieveRequestFactory() {
+    return retrieveReqFact;
+  }
+
+  @Override
+  public CUDRequestFactory getCUDRequestFactory() {
+    return cudReqFact;
+  }
+
+  @Override
+  public InvokeRequestFactory getInvokeRequestFactory() {
+    return invokeReqFact;
+  }
+
+  @Override
+  public BatchRequestFactory getBatchRequestFactory() {
+    return batchReqFact;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/OrSearch.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/OrSearch.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/OrSearch.java
new file mode 100644
index 0000000..f876a37
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/OrSearch.java
@@ -0,0 +1,42 @@
+/*
+ * 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.client.core;
+
+import org.apache.olingo.client.api.uri.URISearch;
+
+public class OrSearch implements URISearch {
+
+  private final URISearch left;
+
+  private final URISearch right;
+
+  OrSearch(final URISearch left, final URISearch right) {
+    this.left = left;
+    this.right = right;
+  }
+
+  @Override
+  public String build() {
+    return new StringBuilder().
+            append('(').append(left.build()).
+            append(" OR ").
+            append(right.build()).append(')').
+            toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/SearchFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/SearchFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/SearchFactoryImpl.java
new file mode 100644
index 0000000..1f0895d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/SearchFactoryImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.client.core;
+
+import org.apache.olingo.client.api.uri.SearchFactory;
+import org.apache.olingo.client.api.uri.URISearch;
+
+public class SearchFactoryImpl implements SearchFactory {
+
+  @Override
+  public URISearch literal(final String value) {
+    return new LiteralSearch(value);
+  }
+
+  @Override
+  public URISearch and(final URISearch left, final URISearch right) {
+    return new AndSearch(left, right);
+  }
+
+  @Override
+  public URISearch or(final URISearch left, final URISearch right) {
+    return new OrSearch(left, right);
+  }
+
+  @Override
+  public URISearch not(final URISearch filter) {
+    return new NotSearch(filter);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
index 9f02870..a5b267c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataRequest.java
@@ -48,9 +48,9 @@ import org.apache.olingo.commons.api.http.HttpMethod;
  * Abstract representation of an OData request. Get instance by using factories.
  *
  * @see org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory
- * @see org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory
+ * @see org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory
  * @see org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestFactory
- * @see org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory
+ * @see org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory
  * @see org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory
  */
 public abstract class AbstractODataRequest extends AbstractRequest implements ODataRequest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncBatchRequestWrapperImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncBatchRequestWrapperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncBatchRequestWrapperImpl.java
new file mode 100644
index 0000000..71174a4
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncBatchRequestWrapperImpl.java
@@ -0,0 +1,119 @@
+/*
+ * 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.client.core.communication.request;
+
+import java.net.URI;
+import java.util.Collection;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.header.ODataPreferences;
+import org.apache.olingo.client.api.communication.request.AsyncBatchRequestWrapper;
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+import org.apache.olingo.client.api.communication.request.batch.BatchManager;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
+import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
+import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class AsyncBatchRequestWrapperImpl extends AsyncRequestWrapperImpl<ODataBatchResponse>
+        implements AsyncBatchRequestWrapper {
+
+  private BatchManager batchManager;
+
+  protected AsyncBatchRequestWrapperImpl(final ODataClient odataClient, final ODataBatchRequest odataRequest) {
+    super(odataClient, odataRequest);
+    batchManager = odataRequest.payloadManager();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public ODataChangeset addChangeset() {
+    return batchManager.addChangeset();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void addRetrieve(final ODataBatchableRequest request) {
+    batchManager.addRequest(request);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void addOutsideUpdate(final ODataBatchableRequest request) {
+    batchManager.addRequest(request);
+  }
+
+  @Override
+  public AsyncResponseWrapper<ODataBatchResponse> execute() {
+    return new AsyncResponseWrapperImpl(batchManager.getResponse());
+  }
+
+  public class AsyncResponseWrapperImpl
+          extends AsyncRequestWrapperImpl<ODataBatchResponse>.AsyncResponseWrapperImpl {
+
+    /**
+     * Constructor.
+     *
+     * @param res OData batch response.
+     */
+    public AsyncResponseWrapperImpl(final ODataBatchResponse res) {
+      super();
+
+      if (res.getStatusCode() == 202) {
+        retrieveMonitorDetails(res);
+      } else {
+        response = res;
+      }
+    }
+
+    private void retrieveMonitorDetails(final ODataBatchResponse res) {
+      Collection<String> headers = res.getHeader(HeaderName.location.toString());
+      if (headers == null || headers.isEmpty()) {
+        throw new AsyncRequestException("Invalid async request response. Monitor URL not found");
+      } else {
+        this.location = URI.create(headers.iterator().next());
+      }
+
+      headers = res.getHeader(HeaderName.retryAfter.toString());
+      if (headers != null && !headers.isEmpty()) {
+        this.retryAfter = Integer.parseInt(headers.iterator().next());
+      }
+
+      headers = res.getHeader(HeaderName.preferenceApplied.toString());
+      if (headers != null && !headers.isEmpty()) {
+        for (String header : headers) {
+          if (header.equalsIgnoreCase(new ODataPreferences(ODataServiceVersion.V40).respondAsync())) {
+            preferenceApplied = true;
+          }
+        }
+      }
+
+      IOUtils.closeQuietly(res.getRawResponse());
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestException.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestException.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestException.java
new file mode 100644
index 0000000..a039c94
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.client.core.communication.request;
+
+public class AsyncRequestException extends RuntimeException {
+
+  private static final long serialVersionUID = -6080844898544654406L;
+
+  public AsyncRequestException(final String message) {
+    super(message);
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestFactoryImpl.java
new file mode 100644
index 0000000..14e1e2a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestFactoryImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.client.core.communication.request;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.request.AsyncBatchRequestWrapper;
+import org.apache.olingo.client.api.communication.request.AsyncRequestFactory;
+import org.apache.olingo.client.api.communication.request.AsyncRequestWrapper;
+import org.apache.olingo.client.api.communication.request.ODataRequest;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
+import org.apache.olingo.client.api.communication.response.ODataResponse;
+
+public class AsyncRequestFactoryImpl implements AsyncRequestFactory {
+
+  private final ODataClient client;
+
+  public AsyncRequestFactoryImpl(final ODataClient client) {
+    this.client = client;
+  }
+
+  @Override
+  public <R extends ODataResponse> AsyncRequestWrapper<R> getAsyncRequestWrapper(final ODataRequest odataRequest) {
+    return new AsyncRequestWrapperImpl<R>(client, odataRequest);
+  }
+
+  @Override
+  public AsyncBatchRequestWrapper getAsyncBatchRequestWrapper(final ODataBatchRequest odataRequest) {
+    return new AsyncBatchRequestWrapperImpl(client, odataRequest);
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java
new file mode 100644
index 0000000..f02d9e4
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java
@@ -0,0 +1,314 @@
+/*
+ * 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.client.core.communication.request;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.http.Header;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.impl.client.DecompressingHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.ODataClientErrorException;
+import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.header.ODataPreferences;
+import org.apache.olingo.client.api.communication.request.AsyncRequestWrapper;
+import org.apache.olingo.client.api.communication.request.ODataRequest;
+import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
+import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
+import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
+import org.apache.olingo.client.api.communication.response.ODataResponse;
+import org.apache.olingo.client.api.http.HttpClientException;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.api.http.HttpMethod;
+
+public class AsyncRequestWrapperImpl<R extends ODataResponse> extends AbstractRequest
+        implements AsyncRequestWrapper<R> {
+
+  protected static final int MAX_RETRY = 5;
+
+  protected final ODataClient odataClient;
+
+  /**
+   * Request to be wrapped.
+   */
+  protected final ODataRequest odataRequest;
+
+  /**
+   * HTTP client.
+   */
+  protected final HttpClient httpClient;
+
+  /**
+   * HTTP request.
+   */
+  protected final HttpUriRequest request;
+
+  /**
+   * Target URI.
+   */
+  protected final URI uri;
+
+  protected AsyncRequestWrapperImpl(final ODataClient odataClient, final ODataRequest odataRequest) {
+    this.odataRequest = odataRequest;
+    this.odataRequest.setAccept(this.odataRequest.getAccept());
+    this.odataRequest.setContentType(this.odataRequest.getContentType());
+
+    extendHeader(HeaderName.prefer.toString(), new ODataPreferences(ODataServiceVersion.V40).respondAsync());
+
+    this.odataClient = odataClient;
+    final HttpMethod method = odataRequest.getMethod();
+
+    // target uri
+    this.uri = odataRequest.getURI();
+
+    HttpClient _httpClient = odataClient.getConfiguration().getHttpClientFactory().create(method, this.uri);
+    if (odataClient.getConfiguration().isGzipCompression()) {
+      _httpClient = new DecompressingHttpClient(_httpClient);
+    }
+    this.httpClient = _httpClient;
+
+    this.request = odataClient.getConfiguration().getHttpUriRequestFactory().create(method, this.uri);
+  }
+
+  @Override
+  public final AsyncRequestWrapper<R> wait(final int waitInSeconds) {
+    extendHeader(HeaderName.prefer.toString(), new ODataPreferences(ODataServiceVersion.V40).wait(waitInSeconds));
+    return this;
+  }
+
+  @Override
+  public final AsyncRequestWrapper<R> callback(URI url) {
+    extendHeader(HeaderName.prefer.toString(),
+            new ODataPreferences(ODataServiceVersion.V40).callback(url.toASCIIString()));
+    return this;
+  }
+
+  protected final void extendHeader(final String headerName, final String headerValue) {
+    final StringBuilder extended = new StringBuilder();
+    if (this.odataRequest.getHeaderNames().contains(headerName)) {
+      extended.append(this.odataRequest.getHeader(headerName)).append(", ");
+    }
+
+    this.odataRequest.addCustomHeader(headerName, extended.append(headerValue).toString());
+  }
+
+  @Override
+  public AsyncResponseWrapper<R> execute() {
+    return new AsyncResponseWrapperImpl(doExecute());
+  }
+
+  protected HttpResponse doExecute() {
+    // Add all available headers
+    for (String key : odataRequest.getHeaderNames()) {
+      final String value = odataRequest.getHeader(key);
+      this.request.addHeader(key, value);
+      LOG.debug("HTTP header being sent {}: {}", key, value);
+    }
+
+    return executeHttpRequest(httpClient, this.request);
+  }
+
+  public class AsyncResponseWrapperImpl implements AsyncResponseWrapper<R> {
+
+    protected URI location = null;
+
+    protected R response = null;
+
+    protected int retryAfter = 5;
+
+    protected boolean preferenceApplied = false;
+
+    public AsyncResponseWrapperImpl() {
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param res HTTP response.
+     */
+    @SuppressWarnings("unchecked")
+    public AsyncResponseWrapperImpl(final HttpResponse res) {
+      if (res.getStatusLine().getStatusCode() == 202) {
+        retrieveMonitorDetails(res);
+      } else {
+        response = (R) ((AbstractODataRequest) odataRequest).getResponseTemplate().initFromHttpResponse(res);
+      }
+    }
+
+    @Override
+    public boolean isPreferenceApplied() {
+      return preferenceApplied;
+    }
+
+    @Override
+    public boolean isDone() {
+      if (response == null) {
+        // check to the monitor URL
+        final HttpResponse res = checkMonitor(location);
+
+        if (res.getStatusLine().getStatusCode() == 202) {
+          retrieveMonitorDetails(res);
+        } else {
+          response = instantiateResponse(res);
+        }
+      }
+
+      return response != null;
+    }
+
+    @Override
+    public R getODataResponse() {
+      HttpResponse res = null;
+      for (int i = 0; response == null && i < MAX_RETRY; i++) {
+        res = checkMonitor(location);
+
+        if (res.getStatusLine().getStatusCode() == 202) {
+
+          final Header[] headers = res.getHeaders(HeaderName.retryAfter.toString());
+          if (ArrayUtils.isNotEmpty(headers)) {
+            this.retryAfter = Integer.parseInt(headers[0].getValue());
+          }
+
+          try {
+            // wait for retry-after
+            Thread.sleep(retryAfter * 1000);
+          } catch (InterruptedException ignore) {
+            // ignore
+          }
+
+        } else {
+          location = null;
+          return instantiateResponse(res);
+        }
+      }
+
+      if (response == null) {
+        throw new ODataClientErrorException(res == null ? null : res.getStatusLine());
+      }
+
+      return response;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ODataDeleteResponse delete() {
+      final ODataDeleteRequest deleteRequest = odataClient.getCUDRequestFactory().getDeleteRequest(location);
+      return deleteRequest.execute();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AsyncResponseWrapper<ODataDeleteResponse> asyncDelete() {
+      return odataClient.getAsyncRequestFactory().<ODataDeleteResponse>getAsyncRequestWrapper(
+              odataClient.getCUDRequestFactory().getDeleteRequest(location)).execute();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AsyncResponseWrapper<R> forceNextMonitorCheck(final URI uri) {
+      this.location = uri;
+      this.response = null;
+      return this;
+    }
+
+    @SuppressWarnings("unchecked")
+    private R instantiateResponse(final HttpResponse res) {
+      R odataResponse;
+      try {
+        odataResponse = (R) ((AbstractODataRequest) odataRequest).getResponseTemplate().
+                initFromEnclosedPart(res.getEntity().getContent());
+
+      } catch (Exception e) {
+        LOG.error("Error instantiating odata response", e);
+        odataResponse = null;
+      }
+
+      return odataResponse;
+    }
+
+    private void retrieveMonitorDetails(final HttpResponse res) {
+      Header[] headers = res.getHeaders(HeaderName.location.toString());
+      if (ArrayUtils.isNotEmpty(headers)) {
+        this.location = URI.create(headers[0].getValue());
+      } else {
+        throw new AsyncRequestException(
+                "Invalid async request response. Monitor URL '" + headers[0].getValue() + "'");
+      }
+
+      headers = res.getHeaders(HeaderName.retryAfter.toString());
+      if (ArrayUtils.isNotEmpty(headers)) {
+        this.retryAfter = Integer.parseInt(headers[0].getValue());
+      }
+
+      headers = res.getHeaders(HeaderName.preferenceApplied.toString());
+      if (ArrayUtils.isNotEmpty(headers)) {
+        for (Header header : headers) {
+          if (header.getValue().equalsIgnoreCase(new ODataPreferences(ODataServiceVersion.V40).respondAsync())) {
+            preferenceApplied = true;
+          }
+        }
+      }
+      try {
+        EntityUtils.consume(res.getEntity());
+      } catch (IOException ex) {
+        Logger.getLogger(AsyncRequestWrapperImpl.class.getName()).log(Level.SEVERE, null, ex);
+      }
+    }
+  }
+
+  protected final HttpResponse checkMonitor(final URI location) {
+    if (location == null) {
+      throw new AsyncRequestException("Invalid async request response. Missing monitor URL");
+    }
+
+    final HttpUriRequest monitor = odataClient.getConfiguration().getHttpUriRequestFactory().
+            create(HttpMethod.GET, location);
+
+    return executeHttpRequest(httpClient, monitor);
+  }
+
+  protected final HttpResponse executeHttpRequest(final HttpClient client, final HttpUriRequest req) {
+    final HttpResponse response;
+    try {
+      response = client.execute(req);
+    } catch (IOException e) {
+      throw new HttpClientException(e);
+    } catch (RuntimeException e) {
+      req.abort();
+      throw new HttpClientException(e);
+    }
+
+    checkResponse(odataClient, response, odataRequest.getAccept());
+
+    return response;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/BatchRequestFactoryImpl.java
new file mode 100644
index 0000000..e29a01d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/BatchRequestFactoryImpl.java
@@ -0,0 +1,37 @@
+/*
+ * 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.client.core.communication.request.batch;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
+
+public class BatchRequestFactoryImpl extends AbstractBatchRequestFactory
+        implements BatchRequestFactory {
+
+  public BatchRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public ODataBatchRequest getBatchRequest(final String serviceRoot) {
+    return new ODataBatchRequestImpl(
+            (ODataClient) client, client.newURIBuilder(serviceRoot).appendBatchSegment().build());
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
new file mode 100644
index 0000000..220e495
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
@@ -0,0 +1,120 @@
+/*
+ * 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.client.core.communication.request.batch;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.header.ODataPreferences;
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+import org.apache.olingo.client.api.communication.request.batch.BatchManager;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
+import org.apache.olingo.client.core.communication.response.batch.ODataBatchResponseManager;
+
+public class ODataBatchRequestImpl
+        extends AbstractODataBatchRequest<ODataBatchResponse, BatchManager>
+        implements ODataBatchRequest {
+
+  public ODataBatchRequestImpl(final ODataClient odataClient, final URI uri) {
+    super(odataClient, uri);
+    setAccept(odataClient.getConfiguration().getDefaultBatchAcceptFormat().toContentTypeString());
+  }
+
+  @Override
+  protected BatchManager getPayloadManager() {
+    if (payloadManager == null) {
+      payloadManager = new BatchManagerImpl(this);
+    }
+    return (BatchManager) payloadManager;
+  }
+
+  @Override
+  public ODataBatchRequest rawAppend(final byte[] toBeStreamed) throws IOException {
+    getPayloadManager().getBodyStreamWriter().write(toBeStreamed);
+    return this;
+  }
+
+  @Override
+  public ODataBatchRequest rawAppend(final byte[] toBeStreamed, int off, int len) throws IOException {
+    getPayloadManager().getBodyStreamWriter().write(toBeStreamed, off, len);
+    return this;
+  }
+
+  @Override
+  protected HttpResponse doExecute() {
+    if (odataClient.getConfiguration().isContinueOnError()) {
+      addCustomHeader(HeaderName.prefer, new ODataPreferences(odataClient.getServiceVersion()).continueOnError());
+    }
+
+    return super.doExecute();
+  }
+
+  /**
+   * Batch request payload management.
+   */
+  public class BatchManagerImpl extends AbstractBatchManager implements BatchManager {
+
+    public BatchManagerImpl(final ODataBatchRequest req) {
+      super(req, ODataBatchRequestImpl.this.futureWrapper,
+              ODataBatchRequestImpl.this.odataClient.getConfiguration().isContinueOnError());
+    }
+
+    @Override
+    protected ODataBatchResponse getResponseInstance(final long timeout, final TimeUnit unit) {
+      return new ODataBatchResponseImpl(odataClient, httpClient, getHttpResponse(timeout, unit));
+    }
+
+    @Override
+    protected void validateSingleRequest(final ODataBatchableRequest request) {
+    }
+  }
+
+  protected class ODataBatchResponseImpl extends AbstractODataResponse implements ODataBatchResponse {
+
+    protected ODataBatchResponseImpl(
+            final CommonODataClient<?> odataClient, final HttpClient httpClient, final HttpResponse res) {
+
+      super(odataClient, httpClient, res);
+    }
+
+    @Override
+    public Iterator<ODataBatchResponseItem> getBody() {
+      return new ODataBatchResponseManager(this, expectedResItems, odataClient.getConfiguration().isContinueOnError());
+    }
+
+    @Override
+    public void close() {
+      for (ODataBatchResponseItem resItem : expectedResItems) {
+        resItem.close();
+      }
+      super.close();
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataChangesetResponseItem.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataChangesetResponseItem.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataChangesetResponseItem.java
index bdc859c..cbeb5a4 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataChangesetResponseItem.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataChangesetResponseItem.java
@@ -24,8 +24,8 @@ import java.util.NoSuchElementException;
 
 import org.apache.olingo.client.api.ODataBatchConstants;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
+import org.apache.olingo.client.core.communication.response.AsyncResponseImpl;
 import org.apache.olingo.client.core.communication.response.batch.ODataBatchErrorResponse;
-import org.apache.olingo.client.core.communication.response.v4.AsyncResponseImpl;
 
 /**
  * Changeset wrapper for the corresponding batch item.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataSingleResponseItem.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataSingleResponseItem.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataSingleResponseItem.java
index 35e30d2..e7e6546 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataSingleResponseItem.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataSingleResponseItem.java
@@ -23,8 +23,8 @@ import java.util.Map;
 import java.util.NoSuchElementException;
 
 import org.apache.olingo.client.api.communication.response.ODataResponse;
+import org.apache.olingo.client.core.communication.response.AsyncResponseImpl;
 import org.apache.olingo.client.core.communication.response.batch.ODataBatchErrorResponse;
-import org.apache.olingo.client.core.communication.response.v4.AsyncResponseImpl;
 
 /**
  * Retrieve response wrapper for the corresponding batch item.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
deleted file mode 100644
index 9d93ad4..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
+++ /dev/null
@@ -1,38 +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.client.core.communication.request.batch.v4;
-
-import org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.batch.AbstractBatchRequestFactory;
-
-public class BatchRequestFactoryImpl extends AbstractBatchRequestFactory
-        implements BatchRequestFactory {
-
-  public BatchRequestFactoryImpl(final ODataClient client) {
-    super(client);
-  }
-
-  @Override
-  public ODataBatchRequest getBatchRequest(final String serviceRoot) {
-    return new ODataBatchRequestImpl(
-            (ODataClient) client, client.newURIBuilder(serviceRoot).appendBatchSegment().build());
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java
deleted file mode 100644
index 55a3ee7..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java
+++ /dev/null
@@ -1,122 +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.client.core.communication.request.batch.v4;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Iterator;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.header.ODataPreferences;
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.request.batch.BatchManager;
-import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.batch.AbstractBatchManager;
-import org.apache.olingo.client.core.communication.request.batch.AbstractODataBatchRequest;
-import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
-import org.apache.olingo.client.core.communication.response.batch.ODataBatchResponseManager;
-
-public class ODataBatchRequestImpl
-        extends AbstractODataBatchRequest<ODataBatchResponse, BatchManager>
-        implements ODataBatchRequest {
-
-  public ODataBatchRequestImpl(final ODataClient odataClient, final URI uri) {
-    super(odataClient, uri);
-    setAccept(odataClient.getConfiguration().getDefaultBatchAcceptFormat().toContentTypeString());
-  }
-
-  @Override
-  protected BatchManager getPayloadManager() {
-    if (payloadManager == null) {
-      payloadManager = new BatchManagerImpl(this);
-    }
-    return (BatchManager) payloadManager;
-  }
-
-  @Override
-  public ODataBatchRequest rawAppend(final byte[] toBeStreamed) throws IOException {
-    getPayloadManager().getBodyStreamWriter().write(toBeStreamed);
-    return this;
-  }
-
-  @Override
-  public ODataBatchRequest rawAppend(final byte[] toBeStreamed, int off, int len) throws IOException {
-    getPayloadManager().getBodyStreamWriter().write(toBeStreamed, off, len);
-    return this;
-  }
-
-  @Override
-  protected HttpResponse doExecute() {
-    if (odataClient.getConfiguration().isContinueOnError()) {
-      addCustomHeader(HeaderName.prefer, new ODataPreferences(odataClient.getServiceVersion()).continueOnError());
-    }
-
-    return super.doExecute();
-  }
-
-  /**
-   * Batch request payload management.
-   */
-  public class BatchManagerImpl extends AbstractBatchManager implements BatchManager {
-
-    public BatchManagerImpl(final ODataBatchRequest req) {
-      super(req, ODataBatchRequestImpl.this.futureWrapper,
-              ODataBatchRequestImpl.this.odataClient.getConfiguration().isContinueOnError());
-    }
-
-    @Override
-    protected ODataBatchResponse getResponseInstance(final long timeout, final TimeUnit unit) {
-      return new ODataBatchResponseImpl(odataClient, httpClient, getHttpResponse(timeout, unit));
-    }
-
-    @Override
-    protected void validateSingleRequest(final ODataBatchableRequest request) {
-    }
-  }
-
-  protected class ODataBatchResponseImpl extends AbstractODataResponse implements ODataBatchResponse {
-
-    protected ODataBatchResponseImpl(
-            final CommonODataClient<?> odataClient, final HttpClient httpClient, final HttpResponse res) {
-
-      super(odataClient, httpClient, res);
-    }
-
-    @Override
-    public Iterator<ODataBatchResponseItem> getBody() {
-      return new ODataBatchResponseManager(this, expectedResItems, odataClient.getConfiguration().isContinueOnError());
-    }
-
-    @Override
-    public void close() {
-      for (ODataBatchResponseItem resItem : expectedResItems) {
-        resItem.close();
-      }
-      super.close();
-    }
-
-  }
-}


[09/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java
new file mode 100644
index 0000000..cb5d5d6
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java
@@ -0,0 +1,69 @@
+/*
+ * 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.client.core.communication.request.cud;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
+import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddingRequest;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+import org.apache.olingo.commons.api.http.HttpMethod;
+
+public class CUDRequestFactoryImpl extends AbstractCUDRequestFactory<UpdateType> implements CUDRequestFactory {
+
+  public CUDRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
+          final UpdateType type, final ODataSingleton entity) {
+
+    return super.getEntityUpdateRequest(type, entity);
+  }
+
+  @Override
+  public ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
+          final URI targetURI, final UpdateType type, final ODataSingleton changes) {
+
+    return super.getEntityUpdateRequest(targetURI, type, changes);
+  }
+
+  @Override
+  public ODataReferenceAddingRequest getReferenceAddingRequest(final URI serviceRoot, final URI targetURI,
+      final URI reference) {
+    final URI contextURI = client.newURIBuilder(serviceRoot.toASCIIString()).appendMetadataSegment().build();
+    ResWrap<URI> wrappedPayload = new ResWrap<URI>(contextURI, null, reference);
+
+    return new ODataReferenceAddingRequestImpl(client, HttpMethod.POST, targetURI, wrappedPayload);
+   }
+   
+    public ODataReferenceAddingRequest getReferenceSingleChangeRequest(final URI serviceRoot, final URI targetURI,
+      final URI reference) {
+     // See OData Protocol 11.4.6.3
+    final URI contextURI = client.newURIBuilder(serviceRoot.toASCIIString()).appendMetadataSegment().build();
+    ResWrap<URI> wrappedPayload = new ResWrap<URI>(contextURI, null, reference);
+
+    return new ODataReferenceAddingRequestImpl(client, HttpMethod.PUT, targetURI, wrappedPayload);
+   }  
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataReferenceAddingRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataReferenceAddingRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataReferenceAddingRequestImpl.java
new file mode 100644
index 0000000..f5d59a1
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataReferenceAddingRequestImpl.java
@@ -0,0 +1,103 @@
+/*
+ * 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.client.core.communication.request.cud;
+
+import java.io.InputStream;
+import java.net.URI;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddingRequest;
+import org.apache.olingo.client.api.communication.response.ODataReferenceAddingResponse;
+import org.apache.olingo.client.api.serialization.ODataWriter;
+import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
+import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
+import org.apache.olingo.client.core.uri.URIUtils;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.http.HttpMethod;
+import org.apache.olingo.commons.api.serialization.ODataSerializerException;
+
+/**
+ * See {@link ODataReferenceAddingRequest}
+ * 
+ * Will be used, for single-valued navigation properties as was well as collection navigation properties
+ */
+public class ODataReferenceAddingRequestImpl extends AbstractODataBasicRequest<ODataReferenceAddingResponse>
+    implements ODataReferenceAddingRequest {
+
+  final ResWrap<URI> reference;
+
+  ODataReferenceAddingRequestImpl(
+      final CommonODataClient<?> odataClient, final HttpMethod method, final URI uri, final ResWrap<URI> reference) {
+    super(odataClient, method, uri);
+    this.reference = reference;
+  }
+
+  @Override
+  public ODataFormat getDefaultFormat() {
+    return odataClient.getConfiguration().getDefaultPubFormat();
+  }
+
+  /**
+   * No payload: null will be returned.
+   */
+  @Override
+  protected InputStream getPayload() {
+    if (reference == null) {
+      return null;
+    } else {
+      ODataWriter writer = odataClient.getWriter();
+      try {
+        return writer.writeReference(reference, ODataFormat.fromString(getContentType()));
+      } catch (ODataSerializerException e) {
+        LOG.warn("Error serializing reference {}", reference);
+        throw new IllegalArgumentException(e);
+      }
+    }
+  }
+
+  @Override
+  public ODataReferenceAddingResponse execute() {
+    final InputStream input = getPayload();
+    ((HttpEntityEnclosingRequestBase) request).setEntity(URIUtils.buildInputStreamEntity(odataClient, input));
+
+    try {
+      return new ODataReferenceAddingResponseImpl(odataClient, httpClient, doExecute());
+    } finally {
+      IOUtils.closeQuietly(input);
+    }
+  }
+
+  /**
+   * Response class about an ODataReferenceAddingRequest.
+   */
+  private class ODataReferenceAddingResponseImpl extends AbstractODataResponse implements ODataReferenceAddingResponse {
+
+    private ODataReferenceAddingResponseImpl(
+        final CommonODataClient<?> odataClient, final HttpClient httpClient, final HttpResponse res) {
+
+      super(odataClient, httpClient, res);
+      this.close();
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
deleted file mode 100644
index fdf0cd7..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
+++ /dev/null
@@ -1,70 +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.client.core.communication.request.cud.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.v4.ODataReferenceAddingRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.cud.AbstractCUDRequestFactory;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-import org.apache.olingo.commons.api.http.HttpMethod;
-
-public class CUDRequestFactoryImpl extends AbstractCUDRequestFactory<UpdateType> implements CUDRequestFactory {
-
-  public CUDRequestFactoryImpl(final ODataClient client) {
-    super(client);
-  }
-
-  @Override
-  public ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
-          final UpdateType type, final ODataSingleton entity) {
-
-    return super.getEntityUpdateRequest(type, entity);
-  }
-
-  @Override
-  public ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
-          final URI targetURI, final UpdateType type, final ODataSingleton changes) {
-
-    return super.getEntityUpdateRequest(targetURI, type, changes);
-  }
-
-  @Override
-  public ODataReferenceAddingRequest getReferenceAddingRequest(final URI serviceRoot, final URI targetURI,
-      final URI reference) {
-    final URI contextURI = client.newURIBuilder(serviceRoot.toASCIIString()).appendMetadataSegment().build();
-    ResWrap<URI> wrappedPayload = new ResWrap<URI>(contextURI, null, reference);
-
-    return new ODataReferenceAddingRequestImpl(client, HttpMethod.POST, targetURI, wrappedPayload);
-   }
-   
-    public ODataReferenceAddingRequest getReferenceSingleChangeRequest(final URI serviceRoot, final URI targetURI,
-      final URI reference) {
-     // See OData Protocol 11.4.6.3
-    final URI contextURI = client.newURIBuilder(serviceRoot.toASCIIString()).appendMetadataSegment().build();
-    ResWrap<URI> wrappedPayload = new ResWrap<URI>(contextURI, null, reference);
-
-    return new ODataReferenceAddingRequestImpl(client, HttpMethod.PUT, targetURI, wrappedPayload);
-   }  
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/ODataReferenceAddingRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/ODataReferenceAddingRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/ODataReferenceAddingRequestImpl.java
deleted file mode 100644
index df4fb6d..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/ODataReferenceAddingRequestImpl.java
+++ /dev/null
@@ -1,103 +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.client.core.communication.request.cud.v4;
-
-import java.io.InputStream;
-import java.net.URI;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.cud.v4.ODataReferenceAddingRequest;
-import org.apache.olingo.client.api.communication.response.v4.ODataReferenceAddingResponse;
-import org.apache.olingo.client.api.serialization.ODataWriter;
-import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
-import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
-import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.http.HttpMethod;
-import org.apache.olingo.commons.api.serialization.ODataSerializerException;
-
-/**
- * See {@link ODataReferenceAddingRequest}
- * 
- * Will be used, for single-valued navigation properties as was well as collection navigation properties
- */
-public class ODataReferenceAddingRequestImpl extends AbstractODataBasicRequest<ODataReferenceAddingResponse>
-    implements ODataReferenceAddingRequest {
-
-  final ResWrap<URI> reference;
-
-  ODataReferenceAddingRequestImpl(
-      final CommonODataClient<?> odataClient, final HttpMethod method, final URI uri, final ResWrap<URI> reference) {
-    super(odataClient, method, uri);
-    this.reference = reference;
-  }
-
-  @Override
-  public ODataFormat getDefaultFormat() {
-    return odataClient.getConfiguration().getDefaultPubFormat();
-  }
-
-  /**
-   * No payload: null will be returned.
-   */
-  @Override
-  protected InputStream getPayload() {
-    if (reference == null) {
-      return null;
-    } else {
-      ODataWriter writer = odataClient.getWriter();
-      try {
-        return writer.writeReference(reference, ODataFormat.fromString(getContentType()));
-      } catch (ODataSerializerException e) {
-        LOG.warn("Error serializing reference {}", reference);
-        throw new IllegalArgumentException(e);
-      }
-    }
-  }
-
-  @Override
-  public ODataReferenceAddingResponse execute() {
-    final InputStream input = getPayload();
-    ((HttpEntityEnclosingRequestBase) request).setEntity(URIUtils.buildInputStreamEntity(odataClient, input));
-
-    try {
-      return new ODataReferenceAddingResponseImpl(odataClient, httpClient, doExecute());
-    } finally {
-      IOUtils.closeQuietly(input);
-    }
-  }
-
-  /**
-   * Response class about an ODataReferenceAddingRequest.
-   */
-  private class ODataReferenceAddingResponseImpl extends AbstractODataResponse implements ODataReferenceAddingResponse {
-
-    private ODataReferenceAddingResponseImpl(
-        final CommonODataClient<?> odataClient, final HttpClient httpClient, final HttpResponse res) {
-
-      super(odataClient, httpClient, res);
-      this.close();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
index f2c74a6..43c271a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
@@ -30,12 +30,12 @@ import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
 import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
 import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
 import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest;
 import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
 import org.apache.olingo.client.core.uri.URIUtils;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java
new file mode 100644
index 0000000..9f1aaae
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.client.core.communication.request.invoke;
+
+import java.net.URI;
+import java.util.Map;
+
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.http.HttpMethod;
+
+public class EdmEnabledInvokeRequestFactoryImpl extends AbstractEdmEnabledInvokeRequestFactory {
+
+  private final EdmEnabledODataClient edmClient;
+
+  public EdmEnabledInvokeRequestFactoryImpl(final EdmEnabledODataClient client) {
+    super(client);
+    this.edmClient = client;
+  }
+
+  @Override
+  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+          final HttpMethod method, final URI uri, final Class<RES> resultRef,
+          final Map<String, ODataValue> parameters) {
+
+    final ODataInvokeRequest<RES> request = new ODataInvokeRequestImpl<RES>(edmClient, resultRef, method, uri);
+    if (parameters != null) {
+      request.setParameters(parameters);
+    }
+
+    return request;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java
new file mode 100644
index 0000000..315071e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.client.core.communication.request.invoke;
+
+import java.net.URI;
+import java.util.Map;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.http.HttpMethod;
+
+public class InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory {
+
+  private final ODataClient client;
+
+  public InvokeRequestFactoryImpl(final ODataClient client) {
+    this.client = client;
+  }
+
+  @Override
+  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+          final HttpMethod method, final URI uri, final Class<RES> resultRef,
+          final Map<String, ODataValue> parameters) {
+
+    final ODataInvokeRequest<RES> request = new ODataInvokeRequestImpl<RES>(client, resultRef, method, uri);
+    if (parameters != null) {
+      request.setParameters(parameters);
+    }
+
+    return request;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
new file mode 100644
index 0000000..d40deba
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
@@ -0,0 +1,48 @@
+/*
+ * 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.client.core.communication.request.invoke;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.commons.api.domain.ODataInvokeResult;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.http.HttpMethod;
+
+public class ODataInvokeRequestImpl<T extends ODataInvokeResult> extends AbstractODataInvokeRequest<T> {
+
+  private ODataFormat format;
+
+  public ODataInvokeRequestImpl(final CommonODataClient<?> odataClient, final Class<T> reference,
+          final HttpMethod method, final URI uri) {
+
+    super(odataClient, reference, method, uri);
+  }
+
+  @Override
+  public void setFormat(final ODataFormat format) {
+    super.setFormat(format);
+    this.format = format;
+  }
+
+  @Override
+  protected ODataFormat getPOSTParameterFormat() {
+    return format == null ? getDefaultFormat() : format;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/EdmEnabledInvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/EdmEnabledInvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/EdmEnabledInvokeRequestFactoryImpl.java
deleted file mode 100644
index d29e533..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/EdmEnabledInvokeRequestFactoryImpl.java
+++ /dev/null
@@ -1,52 +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.client.core.communication.request.invoke.v4;
-
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.core.communication.request.invoke.AbstractEdmEnabledInvokeRequestFactory;
-import org.apache.olingo.commons.api.domain.ODataInvokeResult;
-import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.http.HttpMethod;
-
-public class EdmEnabledInvokeRequestFactoryImpl extends AbstractEdmEnabledInvokeRequestFactory {
-
-  private final EdmEnabledODataClient edmClient;
-
-  public EdmEnabledInvokeRequestFactoryImpl(final EdmEnabledODataClient client) {
-    super(client);
-    this.edmClient = client;
-  }
-
-  @Override
-  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
-          final HttpMethod method, final URI uri, final Class<RES> resultRef,
-          final Map<String, ODataValue> parameters) {
-
-    final ODataInvokeRequest<RES> request = new ODataInvokeRequestImpl<RES>(edmClient, resultRef, method, uri);
-    if (parameters != null) {
-      request.setParameters(parameters);
-    }
-
-    return request;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
deleted file mode 100644
index 6f366f2..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
+++ /dev/null
@@ -1,51 +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.client.core.communication.request.invoke.v4;
-
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.invoke.AbstractInvokeRequestFactory;
-import org.apache.olingo.commons.api.domain.ODataInvokeResult;
-import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.http.HttpMethod;
-
-public class InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory {
-
-  private final ODataClient client;
-
-  public InvokeRequestFactoryImpl(final ODataClient client) {
-    this.client = client;
-  }
-
-  @Override
-  public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
-          final HttpMethod method, final URI uri, final Class<RES> resultRef,
-          final Map<String, ODataValue> parameters) {
-
-    final ODataInvokeRequest<RES> request = new ODataInvokeRequestImpl<RES>(client, resultRef, method, uri);
-    if (parameters != null) {
-      request.setParameters(parameters);
-    }
-
-    return request;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/ODataInvokeRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/ODataInvokeRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/ODataInvokeRequestImpl.java
deleted file mode 100644
index 6163cdd..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/ODataInvokeRequestImpl.java
+++ /dev/null
@@ -1,49 +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.client.core.communication.request.invoke.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.core.communication.request.invoke.AbstractODataInvokeRequest;
-import org.apache.olingo.commons.api.domain.ODataInvokeResult;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.http.HttpMethod;
-
-public class ODataInvokeRequestImpl<T extends ODataInvokeResult> extends AbstractODataInvokeRequest<T> {
-
-  private ODataFormat format;
-
-  public ODataInvokeRequestImpl(final CommonODataClient<?> odataClient, final Class<T> reference,
-          final HttpMethod method, final URI uri) {
-
-    super(odataClient, reference, method, uri);
-  }
-
-  @Override
-  public void setFormat(final ODataFormat format) {
-    super.setFormat(format);
-    this.format = format;
-  }
-
-  @Override
-  protected ODataFormat getPOSTParameterFormat() {
-    return format == null ? getDefaultFormat() : format;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java
new file mode 100644
index 0000000..4112221
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java
@@ -0,0 +1,86 @@
+/*
+ * 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.client.core.communication.request.retrieve;
+
+import java.io.IOException;
+import java.net.URI;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataDeltaRequest;
+import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
+import org.apache.olingo.client.api.http.HttpClientException;
+import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public class ODataDeltaRequestImpl extends AbstractODataRetrieveRequest<ODataDelta>
+        implements ODataDeltaRequest {
+
+  public ODataDeltaRequestImpl(final CommonODataClient<?> odataClient, final URI query) {
+    super(odataClient, query);
+  }
+
+  @Override
+  public ODataFormat getDefaultFormat() {
+    return odataClient.getConfiguration().getDefaultPubFormat();
+  }
+
+  @Override
+  public ODataRetrieveResponse<ODataDelta> execute() {
+    final HttpResponse res = doExecute();
+    return new ODataDeltaResponseImpl(odataClient, httpClient, res);
+  }
+
+  protected class ODataDeltaResponseImpl extends AbstractODataRetrieveResponse {
+
+    private ODataDelta delta = null;
+
+    private ODataDeltaResponseImpl(final CommonODataClient<?> odataClient, final HttpClient httpClient,
+            final HttpResponse res) {
+
+      super(odataClient, httpClient, res);
+    }
+
+    @Override
+    public ODataDelta getBody() {
+      if (delta == null) {
+        try {
+          final ResWrap<Delta> resource = ((ODataClient) odataClient).
+                  getDeserializer(ODataFormat.fromString(getContentType())).
+                  toDelta(res.getEntity().getContent());
+
+          delta = ((ODataClient) odataClient).getBinder().getODataDelta(resource);
+        } catch (IOException e) {
+          throw new HttpClientException(e);
+        } catch (final ODataDeserializerException e) {
+          throw new IllegalArgumentException(e);
+        } finally {
+          this.close();
+        }
+      }
+      return delta;
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
new file mode 100644
index 0000000..781dc10
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
@@ -0,0 +1,78 @@
+/*
+ * 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.client.core.communication.request.retrieve;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataDeltaRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
+import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.XMLMetadataRequest;
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+
+public class RetrieveRequestFactoryImpl extends AbstractRetrieveRequestFactory
+        implements RetrieveRequestFactory {
+
+  public RetrieveRequestFactoryImpl(final ODataClient client) {
+    super(client);
+  }
+
+  @Override
+  public XMLMetadataRequest getXMLMetadataRequest(final String serviceRoot) {
+    return new XMLMetadataRequestImpl(((ODataClient) client),
+            client.newURIBuilder(serviceRoot).appendMetadataSegment().build());
+  }
+
+  @Override
+  public ODataEntitySetRequest<ODataEntitySet> getEntitySetRequest(final URI uri) {
+    return new ODataEntitySetRequestImpl<ODataEntitySet>(client, uri);
+  }
+
+  @Override
+  public ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> getEntitySetIteratorRequest(final URI uri) {
+    return new ODataEntitySetIteratorRequestImpl<ODataEntitySet, ODataEntity>(client, uri);
+  }
+
+  @Override
+  public ODataEntityRequest<ODataSingleton> getSingletonRequest(final URI uri) {
+    return new ODataEntityRequestImpl<ODataSingleton>(client, uri);
+  }
+
+  @Override
+  public ODataEntityRequest<ODataEntity> getEntityRequest(final URI uri) {
+    return new ODataEntityRequestImpl<ODataEntity>(client, uri);
+  }
+
+  @Override
+  public ODataPropertyRequest<ODataProperty> getPropertyRequest(final URI uri) {
+    return new ODataPropertyRequestImpl<ODataProperty>(client, uri);
+  }
+
+  @Override
+  public ODataDeltaRequest getDeltaRequest(final URI uri) {
+    return new ODataDeltaRequestImpl(client, uri);
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java
new file mode 100644
index 0000000..30682f7
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java
@@ -0,0 +1,195 @@
+/*
+ * 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.client.core.communication.request.retrieve;
+
+import java.net.URI;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.communication.request.retrieve.XMLMetadataRequest;
+import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotations;
+import org.apache.olingo.client.api.edm.xml.Include;
+import org.apache.olingo.client.api.edm.xml.IncludeAnnotations;
+import org.apache.olingo.client.api.edm.xml.Reference;
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.core.edm.xml.AbstractSchema;
+import org.apache.olingo.client.core.edm.xml.AnnotationsImpl;
+import org.apache.olingo.client.core.edm.xml.SchemaImpl;
+import org.apache.olingo.commons.api.format.ODataFormat;
+
+public class XMLMetadataRequestImpl
+        extends AbstractMetadataRequestImpl<org.apache.olingo.client.api.edm.xml.XMLMetadata>
+        implements XMLMetadataRequest {
+
+  XMLMetadataRequestImpl(final ODataClient odataClient, final URI uri) {
+    super(odataClient, uri);
+  }
+
+  @Override
+  public ODataRetrieveResponse<org.apache.olingo.client.api.edm.xml.XMLMetadata> execute() {
+    final SingleXMLMetadatRequestImpl rootReq = new SingleXMLMetadatRequestImpl((ODataClient) odataClient, uri, null);
+    final ODataRetrieveResponse<XMLMetadata> rootRes = rootReq.execute();
+
+    final XMLMetadataResponseImpl response =
+            new XMLMetadataResponseImpl(odataClient, httpClient, rootReq.getHttpResponse(), rootRes.getBody());
+
+    // process external references
+    for (Reference reference : rootRes.getBody().getReferences()) {
+      final SingleXMLMetadatRequestImpl includeReq = new SingleXMLMetadatRequestImpl(
+              (ODataClient) odataClient,
+              odataClient.newURIBuilder(uri.resolve(reference.getUri()).toASCIIString()).build(),
+              uri);
+      final XMLMetadata includeMetadata = includeReq.execute().getBody();
+
+      // edmx:Include
+      for (Include include : reference.getIncludes()) {
+        final Schema includedSchema = includeMetadata.getSchema(include.getNamespace());
+        if (includedSchema != null) {
+          response.getBody().getSchemas().add(includedSchema);
+          if (StringUtils.isNotBlank(include.getAlias())) {
+            ((AbstractSchema) includedSchema).setAlias(include.getAlias());
+          }
+        }
+      }
+
+      // edmx:IncludeAnnotations
+      for (IncludeAnnotations include : reference.getIncludeAnnotations()) {
+        for (Schema schema : includeMetadata.getSchemas()) {
+          // create empty schema that will be fed with edm:Annotations that match the criteria in IncludeAnnotations
+          final SchemaImpl forInclusion = new SchemaImpl();
+          forInclusion.setNamespace(schema.getNamespace());
+          forInclusion.setAlias(schema.getAlias());
+
+          // process all edm:Annotations in each schema of the included document
+          for (Annotations annotationGroup : ((SchemaImpl) schema).getAnnotationGroups()) {
+            // take into account only when (TargetNamespace was either not provided or matches) and
+            // (Qualifier was either not provided or matches)
+            if ((StringUtils.isBlank(include.getTargetNamespace())
+                    || include.getTargetNamespace().equals(
+                            StringUtils.substringBeforeLast(annotationGroup.getTarget(), ".")))
+                    && (StringUtils.isBlank(include.getQualifier())
+                    || include.getQualifier().equals(annotationGroup.getQualifier()))) {
+
+              final AnnotationsImpl toBeIncluded = new AnnotationsImpl();
+              toBeIncluded.setTarget(annotationGroup.getTarget());
+              toBeIncluded.setQualifier(annotationGroup.getQualifier());
+              // only import annotations with terms matching the given TermNamespace
+              for (Annotation annotation : annotationGroup.getAnnotations()) {
+                if (include.getTermNamespace().equals(StringUtils.substringBeforeLast(annotation.getTerm(), "."))) {
+                  toBeIncluded.getAnnotations().add(annotation);
+                }
+              }
+              forInclusion.getAnnotationGroups().add(toBeIncluded);
+            }
+          }
+
+          if (!forInclusion.getAnnotationGroups().isEmpty()) {
+            response.getBody().getSchemas().add(forInclusion);
+          }
+        }
+      }
+    }
+
+    return response;
+  }
+
+  private class SingleXMLMetadatRequestImpl extends AbstractMetadataRequestImpl<XMLMetadata> {
+
+    private final URI parentURI;
+    private HttpResponse httpResponse;
+
+    public SingleXMLMetadatRequestImpl(final ODataClient odataClient, final URI uri, final URI parent) {
+      super(odataClient, uri);
+      parentURI = parent;
+    }
+
+    public HttpResponse getHttpResponse() {
+      return httpResponse;
+    }
+
+    /** Referenced document's URIs must only have the same scheme, host, and port as the
+     *  main metadata document's URI but don't have to start with the service root
+     *  as all other OData request URIs. */
+    @Override
+    protected void checkRequest(final CommonODataClient<?> odataClient, final HttpUriRequest request) {
+      if (parentURI == null) {
+        super.checkRequest(odataClient, request);
+      } else {
+        if (!parentURI.getScheme().equals(uri.getScheme())
+            || !parentURI.getAuthority().equals(uri.getAuthority())) {
+          throw new IllegalArgumentException(
+              String.format("The referenced EDMX document has the URI '%s'"
+                  + " where scheme, host, or port is different from the main metadata document URI '%s'.",
+                  uri.toASCIIString(), parentURI.toASCIIString()));
+        }
+      }
+    }
+
+    @Override
+    public ODataRetrieveResponse<XMLMetadata> execute() {
+      httpResponse = doExecute();
+      return new AbstractODataRetrieveResponse(odataClient, httpClient, httpResponse) {
+
+        private XMLMetadata metadata = null;
+
+        @Override
+        public XMLMetadata getBody() {
+          if (metadata == null) {
+            try {
+              metadata = ((ODataClient) odataClient).getDeserializer(ODataFormat.XML).toMetadata(getRawResponse());
+            } finally {
+              this.close();
+            }
+          }
+          return metadata;
+        }
+      };
+    }
+  }
+
+  private class XMLMetadataResponseImpl extends AbstractODataRetrieveResponse {
+
+    private final XMLMetadata metadata;
+
+    private XMLMetadataResponseImpl(final CommonODataClient<?> odataClient, final HttpClient httpClient,
+            final HttpResponse res, final XMLMetadata metadata) {
+
+      super(odataClient, httpClient, null);
+      this.metadata = metadata;
+
+      statusCode = res.getStatusLine().getStatusCode();
+      statusMessage = res.getStatusLine().getReasonPhrase();
+
+      hasBeenInitialized = true;
+    }
+
+    @Override
+    public XMLMetadata getBody() {
+      return metadata;
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/ODataDeltaRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/ODataDeltaRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/ODataDeltaRequestImpl.java
deleted file mode 100644
index dbcfd4a..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/ODataDeltaRequestImpl.java
+++ /dev/null
@@ -1,87 +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.client.core.communication.request.retrieve.v4;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.retrieve.v4.ODataDeltaRequest;
-import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.retrieve.AbstractODataRetrieveRequest;
-import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-
-public class ODataDeltaRequestImpl extends AbstractODataRetrieveRequest<ODataDelta>
-        implements ODataDeltaRequest {
-
-  public ODataDeltaRequestImpl(final CommonODataClient<?> odataClient, final URI query) {
-    super(odataClient, query);
-  }
-
-  @Override
-  public ODataFormat getDefaultFormat() {
-    return odataClient.getConfiguration().getDefaultPubFormat();
-  }
-
-  @Override
-  public ODataRetrieveResponse<ODataDelta> execute() {
-    final HttpResponse res = doExecute();
-    return new ODataDeltaResponseImpl(odataClient, httpClient, res);
-  }
-
-  protected class ODataDeltaResponseImpl extends AbstractODataRetrieveResponse {
-
-    private ODataDelta delta = null;
-
-    private ODataDeltaResponseImpl(final CommonODataClient<?> odataClient, final HttpClient httpClient,
-            final HttpResponse res) {
-
-      super(odataClient, httpClient, res);
-    }
-
-    @Override
-    public ODataDelta getBody() {
-      if (delta == null) {
-        try {
-          final ResWrap<Delta> resource = ((ODataClient) odataClient).
-                  getDeserializer(ODataFormat.fromString(getContentType())).
-                  toDelta(res.getEntity().getContent());
-
-          delta = ((ODataClient) odataClient).getBinder().getODataDelta(resource);
-        } catch (IOException e) {
-          throw new HttpClientException(e);
-        } catch (final ODataDeserializerException e) {
-          throw new IllegalArgumentException(e);
-        } finally {
-          this.close();
-        }
-      }
-      return delta;
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java
deleted file mode 100644
index 3798240..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/RetrieveRequestFactoryImpl.java
+++ /dev/null
@@ -1,83 +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.client.core.communication.request.retrieve.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.XMLMetadataRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.v4.ODataDeltaRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.v4.RetrieveRequestFactory;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.retrieve.AbstractRetrieveRequestFactory;
-import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl;
-import org.apache.olingo.client.core.communication.request.retrieve.ODataEntitySetIteratorRequestImpl;
-import org.apache.olingo.client.core.communication.request.retrieve.ODataEntitySetRequestImpl;
-import org.apache.olingo.client.core.communication.request.retrieve.ODataPropertyRequestImpl;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-
-public class RetrieveRequestFactoryImpl extends AbstractRetrieveRequestFactory
-        implements RetrieveRequestFactory {
-
-  public RetrieveRequestFactoryImpl(final ODataClient client) {
-    super(client);
-  }
-
-  @Override
-  public XMLMetadataRequest getXMLMetadataRequest(final String serviceRoot) {
-    return new XMLMetadataRequestImpl(((ODataClient) client),
-            client.newURIBuilder(serviceRoot).appendMetadataSegment().build());
-  }
-
-  @Override
-  public ODataEntitySetRequest<ODataEntitySet> getEntitySetRequest(final URI uri) {
-    return new ODataEntitySetRequestImpl<ODataEntitySet>(client, uri);
-  }
-
-  @Override
-  public ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> getEntitySetIteratorRequest(final URI uri) {
-    return new ODataEntitySetIteratorRequestImpl<ODataEntitySet, ODataEntity>(client, uri);
-  }
-
-  @Override
-  public ODataEntityRequest<ODataSingleton> getSingletonRequest(final URI uri) {
-    return new ODataEntityRequestImpl<ODataSingleton>(client, uri);
-  }
-
-  @Override
-  public ODataEntityRequest<ODataEntity> getEntityRequest(final URI uri) {
-    return new ODataEntityRequestImpl<ODataEntity>(client, uri);
-  }
-
-  @Override
-  public ODataPropertyRequest<ODataProperty> getPropertyRequest(final URI uri) {
-    return new ODataPropertyRequestImpl<ODataProperty>(client, uri);
-  }
-
-  @Override
-  public ODataDeltaRequest getDeltaRequest(final URI uri) {
-    return new ODataDeltaRequestImpl(client, uri);
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/XMLMetadataRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/XMLMetadataRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/XMLMetadataRequestImpl.java
deleted file mode 100644
index f299732..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/XMLMetadataRequestImpl.java
+++ /dev/null
@@ -1,196 +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.client.core.communication.request.retrieve.v4;
-
-import java.net.URI;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.retrieve.XMLMetadataRequest;
-import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.edm.xml.Schema;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Annotations;
-import org.apache.olingo.client.api.edm.xml.v4.Include;
-import org.apache.olingo.client.api.edm.xml.v4.IncludeAnnotations;
-import org.apache.olingo.client.api.edm.xml.v4.Reference;
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.retrieve.AbstractMetadataRequestImpl;
-import org.apache.olingo.client.core.edm.xml.AbstractSchema;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationsImpl;
-import org.apache.olingo.client.core.edm.xml.v4.SchemaImpl;
-import org.apache.olingo.commons.api.format.ODataFormat;
-
-public class XMLMetadataRequestImpl
-        extends AbstractMetadataRequestImpl<org.apache.olingo.client.api.edm.xml.XMLMetadata>
-        implements XMLMetadataRequest {
-
-  XMLMetadataRequestImpl(final ODataClient odataClient, final URI uri) {
-    super(odataClient, uri);
-  }
-
-  @Override
-  public ODataRetrieveResponse<org.apache.olingo.client.api.edm.xml.XMLMetadata> execute() {
-    final SingleXMLMetadatRequestImpl rootReq = new SingleXMLMetadatRequestImpl((ODataClient) odataClient, uri, null);
-    final ODataRetrieveResponse<XMLMetadata> rootRes = rootReq.execute();
-
-    final XMLMetadataResponseImpl response =
-            new XMLMetadataResponseImpl(odataClient, httpClient, rootReq.getHttpResponse(), rootRes.getBody());
-
-    // process external references
-    for (Reference reference : rootRes.getBody().getReferences()) {
-      final SingleXMLMetadatRequestImpl includeReq = new SingleXMLMetadatRequestImpl(
-              (ODataClient) odataClient,
-              odataClient.newURIBuilder(uri.resolve(reference.getUri()).toASCIIString()).build(),
-              uri);
-      final XMLMetadata includeMetadata = includeReq.execute().getBody();
-
-      // edmx:Include
-      for (Include include : reference.getIncludes()) {
-        final Schema includedSchema = includeMetadata.getSchema(include.getNamespace());
-        if (includedSchema != null) {
-          response.getBody().getSchemas().add((org.apache.olingo.client.api.edm.xml.v4.Schema) includedSchema);
-          if (StringUtils.isNotBlank(include.getAlias())) {
-            ((AbstractSchema) includedSchema).setAlias(include.getAlias());
-          }
-        }
-      }
-
-      // edmx:IncludeAnnotations
-      for (IncludeAnnotations include : reference.getIncludeAnnotations()) {
-        for (Schema schema : includeMetadata.getSchemas()) {
-          // create empty schema that will be fed with edm:Annotations that match the criteria in IncludeAnnotations
-          final SchemaImpl forInclusion = new SchemaImpl();
-          forInclusion.setNamespace(schema.getNamespace());
-          forInclusion.setAlias(schema.getAlias());
-
-          // process all edm:Annotations in each schema of the included document
-          for (Annotations annotationGroup : ((SchemaImpl) schema).getAnnotationGroups()) {
-            // take into account only when (TargetNamespace was either not provided or matches) and
-            // (Qualifier was either not provided or matches)
-            if ((StringUtils.isBlank(include.getTargetNamespace())
-                    || include.getTargetNamespace().equals(
-                            StringUtils.substringBeforeLast(annotationGroup.getTarget(), ".")))
-                    && (StringUtils.isBlank(include.getQualifier())
-                    || include.getQualifier().equals(annotationGroup.getQualifier()))) {
-
-              final AnnotationsImpl toBeIncluded = new AnnotationsImpl();
-              toBeIncluded.setTarget(annotationGroup.getTarget());
-              toBeIncluded.setQualifier(annotationGroup.getQualifier());
-              // only import annotations with terms matching the given TermNamespace
-              for (Annotation annotation : annotationGroup.getAnnotations()) {
-                if (include.getTermNamespace().equals(StringUtils.substringBeforeLast(annotation.getTerm(), "."))) {
-                  toBeIncluded.getAnnotations().add(annotation);
-                }
-              }
-              forInclusion.getAnnotationGroups().add(toBeIncluded);
-            }
-          }
-
-          if (!forInclusion.getAnnotationGroups().isEmpty()) {
-            response.getBody().getSchemas().add(forInclusion);
-          }
-        }
-      }
-    }
-
-    return response;
-  }
-
-  private class SingleXMLMetadatRequestImpl extends AbstractMetadataRequestImpl<XMLMetadata> {
-
-    private final URI parentURI;
-    private HttpResponse httpResponse;
-
-    public SingleXMLMetadatRequestImpl(final ODataClient odataClient, final URI uri, final URI parent) {
-      super(odataClient, uri);
-      parentURI = parent;
-    }
-
-    public HttpResponse getHttpResponse() {
-      return httpResponse;
-    }
-
-    /** Referenced document's URIs must only have the same scheme, host, and port as the
-     *  main metadata document's URI but don't have to start with the service root
-     *  as all other OData request URIs. */
-    @Override
-    protected void checkRequest(final CommonODataClient<?> odataClient, final HttpUriRequest request) {
-      if (parentURI == null) {
-        super.checkRequest(odataClient, request);
-      } else {
-        if (!parentURI.getScheme().equals(uri.getScheme())
-            || !parentURI.getAuthority().equals(uri.getAuthority())) {
-          throw new IllegalArgumentException(
-              String.format("The referenced EDMX document has the URI '%s'"
-                  + " where scheme, host, or port is different from the main metadata document URI '%s'.",
-                  uri.toASCIIString(), parentURI.toASCIIString()));
-        }
-      }
-    }
-
-    @Override
-    public ODataRetrieveResponse<XMLMetadata> execute() {
-      httpResponse = doExecute();
-      return new AbstractODataRetrieveResponse(odataClient, httpClient, httpResponse) {
-
-        private XMLMetadata metadata = null;
-
-        @Override
-        public XMLMetadata getBody() {
-          if (metadata == null) {
-            try {
-              metadata = ((ODataClient) odataClient).getDeserializer(ODataFormat.XML).toMetadata(getRawResponse());
-            } finally {
-              this.close();
-            }
-          }
-          return metadata;
-        }
-      };
-    }
-  }
-
-  private class XMLMetadataResponseImpl extends AbstractODataRetrieveResponse {
-
-    private final XMLMetadata metadata;
-
-    private XMLMetadataResponseImpl(final CommonODataClient<?> odataClient, final HttpClient httpClient,
-            final HttpResponse res, final XMLMetadata metadata) {
-
-      super(odataClient, httpClient, null);
-      this.metadata = metadata;
-
-      statusCode = res.getStatusLine().getStatusCode();
-      statusMessage = res.getStatusLine().getReasonPhrase();
-
-      hasBeenInitialized = true;
-    }
-
-    @Override
-    public XMLMetadata getBody() {
-      return metadata;
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncBatchRequestWrapperImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncBatchRequestWrapperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncBatchRequestWrapperImpl.java
deleted file mode 100644
index a3763bf..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncBatchRequestWrapperImpl.java
+++ /dev/null
@@ -1,119 +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.client.core.communication.request.v4;
-
-import java.net.URI;
-import java.util.Collection;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.header.ODataPreferences;
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.request.batch.BatchManager;
-import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
-import org.apache.olingo.client.api.communication.request.v4.AsyncBatchRequestWrapper;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponseWrapper;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public class AsyncBatchRequestWrapperImpl extends AsyncRequestWrapperImpl<ODataBatchResponse>
-        implements AsyncBatchRequestWrapper {
-
-  private BatchManager batchManager;
-
-  protected AsyncBatchRequestWrapperImpl(final ODataClient odataClient, final ODataBatchRequest odataRequest) {
-    super(odataClient, odataRequest);
-    batchManager = odataRequest.payloadManager();
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public ODataChangeset addChangeset() {
-    return batchManager.addChangeset();
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public void addRetrieve(final ODataBatchableRequest request) {
-    batchManager.addRequest(request);
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public void addOutsideUpdate(final ODataBatchableRequest request) {
-    batchManager.addRequest(request);
-  }
-
-  @Override
-  public AsyncResponseWrapper<ODataBatchResponse> execute() {
-    return new AsyncResponseWrapperImpl(batchManager.getResponse());
-  }
-
-  public class AsyncResponseWrapperImpl
-          extends AsyncRequestWrapperImpl<ODataBatchResponse>.AsyncResponseWrapperImpl {
-
-    /**
-     * Constructor.
-     *
-     * @param res OData batch response.
-     */
-    public AsyncResponseWrapperImpl(final ODataBatchResponse res) {
-      super();
-
-      if (res.getStatusCode() == 202) {
-        retrieveMonitorDetails(res);
-      } else {
-        response = res;
-      }
-    }
-
-    private void retrieveMonitorDetails(final ODataBatchResponse res) {
-      Collection<String> headers = res.getHeader(HeaderName.location.toString());
-      if (headers == null || headers.isEmpty()) {
-        throw new AsyncRequestException("Invalid async request response. Monitor URL not found");
-      } else {
-        this.location = URI.create(headers.iterator().next());
-      }
-
-      headers = res.getHeader(HeaderName.retryAfter.toString());
-      if (headers != null && !headers.isEmpty()) {
-        this.retryAfter = Integer.parseInt(headers.iterator().next());
-      }
-
-      headers = res.getHeader(HeaderName.preferenceApplied.toString());
-      if (headers != null && !headers.isEmpty()) {
-        for (String header : headers) {
-          if (header.equalsIgnoreCase(new ODataPreferences(ODataServiceVersion.V40).respondAsync())) {
-            preferenceApplied = true;
-          }
-        }
-      }
-
-      IOUtils.closeQuietly(res.getRawResponse());
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestException.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestException.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestException.java
deleted file mode 100644
index a3f3651..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestException.java
+++ /dev/null
@@ -1,28 +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.client.core.communication.request.v4;
-
-public class AsyncRequestException extends RuntimeException {
-
-  private static final long serialVersionUID = -6080844898544654406L;
-
-  public AsyncRequestException(final String message) {
-    super(message);
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestFactoryImpl.java
deleted file mode 100644
index 851ce95..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestFactoryImpl.java
+++ /dev/null
@@ -1,46 +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.client.core.communication.request.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataRequest;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
-import org.apache.olingo.client.api.communication.request.v4.AsyncBatchRequestWrapper;
-import org.apache.olingo.client.api.communication.request.v4.AsyncRequestFactory;
-import org.apache.olingo.client.api.communication.request.v4.AsyncRequestWrapper;
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.v4.ODataClient;
-
-public class AsyncRequestFactoryImpl implements AsyncRequestFactory {
-
-  private final ODataClient client;
-
-  public AsyncRequestFactoryImpl(final ODataClient client) {
-    this.client = client;
-  }
-
-  @Override
-  public <R extends ODataResponse> AsyncRequestWrapper<R> getAsyncRequestWrapper(final ODataRequest odataRequest) {
-    return new AsyncRequestWrapperImpl<R>(client, odataRequest);
-  }
-
-  @Override
-  public AsyncBatchRequestWrapper getAsyncBatchRequestWrapper(final ODataBatchRequest odataRequest) {
-    return new AsyncBatchRequestWrapperImpl(client, odataRequest);
-  }
-}


[07/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmConstantAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmConstantAnnotationExpressionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmConstantAnnotationExpressionImpl.java
deleted file mode 100644
index aeded52..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmConstantAnnotationExpressionImpl.java
+++ /dev/null
@@ -1,141 +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.client.core.edm.v4.annotation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.ConstantAnnotationExpression;
-import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
-import org.apache.olingo.commons.api.edm.annotation.EdmConstantAnnotationExpression;
-import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.core.domain.v4.ODataCollectionValueImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataEnumValueImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataPrimitiveValueImpl;
-import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
-
-public class EdmConstantAnnotationExpressionImpl implements EdmConstantAnnotationExpression {
-
-  private final ODataValue value;
-
-  public EdmConstantAnnotationExpressionImpl(final ConstantAnnotationExpression constExprConstruct) {
-    if (constExprConstruct.getType() == ConstantAnnotationExpression.Type.EnumMember) {
-      final List<ODataEnumValue> enumValues = new ArrayList<ODataEnumValue>();
-      String enumTypeName = null;
-      for (String split : StringUtils.split(constExprConstruct.getValue(), ' ')) {
-        final String[] enumSplit = StringUtils.split(split, '/');
-        enumTypeName = enumSplit[0];
-        enumValues.add(new ODataEnumValueImpl(enumSplit[0], enumSplit[1]));
-      }
-      if (enumValues.size() == 1) {
-        value = enumValues.get(0);
-      } else {
-        final ODataCollectionValueImpl collValue = new ODataCollectionValueImpl(enumTypeName);
-        for (ODataValue enumValue : enumValues) {
-          collValue.add(enumValue);
-        }
-        value = collValue;
-      }
-    } else {
-      EdmPrimitiveTypeKind kind;
-      switch (constExprConstruct.getType()) {
-        case Binary:
-          kind = EdmPrimitiveTypeKind.Binary;
-          break;
-        case Bool:
-          kind = EdmPrimitiveTypeKind.Boolean;
-          break;
-        case Date:
-          kind = EdmPrimitiveTypeKind.Date;
-          break;
-        case DateTimeOffset:
-          kind = EdmPrimitiveTypeKind.DateTimeOffset;
-          break;
-        case Decimal:
-          kind = EdmPrimitiveTypeKind.Decimal;
-          break;
-        case Duration:
-          kind = EdmPrimitiveTypeKind.Duration;
-          break;
-        case Float:
-          kind = EdmPrimitiveTypeKind.Single;
-          break;
-        case Guid:
-          kind = EdmPrimitiveTypeKind.Guid;
-          break;
-        case Int:
-          kind = EdmPrimitiveTypeKind.Int32;
-          break;
-        case TimeOfDay:
-          kind = EdmPrimitiveTypeKind.TimeOfDay;
-          break;
-        case String:
-        default:
-          kind = EdmPrimitiveTypeKind.String;
-      }
-      final ODataPrimitiveValueImpl.BuilderImpl primitiveValueBuilder =
-          new ODataPrimitiveValueImpl.BuilderImpl(ODataServiceVersion.V40);
-      primitiveValueBuilder.setType(kind);
-      try {
-        final EdmPrimitiveType primitiveType = EdmPrimitiveTypeFactory.getInstance(kind);
-        primitiveValueBuilder.setValue(
-            primitiveType.valueOfString(constExprConstruct.getValue(),
-                null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null,
-                primitiveType.getDefaultType()));
-      } catch (final EdmPrimitiveTypeException e) {
-        throw new IllegalArgumentException(e);
-      }
-
-      value = primitiveValueBuilder.build();
-    }
-  }
-
-  @Override
-  public boolean isConstant() {
-    return true;
-  }
-
-  @Override
-  public EdmConstantAnnotationExpression asConstant() {
-    return this;
-  }
-
-  @Override
-  public boolean isDynamic() {
-    return false;
-  }
-
-  @Override
-  public EdmDynamicAnnotationExpression asDynamic() {
-    return null;
-  }
-
-  @Override
-  public ODataValue getValue() {
-    return value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmIsOfImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmIsOfImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmIsOfImpl.java
deleted file mode 100644
index 2d00e79..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmIsOfImpl.java
+++ /dev/null
@@ -1,80 +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.client.core.edm.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.IsOf;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmType;
-import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.annotation.EdmIsOf;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-import org.apache.olingo.commons.core.edm.EdmTypeInfo;
-import org.apache.olingo.commons.core.edm.annotation.AbstractEdmAnnotatableDynamicAnnotationExpression;
-
-public class EdmIsOfImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmIsOf {
-
-  private final Edm edm;
-
-  private final IsOf isOf;
-
-  private final EdmDynamicAnnotationExpression value;
-
-  private EdmType type;
-
-  public EdmIsOfImpl(final Edm edm, final IsOf isOf, final EdmDynamicAnnotationExpression value) {
-    this.edm = edm;
-    this.isOf = isOf;
-    this.value = value;
-  }
-
-  @Override
-  public Integer getMaxLength() {
-    return isOf.getMaxLength();
-  }
-
-  @Override
-  public Integer getPrecision() {
-    return isOf.getPrecision();
-  }
-
-  @Override
-  public Integer getScale() {
-    return isOf.getScale();
-  }
-
-  @Override
-  public SRID getSrid() {
-    return isOf.getSrid();
-  }
-
-  @Override
-  public EdmType getType() {
-    if (type == null) {
-      final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(isOf.getType()).build();
-      type = typeInfo.getType();
-    }
-    return type;
-  }
-
-  @Override
-  public EdmDynamicAnnotationExpression getValue() {
-    return value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmRecordImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmRecordImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmRecordImpl.java
deleted file mode 100644
index 8c22b27..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmRecordImpl.java
+++ /dev/null
@@ -1,55 +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.client.core.edm.v4.annotation;
-
-import java.util.List;
-
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmStructuredType;
-import org.apache.olingo.commons.api.edm.annotation.EdmPropertyValue;
-import org.apache.olingo.commons.api.edm.annotation.EdmRecord;
-import org.apache.olingo.commons.core.edm.EdmTypeInfo;
-import org.apache.olingo.commons.core.edm.annotation.AbstractEdmAnnotatableDynamicAnnotationExpression;
-
-public class EdmRecordImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmRecord {
-
-  private final List<EdmPropertyValue> propertyValues;
-
-  private EdmStructuredType type;
-
-  public EdmRecordImpl(final Edm edm, final String type, final List<EdmPropertyValue> propertyValues) {
-    this.propertyValues = propertyValues;
-
-    if (type != null) {
-      final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(type).build();
-      this.type = typeInfo.getEntityType() == null ? typeInfo.getComplexType() : typeInfo.getEntityType();
-    }
-  }
-
-  @Override
-  public List<EdmPropertyValue> getPropertyValues() {
-    return propertyValues;
-  }
-
-  @Override
-  public EdmStructuredType getType() {
-    return type;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java
new file mode 100644
index 0000000..e0fd56e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+
+public abstract class AbstractAnnotatable extends AbstractEdmItem implements Annotatable {
+
+  private static final long serialVersionUID = 3739284381932173905L;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java
index 404d131..adc89c2 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java
@@ -18,9 +18,9 @@
  */
 package org.apache.olingo.client.core.edm.xml;
 
-import org.apache.olingo.client.api.edm.xml.CommonNavigationProperty;
-import org.apache.olingo.client.api.edm.xml.CommonProperty;
 import org.apache.olingo.client.api.edm.xml.ComplexType;
+import org.apache.olingo.client.api.edm.xml.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.Property;
 
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 
@@ -39,14 +39,14 @@ public abstract class AbstractComplexType extends AbstractEdmItem implements Com
   public void setName(final String name) {
     this.name = name;
   }
-
+  
   @Override
-  public CommonProperty getProperty(final String name) {
+  public Property getProperty(final String name) {
     return getOneByName(name, getProperties());
   }
 
   @Override
-  public CommonNavigationProperty getNavigationProperty(final String name) {
+  public NavigationProperty getNavigationProperty(final String name) {
     return getOneByName(name, getNavigationProperties());
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmDeserializer.java
index 556c81f..0391517 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmDeserializer.java
@@ -20,8 +20,7 @@ package org.apache.olingo.client.core.edm.xml;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.core.edm.xml.v4.ReturnTypeImpl;
-import org.apache.olingo.client.core.edm.xml.v4.annotation.ConstantAnnotationExpressionImpl;
+import org.apache.olingo.client.core.edm.xml.annotation.ConstantAnnotationExpressionImpl;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 
 import com.fasterxml.jackson.core.JsonParser;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java
index 3c5453c..9d8cf5e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java
@@ -20,9 +20,9 @@ package org.apache.olingo.client.core.edm.xml;
 
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
 import org.apache.olingo.client.api.edm.xml.EntitySet;
+import org.apache.olingo.client.api.edm.xml.FunctionImport;
 
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 
@@ -79,7 +79,7 @@ public abstract class AbstractEntityContainer extends AbstractEdmItem implements
   public EntitySet getEntitySet(final String name) {
     return getOneByName(name, getEntitySets());
   }
-
+  
   /**
    * Gets the first function import with given name.
    *
@@ -87,7 +87,7 @@ public abstract class AbstractEntityContainer extends AbstractEdmItem implements
    * @return function import.
    */
   @Override
-  public CommonFunctionImport getFunctionImport(final String name) {
+  public FunctionImport getFunctionImport(final String name) {
     return getOneByName(name, getFunctionImports());
   }
 
@@ -98,7 +98,7 @@ public abstract class AbstractEntityContainer extends AbstractEdmItem implements
    * @return function imports.
    */
   @Override
-  public List<? extends CommonFunctionImport> getFunctionImports(final String name) {
+  public List<FunctionImport> getFunctionImports(final String name) {
     return getAllByName(name, getFunctionImports());
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java
index 6159e95..f911463 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java
@@ -41,10 +41,10 @@ public abstract class AbstractXMLMetadata extends AbstractEdmItem implements XML
   }
 
   @Override
-  public List<? extends Schema> getSchemas() {
+  public List<Schema> getSchemas() {
     return this.edmx.getDataServices().getSchemas();
   }
-
+  
   @Override
   public Schema getSchema(final int index) {
     return getSchemas().get(index);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.java
new file mode 100644
index 0000000..562c8e9
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.java
@@ -0,0 +1,61 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class ActionDeserializer extends AbstractEdmDeserializer<ActionImpl> {
+
+  @Override
+  protected ActionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final ActionImpl action = new ActionImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          action.setName(jp.nextTextValue());
+        } else if ("IsBound".equals(jp.getCurrentName())) {
+          action.setBound(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("EntitySetPath".equals(jp.getCurrentName())) {
+          action.setEntitySetPath(jp.nextTextValue());
+        } else if ("Parameter".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          action.getParameters().add(jp.readValueAs(ParameterImpl.class));
+        } else if ("ReturnType".equals(jp.getCurrentName())) {
+          action.setReturnType(parseReturnType(jp, "Action"));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          action.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return action;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java
new file mode 100644
index 0000000..2b685dd
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java
@@ -0,0 +1,91 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Action;
+import org.apache.olingo.client.api.edm.xml.Parameter;
+import org.apache.olingo.client.api.edm.xml.ReturnType;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = ActionDeserializer.class)
+public class ActionImpl extends AbstractAnnotatable implements Action {
+
+  private static final long serialVersionUID = 5321541275349234088L;
+
+  private String name;
+
+  private boolean bound = false;
+
+  private String entitySetPath;
+
+  private final List<Parameter> parameters = new ArrayList<Parameter>();
+
+  private ReturnType returnType;
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  @Override
+  public boolean isBound() {
+    return bound;
+  }
+
+  public void setBound(final boolean bound) {
+    this.bound = bound;
+  }
+
+  @Override
+  public String getEntitySetPath() {
+    return entitySetPath;
+  }
+
+  public void setEntitySetPath(final String entitySetPath) {
+    this.entitySetPath = entitySetPath;
+  }
+
+  @Override
+  public Parameter getParameter(final String name) {
+    return getOneByName(name, getParameters());
+  }
+
+  @Override
+  public List<Parameter> getParameters() {
+    return parameters;
+  }
+
+  @Override
+  public ReturnType getReturnType() {
+    return returnType;
+  }
+
+  public void setReturnType(final ReturnType returnType) {
+    this.returnType = returnType;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java
new file mode 100644
index 0000000..ac9c1c5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java
@@ -0,0 +1,66 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.ActionImport;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ActionImportImpl extends AbstractAnnotatable implements ActionImport {
+
+  private static final long serialVersionUID = 2971468441177647068L;
+
+  @JsonProperty(value = "Name", required = true)
+  private String name;
+
+  @JsonProperty(value = "Action", required = true)
+  private String action;
+
+  @JsonProperty(value = "EntitySet")
+  private String entitySet;
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  @Override
+  public String getAction() {
+    return action;
+  }
+
+  public void setAction(final String action) {
+    this.action = action;
+  }
+
+  @Override
+  public String getEntitySet() {
+    return entitySet;
+  }
+
+  @Override
+  public void setEntitySet(final String entitySet) {
+    this.entitySet = entitySet;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.java
new file mode 100644
index 0000000..a81180a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.java
@@ -0,0 +1,61 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import org.apache.olingo.client.core.edm.xml.annotation.AbstractDynamicAnnotationExpression;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class AnnotationDeserializer extends AbstractEdmDeserializer<AnnotationImpl> {
+
+  @Override
+  protected AnnotationImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final AnnotationImpl annotation = new AnnotationImpl();
+
+    for (; jp.getCurrentToken() != null && jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Term".equals(jp.getCurrentName())) {
+          annotation.setTerm(jp.nextTextValue());
+        } else if ("Qualifier".equals(jp.getCurrentName())) {
+          annotation.setQualifier(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          annotation.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        } else if (isAnnotationConstExprConstruct(jp)) {
+          // Constant Expressions
+          annotation.setAnnotationExpression(parseAnnotationConstExprConstruct(jp));
+        } else {
+          // Dynamic Expressions
+          annotation.setAnnotationExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
+        }
+      }
+    }
+
+    return annotation;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java
new file mode 100644
index 0000000..aaf510e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java
@@ -0,0 +1,64 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = AnnotationDeserializer.class)
+public class AnnotationImpl extends AbstractAnnotatable implements Annotation {
+
+  private static final long serialVersionUID = 5464714417411058033L;
+
+  private String term;
+
+  private String qualifier;
+
+  private AnnotationExpression annotationExpression;
+
+  @Override
+  public String getTerm() {
+    return term;
+  }
+
+  public void setTerm(final String term) {
+    this.term = term;
+  }
+
+  @Override
+  public String getQualifier() {
+    return qualifier;
+  }
+
+  public void setQualifier(final String qualifier) {
+    this.qualifier = qualifier;
+  }
+
+  @Override
+  public AnnotationExpression getExpression() {
+    return annotationExpression;
+  }
+
+  public void setAnnotationExpression(final AnnotationExpression annotationExpression) {
+    this.annotationExpression = annotationExpression;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java
new file mode 100644
index 0000000..14d84ca
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java
@@ -0,0 +1,53 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class AnnotationsDeserializer extends AbstractEdmDeserializer<AnnotationsImpl> {
+
+  @Override
+  protected AnnotationsImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final AnnotationsImpl annotations = new AnnotationsImpl();
+
+    for (; jp.getCurrentToken() != null && jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Target".equals(jp.getCurrentName())) {
+          annotations.setTarget(jp.nextTextValue());
+        } else if ("Qualifier".equals(jp.getCurrentName())) {
+          annotations.setQualifier(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          annotations.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java
new file mode 100644
index 0000000..0f0907e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotations;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = AnnotationsDeserializer.class)
+public class AnnotationsImpl extends AbstractAnnotations implements Annotations {
+
+  private static final long serialVersionUID = -5961207981571644200L;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+  @Override
+  public Annotation getAnnotation(final String term) {
+    Annotation result = null;
+    for (Annotation annotation : getAnnotations()) {
+      if (term.equals(annotation.getTerm())) {
+        result = annotation;
+      }
+    }
+    return result;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java
index a152b38..fbd16ab 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeDeserializer.java
@@ -21,10 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
 import java.io.IOException;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.edm.xml.v4.ComplexTypeImpl;
-import org.apache.olingo.client.core.edm.xml.v4.NavigationPropertyImpl;
-import org.apache.olingo.client.core.edm.xml.v4.PropertyImpl;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java
new file mode 100644
index 0000000..86d171b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java
@@ -0,0 +1,97 @@
+/*
+ * 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 >ied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.ComplexType;
+import org.apache.olingo.client.api.edm.xml.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.Property;
+
+public class ComplexTypeImpl extends AbstractComplexType implements ComplexType {
+
+  private static final long serialVersionUID = 4076944306925840115L;
+
+  private boolean abstractEntityType = false;
+
+  private String baseType;
+
+  private boolean openType = false;
+
+  private final List<Property> properties = new ArrayList<Property>();
+
+  private final List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public boolean isAbstractEntityType() {
+    return abstractEntityType;
+  }
+
+  public void setAbstractEntityType(final boolean abstractEntityType) {
+    this.abstractEntityType = abstractEntityType;
+  }
+
+  @Override
+  public String getBaseType() {
+    return baseType;
+  }
+
+  public void setBaseType(final String baseType) {
+    this.baseType = baseType;
+  }
+
+  @Override
+  public boolean isOpenType() {
+    return openType;
+  }
+
+  public void setOpenType(final boolean openType) {
+    this.openType = openType;
+  }
+
+  @Override
+  public Property getProperty(final String name) {
+    return (Property) super.getProperty(name);
+  }
+
+  @Override
+  public List<Property> getProperties() {
+    return properties;
+  }
+
+  @Override
+  public NavigationProperty getNavigationProperty(final String name) {
+    return (NavigationProperty) super.getNavigationProperty(name);
+  }
+
+  @Override
+  public List<NavigationProperty> getNavigationProperties() {
+    return navigationProperties;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesDeserializer.java
index 85a9a05..14298ea 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesDeserializer.java
@@ -20,9 +20,6 @@ package org.apache.olingo.client.core.edm.xml;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.core.edm.xml.v4.DataServicesImpl;
-import org.apache.olingo.client.core.edm.xml.v4.SchemaImpl;
-
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.JsonToken;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java
new file mode 100644
index 0000000..a04385a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java
@@ -0,0 +1,37 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Schema;
+
+public class DataServicesImpl extends AbstractDataServices {
+
+  private static final long serialVersionUID = 4200317286476885204L;
+
+  private final List<Schema> schemas = new ArrayList<Schema>();
+
+  @Override
+  public List<Schema> getSchemas() {
+    return schemas;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxDeserializer.java
index 7355498..96943a4 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxDeserializer.java
@@ -20,8 +20,6 @@ package org.apache.olingo.client.core.edm.xml;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.core.edm.xml.v4.ReferenceImpl;
-
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.JsonToken;
@@ -33,7 +31,7 @@ public class EdmxDeserializer extends AbstractEdmDeserializer<AbstractEdmx> {
   protected AbstractEdmx doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
       throws IOException, JsonProcessingException {
 
-    final AbstractEdmx edmx = new org.apache.olingo.client.core.edm.xml.v4.EdmxImpl();
+    final AbstractEdmx edmx = new org.apache.olingo.client.core.edm.xml.EdmxImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -43,13 +41,13 @@ public class EdmxDeserializer extends AbstractEdmDeserializer<AbstractEdmx> {
         } else if ("DataServices".equals(jp.getCurrentName())) {
           jp.nextToken();
 
-          ((org.apache.olingo.client.core.edm.xml.v4.EdmxImpl) edmx).
+          ((org.apache.olingo.client.core.edm.xml.EdmxImpl) edmx).
               setDataServices(jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.DataServicesImpl.class));
+                  org.apache.olingo.client.core.edm.xml.DataServicesImpl.class));
 
         } else if ("Reference".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EdmxImpl) edmx).getReferences().
+          ((org.apache.olingo.client.core.edm.xml.EdmxImpl) edmx).getReferences().
               add(jp.readValueAs(ReferenceImpl.class));
         }
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java
new file mode 100644
index 0000000..b1abbec
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java
@@ -0,0 +1,43 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Edmx;
+import org.apache.olingo.client.api.edm.xml.Reference;
+
+public class EdmxImpl extends AbstractEdmx implements Edmx {
+
+  private static final long serialVersionUID = -6293476719276092572L;
+
+  private final List<Reference> references = new ArrayList<Reference>();
+
+  @Override
+  public DataServicesImpl getDataServices() {
+    return (DataServicesImpl) super.getDataServices();
+  }
+
+  @Override
+  public List<Reference> getReferences() {
+    return references;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java
index 46c1e55..c8a647f 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerDeserializer.java
@@ -21,9 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
 import java.io.IOException;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.v4.ActionImportImpl;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.edm.xml.v4.SingletonImpl;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -36,7 +33,7 @@ public class EntityContainerDeserializer extends AbstractEdmDeserializer<Abstrac
   protected AbstractEntityContainer doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
       throws IOException, JsonProcessingException {
 
-    final AbstractEntityContainer entityContainer = new org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl();
+    final AbstractEntityContainer entityContainer = new org.apache.olingo.client.core.edm.xml.EntityContainerImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -52,28 +49,28 @@ public class EntityContainerDeserializer extends AbstractEdmDeserializer<Abstrac
         } else if ("EntitySet".equals(jp.getCurrentName())) {
           jp.nextToken();
 
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl) entityContainer).
+          ((org.apache.olingo.client.core.edm.xml.EntityContainerImpl) entityContainer).
               getEntitySets().add(jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.EntitySetImpl.class));
+                  org.apache.olingo.client.core.edm.xml.EntitySetImpl.class));
 
         } else if ("Singleton".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl) entityContainer).
+          ((org.apache.olingo.client.core.edm.xml.EntityContainerImpl) entityContainer).
               getSingletons().add(jp.readValueAs(SingletonImpl.class));
         } else if ("ActionImport".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl) entityContainer).
+          ((org.apache.olingo.client.core.edm.xml.EntityContainerImpl) entityContainer).
               getActionImports().add(jp.readValueAs(ActionImportImpl.class));
         } else if ("FunctionImport".equals(jp.getCurrentName())) {
           jp.nextToken();
 
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl) entityContainer).
+          ((org.apache.olingo.client.core.edm.xml.EntityContainerImpl) entityContainer).
               getFunctionImports().add(jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.FunctionImportImpl.class));
+                  org.apache.olingo.client.core.edm.xml.FunctionImportImpl.class));
 
         } else if ("Annotation".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl) entityContainer).getAnnotations().
+          ((org.apache.olingo.client.core.edm.xml.EntityContainerImpl) entityContainer).getAnnotations().
               add(jp.readValueAs(AnnotationImpl.class));
         }
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.java
new file mode 100644
index 0000000..238f636
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.java
@@ -0,0 +1,123 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.ActionImport;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.EntityContainer;
+import org.apache.olingo.client.api.edm.xml.EntitySet;
+import org.apache.olingo.client.api.edm.xml.FunctionImport;
+import org.apache.olingo.client.api.edm.xml.Singleton;
+
+public class EntityContainerImpl extends AbstractEntityContainer implements EntityContainer {
+
+  private static final long serialVersionUID = 5631432527646955795L;
+
+  private final List<EntitySet> entitySets = new ArrayList<EntitySet>();
+
+  private final List<Singleton> singletons = new ArrayList<Singleton>();
+
+  private final List<ActionImport> actionImports = new ArrayList<ActionImport>();
+
+  private final List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public void setDefaultEntityContainer(final boolean defaultEntityContainer) {
+    // no action: a single entity container MUST be available as per OData 4.0
+  }
+
+  @Override
+  public boolean isDefaultEntityContainer() {
+    return true;
+  }
+
+  @Override
+  public EntitySet getEntitySet(final String name) {
+    return (EntitySet) super.getEntitySet(name);
+  }
+
+  @Override
+  public List<EntitySet> getEntitySets() {
+    return entitySets;
+  }
+
+  @Override
+  public List<Singleton> getSingletons() {
+    return singletons;
+  }
+
+  @Override
+  public Singleton getSingleton(final String name) {
+    return getOneByName(name, getSingletons());
+  }
+
+  @Override
+  public FunctionImport getFunctionImport(final String name) {
+    return (FunctionImport) super.getFunctionImport(name);
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  public List<FunctionImport> getFunctionImports(final String name) {
+    return (List<FunctionImport>) super.getFunctionImports(name);
+  }
+
+  /**
+   * Gets the first action import with given name.
+   *
+   * @param name name.
+   * @return action import.
+   */
+  @Override
+  public ActionImport getActionImport(final String name) {
+    return getOneByName(name, getActionImports());
+  }
+
+  /**
+   * Gets all action imports with given name.
+   *
+   * @param name name.
+   * @return action imports.
+   */
+  @Override
+  public List<ActionImport> getActionImports(final String name) {
+    return getAllByName(name, getActionImports());
+  }
+
+  @Override
+  public List<ActionImport> getActionImports() {
+    return actionImports;
+  }
+
+  @Override
+  public List<FunctionImport> getFunctionImports() {
+    return functionImports;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java
index 08411d6..f4e8cc1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetDeserializer.java
@@ -21,8 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
 import java.io.IOException;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.edm.xml.v4.NavigationPropertyBindingImpl;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -35,7 +33,7 @@ public class EntitySetDeserializer extends AbstractEdmDeserializer<AbstractEntit
   protected AbstractEntitySet doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final AbstractEntitySet entitySet = new org.apache.olingo.client.core.edm.xml.v4.EntitySetImpl();
+    final AbstractEntitySet entitySet = new org.apache.olingo.client.core.edm.xml.EntitySetImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -45,16 +43,16 @@ public class EntitySetDeserializer extends AbstractEdmDeserializer<AbstractEntit
         } else if ("EntityType".equals(jp.getCurrentName())) {
           entitySet.setEntityType(jp.nextTextValue());
         } else if ("IncludeInServiceDocument".equals(jp.getCurrentName())) {
-          ((org.apache.olingo.client.core.edm.xml.v4.EntitySetImpl) entitySet).
+          ((org.apache.olingo.client.core.edm.xml.EntitySetImpl) entitySet).
                   setIncludeInServiceDocument(BooleanUtils.toBoolean(jp.nextTextValue()));
         } else if ("NavigationPropertyBinding".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntitySetImpl) entitySet).
+          ((org.apache.olingo.client.core.edm.xml.EntitySetImpl) entitySet).
                   getNavigationPropertyBindings().add(
                           jp.readValueAs(NavigationPropertyBindingImpl.class));
         } else if ("Annotation".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntitySetImpl) entitySet).getAnnotations().
+          ((org.apache.olingo.client.core.edm.xml.EntitySetImpl) entitySet).getAnnotations().
                   add(jp.readValueAs(AnnotationImpl.class));
         }
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.java
new file mode 100644
index 0000000..ec132dd
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.EntitySet;
+import org.apache.olingo.client.api.edm.xml.NavigationPropertyBinding;
+
+public class EntitySetImpl extends AbstractEntitySet implements EntitySet {
+
+  private static final long serialVersionUID = -5553885465204370676L;
+
+  private boolean includeInServiceDocument = true;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  private final List<NavigationPropertyBinding> navigationPropertyBindings = new ArrayList<NavigationPropertyBinding>();
+
+  @Override
+  public boolean isIncludeInServiceDocument() {
+    return includeInServiceDocument;
+  }
+
+  public void setIncludeInServiceDocument(final boolean includeInServiceDocument) {
+    this.includeInServiceDocument = includeInServiceDocument;
+  }
+
+  @Override
+  public List<NavigationPropertyBinding> getNavigationPropertyBindings() {
+    return navigationPropertyBindings;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeDeserializer.java
index 026bb13..79d82f0 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeDeserializer.java
@@ -21,7 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
 import java.io.IOException;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -34,7 +33,7 @@ public class EntityTypeDeserializer extends AbstractEdmDeserializer<AbstractEnti
   protected AbstractEntityType doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
       throws IOException, JsonProcessingException {
 
-    final AbstractEntityType entityType = new org.apache.olingo.client.core.edm.xml.v4.EntityTypeImpl();
+    final AbstractEntityType entityType = new org.apache.olingo.client.core.edm.xml.EntityTypeImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -54,16 +53,16 @@ public class EntityTypeDeserializer extends AbstractEdmDeserializer<AbstractEnti
           entityType.setKey(jp.readValueAs(EntityKeyImpl.class));
         } else if ("Property".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityTypeImpl) entityType).
-              getProperties().add(jp.readValueAs(org.apache.olingo.client.core.edm.xml.v4.PropertyImpl.class));
+          ((org.apache.olingo.client.core.edm.xml.EntityTypeImpl) entityType).
+              getProperties().add(jp.readValueAs(org.apache.olingo.client.core.edm.xml.PropertyImpl.class));
         } else if ("NavigationProperty".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityTypeImpl) entityType).
+          ((org.apache.olingo.client.core.edm.xml.EntityTypeImpl) entityType).
               getNavigationProperties().add(jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.NavigationPropertyImpl.class));
+                  org.apache.olingo.client.core.edm.xml.NavigationPropertyImpl.class));
         } else if ("Annotation".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EntityTypeImpl) entityType).getAnnotations().
+          ((org.apache.olingo.client.core.edm.xml.EntityTypeImpl) entityType).getAnnotations().
               add(jp.readValueAs(AnnotationImpl.class));
         }
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java
new file mode 100644
index 0000000..2e0c7fa
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java
@@ -0,0 +1,64 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.EntityType;
+import org.apache.olingo.client.api.edm.xml.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.Property;
+
+public class EntityTypeImpl extends AbstractEntityType implements EntityType {
+
+  private static final long serialVersionUID = -3986417775876689669L;
+
+  private final List<Property> properties = new ArrayList<Property>();
+
+  private final List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public Property getProperty(final String name) {
+    return (Property) super.getProperty(name);
+  }
+
+  @Override
+  public List<Property> getProperties() {
+    return properties;
+  }
+
+  @Override
+  public NavigationProperty getNavigationProperty(final String name) {
+    return (NavigationProperty) super.getNavigationProperty(name);
+  }
+
+  @Override
+  public List<NavigationProperty> getNavigationProperties() {
+    return navigationProperties;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeDeserializer.java
index 3936137..8b70c13 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeDeserializer.java
@@ -21,7 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
 import java.io.IOException;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -34,7 +33,7 @@ public class EnumTypeDeserializer extends AbstractEdmDeserializer<AbstractEnumTy
   protected AbstractEnumType doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final AbstractEnumType enumType = new org.apache.olingo.client.core.edm.xml.v4.EnumTypeImpl();
+    final AbstractEnumType enumType = new org.apache.olingo.client.core.edm.xml.EnumTypeImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -47,12 +46,12 @@ public class EnumTypeDeserializer extends AbstractEdmDeserializer<AbstractEnumTy
           enumType.setFlags(BooleanUtils.toBoolean(jp.nextTextValue()));
         } else if ("Member".equals(jp.getCurrentName())) {
           jp.nextToken();
-            ((org.apache.olingo.client.core.edm.xml.v4.EnumTypeImpl) enumType).
+            ((org.apache.olingo.client.core.edm.xml.EnumTypeImpl) enumType).
                     getMembers().add(jp.readValueAs(
-                                    org.apache.olingo.client.core.edm.xml.v4.MemberImpl.class));
+                                    org.apache.olingo.client.core.edm.xml.MemberImpl.class));
         } else if ("Annotation".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.EnumTypeImpl) enumType).getAnnotations().
+          ((org.apache.olingo.client.core.edm.xml.EnumTypeImpl) enumType).getAnnotations().
                   add(jp.readValueAs(AnnotationImpl.class));
         }
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java
new file mode 100644
index 0000000..68e0fb6
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+
+public class EnumTypeImpl extends AbstractEnumType implements Annotatable {
+
+  private static final long serialVersionUID = 9191189755592743333L;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java
new file mode 100644
index 0000000..9d753fb
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java
@@ -0,0 +1,63 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class FunctionDeserializer extends AbstractEdmDeserializer<FunctionImpl> {
+
+  @Override
+  protected FunctionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final FunctionImpl functionImpl = new FunctionImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          functionImpl.setName(jp.nextTextValue());
+        } else if ("IsBound".equals(jp.getCurrentName())) {
+          functionImpl.setBound(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("IsComposable".equals(jp.getCurrentName())) {
+          functionImpl.setComposable(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("EntitySetPath".equals(jp.getCurrentName())) {
+          functionImpl.setEntitySetPath(jp.nextTextValue());
+        } else if ("Parameter".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          functionImpl.getParameters().add(jp.readValueAs(ParameterImpl.class));
+        } else if ("ReturnType".equals(jp.getCurrentName())) {
+          functionImpl.setReturnType(parseReturnType(jp, "Function"));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          functionImpl.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return functionImpl;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java
new file mode 100644
index 0000000..9c67d09
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java
@@ -0,0 +1,41 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.Function;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = FunctionDeserializer.class)
+public class FunctionImpl extends ActionImpl implements Function {
+
+  private static final long serialVersionUID = -5494898295282843362L;
+
+  private boolean composable = false;
+
+  @Override
+  public boolean isComposable() {
+    return composable;
+  }
+
+  public void setComposable(final boolean composable) {
+    this.composable = composable;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportDeserializer.java
new file mode 100644
index 0000000..c6af641
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportDeserializer.java
@@ -0,0 +1,58 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class FunctionImportDeserializer extends AbstractEdmDeserializer<FunctionImportImpl> {
+
+  @Override
+  protected FunctionImportImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final FunctionImportImpl functImpImpl = new FunctionImportImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          functImpImpl.setName(jp.nextTextValue());
+        } else if ("Function".equals(jp.getCurrentName())) {
+          functImpImpl.setFunction(jp.nextTextValue());
+        } else if ("EntitySet".equals(jp.getCurrentName())) {
+          functImpImpl.setEntitySet(jp.nextTextValue());
+        } else if ("IncludeInServiceDocument".equals(jp.getCurrentName())) {
+          functImpImpl.setIncludeInServiceDocument(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          functImpImpl.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return functImpImpl;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java
new file mode 100644
index 0000000..21b0d12
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java
@@ -0,0 +1,86 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.FunctionImport;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = FunctionImportDeserializer.class)
+public class FunctionImportImpl implements FunctionImport {
+
+  private static final long serialVersionUID = -1686801084142932402L;
+
+  private String name;
+
+  private String function;
+
+  private String entitySet;
+
+  private boolean includeInServiceDocument = false;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  @Override
+  public String getFunction() {
+    return function;
+  }
+
+  public void setFunction(final String function) {
+    this.function = function;
+  }
+
+  @Override
+  public String getEntitySet() {
+    return entitySet;
+  }
+
+  @Override
+  public void setEntitySet(final String entitySet) {
+    this.entitySet = entitySet;
+  }
+
+  @Override
+  public boolean isIncludeInServiceDocument() {
+    return includeInServiceDocument;
+  }
+
+  public void setIncludeInServiceDocument(final boolean includeInServiceDocument) {
+    this.includeInServiceDocument = includeInServiceDocument;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java
new file mode 100644
index 0000000..03cd3e6
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java
@@ -0,0 +1,65 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.IncludeAnnotations;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class IncludeAnnotationsImpl extends AbstractEdmItem implements IncludeAnnotations {
+
+  private static final long serialVersionUID = -8157841387011422396L;
+
+  @JsonProperty(value = "TermNamespace", required = true)
+  private String termNamespace;
+
+  @JsonProperty(value = "Qualifier")
+  private String qualifier;
+
+  @JsonProperty(value = "TargetNamespace")
+  private String targetNamespace;
+
+  @Override
+  public String getTermNamespace() {
+    return termNamespace;
+  }
+
+  public void setTermNamespace(final String termNamespace) {
+    this.termNamespace = termNamespace;
+  }
+
+  @Override
+  public String getQualifier() {
+    return qualifier;
+  }
+
+  public void setQualifier(final String qualifier) {
+    this.qualifier = qualifier;
+  }
+
+  @Override
+  public String getTargetNamespace() {
+    return targetNamespace;
+  }
+
+  public void setTargeyNamespace(final String targeyNamespace) {
+    this.targetNamespace = targeyNamespace;
+  }
+
+}


[03/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java
deleted file mode 100644
index 7a2a0cd..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermDeserializer.java
+++ /dev/null
@@ -1,80 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-import java.util.Arrays;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class TermDeserializer extends AbstractEdmDeserializer<TermImpl> {
-
-  @Override
-  protected TermImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final TermImpl term = new TermImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          term.setName(jp.nextTextValue());
-        } else if ("Type".equals(jp.getCurrentName())) {
-          term.setType(jp.nextTextValue());
-        } else if ("BaseTerm".equals(jp.getCurrentName())) {
-          term.setBaseTerm(jp.nextTextValue());
-        } else if ("DefaultValue".equals(jp.getCurrentName())) {
-          term.setDefaultValue(jp.nextTextValue());
-        } else if ("Nullable".equals(jp.getCurrentName())) {
-          term.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("MaxLength".equals(jp.getCurrentName())) {
-          final String maxLenght = jp.nextTextValue();
-          term.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
-        } else if ("Precision".equals(jp.getCurrentName())) {
-          term.setPrecision(Integer.valueOf(jp.nextTextValue()));
-        } else if ("Scale".equals(jp.getCurrentName())) {
-          final String scale = jp.nextTextValue();
-          term.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
-        } else if ("SRID".equals(jp.getCurrentName())) {
-          final String srid = jp.nextTextValue();
-          if (srid != null) {
-            term.setSrid(SRID.valueOf(srid));
-          }
-        } else if ("AppliesTo".equals(jp.getCurrentName())) {
-          term.getAppliesTo().addAll(Arrays.asList(StringUtils.split(jp.nextTextValue())));
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          term.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return term;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermImpl.java
deleted file mode 100644
index 9aa0bf6..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TermImpl.java
+++ /dev/null
@@ -1,140 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Term;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = TermDeserializer.class)
-public class TermImpl extends AbstractAnnotatable implements Term {
-
-  private static final long serialVersionUID = -8350072064720586186L;
-
-  private String name;
-
-  private String type;
-
-  private String baseTerm;
-
-  private String defaultValue;
-
-  private boolean nullable = true;
-
-  private Integer maxLength;
-
-  private Integer precision;
-
-  private Integer scale;
-
-  private SRID srid;
-
-  private final List<String> appliesTo = new ArrayList<String>();
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public String getType() {
-    return type;
-  }
-
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  @Override
-  public String getBaseTerm() {
-    return baseTerm;
-  }
-
-  public void setBaseTerm(final String baseTerm) {
-    this.baseTerm = baseTerm;
-  }
-
-  @Override
-  public String getDefaultValue() {
-    return defaultValue;
-  }
-
-  public void setDefaultValue(final String defaultValue) {
-    this.defaultValue = defaultValue;
-  }
-
-  @Override
-  public boolean isNullable() {
-    return nullable;
-  }
-
-  public void setNullable(final boolean nullable) {
-    this.nullable = nullable;
-  }
-
-  @Override
-  public Integer getMaxLength() {
-    return maxLength;
-  }
-
-  public void setMaxLength(final Integer maxLength) {
-    this.maxLength = maxLength;
-  }
-
-  @Override
-  public Integer getPrecision() {
-    return precision;
-  }
-
-  public void setPrecision(final Integer precision) {
-    this.precision = precision;
-  }
-
-  @Override
-  public Integer getScale() {
-    return scale;
-  }
-
-  public void setScale(final Integer scale) {
-    this.scale = scale;
-  }
-
-  @Override
-  public SRID getSrid() {
-    return srid;
-  }
-
-  public void setSrid(final SRID srid) {
-    this.srid = srid;
-  }
-
-  @Override
-  public List<String> getAppliesTo() {
-    return appliesTo;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java
deleted file mode 100644
index 381ce01..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionDeserializer.java
+++ /dev/null
@@ -1,71 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class TypeDefinitionDeserializer extends AbstractEdmDeserializer<TypeDefinitionImpl> {
-
-  @Override
-  protected TypeDefinitionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final TypeDefinitionImpl typeDefinition = new TypeDefinitionImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          typeDefinition.setName(jp.nextTextValue());
-        } else if ("UnderlyingType".equals(jp.getCurrentName())) {
-          typeDefinition.setUnderlyingType(jp.nextTextValue());
-        } else if ("MaxLength".equals(jp.getCurrentName())) {
-          typeDefinition.setMaxLength(jp.nextIntValue(0));
-        } else if ("Unicode".equals(jp.getCurrentName())) {
-          typeDefinition.setUnicode(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("Precision".equals(jp.getCurrentName())) {
-          typeDefinition.setPrecision(jp.nextIntValue(0));
-        } else if ("Scale".equals(jp.getCurrentName())) {
-          final String scale = jp.nextTextValue();
-          typeDefinition.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
-        } else if ("SRID".equals(jp.getCurrentName())) {
-          final String srid = jp.nextTextValue();
-          if (srid != null) {
-            typeDefinition.setSrid(SRID.valueOf(srid));
-          }
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          typeDefinition.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return typeDefinition;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionImpl.java
deleted file mode 100644
index c7e6653..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/TypeDefinitionImpl.java
+++ /dev/null
@@ -1,120 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.TypeDefinition;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = TypeDefinitionDeserializer.class)
-public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinition {
-
-  private static final long serialVersionUID = -902407149079419602L;
-
-  private String name;
-
-  private String underlyingType;
-
-  private Integer maxLength;
-
-  private Integer precision;
-
-  private Integer scale;
-
-  private boolean unicode = true;
-
-  private SRID srid;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public String getUnderlyingType() {
-    return underlyingType;
-  }
-
-  public void setUnderlyingType(final String underlyingType) {
-    this.underlyingType = underlyingType;
-  }
-
-  @Override
-  public Integer getMaxLength() {
-    return maxLength;
-  }
-
-  public void setMaxLength(final Integer maxLength) {
-    this.maxLength = maxLength;
-  }
-
-  @Override
-  public Integer getPrecision() {
-    return precision;
-  }
-
-  public void setPrecision(final Integer precision) {
-    this.precision = precision;
-  }
-
-  @Override
-  public Integer getScale() {
-    return scale;
-  }
-
-  public void setScale(final Integer scale) {
-    this.scale = scale;
-  }
-
-  @Override
-  public boolean isUnicode() {
-    return unicode;
-  }
-
-  public void setUnicode(final boolean unicode) {
-    this.unicode = unicode;
-  }
-
-  @Override
-  public SRID getSrid() {
-    return srid;
-  }
-
-  public void setSrid(final SRID srid) {
-    this.srid = srid;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/XMLMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/XMLMetadataImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/XMLMetadataImpl.java
deleted file mode 100644
index c6a1587..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/XMLMetadataImpl.java
+++ /dev/null
@@ -1,57 +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.client.core.edm.xml.v4;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Edmx;
-import org.apache.olingo.client.api.edm.xml.v4.Reference;
-import org.apache.olingo.client.api.edm.xml.v4.Schema;
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-import org.apache.olingo.client.core.edm.xml.AbstractXMLMetadata;
-
-public class XMLMetadataImpl extends AbstractXMLMetadata implements XMLMetadata {
-
-  private static final long serialVersionUID = 6025723060298454901L;
-
-  public XMLMetadataImpl(final EdmxImpl edmx) {
-    super(edmx);
-  }
-
-  @Override
-  @SuppressWarnings("unchecked")
-  public List<Schema> getSchemas() {
-    return (List<Schema>) super.getSchemas();
-  }
-
-  @Override
-  public Schema getSchema(final int index) {
-    return (Schema) super.getSchema(index);
-  }
-
-  @Override
-  public Schema getSchema(final String key) {
-    return (Schema) super.getSchema(key);
-  }
-
-  @Override
-  public List<Reference> getReferences() {
-    return ((Edmx) this.edmx).getReferences();
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotatableDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotatableDynamicAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotatableDynamicAnnotationExpression.java
deleted file mode 100644
index 19dfb37..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotatableDynamicAnnotationExpression.java
+++ /dev/null
@@ -1,38 +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.client.core.edm.xml.v4.annotation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-
-abstract class AbstractAnnotatableDynamicAnnotationExpression
-        extends AbstractDynamicAnnotationExpression implements Annotatable {
-
-  private static final long serialVersionUID = -450668773857358139L;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotationExpression.java
deleted file mode 100644
index 629212b..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractAnnotationExpression.java
+++ /dev/null
@@ -1,49 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.ConstantAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-
-public abstract class AbstractAnnotationExpression extends AbstractEdmItem implements AnnotationExpression {
-
-  private static final long serialVersionUID = -4238652997159205377L;
-
-  @Override
-  public boolean isConstant() {
-    return this instanceof ConstantAnnotationExpression;
-  }
-
-  @Override
-  public ConstantAnnotationExpression asConstant() {
-    return isConstant() ? (ConstantAnnotationExpression) this : null;
-  }
-
-  @Override
-  public boolean isDynamic() {
-    return this instanceof DynamicAnnotationExpression;
-  }
-
-  @Override
-  public DynamicAnnotationExpression asDynamic() {
-    return isDynamic() ? (DynamicAnnotationExpression) this : null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractDynamicAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractDynamicAnnotationExpression.java
deleted file mode 100644
index bdba869..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractDynamicAnnotationExpression.java
+++ /dev/null
@@ -1,218 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationPath;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Apply;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Cast;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Collection;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.If;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.IsOf;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.LabeledElement;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.LabeledElementReference;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.NavigationPropertyPath;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Not;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Null;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Path;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyPath;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyValue;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Record;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.TwoParamsOpDynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.UrlRef;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = DynamicAnnotationExpressionDeserializer.class)
-public abstract class AbstractDynamicAnnotationExpression
-        extends AbstractAnnotationExpression implements DynamicAnnotationExpression {
-
-  private static final long serialVersionUID = 1093411847477874348L;
-
-  @Override
-  public boolean isNot() {
-    return this instanceof Not;
-  }
-
-  @Override
-  public Not asNot() {
-    return isNot() ? (Not) this : null;
-
-  }
-
-  @Override
-  public boolean isTwoParamsOp() {
-    return this instanceof TwoParamsOpDynamicAnnotationExpression;
-  }
-
-  @Override
-  public TwoParamsOpDynamicAnnotationExpression asTwoParamsOp() {
-    return isTwoParamsOp() ? (TwoParamsOpDynamicAnnotationExpression) this : null;
-  }
-
-  @Override
-  public boolean isAnnotationPath() {
-    return this instanceof AnnotationPath;
-  }
-
-  @Override
-  public AnnotationPath asAnnotationPath() {
-    return isAnnotationPath() ? (AnnotationPath) this : null;
-  }
-
-  @Override
-  public boolean isApply() {
-    return this instanceof Apply;
-  }
-
-  @Override
-  public Apply asApply() {
-    return isApply() ? (Apply) this : null;
-  }
-
-  @Override
-  public boolean isCast() {
-    return this instanceof Cast;
-  }
-
-  @Override
-  public Cast asCast() {
-    return isCast() ? (Cast) this : null;
-  }
-
-  @Override
-  public boolean isCollection() {
-    return this instanceof Collection;
-  }
-
-  @Override
-  public Collection asCollection() {
-    return isCollection() ? (Collection) this : null;
-  }
-
-  @Override
-  public boolean isIf() {
-    return this instanceof If;
-  }
-
-  @Override
-  public If asIf() {
-    return isIf() ? (If) this : null;
-  }
-
-  @Override
-  public boolean isIsOf() {
-    return this instanceof IsOf;
-  }
-
-  @Override
-  public IsOf asIsOf() {
-    return isIsOf() ? (IsOf) this : null;
-  }
-
-  @Override
-  public boolean isLabeledElement() {
-    return this instanceof LabeledElement;
-  }
-
-  @Override
-  public LabeledElement asLabeledElement() {
-    return isLabeledElement() ? (LabeledElement) this : null;
-  }
-
-  @Override
-  public boolean isLabeledElementReference() {
-    return this instanceof LabeledElementReference;
-  }
-
-  @Override
-  public LabeledElementReference asLabeledElementReference() {
-    return isLabeledElementReference() ? (LabeledElementReference) this : null;
-  }
-
-  @Override
-  public boolean isNull() {
-    return this instanceof Null;
-  }
-
-  @Override
-  public Null asNull() {
-    return isNull() ? (Null) this : null;
-  }
-
-  @Override
-  public boolean isNavigationPropertyPath() {
-    return this instanceof NavigationPropertyPath;
-  }
-
-  @Override
-  public NavigationPropertyPath asNavigationPropertyPath() {
-    return isNavigationPropertyPath() ? (NavigationPropertyPath) this : null;
-  }
-
-  @Override
-  public boolean isPath() {
-    return this instanceof Path;
-  }
-
-  @Override
-  public Path asPath() {
-    return isPath() ? (Path) this : null;
-  }
-
-  @Override
-  public boolean isPropertyPath() {
-    return this instanceof PropertyPath;
-  }
-
-  @Override
-  public PropertyPath asPropertyPath() {
-    return isPropertyPath() ? (PropertyPath) this : null;
-  }
-
-  @Override
-  public boolean isPropertyValue() {
-    return this instanceof PropertyValue;
-  }
-
-  @Override
-  public PropertyValue asPropertyValue() {
-    return isPropertyValue() ? (PropertyValue) this : null;
-  }
-
-  @Override
-  public boolean isRecord() {
-    return this instanceof Record;
-  }
-
-  @Override
-  public Record asRecord() {
-    return isRecord() ? (Record) this : null;
-  }
-
-  @Override
-  public boolean isUrlRef() {
-    return this instanceof UrlRef;
-  }
-
-  @Override
-  public UrlRef asUrlRef() {
-    return isUrlRef() ? (UrlRef) this : null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractElementOrAttributeExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractElementOrAttributeExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractElementOrAttributeExpression.java
deleted file mode 100644
index 872cf4e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AbstractElementOrAttributeExpression.java
+++ /dev/null
@@ -1,37 +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.client.core.edm.xml.v4.annotation;
-
-/**
- * Groups dynamic expressions that may be provided using element notation or attribute notation.
- */
-abstract class AbstractElementOrAttributeExpression extends AbstractDynamicAnnotationExpression {
-
-  private static final long serialVersionUID = 1588336268773032932L;
-
-  private String value;
-
-  public String getValue() {
-    return value;
-  }
-
-  public void setValue(final String value) {
-    this.value = value;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AnnotationPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AnnotationPathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AnnotationPathImpl.java
deleted file mode 100644
index 423d387..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/AnnotationPathImpl.java
+++ /dev/null
@@ -1,27 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationPath;
-
-public class AnnotationPathImpl extends AbstractElementOrAttributeExpression implements AnnotationPath {
-
-  private static final long serialVersionUID = 5360735207353494466L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java
deleted file mode 100644
index 8247110..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyDeserializer.java
+++ /dev/null
@@ -1,57 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class ApplyDeserializer extends AbstractEdmDeserializer<ApplyImpl> {
-
-  @Override
-  protected ApplyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final ApplyImpl apply = new ApplyImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Function".equals(jp.getCurrentName())) {
-          apply.setFunction(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          apply.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        } else if (isAnnotationConstExprConstruct(jp)) {
-          apply.getParameters().add(parseAnnotationConstExprConstruct(jp));
-        } else {
-          apply.getParameters().add(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return apply;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyImpl.java
deleted file mode 100644
index 4b6f31c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ApplyImpl.java
+++ /dev/null
@@ -1,52 +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.client.core.edm.xml.v4.annotation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Apply;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = ApplyDeserializer.class)
-public class ApplyImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Apply {
-
-  private static final long serialVersionUID = 4358398303405059879L;
-
-  private String function;
-
-  private final List<AnnotationExpression> parameters = new ArrayList<AnnotationExpression>();
-
-  @Override
-  public String getFunction() {
-    return function;
-  }
-
-  public void setFunction(final String function) {
-    this.function = function;
-  }
-
-  @Override
-  public List<AnnotationExpression> getParameters() {
-    return parameters;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java
deleted file mode 100644
index 75ae989..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastDeserializer.java
+++ /dev/null
@@ -1,69 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class CastDeserializer extends AbstractEdmDeserializer<CastImpl> {
-
-  @Override
-  protected CastImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final CastImpl cast = new CastImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Type".equals(jp.getCurrentName())) {
-          cast.setType(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          cast.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        } else if ("MaxLength".equals(jp.getCurrentName())) {
-          final String maxLenght = jp.nextTextValue();
-          cast.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
-        } else if ("Precision".equals(jp.getCurrentName())) {
-          cast.setPrecision(Integer.valueOf(jp.nextTextValue()));
-        } else if ("Scale".equals(jp.getCurrentName())) {
-          final String scale = jp.nextTextValue();
-          cast.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
-        } else if ("SRID".equals(jp.getCurrentName())) {
-          final String srid = jp.nextTextValue();
-          if (srid != null) {
-            cast.setSrid(SRID.valueOf(srid));
-          }
-        } else {
-          cast.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return cast;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastImpl.java
deleted file mode 100644
index 4db619f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CastImpl.java
+++ /dev/null
@@ -1,98 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Cast;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = CastDeserializer.class)
-public class CastImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Cast {
-
-  private static final long serialVersionUID = 3312415984116005313L;
-
-  private String type;
-
-  private Integer maxLength;
-
-  private Integer precision;
-
-  private Integer scale;
-
-  private SRID srid;
-
-  private DynamicAnnotationExpression value;
-
-  @Override
-  public String getType() {
-    return type;
-  }
-
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  @Override
-  public Integer getMaxLength() {
-    return maxLength;
-  }
-
-  public void setMaxLength(final Integer maxLength) {
-    this.maxLength = maxLength;
-  }
-
-  @Override
-  public Integer getPrecision() {
-    return precision;
-  }
-
-  public void setPrecision(final Integer precision) {
-    this.precision = precision;
-  }
-
-  @Override
-  public Integer getScale() {
-    return scale;
-  }
-
-  public void setScale(final Integer scale) {
-    this.scale = scale;
-  }
-
-  @Override
-  public SRID getSrid() {
-    return srid;
-  }
-
-  public void setSrid(final SRID srid) {
-    this.srid = srid;
-  }
-
-  @Override
-  public DynamicAnnotationExpression getValue() {
-    return value;
-  }
-
-  public void setValue(final DynamicAnnotationExpression value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java
deleted file mode 100644
index a606987..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionDeserializer.java
+++ /dev/null
@@ -1,52 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class CollectionDeserializer extends AbstractEdmDeserializer<CollectionImpl> {
-
-  @Override
-  protected CollectionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final CollectionImpl collection = new CollectionImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if (isAnnotationConstExprConstruct(jp)) {
-          collection.getItems().add(parseAnnotationConstExprConstruct(jp));
-        } else {
-          collection.getItems().add(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return collection;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionImpl.java
deleted file mode 100644
index b8f7614..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/CollectionImpl.java
+++ /dev/null
@@ -1,41 +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.client.core.edm.xml.v4.annotation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Collection;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = CollectionDeserializer.class)
-public class CollectionImpl extends AbstractDynamicAnnotationExpression implements Collection {
-
-  private static final long serialVersionUID = -724749123749715643L;
-
-  private final List<AnnotationExpression> items = new ArrayList<AnnotationExpression>();
-
-  @Override
-  public List<AnnotationExpression> getItems() {
-    return items;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ConstantAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ConstantAnnotationExpressionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ConstantAnnotationExpressionImpl.java
deleted file mode 100644
index d210899..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ConstantAnnotationExpressionImpl.java
+++ /dev/null
@@ -1,52 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.ConstantAnnotationExpression;
-
-public class ConstantAnnotationExpressionImpl
-        extends AbstractAnnotationExpression implements ConstantAnnotationExpression {
-
-  private static final long serialVersionUID = 5618680702707972904L;
-
-  private Type type;
-
-  private String value;
-
-  @Override
-  public Type getType() {
-    return type;
-  }
-
-  @Override
-  public void setType(final Type type) {
-    this.type = type;
-  }
-
-  @Override
-  public String getValue() {
-    return value;
-  }
-
-  @Override
-  public void setValue(final String value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynamicAnnotationExpressionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynamicAnnotationExpressionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynamicAnnotationExpressionDeserializer.java
deleted file mode 100644
index a03b98d..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynamicAnnotationExpressionDeserializer.java
+++ /dev/null
@@ -1,175 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.ClassUtils;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationPath;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Apply;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Cast;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Collection;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.If;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.IsOf;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.LabeledElement;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.NavigationPropertyPath;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Null;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Path;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyPath;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Record;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.TwoParamsOpDynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.UrlRef;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonLocation;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class DynamicAnnotationExpressionDeserializer
-        extends AbstractEdmDeserializer<AbstractDynamicAnnotationExpression> {
-
-  private static final String[] EL_OR_ATTR = {
-    AnnotationPath.class.getSimpleName(), NavigationPropertyPath.class.getSimpleName(),
-    Path.class.getSimpleName(), PropertyPath.class.getSimpleName()
-  };
-
-  private static final String APPLY = Apply.class.getSimpleName();
-
-  private static final String CAST = Cast.class.getSimpleName();
-
-  private static final String COLLECTION = Collection.class.getSimpleName();
-
-  private static final String IF = If.class.getSimpleName();
-
-  private static final String IS_OF = IsOf.class.getSimpleName();
-
-  private static final String LABELED_ELEMENT = LabeledElement.class.getSimpleName();
-
-  private static final String NULL = Null.class.getSimpleName();
-
-  private static final String RECORD = Record.class.getSimpleName();
-
-  private static final String URL_REF = UrlRef.class.getSimpleName();
-
-  private AbstractElementOrAttributeExpression getElementOrAttributeExpressio(final String simpleClassName)
-          throws JsonParseException {
-
-    try {
-      @SuppressWarnings("unchecked")
-      Class<? extends AbstractElementOrAttributeExpression> elOrAttrClass =
-              (Class<? extends AbstractElementOrAttributeExpression>) ClassUtils.getClass(
-                      getClass().getPackage().getName() + "." + simpleClassName + "Impl");
-      return elOrAttrClass.newInstance();
-    } catch (Exception e) {
-      throw new JsonParseException("Could not instantiate " + simpleClassName, JsonLocation.NA, e);
-    }
-  }
-
-  private AbstractAnnotationExpression parseConstOrEnumExpression(final JsonParser jp) throws IOException {
-    AbstractAnnotationExpression result;
-    if (isAnnotationConstExprConstruct(jp)) {
-      result = parseAnnotationConstExprConstruct(jp);
-    } else {
-      result = jp.readValueAs(AbstractDynamicAnnotationExpression.class);
-    }
-    jp.nextToken();
-
-    return result;
-  }
-
-  @Override
-  protected AbstractDynamicAnnotationExpression doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    AbstractDynamicAnnotationExpression expression = null;
-
-    if ("Not".equals(jp.getCurrentName())) {
-      final NotImpl not = new NotImpl();
-
-      jp.nextToken();
-      for (; jp.getCurrentToken() != JsonToken.FIELD_NAME; jp.nextToken()) {
-      }
-      not.setExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-      for (; jp.getCurrentToken() != JsonToken.END_OBJECT || !jp.getCurrentName().equals("Not"); jp.nextToken()) {
-      }
-
-      expression = not;
-    } else if (TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()) != null) {
-      final TwoParamsOpDynamicAnnotationExpressionImpl dynExprDoubleParamOp =
-              new TwoParamsOpDynamicAnnotationExpressionImpl();
-      dynExprDoubleParamOp.setType(TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()));
-
-      jp.nextToken();
-      for (; jp.getCurrentToken() != JsonToken.FIELD_NAME; jp.nextToken()) {
-      }
-      dynExprDoubleParamOp.setLeftExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-      dynExprDoubleParamOp.setRightExpression(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-      for (; jp.getCurrentToken() != JsonToken.END_OBJECT
-              || !jp.getCurrentName().equals(dynExprDoubleParamOp.getType().name()); jp.nextToken()) {
-      }
-
-      expression = dynExprDoubleParamOp;
-    } else if (ArrayUtils.contains(EL_OR_ATTR, jp.getCurrentName())) {
-      final AbstractElementOrAttributeExpression elOrAttr = getElementOrAttributeExpressio(jp.getCurrentName());
-      elOrAttr.setValue(jp.nextTextValue());
-
-      expression = elOrAttr;
-    } else if (APPLY.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(ApplyImpl.class);
-    } else if (CAST.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(CastImpl.class);
-    } else if (COLLECTION.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(CollectionImpl.class);
-    } else if (IF.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      jp.nextToken();
-
-      final IfImpl _if = new IfImpl();
-      _if.setGuard(parseConstOrEnumExpression(jp));
-      _if.setThen(parseConstOrEnumExpression(jp));
-      _if.setElse(parseConstOrEnumExpression(jp));
-
-      expression = _if;
-    } else if (IS_OF.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(IsOfImpl.class);
-    } else if (LABELED_ELEMENT.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(LabeledElementImpl.class);
-    } else if (NULL.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(NullImpl.class);
-    } else if (RECORD.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(RecordImpl.class);
-    } else if (URL_REF.equals(jp.getCurrentName())) {
-      jp.nextToken();
-      expression = jp.readValueAs(UrlRefImpl.class);
-    }
-
-    return expression;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IfImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IfImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IfImpl.java
deleted file mode 100644
index 1092280..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IfImpl.java
+++ /dev/null
@@ -1,61 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.If;
-
-public class IfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements If {
-
-  private static final long serialVersionUID = -8571383625077590656L;
-
-  private AnnotationExpression guard;
-
-  private AnnotationExpression _then;
-
-  private AnnotationExpression _else;
-
-  @Override
-  public AnnotationExpression getGuard() {
-    return guard;
-  }
-
-  public void setGuard(final AnnotationExpression guard) {
-    this.guard = guard;
-  }
-
-  @Override
-  public AnnotationExpression getThen() {
-    return _then;
-  }
-
-  public void setThen(final AnnotationExpression _then) {
-    this._then = _then;
-  }
-
-  @Override
-  public AnnotationExpression getElse() {
-    return _else;
-  }
-
-  public void setElse(final AnnotationExpression _else) {
-    this._else = _else;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java
deleted file mode 100644
index 8af18b3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfDeserializer.java
+++ /dev/null
@@ -1,69 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class IsOfDeserializer extends AbstractEdmDeserializer<IsOfImpl> {
-
-  @Override
-  protected IsOfImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final IsOfImpl isof = new IsOfImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Type".equals(jp.getCurrentName())) {
-          isof.setType(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          isof.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        } else if ("MaxLength".equals(jp.getCurrentName())) {
-          final String maxLenght = jp.nextTextValue();
-          isof.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
-        } else if ("Precision".equals(jp.getCurrentName())) {
-          isof.setPrecision(Integer.valueOf(jp.nextTextValue()));
-        } else if ("Scale".equals(jp.getCurrentName())) {
-          final String scale = jp.nextTextValue();
-          isof.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
-        } else if ("SRID".equals(jp.getCurrentName())) {
-          final String srid = jp.nextTextValue();
-          if (srid != null) {
-            isof.setSrid(SRID.valueOf(srid));
-          }
-        } else {
-          isof.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return isof;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfImpl.java
deleted file mode 100644
index d3a2b09..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOfImpl.java
+++ /dev/null
@@ -1,98 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.IsOf;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = IsOfDeserializer.class)
-public class IsOfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements IsOf {
-
-  private static final long serialVersionUID = -893355856129761174L;
-
-  private String type;
-
-  private Integer maxLength;
-
-  private Integer precision;
-
-  private Integer scale;
-
-  private SRID srid;
-
-  private DynamicAnnotationExpression value;
-
-  @Override
-  public String getType() {
-    return type;
-  }
-
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  @Override
-  public Integer getMaxLength() {
-    return maxLength;
-  }
-
-  public void setMaxLength(final Integer maxLength) {
-    this.maxLength = maxLength;
-  }
-
-  @Override
-  public Integer getPrecision() {
-    return precision;
-  }
-
-  public void setPrecision(final Integer precision) {
-    this.precision = precision;
-  }
-
-  @Override
-  public Integer getScale() {
-    return scale;
-  }
-
-  public void setScale(final Integer scale) {
-    this.scale = scale;
-  }
-
-  @Override
-  public SRID getSrid() {
-    return srid;
-  }
-
-  public void setSrid(final SRID srid) {
-    this.srid = srid;
-  }
-
-  @Override
-  public DynamicAnnotationExpression getValue() {
-    return value;
-  }
-
-  public void setValue(final DynamicAnnotationExpression value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java
deleted file mode 100644
index 97d128f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementDeserializer.java
+++ /dev/null
@@ -1,55 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class LabeledElementDeserializer extends AbstractEdmDeserializer<LabeledElementImpl> {
-
-  @Override
-  protected LabeledElementImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final LabeledElementImpl element = new LabeledElementImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          element.setName(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          element.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        } else {
-          element.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
-        }
-      }
-    }
-
-    return element;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementImpl.java
deleted file mode 100644
index 2e6096c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementImpl.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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.LabeledElement;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = LabeledElementDeserializer.class)
-public class LabeledElementImpl
-        extends AbstractAnnotatableDynamicAnnotationExpression implements LabeledElement {
-
-  private static final long serialVersionUID = 4909387630253341824L;
-
-  private String name;
-
-  private DynamicAnnotationExpression value;
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public DynamicAnnotationExpression getValue() {
-    return value;
-  }
-
-  public void setValue(final DynamicAnnotationExpression value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementReferenceImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementReferenceImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementReferenceImpl.java
deleted file mode 100644
index 0f0d24d..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementReferenceImpl.java
+++ /dev/null
@@ -1,28 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.LabeledElementReference;
-
-public class LabeledElementReferenceImpl
-        extends AbstractElementOrAttributeExpression implements LabeledElementReference {
-
-  private static final long serialVersionUID = 7560525604021670529L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NavigationPropertyPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NavigationPropertyPathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NavigationPropertyPathImpl.java
deleted file mode 100644
index 3cedc6b..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NavigationPropertyPathImpl.java
+++ /dev/null
@@ -1,27 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.NavigationPropertyPath;
-
-public class NavigationPropertyPathImpl extends AbstractElementOrAttributeExpression implements NavigationPropertyPath {
-
-  private static final long serialVersionUID = 879840502446301312L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NotImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NotImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NotImpl.java
deleted file mode 100644
index f6a230b..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NotImpl.java
+++ /dev/null
@@ -1,39 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Not;
-
-public class NotImpl extends AbstractDynamicAnnotationExpression implements Not {
-
-  private static final long serialVersionUID = -437788415922966812L;
-
-  private DynamicAnnotationExpression expression;
-
-  @Override
-  public DynamicAnnotationExpression getExpression() {
-    return expression;
-  }
-
-  public void setExpression(final DynamicAnnotationExpression expression) {
-    this.expression = expression;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java
deleted file mode 100644
index 66d46a6..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullDeserializer.java
+++ /dev/null
@@ -1,51 +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.client.core.edm.xml.v4.annotation;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class NullDeserializer extends AbstractEdmDeserializer<NullImpl> {
-
-  @Override
-  protected NullImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final NullImpl _null = new NullImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Annotation".equals(jp.getCurrentName())) {
-          _null.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return _null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullImpl.java
deleted file mode 100644
index 3d3bfb0..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NullImpl.java
+++ /dev/null
@@ -1,30 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Null;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = NullDeserializer.class)
-public class NullImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Null {
-
-  private static final long serialVersionUID = -3148516847180393142L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PathImpl.java
deleted file mode 100644
index fb01a25..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PathImpl.java
+++ /dev/null
@@ -1,27 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Path;
-
-public class PathImpl extends AbstractElementOrAttributeExpression implements Path {
-
-  private static final long serialVersionUID = 6020168217561402545L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyPathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyPathImpl.java
deleted file mode 100644
index ef6619f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyPathImpl.java
+++ /dev/null
@@ -1,27 +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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyPath;
-
-public class PropertyPathImpl extends AbstractElementOrAttributeExpression implements PropertyPath {
-
-  private static final long serialVersionUID = -9133862135834738470L;
-
-}


[11/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Edmx.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Edmx.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Edmx.java
deleted file mode 100644
index aa3eb5c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Edmx.java
+++ /dev/null
@@ -1,26 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-public interface Edmx extends org.apache.olingo.client.api.edm.xml.Edmx {
-
-  List<Reference> getReferences();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityContainer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityContainer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityContainer.java
deleted file mode 100644
index 02c51b1..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityContainer.java
+++ /dev/null
@@ -1,49 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-public interface EntityContainer extends org.apache.olingo.client.api.edm.xml.EntityContainer, Annotatable {
-
-  @Override
-  EntitySet getEntitySet(String name);
-
-  @Override
-  List<EntitySet> getEntitySets();
-
-  List<Singleton> getSingletons();
-
-  Singleton getSingleton(String name);
-
-  ActionImport getActionImport(String name);
-
-  List<ActionImport> getActionImports(String name);
-
-  List<ActionImport> getActionImports();
-
-  @Override
-  FunctionImport getFunctionImport(String name);
-
-  @Override
-  List<FunctionImport> getFunctionImports(String name);
-
-  @Override
-  List<FunctionImport> getFunctionImports();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntitySet.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntitySet.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntitySet.java
deleted file mode 100644
index c72c277..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntitySet.java
+++ /dev/null
@@ -1,24 +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.client.api.edm.xml.v4;
-
-public interface EntitySet extends org.apache.olingo.client.api.edm.xml.EntitySet, BindingTarget {
-
-  boolean isIncludeInServiceDocument();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityType.java
deleted file mode 100644
index 132c82b..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/EntityType.java
+++ /dev/null
@@ -1,23 +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.client.api.edm.xml.v4;
-
-public interface EntityType extends org.apache.olingo.client.api.edm.xml.EntityType, ComplexType {
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Function.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Function.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Function.java
deleted file mode 100644
index e097c6b..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Function.java
+++ /dev/null
@@ -1,24 +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.client.api.edm.xml.v4;
-
-public interface Function extends Action {
-
-  boolean isComposable();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/FunctionImport.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/FunctionImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/FunctionImport.java
deleted file mode 100644
index fa1b8dc..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/FunctionImport.java
+++ /dev/null
@@ -1,28 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
-
-public interface FunctionImport extends OperationImport, CommonFunctionImport {
-
-  String getFunction();
-
-  boolean isIncludeInServiceDocument();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Include.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Include.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Include.java
deleted file mode 100644
index 96708e4..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Include.java
+++ /dev/null
@@ -1,26 +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.client.api.edm.xml.v4;
-
-public interface Include {
-
-  String getAlias();
-
-  String getNamespace();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/IncludeAnnotations.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/IncludeAnnotations.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/IncludeAnnotations.java
deleted file mode 100644
index 2b822a4..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/IncludeAnnotations.java
+++ /dev/null
@@ -1,28 +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.client.api.edm.xml.v4;
-
-public interface IncludeAnnotations {
-
-  String getQualifier();
-
-  String getTargetNamespace();
-
-  String getTermNamespace();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationProperty.java
deleted file mode 100644
index ec2145d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationProperty.java
+++ /dev/null
@@ -1,38 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.CommonNavigationProperty;
-import org.apache.olingo.client.api.edm.xml.OnDelete;
-
-public interface NavigationProperty extends CommonNavigationProperty, Annotatable {
-
-  String getType();
-
-  boolean isNullable();
-
-  String getPartner();
-
-  List<ReferentialConstraint> getReferentialConstraints();
-
-  OnDelete getOnDelete();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationPropertyBinding.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationPropertyBinding.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationPropertyBinding.java
deleted file mode 100644
index 35d76f8..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/NavigationPropertyBinding.java
+++ /dev/null
@@ -1,27 +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.client.api.edm.xml.v4;
-
-public interface NavigationPropertyBinding {
-
-  String getPath();
-
-  String getTarget();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/OperationImport.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/OperationImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/OperationImport.java
deleted file mode 100644
index a86d5cc..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/OperationImport.java
+++ /dev/null
@@ -1,28 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.Named;
-
-public interface OperationImport extends Named, Annotatable {
-
-  String getEntitySet();
-
-  void setEntitySet(String entitySet);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Parameter.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Parameter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Parameter.java
deleted file mode 100644
index 127fa7c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Parameter.java
+++ /dev/null
@@ -1,27 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.CommonParameter;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-public interface Parameter extends CommonParameter, Annotatable {
-
-  SRID getSrid();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Property.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Property.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Property.java
deleted file mode 100644
index 74400cd..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Property.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.CommonProperty;
-
-public interface Property extends CommonProperty, Annotatable {
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Reference.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Reference.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Reference.java
deleted file mode 100644
index d8e2add..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Reference.java
+++ /dev/null
@@ -1,31 +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.client.api.edm.xml.v4;
-
-import java.net.URI;
-import java.util.List;
-
-public interface Reference extends Annotatable {
-
-  URI getUri();
-
-  List<Include> getIncludes();
-
-  List<IncludeAnnotations> getIncludeAnnotations();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReferentialConstraint.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReferentialConstraint.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReferentialConstraint.java
deleted file mode 100644
index 5e29932..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReferentialConstraint.java
+++ /dev/null
@@ -1,27 +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.client.api.edm.xml.v4;
-
-public interface ReferentialConstraint extends Annotatable {
-
-  String getProperty();
-
-  String getReferencedProperty();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReturnType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReturnType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReturnType.java
deleted file mode 100644
index 50ffc75..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ReturnType.java
+++ /dev/null
@@ -1,36 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-public interface ReturnType {
-
-  Integer getMaxLength();
-
-  Integer getPrecision();
-
-  Integer getScale();
-
-  SRID getSrid();
-
-  String getType();
-
-  boolean isNullable();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Schema.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Schema.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Schema.java
deleted file mode 100644
index 1d90635..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Schema.java
+++ /dev/null
@@ -1,69 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-import java.util.Map;
-
-public interface Schema extends org.apache.olingo.client.api.edm.xml.Schema, Annotatable {
-
-  @Override
-  List<EntityContainer> getEntityContainers();
-
-  EntityContainer getEntityContainer();
-
-  @Override
-  ComplexType getComplexType(String name);
-
-  @Override
-  List<ComplexType> getComplexTypes();
-
-  @Override
-  EntityType getEntityType(String name);
-
-  @Override
-  List<EntityType> getEntityTypes();
-
-  List<Action> getActions();
-
-  List<Action> getActions(String name);
-
-  Annotation getAnnotation(String term);
-
-  Map<String, Annotatable> getAnnotatables();
-
-  List<Function> getFunctions();
-
-  List<Function> getFunctions(String name);
-
-  Term getTerm(String name);
-
-  List<Term> getTerms();
-
-  TypeDefinition getTypeDefinition(String name);
-
-  List<TypeDefinition> getTypeDefinitions();
-
-  @Override
-  List<Annotations> getAnnotationGroups();
-
-  @Override
-  Annotations getAnnotationGroup(String target);
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Singleton.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Singleton.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Singleton.java
deleted file mode 100644
index b1df8f4..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Singleton.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.EntitySet;
-
-public interface Singleton extends EntitySet, BindingTarget {
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Term.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Term.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Term.java
deleted file mode 100644
index eaaba52..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Term.java
+++ /dev/null
@@ -1,45 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.Named;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-public interface Term extends Named, Annotatable {
-
-  List<String> getAppliesTo();
-
-  String getBaseTerm();
-
-  String getDefaultValue();
-
-  Integer getMaxLength();
-
-  Integer getPrecision();
-
-  Integer getScale();
-
-  SRID getSrid();
-
-  String getType();
-
-  boolean isNullable();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/TypeDefinition.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/TypeDefinition.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/TypeDefinition.java
deleted file mode 100644
index 20234c2..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/TypeDefinition.java
+++ /dev/null
@@ -1,41 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.Named;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-public interface TypeDefinition extends Named, Annotatable {
-
-  List<Annotation> getAnnotations();
-
-  Integer getMaxLength();
-
-  Integer getPrecision();
-
-  Integer getScale();
-
-  SRID getSrid();
-
-  String getUnderlyingType();
-
-  boolean isUnicode();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/XMLMetadata.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/XMLMetadata.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/XMLMetadata.java
deleted file mode 100644
index f3b619e..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/XMLMetadata.java
+++ /dev/null
@@ -1,36 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-public interface XMLMetadata extends org.apache.olingo.client.api.edm.xml.XMLMetadata {
-
-  @Override
-  List<Schema> getSchemas();
-
-  @Override
-  Schema getSchema(int index);
-
-  @Override
-  Schema getSchema(String key);
-
-  List<Reference> getReferences();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationExpression.java
deleted file mode 100644
index fb96d9d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationExpression.java
+++ /dev/null
@@ -1,30 +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.client.api.edm.xml.v4.annotation;
-
-public interface AnnotationExpression {
-
-  boolean isConstant();
-
-  ConstantAnnotationExpression asConstant();
-
-  boolean isDynamic();
-
-  DynamicAnnotationExpression asDynamic();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationPath.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationPath.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationPath.java
deleted file mode 100644
index 225ea8f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/AnnotationPath.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4.annotation;
-
-public interface AnnotationPath extends DynamicAnnotationExpression {
-
-  String getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Apply.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Apply.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Apply.java
deleted file mode 100644
index 3bd4a9f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Apply.java
+++ /dev/null
@@ -1,30 +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.client.api.edm.xml.v4.annotation;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-
-public interface Apply extends DynamicAnnotationExpression, Annotatable {
-
-  String getFunction();
-
-  List<AnnotationExpression> getParameters();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Cast.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Cast.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Cast.java
deleted file mode 100644
index c580de0..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Cast.java
+++ /dev/null
@@ -1,38 +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.client.api.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-public interface Cast extends DynamicAnnotationExpression, Annotatable {
-
-  Integer getMaxLength();
-
-  Integer getPrecision();
-
-  Integer getScale();
-
-  SRID getSrid();
-
-  String getType();
-
-  DynamicAnnotationExpression getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Collection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Collection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Collection.java
deleted file mode 100644
index 4a6f61d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Collection.java
+++ /dev/null
@@ -1,27 +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.client.api.edm.xml.v4.annotation;
-
-import java.util.List;
-
-public interface Collection extends DynamicAnnotationExpression {
-
-  List<AnnotationExpression> getItems();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/ConstantAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/ConstantAnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/ConstantAnnotationExpression.java
deleted file mode 100644
index 2011feb..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/ConstantAnnotationExpression.java
+++ /dev/null
@@ -1,56 +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.client.api.edm.xml.v4.annotation;
-
-public interface ConstantAnnotationExpression extends AnnotationExpression {
-
-  public enum Type {
-
-    Binary,
-    Bool,
-    Date,
-    DateTimeOffset,
-    Decimal,
-    Duration,
-    EnumMember,
-    Float,
-    Guid,
-    Int,
-    String,
-    TimeOfDay;
-
-    public static Type fromString(final String value) {
-      Type result = null;
-      try {
-        result = valueOf(value);
-      } catch (IllegalArgumentException e) {
-        // ignore
-      }
-      return result;
-    }
-  }
-
-  Type getType();
-
-  void setType(Type type);
-
-  String getValue();
-
-  void setValue(String value);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/DynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/DynamicAnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/DynamicAnnotationExpression.java
deleted file mode 100644
index b45c20b..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/DynamicAnnotationExpression.java
+++ /dev/null
@@ -1,91 +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.client.api.edm.xml.v4.annotation;
-
-public interface DynamicAnnotationExpression extends AnnotationExpression {
-
-  boolean isNot();
-
-  Not asNot();
-
-  boolean isTwoParamsOp();
-
-  TwoParamsOpDynamicAnnotationExpression asTwoParamsOp();
-
-  boolean isAnnotationPath();
-
-  AnnotationPath asAnnotationPath();
-
-  boolean isApply();
-
-  Apply asApply();
-
-  boolean isCast();
-
-  Cast asCast();
-
-  boolean isCollection();
-
-  Collection asCollection();
-
-  boolean isIf();
-
-  If asIf();
-
-  boolean isIsOf();
-
-  IsOf asIsOf();
-
-  boolean isLabeledElement();
-
-  LabeledElement asLabeledElement();
-
-  boolean isLabeledElementReference();
-
-  LabeledElementReference asLabeledElementReference();
-
-  boolean isNull();
-  
-  Null asNull();
-  
-  boolean isNavigationPropertyPath();
-
-  NavigationPropertyPath asNavigationPropertyPath();
-
-  boolean isPath();
-
-  Path asPath();
-
-  boolean isPropertyPath();
-
-  PropertyPath asPropertyPath();
-
-  boolean isPropertyValue();
-
-  PropertyValue asPropertyValue();
-
-  boolean isRecord();
-
-  Record asRecord();
-
-  boolean isUrlRef();
-
-  UrlRef asUrlRef();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/If.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/If.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/If.java
deleted file mode 100644
index 48cb76a..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/If.java
+++ /dev/null
@@ -1,31 +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.client.api.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-
-public interface If extends DynamicAnnotationExpression, Annotatable {
-
-  AnnotationExpression getGuard();
-
-  AnnotationExpression getThen();
-
-  AnnotationExpression getElse();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/IsOf.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/IsOf.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/IsOf.java
deleted file mode 100644
index ad6ae2f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/IsOf.java
+++ /dev/null
@@ -1,38 +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.client.api.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-public interface IsOf extends DynamicAnnotationExpression, Annotatable {
-
-  Integer getMaxLength();
-
-  Integer getPrecision();
-
-  Integer getScale();
-
-  SRID getSrid();
-
-  String getType();
-
-  DynamicAnnotationExpression getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElement.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElement.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElement.java
deleted file mode 100644
index 1e89a99..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElement.java
+++ /dev/null
@@ -1,29 +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.client.api.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-
-public interface LabeledElement extends DynamicAnnotationExpression, Annotatable {
-
-  String getName();
-
-  DynamicAnnotationExpression getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElementReference.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElementReference.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElementReference.java
deleted file mode 100644
index f34a42c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/LabeledElementReference.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4.annotation;
-
-public interface LabeledElementReference extends DynamicAnnotationExpression {
-
-  String getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/NavigationPropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/NavigationPropertyPath.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/NavigationPropertyPath.java
deleted file mode 100644
index bcbf334..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/NavigationPropertyPath.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4.annotation;
-
-public interface NavigationPropertyPath extends DynamicAnnotationExpression {
-
-  String getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Not.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Not.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Not.java
deleted file mode 100644
index 6e3fbfe..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Not.java
+++ /dev/null
@@ -1,24 +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.client.api.edm.xml.v4.annotation;
-
-public interface Not extends DynamicAnnotationExpression {
-
-  DynamicAnnotationExpression getExpression();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Null.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Null.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Null.java
deleted file mode 100644
index 2e83241..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Null.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-
-public interface Null extends DynamicAnnotationExpression, Annotatable {
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Path.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Path.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Path.java
deleted file mode 100644
index 9500207..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Path.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4.annotation;
-
-public interface Path extends DynamicAnnotationExpression {
-
-  String getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyPath.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyPath.java
deleted file mode 100644
index 3ecb019..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyPath.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4.annotation;
-
-public interface PropertyPath extends DynamicAnnotationExpression {
-
-  String getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyValue.java
deleted file mode 100644
index 74b7721..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/PropertyValue.java
+++ /dev/null
@@ -1,29 +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.client.api.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-
-public interface PropertyValue extends DynamicAnnotationExpression, Annotatable {
-
-  String getProperty();
-
-  AnnotationExpression getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Record.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Record.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Record.java
deleted file mode 100644
index c9f70b0..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/Record.java
+++ /dev/null
@@ -1,31 +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.client.api.edm.xml.v4.annotation;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-
-public interface Record extends DynamicAnnotationExpression, Annotatable {
-
-  List<PropertyValue> getPropertyValues();
-
-  String getType();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpression.java
deleted file mode 100644
index 15f56a1..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/TwoParamsOpDynamicAnnotationExpression.java
+++ /dev/null
@@ -1,50 +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.client.api.edm.xml.v4.annotation;
-
-public interface TwoParamsOpDynamicAnnotationExpression extends DynamicAnnotationExpression {
-
-  public static enum Type {
-
-    And,
-    Or,
-    Eq,
-    Ne,
-    Gt,
-    Ge,
-    Lt,
-    Le;
-
-    public static Type fromString(final String value) {
-      Type result = null;
-      for (Type type : values()) {
-        if (value.equals(type.name())) {
-          result = type;
-        }
-      }
-      return result;
-    }
-  }
-
-  Type getType();
-  
-  DynamicAnnotationExpression getLeftExpression();
-
-  DynamicAnnotationExpression getRightExpression();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/UrlRef.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/UrlRef.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/UrlRef.java
deleted file mode 100644
index 9e67cfb..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/annotation/UrlRef.java
+++ /dev/null
@@ -1,25 +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.client.api.edm.xml.v4.annotation;
-
-public interface UrlRef extends DynamicAnnotationExpression {
-
-  AnnotationExpression getValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java
new file mode 100644
index 0000000..52862fa
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java
@@ -0,0 +1,43 @@
+/*
+ * 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.client.api.serialization;
+
+import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.Entity;
+import org.apache.olingo.commons.api.data.EntitySet;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+
+public interface ODataBinder extends CommonODataBinder {
+
+  @Override
+  ODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
+
+  @Override
+  ODataEntity getODataEntity(ResWrap<Entity> resource);
+
+  @Override
+  ODataProperty getODataProperty(ResWrap<Property> resource);
+
+  ODataDelta getODataDelta(ResWrap<Delta> resource);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java
new file mode 100644
index 0000000..0301704
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataDeserializer.java
@@ -0,0 +1,41 @@
+/*
+ * 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.client.api.serialization;
+
+import java.io.InputStream;
+
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public interface ODataDeserializer extends ClientODataDeserializer {
+
+  @Override
+  XMLMetadata toMetadata(InputStream input);
+
+  /**
+   * Gets a delta object from the given InputStream.
+   *
+   * @param input stream to be de-serialized.
+   * @return {@link Delta} instance.
+   * @throws ODataDeserializerException
+   */
+  ResWrap<Delta> toDelta(InputStream input) throws ODataDeserializerException;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
new file mode 100644
index 0000000..814947e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
@@ -0,0 +1,39 @@
+/*
+ * 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.client.api.serialization;
+
+import java.io.InputStream;
+
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.format.ODataFormat;
+import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
+
+public interface ODataReader extends CommonODataReader {
+
+  @Override
+  ODataEntitySet readEntitySet(InputStream input, ODataFormat format) throws ODataDeserializerException;
+
+  @Override
+  ODataEntity readEntity(InputStream input, ODataFormat format) throws ODataDeserializerException;
+
+  @Override
+  ODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java
deleted file mode 100644
index 1a8565f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataBinder.java
+++ /dev/null
@@ -1,44 +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.client.api.serialization.v4;
-
-import org.apache.olingo.client.api.serialization.CommonODataBinder;
-import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.data.Entity;
-import org.apache.olingo.commons.api.data.EntitySet;
-import org.apache.olingo.commons.api.data.Property;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-
-public interface ODataBinder extends CommonODataBinder {
-
-  @Override
-  ODataEntitySet getODataEntitySet(ResWrap<EntitySet> resource);
-
-  @Override
-  ODataEntity getODataEntity(ResWrap<Entity> resource);
-
-  @Override
-  ODataProperty getODataProperty(ResWrap<Property> resource);
-
-  ODataDelta getODataDelta(ResWrap<Delta> resource);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java
deleted file mode 100644
index 9df40d9..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataDeserializer.java
+++ /dev/null
@@ -1,42 +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.client.api.serialization.v4;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.edm.xml.v4.XMLMetadata;
-import org.apache.olingo.client.api.serialization.ClientODataDeserializer;
-import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-
-public interface ODataDeserializer extends ClientODataDeserializer {
-
-  @Override
-  XMLMetadata toMetadata(InputStream input);
-
-  /**
-   * Gets a delta object from the given InputStream.
-   *
-   * @param input stream to be de-serialized.
-   * @return {@link Delta} instance.
-   * @throws ODataDeserializerException
-   */
-  ResWrap<Delta> toDelta(InputStream input) throws ODataDeserializerException;
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java
deleted file mode 100644
index 993034c..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/v4/ODataReader.java
+++ /dev/null
@@ -1,40 +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.client.api.serialization.v4;
-
-import java.io.InputStream;
-
-import org.apache.olingo.client.api.serialization.CommonODataReader;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
-
-public interface ODataReader extends CommonODataReader {
-
-  @Override
-  ODataEntitySet readEntitySet(InputStream input, ODataFormat format) throws ODataDeserializerException;
-
-  @Override
-  ODataEntity readEntity(InputStream input, ODataFormat format) throws ODataDeserializerException;
-
-  @Override
-  ODataProperty readProperty(InputStream input, ODataFormat format) throws ODataDeserializerException;
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArgFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArgFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArgFactory.java
new file mode 100644
index 0000000..3f1ac69
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterArgFactory.java
@@ -0,0 +1,56 @@
+/*
+ * 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.client.api.uri;
+
+
+public interface FilterArgFactory extends CommonFilterArgFactory {
+
+  FilterArg contains(FilterArg first, FilterArg second);
+
+  FilterArg fractionalseconds(FilterArg param);
+
+  FilterArg date(FilterArg param);
+
+  FilterArg time(FilterArg param);
+
+  FilterArg totaloffsetminutes(FilterArg param);
+
+  FilterArg now();
+
+  FilterArg mindatetime();
+
+  FilterArg maxdatetime();
+
+  FilterArg totalseconds(FilterArg param);
+
+  FilterArg cast(FilterArg type);
+
+  FilterArg cast(FilterArg expression, FilterArg type);
+
+  FilterArg geoDistance(FilterArg first, FilterArg second);
+
+  FilterArg geoIntersects(FilterArg first, FilterArg second);
+
+  FilterArg geoLength(FilterArg first, FilterArg second);
+
+  FilterArg any(FilterArg collection, URIFilter expression);
+
+  FilterArg all(FilterArg collection, URIFilter expression);
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterFactory.java
new file mode 100644
index 0000000..b5829ed
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/uri/FilterFactory.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.api.uri;
+
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+
+public interface FilterFactory extends CommonFilterFactory {
+
+  @Override
+  FilterArgFactory getArgFactory();
+
+  URIFilter has(String key, EdmEnumType enumType, String memberName);
+
+  URIFilter has(FilterArg left, EdmEnumType enumType, String memberName);
+
+}


[04/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java
deleted file mode 100644
index 5f8503f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java
+++ /dev/null
@@ -1,64 +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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = AnnotationDeserializer.class)
-public class AnnotationImpl extends AbstractAnnotatable implements Annotation {
-
-  private static final long serialVersionUID = 5464714417411058033L;
-
-  private String term;
-
-  private String qualifier;
-
-  private AnnotationExpression annotationExpression;
-
-  @Override
-  public String getTerm() {
-    return term;
-  }
-
-  public void setTerm(final String term) {
-    this.term = term;
-  }
-
-  @Override
-  public String getQualifier() {
-    return qualifier;
-  }
-
-  public void setQualifier(final String qualifier) {
-    this.qualifier = qualifier;
-  }
-
-  @Override
-  public AnnotationExpression getExpression() {
-    return annotationExpression;
-  }
-
-  public void setAnnotationExpression(final AnnotationExpression annotationExpression) {
-    this.annotationExpression = annotationExpression;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java
deleted file mode 100644
index 89b8e93..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsDeserializer.java
+++ /dev/null
@@ -1,55 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class AnnotationsDeserializer extends AbstractEdmDeserializer<AnnotationsImpl> {
-
-  @Override
-  protected AnnotationsImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final AnnotationsImpl annotations = new AnnotationsImpl();
-
-    for (; jp.getCurrentToken() != null && jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Target".equals(jp.getCurrentName())) {
-          annotations.setTarget(jp.nextTextValue());
-        } else if ("Qualifier".equals(jp.getCurrentName())) {
-          annotations.setQualifier(jp.nextTextValue());
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          annotations.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java
deleted file mode 100644
index 43f3037..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java
+++ /dev/null
@@ -1,52 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Annotations;
-import org.apache.olingo.client.core.edm.xml.AbstractAnnotations;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = AnnotationsDeserializer.class)
-public class AnnotationsImpl extends AbstractAnnotations implements Annotations {
-
-  private static final long serialVersionUID = -5961207981571644200L;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-  @Override
-  public Annotation getAnnotation(final String term) {
-    Annotation result = null;
-    for (Annotation annotation : getAnnotations()) {
-      if (term.equals(annotation.getTerm())) {
-        result = annotation;
-      }
-    }
-    return result;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java
deleted file mode 100644
index ec86a80..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java
+++ /dev/null
@@ -1,98 +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 >ied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.ComplexType;
-import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
-import org.apache.olingo.client.api.edm.xml.v4.Property;
-import org.apache.olingo.client.core.edm.xml.AbstractComplexType;
-
-public class ComplexTypeImpl extends AbstractComplexType implements ComplexType {
-
-  private static final long serialVersionUID = 4076944306925840115L;
-
-  private boolean abstractEntityType = false;
-
-  private String baseType;
-
-  private boolean openType = false;
-
-  private final List<Property> properties = new ArrayList<Property>();
-
-  private final List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public boolean isAbstractEntityType() {
-    return abstractEntityType;
-  }
-
-  public void setAbstractEntityType(final boolean abstractEntityType) {
-    this.abstractEntityType = abstractEntityType;
-  }
-
-  @Override
-  public String getBaseType() {
-    return baseType;
-  }
-
-  public void setBaseType(final String baseType) {
-    this.baseType = baseType;
-  }
-
-  @Override
-  public boolean isOpenType() {
-    return openType;
-  }
-
-  public void setOpenType(final boolean openType) {
-    this.openType = openType;
-  }
-
-  @Override
-  public Property getProperty(final String name) {
-    return (Property) super.getProperty(name);
-  }
-
-  @Override
-  public List<Property> getProperties() {
-    return properties;
-  }
-
-  @Override
-  public NavigationProperty getNavigationProperty(final String name) {
-    return (NavigationProperty) super.getNavigationProperty(name);
-  }
-
-  @Override
-  public List<NavigationProperty> getNavigationProperties() {
-    return navigationProperties;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java
deleted file mode 100644
index 80a7da2..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java
+++ /dev/null
@@ -1,38 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Schema;
-import org.apache.olingo.client.core.edm.xml.AbstractDataServices;
-
-public class DataServicesImpl extends AbstractDataServices {
-
-  private static final long serialVersionUID = 4200317286476885204L;
-
-  private final List<Schema> schemas = new ArrayList<Schema>();
-
-  @Override
-  public List<Schema> getSchemas() {
-    return schemas;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EdmxImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EdmxImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EdmxImpl.java
deleted file mode 100644
index dd44dd3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EdmxImpl.java
+++ /dev/null
@@ -1,44 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Edmx;
-import org.apache.olingo.client.api.edm.xml.v4.Reference;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmx;
-
-public class EdmxImpl extends AbstractEdmx implements Edmx {
-
-  private static final long serialVersionUID = -6293476719276092572L;
-
-  private final List<Reference> references = new ArrayList<Reference>();
-
-  @Override
-  public DataServicesImpl getDataServices() {
-    return (DataServicesImpl) super.getDataServices();
-  }
-
-  @Override
-  public List<Reference> getReferences() {
-    return references;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityContainerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityContainerImpl.java
deleted file mode 100644
index 5cffafb..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityContainerImpl.java
+++ /dev/null
@@ -1,124 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.EntityContainer;
-import org.apache.olingo.client.api.edm.xml.v4.EntitySet;
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Singleton;
-import org.apache.olingo.client.core.edm.xml.AbstractEntityContainer;
-
-public class EntityContainerImpl extends AbstractEntityContainer implements EntityContainer {
-
-  private static final long serialVersionUID = 5631432527646955795L;
-
-  private final List<EntitySet> entitySets = new ArrayList<EntitySet>();
-
-  private final List<Singleton> singletons = new ArrayList<Singleton>();
-
-  private final List<ActionImport> actionImports = new ArrayList<ActionImport>();
-
-  private final List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public void setDefaultEntityContainer(final boolean defaultEntityContainer) {
-    // no action: a single entity container MUST be available as per OData 4.0
-  }
-
-  @Override
-  public boolean isDefaultEntityContainer() {
-    return true;
-  }
-
-  @Override
-  public EntitySet getEntitySet(final String name) {
-    return (EntitySet) super.getEntitySet(name);
-  }
-
-  @Override
-  public List<EntitySet> getEntitySets() {
-    return entitySets;
-  }
-
-  @Override
-  public List<Singleton> getSingletons() {
-    return singletons;
-  }
-
-  @Override
-  public Singleton getSingleton(final String name) {
-    return getOneByName(name, getSingletons());
-  }
-
-  @Override
-  public FunctionImport getFunctionImport(final String name) {
-    return (FunctionImport) super.getFunctionImport(name);
-  }
-
-  @Override
-  @SuppressWarnings("unchecked")
-  public List<FunctionImport> getFunctionImports(final String name) {
-    return (List<FunctionImport>) super.getFunctionImports(name);
-  }
-
-  /**
-   * Gets the first action import with given name.
-   *
-   * @param name name.
-   * @return action import.
-   */
-  @Override
-  public ActionImport getActionImport(final String name) {
-    return getOneByName(name, getActionImports());
-  }
-
-  /**
-   * Gets all action imports with given name.
-   *
-   * @param name name.
-   * @return action imports.
-   */
-  @Override
-  public List<ActionImport> getActionImports(final String name) {
-    return getAllByName(name, getActionImports());
-  }
-
-  @Override
-  public List<ActionImport> getActionImports() {
-    return actionImports;
-  }
-
-  @Override
-  public List<FunctionImport> getFunctionImports() {
-    return functionImports;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntitySetImpl.java
deleted file mode 100644
index 8c3a2d3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntitySetImpl.java
+++ /dev/null
@@ -1,58 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.EntitySet;
-import org.apache.olingo.client.api.edm.xml.v4.NavigationPropertyBinding;
-import org.apache.olingo.client.core.edm.xml.AbstractEntitySet;
-
-public class EntitySetImpl extends AbstractEntitySet implements EntitySet {
-
-  private static final long serialVersionUID = -5553885465204370676L;
-
-  private boolean includeInServiceDocument = true;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  private final List<NavigationPropertyBinding> navigationPropertyBindings = new ArrayList<NavigationPropertyBinding>();
-
-  @Override
-  public boolean isIncludeInServiceDocument() {
-    return includeInServiceDocument;
-  }
-
-  public void setIncludeInServiceDocument(final boolean includeInServiceDocument) {
-    this.includeInServiceDocument = includeInServiceDocument;
-  }
-
-  @Override
-  public List<NavigationPropertyBinding> getNavigationPropertyBindings() {
-    return navigationPropertyBindings;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityTypeImpl.java
deleted file mode 100644
index 87c49f3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EntityTypeImpl.java
+++ /dev/null
@@ -1,65 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.EntityType;
-import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
-import org.apache.olingo.client.api.edm.xml.v4.Property;
-import org.apache.olingo.client.core.edm.xml.AbstractEntityType;
-
-public class EntityTypeImpl extends AbstractEntityType implements EntityType {
-
-  private static final long serialVersionUID = -3986417775876689669L;
-
-  private final List<Property> properties = new ArrayList<Property>();
-
-  private final List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public Property getProperty(final String name) {
-    return (Property) super.getProperty(name);
-  }
-
-  @Override
-  public List<Property> getProperties() {
-    return properties;
-  }
-
-  @Override
-  public NavigationProperty getNavigationProperty(final String name) {
-    return (NavigationProperty) super.getNavigationProperty(name);
-  }
-
-  @Override
-  public List<NavigationProperty> getNavigationProperties() {
-    return navigationProperties;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EnumTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EnumTypeImpl.java
deleted file mode 100644
index c584828..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/EnumTypeImpl.java
+++ /dev/null
@@ -1,39 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.core.edm.xml.AbstractEnumType;
-
-public class EnumTypeImpl extends AbstractEnumType implements Annotatable {
-
-  private static final long serialVersionUID = 9191189755592743333L;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java
deleted file mode 100644
index fc803a3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionDeserializer.java
+++ /dev/null
@@ -1,64 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class FunctionDeserializer extends AbstractEdmDeserializer<FunctionImpl> {
-
-  @Override
-  protected FunctionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final FunctionImpl functionImpl = new FunctionImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          functionImpl.setName(jp.nextTextValue());
-        } else if ("IsBound".equals(jp.getCurrentName())) {
-          functionImpl.setBound(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("IsComposable".equals(jp.getCurrentName())) {
-          functionImpl.setComposable(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("EntitySetPath".equals(jp.getCurrentName())) {
-          functionImpl.setEntitySetPath(jp.nextTextValue());
-        } else if ("Parameter".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          functionImpl.getParameters().add(jp.readValueAs(ParameterImpl.class));
-        } else if ("ReturnType".equals(jp.getCurrentName())) {
-          functionImpl.setReturnType(parseReturnType(jp, "Function"));
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          functionImpl.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return functionImpl;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImpl.java
deleted file mode 100644
index 9b9b1b8..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImpl.java
+++ /dev/null
@@ -1,41 +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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.Function;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = FunctionDeserializer.class)
-public class FunctionImpl extends ActionImpl implements Function {
-
-  private static final long serialVersionUID = -5494898295282843362L;
-
-  private boolean composable = false;
-
-  @Override
-  public boolean isComposable() {
-    return composable;
-  }
-
-  public void setComposable(final boolean composable) {
-    this.composable = composable;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportDeserializer.java
deleted file mode 100644
index 271b012..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportDeserializer.java
+++ /dev/null
@@ -1,59 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class FunctionImportDeserializer extends AbstractEdmDeserializer<FunctionImportImpl> {
-
-  @Override
-  protected FunctionImportImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final FunctionImportImpl functImpImpl = new FunctionImportImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          functImpImpl.setName(jp.nextTextValue());
-        } else if ("Function".equals(jp.getCurrentName())) {
-          functImpImpl.setFunction(jp.nextTextValue());
-        } else if ("EntitySet".equals(jp.getCurrentName())) {
-          functImpImpl.setEntitySet(jp.nextTextValue());
-        } else if ("IncludeInServiceDocument".equals(jp.getCurrentName())) {
-          functImpImpl.setIncludeInServiceDocument(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          functImpImpl.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return functImpImpl;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportImpl.java
deleted file mode 100644
index 69745d1..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/FunctionImportImpl.java
+++ /dev/null
@@ -1,86 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = FunctionImportDeserializer.class)
-public class FunctionImportImpl implements FunctionImport {
-
-  private static final long serialVersionUID = -1686801084142932402L;
-
-  private String name;
-
-  private String function;
-
-  private String entitySet;
-
-  private boolean includeInServiceDocument = false;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public String getFunction() {
-    return function;
-  }
-
-  public void setFunction(final String function) {
-    this.function = function;
-  }
-
-  @Override
-  public String getEntitySet() {
-    return entitySet;
-  }
-
-  @Override
-  public void setEntitySet(final String entitySet) {
-    this.entitySet = entitySet;
-  }
-
-  @Override
-  public boolean isIncludeInServiceDocument() {
-    return includeInServiceDocument;
-  }
-
-  public void setIncludeInServiceDocument(final boolean includeInServiceDocument) {
-    this.includeInServiceDocument = includeInServiceDocument;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeAnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeAnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeAnnotationsImpl.java
deleted file mode 100644
index 1fa69a2..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeAnnotationsImpl.java
+++ /dev/null
@@ -1,66 +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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.IncludeAnnotations;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class IncludeAnnotationsImpl extends AbstractEdmItem implements IncludeAnnotations {
-
-  private static final long serialVersionUID = -8157841387011422396L;
-
-  @JsonProperty(value = "TermNamespace", required = true)
-  private String termNamespace;
-
-  @JsonProperty(value = "Qualifier")
-  private String qualifier;
-
-  @JsonProperty(value = "TargetNamespace")
-  private String targetNamespace;
-
-  @Override
-  public String getTermNamespace() {
-    return termNamespace;
-  }
-
-  public void setTermNamespace(final String termNamespace) {
-    this.termNamespace = termNamespace;
-  }
-
-  @Override
-  public String getQualifier() {
-    return qualifier;
-  }
-
-  public void setQualifier(final String qualifier) {
-    this.qualifier = qualifier;
-  }
-
-  @Override
-  public String getTargetNamespace() {
-    return targetNamespace;
-  }
-
-  public void setTargeyNamespace(final String targeyNamespace) {
-    this.targetNamespace = targeyNamespace;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeImpl.java
deleted file mode 100644
index 10d7063..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/IncludeImpl.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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.Include;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class IncludeImpl extends AbstractEdmItem implements Include {
-
-  private static final long serialVersionUID = -5450008299655584221L;
-
-  @JsonProperty(value = "Namespace", required = true)
-  private String namespace;
-
-  @JsonProperty(value = "Alias")
-  private String alias;
-
-  @Override
-  public String getNamespace() {
-    return namespace;
-  }
-
-  public void setNamespace(final String namespace) {
-    this.namespace = namespace;
-  }
-
-  @Override
-  public String getAlias() {
-    return alias;
-  }
-
-  public void setAlias(final String alias) {
-    this.alias = alias;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/MemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/MemberImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/MemberImpl.java
deleted file mode 100644
index 76a8201..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/MemberImpl.java
+++ /dev/null
@@ -1,39 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.core.edm.xml.AbstractMember;
-
-public class MemberImpl extends AbstractMember implements Annotatable {
-
-  private static final long serialVersionUID = -6138606817225829791L;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyBindingImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyBindingImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyBindingImpl.java
deleted file mode 100644
index d114b62..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyBindingImpl.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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.NavigationPropertyBinding;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class NavigationPropertyBindingImpl extends AbstractEdmItem implements NavigationPropertyBinding {
-
-  private static final long serialVersionUID = -7056978592235483660L;
-
-  @JsonProperty(value = "Path", required = true)
-  private String path;
-
-  @JsonProperty(value = "Target", required = true)
-  private String target;
-
-  @Override
-  public String getPath() {
-    return path;
-  }
-
-  public void setPath(final String path) {
-    this.path = path;
-  }
-
-  @Override
-  public String getTarget() {
-    return target;
-  }
-
-  public void setTarget(final String target) {
-    this.target = target;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java
deleted file mode 100644
index 289c2d1..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyDeserializer.java
+++ /dev/null
@@ -1,69 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.OnDeleteImpl;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class NavigationPropertyDeserializer extends AbstractEdmDeserializer<NavigationPropertyImpl> {
-
-  @Override
-  protected NavigationPropertyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final NavigationPropertyImpl property = new NavigationPropertyImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          property.setName(jp.nextTextValue());
-        } else if ("Type".equals(jp.getCurrentName())) {
-          property.setType(jp.nextTextValue());
-        } else if ("Nullable".equals(jp.getCurrentName())) {
-          property.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("Partner".equals(jp.getCurrentName())) {
-          property.setPartner(jp.nextTextValue());
-        } else if ("ContainsTarget".equals(jp.getCurrentName())) {
-          property.setContainsTarget(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("ReferentialConstraint".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          property.getReferentialConstraints().add(jp.readValueAs(ReferentialConstraintImpl.class));
-        } else if ("OnDelete".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          property.setOnDelete(jp.readValueAs(OnDeleteImpl.class));
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          property.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return property;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyImpl.java
deleted file mode 100644
index 2c1caf6..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/NavigationPropertyImpl.java
+++ /dev/null
@@ -1,95 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.OnDelete;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
-import org.apache.olingo.client.api.edm.xml.v4.ReferentialConstraint;
-import org.apache.olingo.client.core.edm.xml.AbstractNavigationProperty;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = NavigationPropertyDeserializer.class)
-public class NavigationPropertyImpl extends AbstractNavigationProperty implements NavigationProperty {
-
-  private static final long serialVersionUID = 4503112988794432940L;
-
-  private String type;
-
-  private boolean nullable = true;
-
-  private String partner;
-
-  private final List<ReferentialConstraint> referentialConstraints = new ArrayList<ReferentialConstraint>();
-
-  private OnDelete onDelete;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public String getType() {
-    return type;
-  }
-
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  @Override
-  public boolean isNullable() {
-    return nullable;
-  }
-
-  public void setNullable(final boolean nullable) {
-    this.nullable = nullable;
-  }
-
-  @Override
-  public String getPartner() {
-    return partner;
-  }
-
-  public void setPartner(final String partner) {
-    this.partner = partner;
-  }
-
-  @Override
-  public List<ReferentialConstraint> getReferentialConstraints() {
-    return referentialConstraints;
-  }
-
-  @Override
-  public OnDelete getOnDelete() {
-    return onDelete;
-  }
-
-  public void setOnDelete(final OnDelete onDelete) {
-    this.onDelete = onDelete;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ParameterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ParameterImpl.java
deleted file mode 100644
index 4a79f7b..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ParameterImpl.java
+++ /dev/null
@@ -1,51 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Parameter;
-import org.apache.olingo.client.core.edm.xml.AbstractParameter;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-public class ParameterImpl extends AbstractParameter implements Parameter {
-
-  private static final long serialVersionUID = 7119478691341167904L;
-
-  private SRID srid;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public SRID getSrid() {
-    return srid;
-  }
-
-  public void setSrid(final SRID srid) {
-    this.srid = srid;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/PropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/PropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/PropertyImpl.java
deleted file mode 100644
index d53b659..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/PropertyImpl.java
+++ /dev/null
@@ -1,38 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Property;
-import org.apache.olingo.client.core.edm.xml.AbstractProperty;
-
-public class PropertyImpl extends AbstractProperty implements Property {
-
-  private static final long serialVersionUID = 4544336801968719526L;
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java
deleted file mode 100644
index 552a952..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceDeserializer.java
+++ /dev/null
@@ -1,60 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class ReferenceDeserializer extends AbstractEdmDeserializer<ReferenceImpl> {
-
-  @Override
-  protected ReferenceImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final ReferenceImpl reference = new ReferenceImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Uri".equals(jp.getCurrentName())) {
-          reference.setUri(URI.create(jp.nextTextValue()));
-        } else if ("Include".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          reference.getIncludes().add(jp.readValueAs( IncludeImpl.class));
-        } else if ("IncludeAnnotations".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          reference.getIncludeAnnotations().add(jp.readValueAs( IncludeAnnotationsImpl.class));
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          reference.getAnnotations().add(jp.readValueAs( AnnotationImpl.class));
-        }
-      }
-    }
-
-    return reference;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceImpl.java
deleted file mode 100644
index d8ae938..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferenceImpl.java
+++ /dev/null
@@ -1,61 +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.client.core.edm.xml.v4;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.Include;
-import org.apache.olingo.client.api.edm.xml.v4.IncludeAnnotations;
-import org.apache.olingo.client.api.edm.xml.v4.Reference;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = ReferenceDeserializer.class)
-public class ReferenceImpl extends AbstractAnnotatable implements Reference {
-
-  private static final long serialVersionUID = 7720274712545267654L;
-
-  private URI uri;
-
-  private final List<Include> includes = new ArrayList<Include>();
-
-  private final List<IncludeAnnotations> includeAnnotations = new ArrayList<IncludeAnnotations>();
-
-  @Override
-  public URI getUri() {
-    return uri;
-  }
-
-  public void setUri(final URI uri) {
-    this.uri = uri;
-  }
-
-  @Override
-  public List<Include> getIncludes() {
-    return includes;
-  }
-
-  @Override
-  public List<IncludeAnnotations> getIncludeAnnotations() {
-    return includeAnnotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferentialConstraintImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferentialConstraintImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferentialConstraintImpl.java
deleted file mode 100644
index c11710c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReferentialConstraintImpl.java
+++ /dev/null
@@ -1,53 +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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.ReferentialConstraint;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class ReferentialConstraintImpl extends AbstractAnnotatable implements ReferentialConstraint {
-
-  private static final long serialVersionUID = -5822115908069878139L;
-
-  @JsonProperty(value = "Property", required = true)
-  private String property;
-
-  @JsonProperty(value = "ReferencedProperty", required = true)
-  private String referencedProperty;
-
-  @Override
-  public String getProperty() {
-    return property;
-  }
-
-  public void setProperty(final String property) {
-    this.property = property;
-  }
-
-  @Override
-  public String getReferencedProperty() {
-    return referencedProperty;
-  }
-
-  public void setReferencedProperty(final String referencedProperty) {
-    this.referencedProperty = referencedProperty;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java
deleted file mode 100644
index 18ef16f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeDeserializer.java
+++ /dev/null
@@ -1,67 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class ReturnTypeDeserializer extends AbstractEdmDeserializer<ReturnTypeImpl> {
-
-  @Override
-  protected ReturnTypeImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final ReturnTypeImpl returnType = new ReturnTypeImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Type".equals(jp.getCurrentName())) {
-          returnType.setType(jp.nextTextValue());
-        } else if ("Nullable".equals(jp.getCurrentName())) {
-          returnType.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
-        } else if ("MaxLength".equals(jp.getCurrentName())) {
-          final String maxLenght = jp.nextTextValue();
-          returnType.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
-        } else if ("Precision".equals(jp.getCurrentName())) {
-          returnType.setPrecision(Integer.valueOf(jp.nextTextValue()));
-        } else if ("Scale".equals(jp.getCurrentName())) {
-          final String scale = jp.nextTextValue();
-          returnType.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
-        } else if ("SRID".equals(jp.getCurrentName())) {
-          final String srid = jp.nextTextValue();
-          if (srid != null) {
-            returnType.setSrid(SRID.valueOf(srid));
-          }
-        }
-      }
-    }
-
-    return returnType;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeImpl.java
deleted file mode 100644
index 6df832a..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ReturnTypeImpl.java
+++ /dev/null
@@ -1,98 +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.client.core.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.ReturnType;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = ReturnTypeDeserializer.class)
-public class ReturnTypeImpl extends AbstractEdmItem implements ReturnType {
-
-  private static final long serialVersionUID = 6261092793901735110L;
-
-  private String type;
-
-  private boolean nullable = true;
-
-  private Integer maxLength;
-
-  private Integer precision;
-
-  private Integer scale;
-
-  private SRID srid;
-
-  @Override
-  public String getType() {
-    return type;
-  }
-
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  @Override
-  public boolean isNullable() {
-    return nullable;
-  }
-
-  public void setNullable(final boolean nullable) {
-    this.nullable = nullable;
-  }
-
-  @Override
-  public Integer getMaxLength() {
-    return maxLength;
-  }
-
-  public void setMaxLength(final Integer maxLength) {
-    this.maxLength = maxLength;
-  }
-
-  @Override
-  public Integer getPrecision() {
-    return precision;
-  }
-
-  public void setPrecision(final Integer precision) {
-    this.precision = precision;
-  }
-
-  @Override
-  public Integer getScale() {
-    return scale;
-  }
-
-  public void setScale(final Integer scale) {
-    this.scale = scale;
-  }
-
-  @Override
-  public SRID getSrid() {
-    return srid;
-  }
-
-  public void setSrid(final SRID srid) {
-    this.srid = srid;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SchemaImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SchemaImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SchemaImpl.java
deleted file mode 100644
index 20600fa..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SchemaImpl.java
+++ /dev/null
@@ -1,249 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.olingo.client.api.edm.xml.EnumType;
-import org.apache.olingo.client.api.edm.xml.v4.Action;
-import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Annotations;
-import org.apache.olingo.client.api.edm.xml.v4.ComplexType;
-import org.apache.olingo.client.api.edm.xml.v4.EntityContainer;
-import org.apache.olingo.client.api.edm.xml.v4.EntitySet;
-import org.apache.olingo.client.api.edm.xml.v4.EntityType;
-import org.apache.olingo.client.api.edm.xml.v4.Function;
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Schema;
-import org.apache.olingo.client.api.edm.xml.v4.Singleton;
-import org.apache.olingo.client.api.edm.xml.v4.Term;
-import org.apache.olingo.client.api.edm.xml.v4.TypeDefinition;
-import org.apache.olingo.client.core.edm.xml.AbstractSchema;
-
-public class SchemaImpl extends AbstractSchema implements Schema {
-
-  private static final long serialVersionUID = 1911087363912024939L;
-
-  private final List<Action> actions = new ArrayList<Action>();
-
-  private final List<Annotations> annotationGroups = new ArrayList<Annotations>();
-
-  private final List<Annotation> annotations = new ArrayList<Annotation>();
-
-  private final List<ComplexType> complexTypes = new ArrayList<ComplexType>();
-
-  private EntityContainer entityContainer;
-
-  private final List<EnumType> enumTypes = new ArrayList<EnumType>();
-
-  private final List<EntityType> entityTypes = new ArrayList<EntityType>();
-
-  private final List<Function> functions = new ArrayList<Function>();
-
-  private final List<Term> terms = new ArrayList<Term>();
-
-  private final List<TypeDefinition> typeDefinitions = new ArrayList<TypeDefinition>();
-
-  private Map<String, Annotatable> annotatables;
-
-  @Override
-  public List<Action> getActions() {
-    return actions;
-  }
-
-  @Override
-  public List<Action> getActions(final String name) {
-    return getAllByName(name, getActions());
-  }
-
-  @Override
-  public List<Annotations> getAnnotationGroups() {
-    return annotationGroups;
-  }
-
-  @Override
-  public Annotations getAnnotationGroup(final String target) {
-    Annotations result = null;
-    for (Annotations annots : getAnnotationGroups()) {
-      if (target.equals(annots.getTarget())) {
-        result = annots;
-      }
-    }
-    return result;
-  }
-
-  @Override
-  public Annotation getAnnotation(final String term) {
-    Annotation result = null;
-    for (Annotation annot : getAnnotations()) {
-      if (term.equals(annot.getTerm())) {
-        result = annot;
-      }
-    }
-    return result;
-  }
-
-  @Override
-  public List<Annotation> getAnnotations() {
-    return annotations;
-  }
-
-  @Override
-  public List<Function> getFunctions() {
-    return functions;
-  }
-
-  @Override
-  public List<Function> getFunctions(final String name) {
-    return getAllByName(name, getFunctions());
-  }
-
-  @Override
-  public Term getTerm(final String name) {
-    return getOneByName(name, getTerms());
-  }
-
-  @Override
-  public List<Term> getTerms() {
-    return terms;
-  }
-
-  @Override
-  public TypeDefinition getTypeDefinition(final String name) {
-    return getOneByName(name, getTypeDefinitions());
-  }
-
-  @Override
-  public List<TypeDefinition> getTypeDefinitions() {
-    return typeDefinitions;
-  }
-
-  @Override
-  public EntityContainer getEntityContainer() {
-    return entityContainer;
-  }
-
-  public void setEntityContainer(final EntityContainerImpl entityContainer) {
-    this.entityContainer = entityContainer;
-  }
-
-  @Override
-  public List<EntityContainer> getEntityContainers() {
-    return entityContainer == null
-            ? Collections.<EntityContainer>emptyList() : Collections.singletonList(entityContainer);
-  }
-
-  @Override
-  public EntityContainer getDefaultEntityContainer() {
-    return entityContainer;
-  }
-
-  @Override
-  public EntityContainer getEntityContainer(final String name) {
-    if (entityContainer != null && name.equals(entityContainer.getName())) {
-      return entityContainer;
-    }
-    return null;
-  }
-
-  @Override
-  public List<EnumType> getEnumTypes() {
-    return enumTypes;
-  }
-
-  @Override
-  public ComplexType getComplexType(final String name) {
-    return (ComplexType) super.getComplexType(name);
-  }
-
-  @Override
-  public List<ComplexType> getComplexTypes() {
-    return complexTypes;
-  }
-
-  @Override
-  public EntityType getEntityType(final String name) {
-    return (EntityType) super.getEntityType(name);
-  }
-
-  @Override
-  public List<EntityType> getEntityTypes() {
-    return entityTypes;
-  }
-
-  @Override
-  public Map<String, Annotatable> getAnnotatables() {
-    if (annotatables == null) {
-      annotatables = new HashMap<String, Annotatable>();
-      for (Annotations annotationGroup : getAnnotationGroups()) {
-        annotatables.put(null, annotationGroup);
-      }
-      for (Annotation annotation : getAnnotations()) {
-        annotatables.put(annotation.getTerm(), annotation);
-      }
-      for (Action action : getActions()) {
-        annotatables.put(action.getName(), action);
-      }
-      for (ComplexType complexType : getComplexTypes()) {
-        annotatables.put(complexType.getName(), complexType);
-      }
-      for (EntityType entityType : getEntityTypes()) {
-        annotatables.put(entityType.getName(), entityType);
-      }
-      for (EnumType enumType : getEnumTypes()) {
-        annotatables.put(enumType.getName(), (EnumTypeImpl) enumType);
-      }
-      for (Function function : getFunctions()) {
-        annotatables.put(function.getName(), function);
-      }
-      for (Term term : getTerms()) {
-        annotatables.put(term.getName(), term);
-      }
-      for (TypeDefinition typedef : getTypeDefinitions()) {
-        annotatables.put(typedef.getName(), typedef);
-      }
-      if (entityContainer != null) {
-        annotatables.put(entityContainer.getName(), entityContainer);
-        for (Annotation annotation : entityContainer.getAnnotations()) {
-          annotatables.put(annotation.getTerm(), annotation);
-        }
-        for (ActionImport actionImport : entityContainer.getActionImports()) {
-          annotatables.put(actionImport.getName(), actionImport);
-        }
-        for (FunctionImport functionImport : entityContainer.getFunctionImports()) {
-          annotatables.put(functionImport.getName(), functionImport);
-        }
-        for (EntitySet entitySet : entityContainer.getEntitySets()) {
-          annotatables.put(entitySet.getName(), entitySet);
-        }
-        for (Singleton singleton : entityContainer.getSingletons()) {
-          annotatables.put(singleton.getName(), singleton);
-        }
-      }
-    }
-    return annotatables;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java
deleted file mode 100644
index affe220..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonDeserializer.java
+++ /dev/null
@@ -1,59 +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.client.core.edm.xml.v4;
-
-import java.io.IOException;
-
-import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-
-public class SingletonDeserializer extends AbstractEdmDeserializer<SingletonImpl> {
-
-  @Override
-  protected SingletonImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-          throws IOException, JsonProcessingException {
-
-    final SingletonImpl singleton = new SingletonImpl();
-
-    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
-      final JsonToken token = jp.getCurrentToken();
-      if (token == JsonToken.FIELD_NAME) {
-        if ("Name".equals(jp.getCurrentName())) {
-          singleton.setName(jp.nextTextValue());
-        } else if ("Type".equals(jp.getCurrentName())) {
-          singleton.setEntityType(jp.nextTextValue());
-        } else if ("NavigationPropertyBinding".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          singleton.getNavigationPropertyBindings().add(
-                  jp.readValueAs(NavigationPropertyBindingImpl.class));
-        } else if ("Annotation".equals(jp.getCurrentName())) {
-          jp.nextToken();
-          singleton.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
-        }
-      }
-    }
-
-    return singleton;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonImpl.java
deleted file mode 100644
index f19ac70..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/SingletonImpl.java
+++ /dev/null
@@ -1,63 +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.client.core.edm.xml.v4;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.NavigationPropertyBinding;
-import org.apache.olingo.client.api.edm.xml.v4.Singleton;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = SingletonDeserializer.class)
-public class SingletonImpl extends AbstractAnnotatable implements Singleton {
-
-  private static final long serialVersionUID = 1656749615107151921L;
-
-  private String name;
-
-  private String entityType;
-
-  private final List<NavigationPropertyBinding> navigationPropertyBindings = new ArrayList<NavigationPropertyBinding>();
-
-  @Override
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  @Override
-  public String getEntityType() {
-    return entityType;
-  }
-
-  public void setEntityType(final String entityType) {
-    this.entityType = entityType;
-  }
-
-  @Override
-  public List<NavigationPropertyBinding> getNavigationPropertyBindings() {
-    return navigationPropertyBindings;
-  }
-
-}


[06/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.java
new file mode 100644
index 0000000..6906257
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.java
@@ -0,0 +1,53 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.Include;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class IncludeImpl extends AbstractEdmItem implements Include {
+
+  private static final long serialVersionUID = -5450008299655584221L;
+
+  @JsonProperty(value = "Namespace", required = true)
+  private String namespace;
+
+  @JsonProperty(value = "Alias")
+  private String alias;
+
+  @Override
+  public String getNamespace() {
+    return namespace;
+  }
+
+  public void setNamespace(final String namespace) {
+    this.namespace = namespace;
+  }
+
+  @Override
+  public String getAlias() {
+    return alias;
+  }
+
+  public void setAlias(final String alias) {
+    this.alias = alias;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java
new file mode 100644
index 0000000..bc48e9f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+
+public class MemberImpl extends AbstractMember implements Annotatable {
+
+  private static final long serialVersionUID = -6138606817225829791L;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.java
new file mode 100644
index 0000000..283b0d5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.java
@@ -0,0 +1,53 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.NavigationPropertyBinding;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class NavigationPropertyBindingImpl extends AbstractEdmItem implements NavigationPropertyBinding {
+
+  private static final long serialVersionUID = -7056978592235483660L;
+
+  @JsonProperty(value = "Path", required = true)
+  private String path;
+
+  @JsonProperty(value = "Target", required = true)
+  private String target;
+
+  @Override
+  public String getPath() {
+    return path;
+  }
+
+  public void setPath(final String path) {
+    this.path = path;
+  }
+
+  @Override
+  public String getTarget() {
+    return target;
+  }
+
+  public void setTarget(final String target) {
+    this.target = target;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java
new file mode 100644
index 0000000..a422c53
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java
@@ -0,0 +1,67 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class NavigationPropertyDeserializer extends AbstractEdmDeserializer<NavigationPropertyImpl> {
+
+  @Override
+  protected NavigationPropertyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final NavigationPropertyImpl property = new NavigationPropertyImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          property.setName(jp.nextTextValue());
+        } else if ("Type".equals(jp.getCurrentName())) {
+          property.setType(jp.nextTextValue());
+        } else if ("Nullable".equals(jp.getCurrentName())) {
+          property.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("Partner".equals(jp.getCurrentName())) {
+          property.setPartner(jp.nextTextValue());
+        } else if ("ContainsTarget".equals(jp.getCurrentName())) {
+          property.setContainsTarget(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("ReferentialConstraint".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          property.getReferentialConstraints().add(jp.readValueAs(ReferentialConstraintImpl.class));
+        } else if ("OnDelete".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          property.setOnDelete(jp.readValueAs(OnDeleteImpl.class));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          property.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return property;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java
new file mode 100644
index 0000000..deb20e5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java
@@ -0,0 +1,94 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.OnDelete;
+import org.apache.olingo.client.api.edm.xml.ReferentialConstraint;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = NavigationPropertyDeserializer.class)
+public class NavigationPropertyImpl extends AbstractNavigationProperty implements NavigationProperty {
+
+  private static final long serialVersionUID = 4503112988794432940L;
+
+  private String type;
+
+  private boolean nullable = true;
+
+  private String partner;
+
+  private final List<ReferentialConstraint> referentialConstraints = new ArrayList<ReferentialConstraint>();
+
+  private OnDelete onDelete;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  @Override
+  public boolean isNullable() {
+    return nullable;
+  }
+
+  public void setNullable(final boolean nullable) {
+    this.nullable = nullable;
+  }
+
+  @Override
+  public String getPartner() {
+    return partner;
+  }
+
+  public void setPartner(final String partner) {
+    this.partner = partner;
+  }
+
+  @Override
+  public List<ReferentialConstraint> getReferentialConstraints() {
+    return referentialConstraints;
+  }
+
+  @Override
+  public OnDelete getOnDelete() {
+    return onDelete;
+  }
+
+  public void setOnDelete(final OnDelete onDelete) {
+    this.onDelete = onDelete;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterDeserializer.java
index d6c9bed..16353f5 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterDeserializer.java
@@ -21,7 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
 import java.io.IOException;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 import org.apache.olingo.commons.api.edm.geo.SRID;
 
 import com.fasterxml.jackson.core.JsonParser;
@@ -35,7 +34,7 @@ public class ParameterDeserializer extends AbstractEdmDeserializer<AbstractParam
   protected AbstractParameter doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final AbstractParameter parameter = new org.apache.olingo.client.core.edm.xml.v4.ParameterImpl();
+    final AbstractParameter parameter = new org.apache.olingo.client.core.edm.xml.ParameterImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -57,11 +56,11 @@ public class ParameterDeserializer extends AbstractEdmDeserializer<AbstractParam
         } else if ("SRID".equals(jp.getCurrentName())) {
           final String srid = jp.nextTextValue();
           if (srid != null) {
-            ((org.apache.olingo.client.core.edm.xml.v4.ParameterImpl) parameter).setSrid(SRID.valueOf(srid));
+            ((org.apache.olingo.client.core.edm.xml.ParameterImpl) parameter).setSrid(SRID.valueOf(srid));
           }
         } else if ("Annotation".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.ParameterImpl) parameter).getAnnotations().
+          ((org.apache.olingo.client.core.edm.xml.ParameterImpl) parameter).getAnnotations().
                   add(jp.readValueAs(AnnotationImpl.class));
         }
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.java
new file mode 100644
index 0000000..ec2a08e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Parameter;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+public class ParameterImpl extends AbstractParameter implements Parameter {
+
+  private static final long serialVersionUID = 7119478691341167904L;
+
+  private SRID srid;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public SRID getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final SRID srid) {
+    this.srid = srid;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyDeserializer.java
index bf6e8b4..02c3c3e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyDeserializer.java
@@ -21,7 +21,6 @@ package org.apache.olingo.client.core.edm.xml;
 import java.io.IOException;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 import org.apache.olingo.commons.api.edm.geo.SRID;
 
 import com.fasterxml.jackson.core.JsonParser;
@@ -35,7 +34,7 @@ public class PropertyDeserializer extends AbstractEdmDeserializer<AbstractProper
   protected AbstractProperty doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
       throws IOException, JsonProcessingException {
 
-    final AbstractProperty property = new org.apache.olingo.client.core.edm.xml.v4.PropertyImpl();
+    final AbstractProperty property = new org.apache.olingo.client.core.edm.xml.PropertyImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -65,7 +64,7 @@ public class PropertyDeserializer extends AbstractEdmDeserializer<AbstractProper
           }
         } else if ("Annotation".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.PropertyImpl) property).getAnnotations().
+          ((org.apache.olingo.client.core.edm.xml.PropertyImpl) property).getAnnotations().
               add(jp.readValueAs(AnnotationImpl.class));
         }
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.java
new file mode 100644
index 0000000..1cbdfb1
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.java
@@ -0,0 +1,37 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Property;
+
+public class PropertyImpl extends AbstractProperty implements Property {
+
+  private static final long serialVersionUID = 4544336801968719526L;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java
new file mode 100644
index 0000000..92f1e53
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java
@@ -0,0 +1,58 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+import java.net.URI;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class ReferenceDeserializer extends AbstractEdmDeserializer<ReferenceImpl> {
+
+  @Override
+  protected ReferenceImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final ReferenceImpl reference = new ReferenceImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Uri".equals(jp.getCurrentName())) {
+          reference.setUri(URI.create(jp.nextTextValue()));
+        } else if ("Include".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          reference.getIncludes().add(jp.readValueAs( IncludeImpl.class));
+        } else if ("IncludeAnnotations".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          reference.getIncludeAnnotations().add(jp.readValueAs( IncludeAnnotationsImpl.class));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          reference.getAnnotations().add(jp.readValueAs( AnnotationImpl.class));
+        }
+      }
+    }
+
+    return reference;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceImpl.java
new file mode 100644
index 0000000..f9efbf9
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceImpl.java
@@ -0,0 +1,61 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Include;
+import org.apache.olingo.client.api.edm.xml.IncludeAnnotations;
+import org.apache.olingo.client.api.edm.xml.Reference;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = ReferenceDeserializer.class)
+public class ReferenceImpl extends AbstractAnnotatable implements Reference {
+
+  private static final long serialVersionUID = 7720274712545267654L;
+
+  private URI uri;
+
+  private final List<Include> includes = new ArrayList<Include>();
+
+  private final List<IncludeAnnotations> includeAnnotations = new ArrayList<IncludeAnnotations>();
+
+  @Override
+  public URI getUri() {
+    return uri;
+  }
+
+  public void setUri(final URI uri) {
+    this.uri = uri;
+  }
+
+  @Override
+  public List<Include> getIncludes() {
+    return includes;
+  }
+
+  @Override
+  public List<IncludeAnnotations> getIncludeAnnotations() {
+    return includeAnnotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferentialConstraintImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferentialConstraintImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferentialConstraintImpl.java
new file mode 100644
index 0000000..61b2642
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferentialConstraintImpl.java
@@ -0,0 +1,53 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.ReferentialConstraint;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ReferentialConstraintImpl extends AbstractAnnotatable implements ReferentialConstraint {
+
+  private static final long serialVersionUID = -5822115908069878139L;
+
+  @JsonProperty(value = "Property", required = true)
+  private String property;
+
+  @JsonProperty(value = "ReferencedProperty", required = true)
+  private String referencedProperty;
+
+  @Override
+  public String getProperty() {
+    return property;
+  }
+
+  public void setProperty(final String property) {
+    this.property = property;
+  }
+
+  @Override
+  public String getReferencedProperty() {
+    return referencedProperty;
+  }
+
+  public void setReferencedProperty(final String referencedProperty) {
+    this.referencedProperty = referencedProperty;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeDeserializer.java
new file mode 100644
index 0000000..1a8cd94
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeDeserializer.java
@@ -0,0 +1,66 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class ReturnTypeDeserializer extends AbstractEdmDeserializer<ReturnTypeImpl> {
+
+  @Override
+  protected ReturnTypeImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final ReturnTypeImpl returnType = new ReturnTypeImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Type".equals(jp.getCurrentName())) {
+          returnType.setType(jp.nextTextValue());
+        } else if ("Nullable".equals(jp.getCurrentName())) {
+          returnType.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("MaxLength".equals(jp.getCurrentName())) {
+          final String maxLenght = jp.nextTextValue();
+          returnType.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          returnType.setPrecision(Integer.valueOf(jp.nextTextValue()));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          final String scale = jp.nextTextValue();
+          returnType.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          final String srid = jp.nextTextValue();
+          if (srid != null) {
+            returnType.setSrid(SRID.valueOf(srid));
+          }
+        }
+      }
+    }
+
+    return returnType;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeImpl.java
new file mode 100644
index 0000000..1135437
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReturnTypeImpl.java
@@ -0,0 +1,97 @@
+/*
+ * 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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.ReturnType;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = ReturnTypeDeserializer.class)
+public class ReturnTypeImpl extends AbstractEdmItem implements ReturnType {
+
+  private static final long serialVersionUID = 6261092793901735110L;
+
+  private String type;
+
+  private boolean nullable = true;
+
+  private Integer maxLength;
+
+  private Integer precision;
+
+  private Integer scale;
+
+  private SRID srid;
+
+  @Override
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  @Override
+  public boolean isNullable() {
+    return nullable;
+  }
+
+  public void setNullable(final boolean nullable) {
+    this.nullable = nullable;
+  }
+
+  @Override
+  public Integer getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final Integer maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  @Override
+  public Integer getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final Integer precision) {
+    this.precision = precision;
+  }
+
+  @Override
+  public Integer getScale() {
+    return scale;
+  }
+
+  public void setScale(final Integer scale) {
+    this.scale = scale;
+  }
+
+  @Override
+  public SRID getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final SRID srid) {
+    this.srid = srid;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaDeserializer.java
index c182303..0b042ad 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaDeserializer.java
@@ -20,12 +20,6 @@ package org.apache.olingo.client.core.edm.xml;
 
 import java.io.IOException;
 
-import org.apache.olingo.client.core.edm.xml.v4.ActionImpl;
-import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
-import org.apache.olingo.client.core.edm.xml.v4.FunctionImpl;
-import org.apache.olingo.client.core.edm.xml.v4.TermImpl;
-import org.apache.olingo.client.core.edm.xml.v4.TypeDefinitionImpl;
-
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.JsonToken;
@@ -37,7 +31,7 @@ public class SchemaDeserializer extends AbstractEdmDeserializer<AbstractSchema>
   protected AbstractSchema doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
       throws IOException, JsonProcessingException {
 
-    final AbstractSchema schema = new org.apache.olingo.client.core.edm.xml.v4.SchemaImpl();
+    final AbstractSchema schema = new org.apache.olingo.client.core.edm.xml.SchemaImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -49,60 +43,60 @@ public class SchemaDeserializer extends AbstractEdmDeserializer<AbstractSchema>
         } else if ("ComplexType".equals(jp.getCurrentName())) {
           jp.nextToken();
 
-          ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).
+          ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).
               getComplexTypes().add(jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.ComplexTypeImpl.class));
+                  org.apache.olingo.client.core.edm.xml.ComplexTypeImpl.class));
 
         } else if ("EntityType".equals(jp.getCurrentName())) {
           jp.nextToken();
 
-          ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).
+          ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).
               getEntityTypes().add(jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.EntityTypeImpl.class));
+                  org.apache.olingo.client.core.edm.xml.EntityTypeImpl.class));
 
         } else if ("EnumType".equals(jp.getCurrentName())) {
           jp.nextToken();
 
-          ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).
+          ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).
               getEnumTypes().add(jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.EnumTypeImpl.class));
+                  org.apache.olingo.client.core.edm.xml.EnumTypeImpl.class));
 
         } else if ("EntityContainer".equals(jp.getCurrentName())) {
           jp.nextToken();
 
-          org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl entityContainer =
+          org.apache.olingo.client.core.edm.xml.EntityContainerImpl entityContainer =
               jp.readValueAs(
-                  org.apache.olingo.client.core.edm.xml.v4.EntityContainerImpl.class);
+                  org.apache.olingo.client.core.edm.xml.EntityContainerImpl.class);
           entityContainer.setDefaultEntityContainer(true);
-          ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).
+          ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).
               setEntityContainer(entityContainer);
 
         } else if ("Action".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getActions().
+          ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).getActions().
               add(jp.readValueAs(ActionImpl.class));
         } else if ("Function".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getFunctions().
+          ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).getFunctions().
               add(jp.readValueAs(FunctionImpl.class));
         } else if ("TypeDefinition".equals(jp.getCurrentName())) {
           jp.nextToken();
-          ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).
+          ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).
               getTypeDefinitions().add(jp.readValueAs(TypeDefinitionImpl.class));
         }
       } else if ("Annotations".equals(jp.getCurrentName())) {
         jp.nextToken();
 
-        ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getAnnotationGroups().
-            add(jp.readValueAs(org.apache.olingo.client.core.edm.xml.v4.AnnotationsImpl.class));
+        ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).getAnnotationGroups().
+            add(jp.readValueAs(org.apache.olingo.client.core.edm.xml.AnnotationsImpl.class));
 
       } else if ("Annotation".equals(jp.getCurrentName())) {
         jp.nextToken();
-        ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getAnnotations().
+        ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).getAnnotations().
             add(jp.readValueAs(AnnotationImpl.class));
       } else if ("Term".equals(jp.getCurrentName())) {
         jp.nextToken();
-        ((org.apache.olingo.client.core.edm.xml.v4.SchemaImpl) schema).getTerms().
+        ((org.apache.olingo.client.core.edm.xml.SchemaImpl) schema).getTerms().
             add(jp.readValueAs(TermImpl.class));
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaImpl.java
new file mode 100644
index 0000000..f44e558
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SchemaImpl.java
@@ -0,0 +1,248 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.olingo.client.api.edm.xml.Action;
+import org.apache.olingo.client.api.edm.xml.ActionImport;
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotations;
+import org.apache.olingo.client.api.edm.xml.ComplexType;
+import org.apache.olingo.client.api.edm.xml.EntityContainer;
+import org.apache.olingo.client.api.edm.xml.EntitySet;
+import org.apache.olingo.client.api.edm.xml.EntityType;
+import org.apache.olingo.client.api.edm.xml.EnumType;
+import org.apache.olingo.client.api.edm.xml.Function;
+import org.apache.olingo.client.api.edm.xml.FunctionImport;
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.client.api.edm.xml.Singleton;
+import org.apache.olingo.client.api.edm.xml.Term;
+import org.apache.olingo.client.api.edm.xml.TypeDefinition;
+
+public class SchemaImpl extends AbstractSchema implements Schema {
+
+  private static final long serialVersionUID = 1911087363912024939L;
+
+  private final List<Action> actions = new ArrayList<Action>();
+
+  private final List<Annotations> annotationGroups = new ArrayList<Annotations>();
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  private final List<ComplexType> complexTypes = new ArrayList<ComplexType>();
+
+  private EntityContainer entityContainer;
+
+  private final List<EnumType> enumTypes = new ArrayList<EnumType>();
+
+  private final List<EntityType> entityTypes = new ArrayList<EntityType>();
+
+  private final List<Function> functions = new ArrayList<Function>();
+
+  private final List<Term> terms = new ArrayList<Term>();
+
+  private final List<TypeDefinition> typeDefinitions = new ArrayList<TypeDefinition>();
+
+  private Map<String, Annotatable> annotatables;
+
+  @Override
+  public List<Action> getActions() {
+    return actions;
+  }
+
+  @Override
+  public List<Action> getActions(final String name) {
+    return getAllByName(name, getActions());
+  }
+
+  @Override
+  public List<Annotations> getAnnotationGroups() {
+    return annotationGroups;
+  }
+
+  @Override
+  public Annotations getAnnotationGroup(final String target) {
+    Annotations result = null;
+    for (Annotations annots : getAnnotationGroups()) {
+      if (target.equals(annots.getTarget())) {
+        result = annots;
+      }
+    }
+    return result;
+  }
+
+  @Override
+  public Annotation getAnnotation(final String term) {
+    Annotation result = null;
+    for (Annotation annot : getAnnotations()) {
+      if (term.equals(annot.getTerm())) {
+        result = annot;
+      }
+    }
+    return result;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+  @Override
+  public List<Function> getFunctions() {
+    return functions;
+  }
+
+  @Override
+  public List<Function> getFunctions(final String name) {
+    return getAllByName(name, getFunctions());
+  }
+
+  @Override
+  public Term getTerm(final String name) {
+    return getOneByName(name, getTerms());
+  }
+
+  @Override
+  public List<Term> getTerms() {
+    return terms;
+  }
+
+  @Override
+  public TypeDefinition getTypeDefinition(final String name) {
+    return getOneByName(name, getTypeDefinitions());
+  }
+
+  @Override
+  public List<TypeDefinition> getTypeDefinitions() {
+    return typeDefinitions;
+  }
+
+  @Override
+  public EntityContainer getEntityContainer() {
+    return entityContainer;
+  }
+
+  public void setEntityContainer(final EntityContainerImpl entityContainer) {
+    this.entityContainer = entityContainer;
+  }
+
+  @Override
+  public List<EntityContainer> getEntityContainers() {
+    return entityContainer == null
+            ? Collections.<EntityContainer>emptyList() : Collections.singletonList(entityContainer);
+  }
+
+  @Override
+  public EntityContainer getDefaultEntityContainer() {
+    return entityContainer;
+  }
+
+  @Override
+  public EntityContainer getEntityContainer(final String name) {
+    if (entityContainer != null && name.equals(entityContainer.getName())) {
+      return entityContainer;
+    }
+    return null;
+  }
+
+  @Override
+  public List<EnumType> getEnumTypes() {
+    return enumTypes;
+  }
+
+  @Override
+  public ComplexType getComplexType(final String name) {
+    return (ComplexType) super.getComplexType(name);
+  }
+
+  @Override
+  public List<ComplexType> getComplexTypes() {
+    return complexTypes;
+  }
+
+  @Override
+  public EntityType getEntityType(final String name) {
+    return (EntityType) super.getEntityType(name);
+  }
+
+  @Override
+  public List<EntityType> getEntityTypes() {
+    return entityTypes;
+  }
+
+  @Override
+  public Map<String, Annotatable> getAnnotatables() {
+    if (annotatables == null) {
+      annotatables = new HashMap<String, Annotatable>();
+      for (Annotations annotationGroup : getAnnotationGroups()) {
+        annotatables.put(null, annotationGroup);
+      }
+      for (Annotation annotation : getAnnotations()) {
+        annotatables.put(annotation.getTerm(), annotation);
+      }
+      for (Action action : getActions()) {
+        annotatables.put(action.getName(), action);
+      }
+      for (ComplexType complexType : getComplexTypes()) {
+        annotatables.put(complexType.getName(), complexType);
+      }
+      for (EntityType entityType : getEntityTypes()) {
+        annotatables.put(entityType.getName(), entityType);
+      }
+      for (EnumType enumType : getEnumTypes()) {
+        annotatables.put(enumType.getName(), (EnumTypeImpl) enumType);
+      }
+      for (Function function : getFunctions()) {
+        annotatables.put(function.getName(), function);
+      }
+      for (Term term : getTerms()) {
+        annotatables.put(term.getName(), term);
+      }
+      for (TypeDefinition typedef : getTypeDefinitions()) {
+        annotatables.put(typedef.getName(), typedef);
+      }
+      if (entityContainer != null) {
+        annotatables.put(entityContainer.getName(), entityContainer);
+        for (Annotation annotation : entityContainer.getAnnotations()) {
+          annotatables.put(annotation.getTerm(), annotation);
+        }
+        for (ActionImport actionImport : entityContainer.getActionImports()) {
+          annotatables.put(actionImport.getName(), actionImport);
+        }
+        for (FunctionImport functionImport : entityContainer.getFunctionImports()) {
+          annotatables.put(functionImport.getName(), functionImport);
+        }
+        for (EntitySet entitySet : entityContainer.getEntitySets()) {
+          annotatables.put(entitySet.getName(), entitySet);
+        }
+        for (Singleton singleton : entityContainer.getSingletons()) {
+          annotatables.put(singleton.getName(), singleton);
+        }
+      }
+    }
+    return annotatables;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonDeserializer.java
new file mode 100644
index 0000000..1bc3b2d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonDeserializer.java
@@ -0,0 +1,57 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class SingletonDeserializer extends AbstractEdmDeserializer<SingletonImpl> {
+
+  @Override
+  protected SingletonImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final SingletonImpl singleton = new SingletonImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          singleton.setName(jp.nextTextValue());
+        } else if ("Type".equals(jp.getCurrentName())) {
+          singleton.setEntityType(jp.nextTextValue());
+        } else if ("NavigationPropertyBinding".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          singleton.getNavigationPropertyBindings().add(
+                  jp.readValueAs(NavigationPropertyBindingImpl.class));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          singleton.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return singleton;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonImpl.java
new file mode 100644
index 0000000..ea26cf5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/SingletonImpl.java
@@ -0,0 +1,69 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.NavigationPropertyBinding;
+import org.apache.olingo.client.api.edm.xml.Singleton;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = SingletonDeserializer.class)
+public class SingletonImpl extends AbstractAnnotatable implements Singleton {
+
+  private static final long serialVersionUID = 1656749615107151921L;
+
+  private String name;
+
+  private String entityType;
+
+  private final List<NavigationPropertyBinding> navigationPropertyBindings = new ArrayList<NavigationPropertyBinding>();
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  @Override
+  public String getEntityType() {
+    return entityType;
+  }
+
+  public void setEntityType(final String entityType) {
+    this.entityType = entityType;
+  }
+
+  @Override
+  public List<NavigationPropertyBinding> getNavigationPropertyBindings() {
+    return navigationPropertyBindings;
+  }
+
+  //TODO: includeInServiceDocument is always false for singletons
+  @Override
+  public boolean isIncludeInServiceDocument() {
+    return false;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermDeserializer.java
new file mode 100644
index 0000000..084c62f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermDeserializer.java
@@ -0,0 +1,79 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+import java.util.Arrays;
+
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class TermDeserializer extends AbstractEdmDeserializer<TermImpl> {
+
+  @Override
+  protected TermImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final TermImpl term = new TermImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          term.setName(jp.nextTextValue());
+        } else if ("Type".equals(jp.getCurrentName())) {
+          term.setType(jp.nextTextValue());
+        } else if ("BaseTerm".equals(jp.getCurrentName())) {
+          term.setBaseTerm(jp.nextTextValue());
+        } else if ("DefaultValue".equals(jp.getCurrentName())) {
+          term.setDefaultValue(jp.nextTextValue());
+        } else if ("Nullable".equals(jp.getCurrentName())) {
+          term.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("MaxLength".equals(jp.getCurrentName())) {
+          final String maxLenght = jp.nextTextValue();
+          term.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          term.setPrecision(Integer.valueOf(jp.nextTextValue()));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          final String scale = jp.nextTextValue();
+          term.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          final String srid = jp.nextTextValue();
+          if (srid != null) {
+            term.setSrid(SRID.valueOf(srid));
+          }
+        } else if ("AppliesTo".equals(jp.getCurrentName())) {
+          term.getAppliesTo().addAll(Arrays.asList(StringUtils.split(jp.nextTextValue())));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          term.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return term;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermImpl.java
new file mode 100644
index 0000000..a9212aa
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TermImpl.java
@@ -0,0 +1,140 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Term;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = TermDeserializer.class)
+public class TermImpl extends AbstractAnnotatable implements Term {
+
+  private static final long serialVersionUID = -8350072064720586186L;
+
+  private String name;
+
+  private String type;
+
+  private String baseTerm;
+
+  private String defaultValue;
+
+  private boolean nullable = true;
+
+  private Integer maxLength;
+
+  private Integer precision;
+
+  private Integer scale;
+
+  private SRID srid;
+
+  private final List<String> appliesTo = new ArrayList<String>();
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  @Override
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  @Override
+  public String getBaseTerm() {
+    return baseTerm;
+  }
+
+  public void setBaseTerm(final String baseTerm) {
+    this.baseTerm = baseTerm;
+  }
+
+  @Override
+  public String getDefaultValue() {
+    return defaultValue;
+  }
+
+  public void setDefaultValue(final String defaultValue) {
+    this.defaultValue = defaultValue;
+  }
+
+  @Override
+  public boolean isNullable() {
+    return nullable;
+  }
+
+  public void setNullable(final boolean nullable) {
+    this.nullable = nullable;
+  }
+
+  @Override
+  public Integer getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final Integer maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  @Override
+  public Integer getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final Integer precision) {
+    this.precision = precision;
+  }
+
+  @Override
+  public Integer getScale() {
+    return scale;
+  }
+
+  public void setScale(final Integer scale) {
+    this.scale = scale;
+  }
+
+  @Override
+  public SRID getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final SRID srid) {
+    this.srid = srid;
+  }
+
+  @Override
+  public List<String> getAppliesTo() {
+    return appliesTo;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionDeserializer.java
new file mode 100644
index 0000000..551a3c7
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionDeserializer.java
@@ -0,0 +1,70 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class TypeDefinitionDeserializer extends AbstractEdmDeserializer<TypeDefinitionImpl> {
+
+  @Override
+  protected TypeDefinitionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final TypeDefinitionImpl typeDefinition = new TypeDefinitionImpl();
+
+    for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+      final JsonToken token = jp.getCurrentToken();
+      if (token == JsonToken.FIELD_NAME) {
+        if ("Name".equals(jp.getCurrentName())) {
+          typeDefinition.setName(jp.nextTextValue());
+        } else if ("UnderlyingType".equals(jp.getCurrentName())) {
+          typeDefinition.setUnderlyingType(jp.nextTextValue());
+        } else if ("MaxLength".equals(jp.getCurrentName())) {
+          typeDefinition.setMaxLength(jp.nextIntValue(0));
+        } else if ("Unicode".equals(jp.getCurrentName())) {
+          typeDefinition.setUnicode(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          typeDefinition.setPrecision(jp.nextIntValue(0));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          final String scale = jp.nextTextValue();
+          typeDefinition.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          final String srid = jp.nextTextValue();
+          if (srid != null) {
+            typeDefinition.setSrid(SRID.valueOf(srid));
+          }
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          typeDefinition.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
+        }
+      }
+    }
+
+    return typeDefinition;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionImpl.java
new file mode 100644
index 0000000..0ec8b17
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/TypeDefinitionImpl.java
@@ -0,0 +1,119 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.TypeDefinition;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = TypeDefinitionDeserializer.class)
+public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinition {
+
+  private static final long serialVersionUID = -902407149079419602L;
+
+  private String name;
+
+  private String underlyingType;
+
+  private Integer maxLength;
+
+  private Integer precision;
+
+  private Integer scale;
+
+  private boolean unicode = true;
+
+  private SRID srid;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  @Override
+  public String getUnderlyingType() {
+    return underlyingType;
+  }
+
+  public void setUnderlyingType(final String underlyingType) {
+    this.underlyingType = underlyingType;
+  }
+
+  @Override
+  public Integer getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final Integer maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  @Override
+  public Integer getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final Integer precision) {
+    this.precision = precision;
+  }
+
+  @Override
+  public Integer getScale() {
+    return scale;
+  }
+
+  public void setScale(final Integer scale) {
+    this.scale = scale;
+  }
+
+  @Override
+  public boolean isUnicode() {
+    return unicode;
+  }
+
+  public void setUnicode(final boolean unicode) {
+    this.unicode = unicode;
+  }
+
+  @Override
+  public SRID getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final SRID srid) {
+    this.srid = srid;
+  }
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/XMLMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/XMLMetadataImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/XMLMetadataImpl.java
new file mode 100644
index 0000000..35de525
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/XMLMetadataImpl.java
@@ -0,0 +1,56 @@
+/*
+ * 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.client.core.edm.xml;
+
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Edmx;
+import org.apache.olingo.client.api.edm.xml.Reference;
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+
+public class XMLMetadataImpl extends AbstractXMLMetadata implements XMLMetadata {
+
+  private static final long serialVersionUID = 6025723060298454901L;
+
+  public XMLMetadataImpl(final EdmxImpl edmx) {
+    super(edmx);
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  public List<Schema> getSchemas() {
+    return (List<Schema>) super.getSchemas();
+  }
+
+  @Override
+  public Schema getSchema(final int index) {
+    return (Schema) super.getSchema(index);
+  }
+
+  @Override
+  public Schema getSchema(final String key) {
+    return (Schema) super.getSchema(key);
+  }
+
+  @Override
+  public List<Reference> getReferences() {
+    return ((Edmx) this.edmx).getReferences();
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotatableDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotatableDynamicAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotatableDynamicAnnotationExpression.java
new file mode 100644
index 0000000..da9691e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotatableDynamicAnnotationExpression.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+
+abstract class AbstractAnnotatableDynamicAnnotationExpression
+        extends AbstractDynamicAnnotationExpression implements Annotatable {
+
+  private static final long serialVersionUID = -450668773857358139L;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  @Override
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotationExpression.java
new file mode 100644
index 0000000..82c0a3d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractAnnotationExpression.java
@@ -0,0 +1,49 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.ConstantAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+
+public abstract class AbstractAnnotationExpression extends AbstractEdmItem implements AnnotationExpression {
+
+  private static final long serialVersionUID = -4238652997159205377L;
+
+  @Override
+  public boolean isConstant() {
+    return this instanceof ConstantAnnotationExpression;
+  }
+
+  @Override
+  public ConstantAnnotationExpression asConstant() {
+    return isConstant() ? (ConstantAnnotationExpression) this : null;
+  }
+
+  @Override
+  public boolean isDynamic() {
+    return this instanceof DynamicAnnotationExpression;
+  }
+
+  @Override
+  public DynamicAnnotationExpression asDynamic() {
+    return isDynamic() ? (DynamicAnnotationExpression) this : null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractDynamicAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractDynamicAnnotationExpression.java
new file mode 100644
index 0000000..f94bac6
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractDynamicAnnotationExpression.java
@@ -0,0 +1,218 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationPath;
+import org.apache.olingo.client.api.edm.xml.annotation.Apply;
+import org.apache.olingo.client.api.edm.xml.annotation.Cast;
+import org.apache.olingo.client.api.edm.xml.annotation.Collection;
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.If;
+import org.apache.olingo.client.api.edm.xml.annotation.IsOf;
+import org.apache.olingo.client.api.edm.xml.annotation.LabeledElement;
+import org.apache.olingo.client.api.edm.xml.annotation.LabeledElementReference;
+import org.apache.olingo.client.api.edm.xml.annotation.NavigationPropertyPath;
+import org.apache.olingo.client.api.edm.xml.annotation.Not;
+import org.apache.olingo.client.api.edm.xml.annotation.Null;
+import org.apache.olingo.client.api.edm.xml.annotation.Path;
+import org.apache.olingo.client.api.edm.xml.annotation.PropertyPath;
+import org.apache.olingo.client.api.edm.xml.annotation.PropertyValue;
+import org.apache.olingo.client.api.edm.xml.annotation.Record;
+import org.apache.olingo.client.api.edm.xml.annotation.TwoParamsOpDynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.UrlRef;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = DynamicAnnotationExpressionDeserializer.class)
+public abstract class AbstractDynamicAnnotationExpression
+        extends AbstractAnnotationExpression implements DynamicAnnotationExpression {
+
+  private static final long serialVersionUID = 1093411847477874348L;
+
+  @Override
+  public boolean isNot() {
+    return this instanceof Not;
+  }
+
+  @Override
+  public Not asNot() {
+    return isNot() ? (Not) this : null;
+
+  }
+
+  @Override
+  public boolean isTwoParamsOp() {
+    return this instanceof TwoParamsOpDynamicAnnotationExpression;
+  }
+
+  @Override
+  public TwoParamsOpDynamicAnnotationExpression asTwoParamsOp() {
+    return isTwoParamsOp() ? (TwoParamsOpDynamicAnnotationExpression) this : null;
+  }
+
+  @Override
+  public boolean isAnnotationPath() {
+    return this instanceof AnnotationPath;
+  }
+
+  @Override
+  public AnnotationPath asAnnotationPath() {
+    return isAnnotationPath() ? (AnnotationPath) this : null;
+  }
+
+  @Override
+  public boolean isApply() {
+    return this instanceof Apply;
+  }
+
+  @Override
+  public Apply asApply() {
+    return isApply() ? (Apply) this : null;
+  }
+
+  @Override
+  public boolean isCast() {
+    return this instanceof Cast;
+  }
+
+  @Override
+  public Cast asCast() {
+    return isCast() ? (Cast) this : null;
+  }
+
+  @Override
+  public boolean isCollection() {
+    return this instanceof Collection;
+  }
+
+  @Override
+  public Collection asCollection() {
+    return isCollection() ? (Collection) this : null;
+  }
+
+  @Override
+  public boolean isIf() {
+    return this instanceof If;
+  }
+
+  @Override
+  public If asIf() {
+    return isIf() ? (If) this : null;
+  }
+
+  @Override
+  public boolean isIsOf() {
+    return this instanceof IsOf;
+  }
+
+  @Override
+  public IsOf asIsOf() {
+    return isIsOf() ? (IsOf) this : null;
+  }
+
+  @Override
+  public boolean isLabeledElement() {
+    return this instanceof LabeledElement;
+  }
+
+  @Override
+  public LabeledElement asLabeledElement() {
+    return isLabeledElement() ? (LabeledElement) this : null;
+  }
+
+  @Override
+  public boolean isLabeledElementReference() {
+    return this instanceof LabeledElementReference;
+  }
+
+  @Override
+  public LabeledElementReference asLabeledElementReference() {
+    return isLabeledElementReference() ? (LabeledElementReference) this : null;
+  }
+
+  @Override
+  public boolean isNull() {
+    return this instanceof Null;
+  }
+
+  @Override
+  public Null asNull() {
+    return isNull() ? (Null) this : null;
+  }
+
+  @Override
+  public boolean isNavigationPropertyPath() {
+    return this instanceof NavigationPropertyPath;
+  }
+
+  @Override
+  public NavigationPropertyPath asNavigationPropertyPath() {
+    return isNavigationPropertyPath() ? (NavigationPropertyPath) this : null;
+  }
+
+  @Override
+  public boolean isPath() {
+    return this instanceof Path;
+  }
+
+  @Override
+  public Path asPath() {
+    return isPath() ? (Path) this : null;
+  }
+
+  @Override
+  public boolean isPropertyPath() {
+    return this instanceof PropertyPath;
+  }
+
+  @Override
+  public PropertyPath asPropertyPath() {
+    return isPropertyPath() ? (PropertyPath) this : null;
+  }
+
+  @Override
+  public boolean isPropertyValue() {
+    return this instanceof PropertyValue;
+  }
+
+  @Override
+  public PropertyValue asPropertyValue() {
+    return isPropertyValue() ? (PropertyValue) this : null;
+  }
+
+  @Override
+  public boolean isRecord() {
+    return this instanceof Record;
+  }
+
+  @Override
+  public Record asRecord() {
+    return isRecord() ? (Record) this : null;
+  }
+
+  @Override
+  public boolean isUrlRef() {
+    return this instanceof UrlRef;
+  }
+
+  @Override
+  public UrlRef asUrlRef() {
+    return isUrlRef() ? (UrlRef) this : null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractElementOrAttributeExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractElementOrAttributeExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractElementOrAttributeExpression.java
new file mode 100644
index 0000000..8237fca
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractElementOrAttributeExpression.java
@@ -0,0 +1,37 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+/**
+ * Groups dynamic expressions that may be provided using element notation or attribute notation.
+ */
+abstract class AbstractElementOrAttributeExpression extends AbstractDynamicAnnotationExpression {
+
+  private static final long serialVersionUID = 1588336268773032932L;
+
+  private String value;
+
+  public String getValue() {
+    return value;
+  }
+
+  public void setValue(final String value) {
+    this.value = value;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AnnotationPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AnnotationPathImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AnnotationPathImpl.java
new file mode 100644
index 0000000..0893613
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AnnotationPathImpl.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.core.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationPath;
+
+public class AnnotationPathImpl extends AbstractElementOrAttributeExpression implements AnnotationPath {
+
+  private static final long serialVersionUID = 5360735207353494466L;
+
+}


[15/17] olingo-odata4 git commit: [OLINGO-575] Merge v4 packages in commons

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java
new file mode 100644
index 0000000..bd148b2
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataComplexValueImpl.java
@@ -0,0 +1,161 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ODataComplexValueImpl extends AbstractODataComplexValue<ODataProperty> implements ODataLinkedComplexValue {
+
+  /**
+   * Navigation links (might contain in-line entities or entity sets).
+   */
+  private final List<ODataLink> navigationLinks = new ArrayList<ODataLink>();
+
+  /**
+   * Association links.
+   */
+  private final List<ODataLink> associationLinks = new ArrayList<ODataLink>();
+
+  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
+
+  public ODataComplexValueImpl(final String typeName) {
+    super(typeName);
+  }
+
+  @Override
+  protected ODataComplexValue<ODataProperty> getThis() {
+    return this;
+  }
+
+  @Override
+  public boolean isEnum() {
+    return false;
+  }
+
+  @Override
+  public ODataEnumValue asEnum() {
+    return null;
+  }
+
+  @Override
+  public boolean isLinkedComplex() {
+    return true;
+  }
+
+  @Override
+  public ODataLinkedComplexValue asLinkedComplex() {
+    return this;
+  }
+
+  @Override
+  public boolean addLink(final ODataLink link) {
+    boolean result = false;
+
+    switch (link.getType()) {
+    case ASSOCIATION:
+      result = associationLinks.contains(link) ? false : associationLinks.add(link);
+      break;
+
+    case ENTITY_NAVIGATION:
+    case ENTITY_SET_NAVIGATION:
+      result = navigationLinks.contains(link) ? false : navigationLinks.add(link);
+      break;
+
+    case MEDIA_EDIT:
+      throw new IllegalArgumentException("Complex values cannot have media links!");
+
+    default:
+    }
+
+    return result;
+  }
+
+  @Override
+  public boolean removeLink(final ODataLink link) {
+    return associationLinks.remove(link) || navigationLinks.remove(link);
+  }
+
+  private ODataLink getLink(final List<ODataLink> links, final String name) {
+    ODataLink result = null;
+    for (ODataLink link : links) {
+      if (name.equals(link.getName())) {
+        result = link;
+      }
+    }
+
+    return result;
+  }
+
+  @Override
+  public ODataLink getNavigationLink(final String name) {
+    return getLink(navigationLinks, name);
+  }
+
+  @Override
+  public List<ODataLink> getNavigationLinks() {
+    return navigationLinks;
+  }
+
+  @Override
+  public ODataLink getAssociationLink(final String name) {
+    return getLink(associationLinks, name);
+  }
+
+  @Override
+  public List<ODataLink> getAssociationLinks() {
+    return associationLinks;
+  }
+
+  @Override
+  public Map<String, Object> asJavaMap() {
+    final Map<String, Object> result = new LinkedHashMap<String, Object>();
+    for (Map.Entry<String, ODataProperty> entry : fields.entrySet()) {
+      Object value = null;
+      if (entry.getValue().hasPrimitiveValue()) {
+        value = entry.getValue().getPrimitiveValue().toValue();
+      } else if (entry.getValue().hasComplexValue()) {
+        value = entry.getValue().getComplexValue().asJavaMap();
+      } else if (entry.getValue().hasCollectionValue()) {
+        value = entry.getValue().getCollectionValue().asJavaCollection();
+      } else if (entry.getValue().hasEnumValue()) {
+        value = entry.getValue().getEnumValue().toString();
+      }
+
+      result.put(entry.getKey(), value);
+    }
+
+    return result;
+  }
+
+  @Override
+  public List<ODataAnnotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeletedEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeletedEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeletedEntityImpl.java
new file mode 100644
index 0000000..4021996
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeletedEntityImpl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataDeletedEntity;
+import org.apache.olingo.commons.api.domain.ODataItem;
+
+import java.net.URI;
+
+public class ODataDeletedEntityImpl extends ODataItem implements ODataDeletedEntity {
+
+  private URI id;
+
+  private Reason reason;
+
+  public ODataDeletedEntityImpl() {
+    super(null);
+  }
+
+  @Override
+  public URI getId() {
+    return id;
+  }
+
+  public void setId(final URI id) {
+    this.id = id;
+  }
+
+  @Override
+  public Reason getReason() {
+    return reason;
+  }
+
+  public void setReason(final Reason reason) {
+    this.reason = reason;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaImpl.java
new file mode 100644
index 0000000..f8d6fdf
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaImpl.java
@@ -0,0 +1,60 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataDeletedEntity;
+import org.apache.olingo.commons.api.domain.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataDeltaLink;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ODataDeltaImpl extends ODataEntitySetImpl implements ODataDelta {
+
+  private final List<ODataDeletedEntity> deletedEntities = new ArrayList<ODataDeletedEntity>();
+
+  private final List<ODataDeltaLink> addedLinks = new ArrayList<ODataDeltaLink>();
+
+  private final List<ODataDeltaLink> deletedLinks = new ArrayList<ODataDeltaLink>();
+
+  public ODataDeltaImpl() {
+    super();
+  }
+
+  public ODataDeltaImpl(final URI next) {
+    super(next);
+  }
+
+  @Override
+  public List<ODataDeletedEntity> getDeletedEntities() {
+    return deletedEntities;
+  }
+
+  @Override
+  public List<ODataDeltaLink> getAddedLinks() {
+    return addedLinks;
+  }
+
+  @Override
+  public List<ODataDeltaLink> getDeletedLinks() {
+    return deletedLinks;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaLinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaLinkImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaLinkImpl.java
new file mode 100644
index 0000000..5a39382
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataDeltaLinkImpl.java
@@ -0,0 +1,78 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataDeltaLink;
+import org.apache.olingo.commons.api.domain.ODataItem;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ODataDeltaLinkImpl extends ODataItem implements ODataDeltaLink {
+
+  private URI source;
+
+  private String relationship;
+
+  private URI target;
+
+  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
+
+  public ODataDeltaLinkImpl() {
+    super(null);
+  }
+
+  @Override
+  public URI getSource() {
+    return source;
+  }
+
+  @Override
+  public void setSource(final URI source) {
+    this.source = source;
+  }
+
+  @Override
+  public String getRelationship() {
+    return relationship;
+  }
+
+  @Override
+  public void setRelationship(final String relationship) {
+    this.relationship = relationship;
+  }
+
+  @Override
+  public URI getTarget() {
+    return target;
+  }
+
+  @Override
+  public void setTarget(final URI target) {
+    this.target = target;
+  }
+
+  @Override
+  public List<ODataAnnotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java
new file mode 100644
index 0000000..84bba6d
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntityImpl.java
@@ -0,0 +1,70 @@
+/*
+ * 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.domain;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+
+public class ODataEntityImpl extends AbstractODataEntity implements ODataSingleton {
+
+  /**
+   * Entity id.
+   */
+  private URI id;
+
+  private final List<ODataProperty> properties = new ArrayList<ODataProperty>();
+
+  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
+
+  public ODataEntityImpl(final FullQualifiedName typeName) {
+    super(typeName);
+  }
+
+  @Override
+  public URI getId() {
+    return id;
+  }
+
+  @Override
+  public void setId(final URI id) {
+    this.id = id;
+  }
+
+  @Override
+  public ODataProperty getProperty(final String name) {
+    return (ODataProperty) super.getProperty(name);
+  }
+
+  @Override
+  public List<ODataProperty> getProperties() {
+    return properties;
+  }
+
+  @Override
+  public List<ODataAnnotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntitySetImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntitySetImpl.java
new file mode 100644
index 0000000..b6853c1
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEntitySetImpl.java
@@ -0,0 +1,65 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ODataEntitySetImpl extends AbstractODataEntitySet implements ODataEntitySet {
+
+  private URI deltaLink;
+
+  private final List<ODataEntity> entities = new ArrayList<ODataEntity>();
+
+  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
+
+  public ODataEntitySetImpl() {
+    super();
+  }
+
+  public ODataEntitySetImpl(final URI next) {
+    super(next);
+  }
+
+  @Override
+  public List<ODataEntity> getEntities() {
+    return entities;
+  }
+
+  @Override
+  public URI getDeltaLink() {
+    return deltaLink;
+  }
+
+  @Override
+  public void setDeltaLink(final URI deltaLink) {
+    this.deltaLink = deltaLink;
+  }
+
+  @Override
+  public List<ODataAnnotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEnumValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEnumValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEnumValueImpl.java
new file mode 100644
index 0000000..bf76376
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataEnumValueImpl.java
@@ -0,0 +1,65 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.AbstractODataValue;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+
+public class ODataEnumValueImpl extends AbstractODataValue implements ODataEnumValue {
+
+  private final String value;
+
+  public ODataEnumValueImpl(final String typeName, final String value) {
+    super(typeName);
+    this.value = value;
+  }
+
+  @Override
+  public String getValue() {
+    return value;
+  }
+
+  @Override
+  public boolean isEnum() {
+    return true;
+  }
+
+  @Override
+  public ODataEnumValue asEnum() {
+    return this;
+  }
+
+  @Override
+  public boolean isLinkedComplex() {
+    return false;
+  }
+
+  @Override
+  public ODataLinkedComplexValue asLinkedComplex() {
+    return null;
+  }
+
+  @Override
+  public String toString() {
+    return getTypeName() + "'" + getValue() + "'";
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataObjectFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataObjectFactoryImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataObjectFactoryImpl.java
new file mode 100644
index 0000000..7f7a81c
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataObjectFactoryImpl.java
@@ -0,0 +1,156 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataLinkType;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+import java.net.URI;
+
+public class ODataObjectFactoryImpl extends AbstractODataObjectFactory implements ODataObjectFactory {
+
+  public ODataObjectFactoryImpl(final ODataServiceVersion version) {
+    super(version);
+  }
+
+  @Override
+  public ODataEntitySet newEntitySet() {
+    return new ODataEntitySetImpl();
+  }
+
+  @Override
+  public ODataEntitySet newEntitySet(final URI next) {
+    return new ODataEntitySetImpl(next);
+  }
+
+  @Override
+  public ODataEntity newEntity(final FullQualifiedName typeName) {
+    return new ODataEntityImpl(typeName);
+  }
+
+  @Override
+  public ODataEntity newEntity(final FullQualifiedName typeName, final URI link) {
+    final ODataEntityImpl result = new ODataEntityImpl(typeName);
+    result.setLink(link);
+    return result;
+  }
+
+  @Override
+  public ODataSingleton newSingleton(final FullQualifiedName typeName) {
+    return new ODataEntityImpl(typeName);
+  }
+
+  @Override
+  public ODataLink newEntityNavigationLink(final String name, final URI link) {
+    return new ODataLink.Builder().setVersion(version).setURI(link).
+        setType(ODataLinkType.ENTITY_NAVIGATION).setTitle(name).build();
+  }
+
+  @Override
+  public ODataLink newEntitySetNavigationLink(final String name, final URI link) {
+    return new ODataLink.Builder().setVersion(version).setURI(link).
+        setType(ODataLinkType.ENTITY_SET_NAVIGATION).setTitle(name).build();
+  }
+
+  @Override
+  public ODataLink newAssociationLink(final String name, final URI link) {
+    return new ODataLink.Builder().setVersion(version).setURI(link).
+        setType(ODataLinkType.ASSOCIATION).setTitle(name).build();
+  }
+
+  @Override
+  public ODataLink newMediaEditLink(final String name, final URI link) {
+    return new ODataLink.Builder().setVersion(version).setURI(link).
+        setType(ODataLinkType.MEDIA_EDIT).setTitle(name).build();
+  }
+
+  @Override
+  public ODataPrimitiveValue.Builder newPrimitiveValueBuilder() {
+    return new ODataPrimitiveValueImpl.BuilderImpl(version);
+  }
+
+  @Override
+  public ODataEnumValue newEnumValue(final String typeName, final String value) {
+    return new ODataEnumValueImpl(typeName, value);
+  }
+
+  @Override
+  public ODataComplexValue<ODataProperty> newComplexValue(final String typeName) {
+    return new ODataComplexValueImpl(typeName);
+  }
+
+  @Override
+  public ODataLinkedComplexValue newLinkedComplexValue(final String typeName) {
+    return new ODataComplexValueImpl(typeName);
+  }
+
+  @Override
+  public ODataCollectionValue<ODataValue> newCollectionValue(final String typeName) {
+    return new ODataCollectionValueImpl(typeName);
+  }
+
+  @Override
+  public ODataProperty newPrimitiveProperty(final String name, final ODataPrimitiveValue value) {
+    return new ODataPropertyImpl(name, value);
+  }
+
+  @Override
+  public ODataProperty newComplexProperty(final String name,
+      final ODataComplexValue<? extends CommonODataProperty> value) {
+
+    return new ODataPropertyImpl(name, value);
+  }
+
+  @Override
+  public ODataProperty newCollectionProperty(final String name,
+      final ODataCollectionValue<? extends org.apache.olingo.commons.api.domain.ODataValue> value) {
+
+    return new ODataPropertyImpl(name, value);
+  }
+
+  @Override
+  public ODataProperty newEnumProperty(final String name, final ODataEnumValue value) {
+    return new ODataPropertyImpl(name, value);
+  }
+
+  @Override
+  public ODataDelta newDelta() {
+    return new ODataDeltaImpl();
+  }
+
+  @Override
+  public ODataDelta newDelta(final URI next) {
+    return new ODataDeltaImpl(next);
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPrimitiveValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPrimitiveValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPrimitiveValueImpl.java
new file mode 100644
index 0000000..e50d8ad
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPrimitiveValueImpl.java
@@ -0,0 +1,69 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class ODataPrimitiveValueImpl extends AbstractODataPrimitiveValue implements ODataValue {
+
+  public static class BuilderImpl extends AbstractBuilder {
+
+    private final ODataPrimitiveValueImpl instance;
+
+    public BuilderImpl(final ODataServiceVersion version) {
+      super(version);
+      instance = new ODataPrimitiveValueImpl();
+    }
+
+    @Override
+    protected AbstractODataPrimitiveValue getInstance() {
+      return instance;
+    }
+
+    @Override
+    public ODataPrimitiveValueImpl build() {
+      return (ODataPrimitiveValueImpl) super.build();
+    }
+
+  }
+
+  @Override
+  public boolean isEnum() {
+    return false;
+  }
+
+  @Override
+  public ODataEnumValue asEnum() {
+    return null;
+  }
+
+  @Override
+  public boolean isLinkedComplex() {
+    return false;
+  }
+
+  @Override
+  public ODataLinkedComplexValue asLinkedComplex() {
+    return null;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPropertyImpl.java
new file mode 100644
index 0000000..e1560b3
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataPropertyImpl.java
@@ -0,0 +1,88 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataValue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ODataPropertyImpl extends AbstractODataProperty implements ODataProperty {
+
+  private final ODataValuable valuable;
+
+  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
+
+  public ODataPropertyImpl(final String name, final org.apache.olingo.commons.api.domain.ODataValue value) {
+    super(name, value);
+    valuable = new ODataValuableImpl((ODataValue) value);
+  }
+
+  @Override
+  public ODataValue getValue() {
+    return valuable.getValue();
+  }
+
+  @Override
+  public boolean hasEnumValue() {
+    return valuable.hasEnumValue();
+  }
+
+  @Override
+  public ODataEnumValue getEnumValue() {
+    return valuable.getEnumValue();
+  }
+
+  @Override
+  public ODataComplexValue<ODataProperty> getComplexValue() {
+    return valuable.getComplexValue();
+  }
+
+  @Override
+  public ODataLinkedComplexValue getLinkedComplexValue() {
+    return valuable.getLinkedComplexValue();
+  }
+
+  @Override
+  public ODataCollectionValue<ODataValue> getCollectionValue() {
+    return valuable.getCollectionValue();
+  }
+
+  @Override
+  public List<ODataAnnotation> getAnnotations() {
+    return annotations;
+  }
+
+  @Override
+  public String toString() {
+    return "ODataPropertyImpl{"
+        + "name=" + getName()
+        + ",valuable=" + valuable
+        + ", annotations=" + annotations
+        + '}';
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataValuableImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataValuableImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataValuableImpl.java
new file mode 100644
index 0000000..090a584
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataValuableImpl.java
@@ -0,0 +1,120 @@
+/*
+ * 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.domain;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataValue;
+
+public class ODataValuableImpl implements ODataValuable {
+
+  private final ODataValue value;
+
+  public ODataValuableImpl(final ODataValue value) {
+    this.value = value;
+  }
+
+  @Override
+  public ODataValue getValue() {
+    return value;
+  }
+
+  @Override
+  public boolean hasNullValue() {
+    return value == null;
+  }
+
+  @Override
+  public boolean hasPrimitiveValue() {
+    return !hasNullValue() && value.isPrimitive();
+  }
+
+  @Override
+  public ODataPrimitiveValue getPrimitiveValue() {
+    return hasPrimitiveValue() ? value.asPrimitive() : null;
+  }
+
+  @Override
+  public boolean hasCollectionValue() {
+    return !hasNullValue() && value.isCollection();
+  }
+
+  @Override
+  public ODataCollectionValue<ODataValue> getCollectionValue() {
+    return hasCollectionValue()
+        ? getValue().<ODataValue> asCollection()
+        : null;
+  }
+
+  @Override
+  public boolean hasComplexValue() {
+    return !hasNullValue() && value.isComplex();
+  }
+
+  @Override
+  public ODataComplexValue<ODataProperty> getComplexValue() {
+    return hasComplexValue()
+        ? getValue().<ODataProperty> asComplex()
+        : null;
+  }
+
+  @Override
+  public ODataLinkedComplexValue getLinkedComplexValue() {
+    return hasComplexValue()
+        ? getValue().asLinkedComplex()
+        : null;
+  }
+
+  @Override
+  public boolean hasEnumValue() {
+    return !hasNullValue() && getValue().isEnum();
+  }
+
+  @Override
+  public ODataEnumValue getEnumValue() {
+    return hasEnumValue()
+        ? getValue().asEnum()
+        : null;
+  }
+
+  @Override
+  public boolean equals(final Object obj) {
+    return EqualsBuilder.reflectionEquals(this, obj);
+  }
+
+  @Override
+  public int hashCode() {
+    return HashCodeBuilder.reflectionHashCode(this);
+  }
+
+  @Override
+  public String toString() {
+    return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataAnnotationImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataAnnotationImpl.java
deleted file mode 100644
index 436217c..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataAnnotationImpl.java
+++ /dev/null
@@ -1,109 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-
-public class ODataAnnotationImpl implements ODataAnnotation {
-
-  private final String term;
-
-  private final ODataValuable valuable;
-
-  public ODataAnnotationImpl(final String term, final ODataValue value) {
-    this.term = term;
-    valuable = new ODataValuableImpl(value);
-  }
-
-  @Override
-  public String getTerm() {
-    return term;
-  }
-
-  @Override
-  public ODataValue getValue() {
-    return valuable.getValue();
-  }
-
-  @Override
-  public boolean hasNullValue() {
-    return valuable.hasNullValue();
-  }
-
-  @Override
-  public boolean hasPrimitiveValue() {
-    return valuable.hasPrimitiveValue();
-  }
-
-  @Override
-  public ODataPrimitiveValue getPrimitiveValue() {
-    return valuable.getPrimitiveValue();
-  }
-
-  @Override
-  public boolean hasCollectionValue() {
-    return valuable.hasCollectionValue();
-  }
-
-  @Override
-  public ODataCollectionValue<ODataValue> getCollectionValue() {
-    return valuable.getCollectionValue();
-  }
-
-  @Override
-  public boolean hasComplexValue() {
-    return valuable.hasComplexValue();
-  }
-
-  @Override
-  public ODataComplexValue<ODataProperty> getComplexValue() {
-    return valuable.getComplexValue();
-  }
-
-  @Override
-  public ODataLinkedComplexValue getLinkedComplexValue() {
-    return valuable.getLinkedComplexValue();
-  }
-
-  @Override
-  public boolean hasEnumValue() {
-    return valuable.hasEnumValue();
-  }
-
-  @Override
-  public ODataEnumValue getEnumValue() {
-    return valuable.getEnumValue();
-  }
-
-  @Override
-  public String toString() {
-    return "ODataPropertyImpl{"
-        + "term=" + term
-        + ",valuable=" + valuable
-        + '}';
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataCollectionValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataCollectionValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataCollectionValueImpl.java
deleted file mode 100644
index 6f29af3..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataCollectionValueImpl.java
+++ /dev/null
@@ -1,78 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-import org.apache.olingo.commons.core.domain.AbstractODataCollectionValue;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class ODataCollectionValueImpl extends AbstractODataCollectionValue<ODataValue> implements ODataValue {
-
-  public ODataCollectionValueImpl(final String typeName) {
-    super(typeName);
-  }
-
-  @Override
-  protected ODataCollectionValueImpl getThis() {
-    return this;
-  }
-
-  @Override
-  public boolean isEnum() {
-    return false;
-  }
-
-  @Override
-  public ODataEnumValue asEnum() {
-    return null;
-  }
-
-  @Override
-  public boolean isLinkedComplex() {
-    return false;
-  }
-
-  @Override
-  public ODataLinkedComplexValue asLinkedComplex() {
-    return null;
-  }
-
-  @Override
-  public Collection<Object> asJavaCollection() {
-    final List<Object> result = new ArrayList<Object>();
-    for (ODataValue value : values) {
-      if (value.isPrimitive()) {
-        result.add(value.asPrimitive().toValue());
-      } else if (value.isComplex()) {
-        result.add(value.asComplex().asJavaMap());
-      } else if (value.isCollection()) {
-        result.add(value.asCollection().asJavaCollection());
-      } else if (value.isEnum()) {
-        result.add(value.asEnum().toString());
-      }
-    }
-
-    return result;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataComplexValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataComplexValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataComplexValueImpl.java
deleted file mode 100644
index 9a3ed7b..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataComplexValueImpl.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.core.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.core.domain.AbstractODataComplexValue;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-public class ODataComplexValueImpl extends AbstractODataComplexValue<ODataProperty> implements ODataLinkedComplexValue {
-
-  /**
-   * Navigation links (might contain in-line entities or entity sets).
-   */
-  private final List<ODataLink> navigationLinks = new ArrayList<ODataLink>();
-
-  /**
-   * Association links.
-   */
-  private final List<ODataLink> associationLinks = new ArrayList<ODataLink>();
-
-  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
-
-  public ODataComplexValueImpl(final String typeName) {
-    super(typeName);
-  }
-
-  @Override
-  protected ODataComplexValue<ODataProperty> getThis() {
-    return this;
-  }
-
-  @Override
-  public boolean isEnum() {
-    return false;
-  }
-
-  @Override
-  public ODataEnumValue asEnum() {
-    return null;
-  }
-
-  @Override
-  public boolean isLinkedComplex() {
-    return true;
-  }
-
-  @Override
-  public ODataLinkedComplexValue asLinkedComplex() {
-    return this;
-  }
-
-  @Override
-  public boolean addLink(final ODataLink link) {
-    boolean result = false;
-
-    switch (link.getType()) {
-    case ASSOCIATION:
-      result = associationLinks.contains(link) ? false : associationLinks.add(link);
-      break;
-
-    case ENTITY_NAVIGATION:
-    case ENTITY_SET_NAVIGATION:
-      result = navigationLinks.contains(link) ? false : navigationLinks.add(link);
-      break;
-
-    case MEDIA_EDIT:
-      throw new IllegalArgumentException("Complex values cannot have media links!");
-
-    default:
-    }
-
-    return result;
-  }
-
-  @Override
-  public boolean removeLink(final ODataLink link) {
-    return associationLinks.remove(link) || navigationLinks.remove(link);
-  }
-
-  private ODataLink getLink(final List<ODataLink> links, final String name) {
-    ODataLink result = null;
-    for (ODataLink link : links) {
-      if (name.equals(link.getName())) {
-        result = link;
-      }
-    }
-
-    return result;
-  }
-
-  @Override
-  public ODataLink getNavigationLink(final String name) {
-    return getLink(navigationLinks, name);
-  }
-
-  @Override
-  public List<ODataLink> getNavigationLinks() {
-    return navigationLinks;
-  }
-
-  @Override
-  public ODataLink getAssociationLink(final String name) {
-    return getLink(associationLinks, name);
-  }
-
-  @Override
-  public List<ODataLink> getAssociationLinks() {
-    return associationLinks;
-  }
-
-  @Override
-  public Map<String, Object> asJavaMap() {
-    final Map<String, Object> result = new LinkedHashMap<String, Object>();
-    for (Map.Entry<String, ODataProperty> entry : fields.entrySet()) {
-      Object value = null;
-      if (entry.getValue().hasPrimitiveValue()) {
-        value = entry.getValue().getPrimitiveValue().toValue();
-      } else if (entry.getValue().hasComplexValue()) {
-        value = entry.getValue().getComplexValue().asJavaMap();
-      } else if (entry.getValue().hasCollectionValue()) {
-        value = entry.getValue().getCollectionValue().asJavaCollection();
-      } else if (entry.getValue().hasEnumValue()) {
-        value = entry.getValue().getEnumValue().toString();
-      }
-
-      result.put(entry.getKey(), value);
-    }
-
-    return result;
-  }
-
-  @Override
-  public List<ODataAnnotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeletedEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeletedEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeletedEntityImpl.java
deleted file mode 100644
index 8722d7d..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeletedEntityImpl.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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataItem;
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity;
-
-import java.net.URI;
-
-public class ODataDeletedEntityImpl extends ODataItem implements ODataDeletedEntity {
-
-  private URI id;
-
-  private Reason reason;
-
-  public ODataDeletedEntityImpl() {
-    super(null);
-  }
-
-  @Override
-  public URI getId() {
-    return id;
-  }
-
-  public void setId(final URI id) {
-    this.id = id;
-  }
-
-  @Override
-  public Reason getReason() {
-    return reason;
-  }
-
-  public void setReason(final Reason reason) {
-    this.reason = reason;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaImpl.java
deleted file mode 100644
index 18e7655..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaImpl.java
+++ /dev/null
@@ -1,60 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ODataDeltaImpl extends ODataEntitySetImpl implements ODataDelta {
-
-  private final List<ODataDeletedEntity> deletedEntities = new ArrayList<ODataDeletedEntity>();
-
-  private final List<ODataDeltaLink> addedLinks = new ArrayList<ODataDeltaLink>();
-
-  private final List<ODataDeltaLink> deletedLinks = new ArrayList<ODataDeltaLink>();
-
-  public ODataDeltaImpl() {
-    super();
-  }
-
-  public ODataDeltaImpl(final URI next) {
-    super(next);
-  }
-
-  @Override
-  public List<ODataDeletedEntity> getDeletedEntities() {
-    return deletedEntities;
-  }
-
-  @Override
-  public List<ODataDeltaLink> getAddedLinks() {
-    return addedLinks;
-  }
-
-  @Override
-  public List<ODataDeltaLink> getDeletedLinks() {
-    return deletedLinks;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java
deleted file mode 100644
index a0d18e6..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java
+++ /dev/null
@@ -1,78 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataItem;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ODataDeltaLinkImpl extends ODataItem implements ODataDeltaLink {
-
-  private URI source;
-
-  private String relationship;
-
-  private URI target;
-
-  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
-
-  public ODataDeltaLinkImpl() {
-    super(null);
-  }
-
-  @Override
-  public URI getSource() {
-    return source;
-  }
-
-  @Override
-  public void setSource(final URI source) {
-    this.source = source;
-  }
-
-  @Override
-  public String getRelationship() {
-    return relationship;
-  }
-
-  @Override
-  public void setRelationship(final String relationship) {
-    this.relationship = relationship;
-  }
-
-  @Override
-  public URI getTarget() {
-    return target;
-  }
-
-  @Override
-  public void setTarget(final URI target) {
-    this.target = target;
-  }
-
-  @Override
-  public List<ODataAnnotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntityImpl.java
deleted file mode 100644
index 24063f4..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntityImpl.java
+++ /dev/null
@@ -1,71 +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.domain.v4;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.domain.AbstractODataEntity;
-
-public class ODataEntityImpl extends AbstractODataEntity implements ODataSingleton {
-
-  /**
-   * Entity id.
-   */
-  private URI id;
-
-  private final List<ODataProperty> properties = new ArrayList<ODataProperty>();
-
-  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
-
-  public ODataEntityImpl(final FullQualifiedName typeName) {
-    super(typeName);
-  }
-
-  @Override
-  public URI getId() {
-    return id;
-  }
-
-  @Override
-  public void setId(final URI id) {
-    this.id = id;
-  }
-
-  @Override
-  public ODataProperty getProperty(final String name) {
-    return (ODataProperty) super.getProperty(name);
-  }
-
-  @Override
-  public List<ODataProperty> getProperties() {
-    return properties;
-  }
-
-  @Override
-  public List<ODataAnnotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntitySetImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntitySetImpl.java
deleted file mode 100644
index eda164e..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEntitySetImpl.java
+++ /dev/null
@@ -1,66 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.core.domain.AbstractODataEntitySet;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ODataEntitySetImpl extends AbstractODataEntitySet implements ODataEntitySet {
-
-  private URI deltaLink;
-
-  private final List<ODataEntity> entities = new ArrayList<ODataEntity>();
-
-  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
-
-  public ODataEntitySetImpl() {
-    super();
-  }
-
-  public ODataEntitySetImpl(final URI next) {
-    super(next);
-  }
-
-  @Override
-  public List<ODataEntity> getEntities() {
-    return entities;
-  }
-
-  @Override
-  public URI getDeltaLink() {
-    return deltaLink;
-  }
-
-  @Override
-  public void setDeltaLink(final URI deltaLink) {
-    this.deltaLink = deltaLink;
-  }
-
-  @Override
-  public List<ODataAnnotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEnumValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEnumValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEnumValueImpl.java
deleted file mode 100644
index 52c8898..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataEnumValueImpl.java
+++ /dev/null
@@ -1,65 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.AbstractODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-
-public class ODataEnumValueImpl extends AbstractODataValue implements ODataEnumValue {
-
-  private final String value;
-
-  public ODataEnumValueImpl(final String typeName, final String value) {
-    super(typeName);
-    this.value = value;
-  }
-
-  @Override
-  public String getValue() {
-    return value;
-  }
-
-  @Override
-  public boolean isEnum() {
-    return true;
-  }
-
-  @Override
-  public ODataEnumValue asEnum() {
-    return this;
-  }
-
-  @Override
-  public boolean isLinkedComplex() {
-    return false;
-  }
-
-  @Override
-  public ODataLinkedComplexValue asLinkedComplex() {
-    return null;
-  }
-
-  @Override
-  public String toString() {
-    return getTypeName() + "'" + getValue() + "'";
-
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataObjectFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataObjectFactoryImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataObjectFactoryImpl.java
deleted file mode 100644
index 6c3c79a..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataObjectFactoryImpl.java
+++ /dev/null
@@ -1,157 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.CommonODataProperty;
-import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.core.domain.AbstractODataObjectFactory;
-
-import java.net.URI;
-
-public class ODataObjectFactoryImpl extends AbstractODataObjectFactory implements ODataObjectFactory {
-
-  public ODataObjectFactoryImpl(final ODataServiceVersion version) {
-    super(version);
-  }
-
-  @Override
-  public ODataEntitySet newEntitySet() {
-    return new ODataEntitySetImpl();
-  }
-
-  @Override
-  public ODataEntitySet newEntitySet(final URI next) {
-    return new ODataEntitySetImpl(next);
-  }
-
-  @Override
-  public ODataEntity newEntity(final FullQualifiedName typeName) {
-    return new ODataEntityImpl(typeName);
-  }
-
-  @Override
-  public ODataEntity newEntity(final FullQualifiedName typeName, final URI link) {
-    final ODataEntityImpl result = new ODataEntityImpl(typeName);
-    result.setLink(link);
-    return result;
-  }
-
-  @Override
-  public ODataSingleton newSingleton(final FullQualifiedName typeName) {
-    return new ODataEntityImpl(typeName);
-  }
-
-  @Override
-  public ODataLink newEntityNavigationLink(final String name, final URI link) {
-    return new ODataLink.Builder().setVersion(version).setURI(link).
-        setType(ODataLinkType.ENTITY_NAVIGATION).setTitle(name).build();
-  }
-
-  @Override
-  public ODataLink newEntitySetNavigationLink(final String name, final URI link) {
-    return new ODataLink.Builder().setVersion(version).setURI(link).
-        setType(ODataLinkType.ENTITY_SET_NAVIGATION).setTitle(name).build();
-  }
-
-  @Override
-  public ODataLink newAssociationLink(final String name, final URI link) {
-    return new ODataLink.Builder().setVersion(version).setURI(link).
-        setType(ODataLinkType.ASSOCIATION).setTitle(name).build();
-  }
-
-  @Override
-  public ODataLink newMediaEditLink(final String name, final URI link) {
-    return new ODataLink.Builder().setVersion(version).setURI(link).
-        setType(ODataLinkType.MEDIA_EDIT).setTitle(name).build();
-  }
-
-  @Override
-  public ODataPrimitiveValue.Builder newPrimitiveValueBuilder() {
-    return new ODataPrimitiveValueImpl.BuilderImpl(version);
-  }
-
-  @Override
-  public ODataEnumValue newEnumValue(final String typeName, final String value) {
-    return new ODataEnumValueImpl(typeName, value);
-  }
-
-  @Override
-  public ODataComplexValue<ODataProperty> newComplexValue(final String typeName) {
-    return new ODataComplexValueImpl(typeName);
-  }
-
-  @Override
-  public ODataLinkedComplexValue newLinkedComplexValue(final String typeName) {
-    return new ODataComplexValueImpl(typeName);
-  }
-
-  @Override
-  public ODataCollectionValue<ODataValue> newCollectionValue(final String typeName) {
-    return new ODataCollectionValueImpl(typeName);
-  }
-
-  @Override
-  public ODataProperty newPrimitiveProperty(final String name, final ODataPrimitiveValue value) {
-    return new ODataPropertyImpl(name, value);
-  }
-
-  @Override
-  public ODataProperty newComplexProperty(final String name,
-      final ODataComplexValue<? extends CommonODataProperty> value) {
-
-    return new ODataPropertyImpl(name, value);
-  }
-
-  @Override
-  public ODataProperty newCollectionProperty(final String name,
-      final ODataCollectionValue<? extends org.apache.olingo.commons.api.domain.ODataValue> value) {
-
-    return new ODataPropertyImpl(name, value);
-  }
-
-  @Override
-  public ODataProperty newEnumProperty(final String name, final ODataEnumValue value) {
-    return new ODataPropertyImpl(name, value);
-  }
-
-  @Override
-  public ODataDelta newDelta() {
-    return new ODataDeltaImpl();
-  }
-
-  @Override
-  public ODataDelta newDelta(final URI next) {
-    return new ODataDeltaImpl(next);
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPrimitiveValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPrimitiveValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPrimitiveValueImpl.java
deleted file mode 100644
index 97f252d..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPrimitiveValueImpl.java
+++ /dev/null
@@ -1,70 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.core.domain.AbstractODataPrimitiveValue;
-
-public class ODataPrimitiveValueImpl extends AbstractODataPrimitiveValue implements ODataValue {
-
-  public static class BuilderImpl extends AbstractBuilder {
-
-    private final ODataPrimitiveValueImpl instance;
-
-    public BuilderImpl(final ODataServiceVersion version) {
-      super(version);
-      instance = new ODataPrimitiveValueImpl();
-    }
-
-    @Override
-    protected AbstractODataPrimitiveValue getInstance() {
-      return instance;
-    }
-
-    @Override
-    public ODataPrimitiveValueImpl build() {
-      return (ODataPrimitiveValueImpl) super.build();
-    }
-
-  }
-
-  @Override
-  public boolean isEnum() {
-    return false;
-  }
-
-  @Override
-  public ODataEnumValue asEnum() {
-    return null;
-  }
-
-  @Override
-  public boolean isLinkedComplex() {
-    return false;
-  }
-
-  @Override
-  public ODataLinkedComplexValue asLinkedComplex() {
-    return null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPropertyImpl.java
deleted file mode 100644
index 84a35dc..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataPropertyImpl.java
+++ /dev/null
@@ -1,89 +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.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-import org.apache.olingo.commons.core.domain.AbstractODataProperty;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class ODataPropertyImpl extends AbstractODataProperty implements ODataProperty {
-
-  private final ODataValuable valuable;
-
-  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
-
-  public ODataPropertyImpl(final String name, final org.apache.olingo.commons.api.domain.ODataValue value) {
-    super(name, value);
-    valuable = new ODataValuableImpl((ODataValue) value);
-  }
-
-  @Override
-  public ODataValue getValue() {
-    return valuable.getValue();
-  }
-
-  @Override
-  public boolean hasEnumValue() {
-    return valuable.hasEnumValue();
-  }
-
-  @Override
-  public ODataEnumValue getEnumValue() {
-    return valuable.getEnumValue();
-  }
-
-  @Override
-  public ODataComplexValue<ODataProperty> getComplexValue() {
-    return valuable.getComplexValue();
-  }
-
-  @Override
-  public ODataLinkedComplexValue getLinkedComplexValue() {
-    return valuable.getLinkedComplexValue();
-  }
-
-  @Override
-  public ODataCollectionValue<ODataValue> getCollectionValue() {
-    return valuable.getCollectionValue();
-  }
-
-  @Override
-  public List<ODataAnnotation> getAnnotations() {
-    return annotations;
-  }
-
-  @Override
-  public String toString() {
-    return "ODataPropertyImpl{"
-        + "name=" + getName()
-        + ",valuable=" + valuable
-        + ", annotations=" + annotations
-        + '}';
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataValuableImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataValuableImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataValuableImpl.java
deleted file mode 100644
index 664691c..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataValuableImpl.java
+++ /dev/null
@@ -1,120 +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.domain.v4;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-
-public class ODataValuableImpl implements ODataValuable {
-
-  private final ODataValue value;
-
-  public ODataValuableImpl(final ODataValue value) {
-    this.value = value;
-  }
-
-  @Override
-  public ODataValue getValue() {
-    return value;
-  }
-
-  @Override
-  public boolean hasNullValue() {
-    return value == null;
-  }
-
-  @Override
-  public boolean hasPrimitiveValue() {
-    return !hasNullValue() && value.isPrimitive();
-  }
-
-  @Override
-  public ODataPrimitiveValue getPrimitiveValue() {
-    return hasPrimitiveValue() ? value.asPrimitive() : null;
-  }
-
-  @Override
-  public boolean hasCollectionValue() {
-    return !hasNullValue() && value.isCollection();
-  }
-
-  @Override
-  public ODataCollectionValue<ODataValue> getCollectionValue() {
-    return hasCollectionValue()
-        ? getValue().<ODataValue> asCollection()
-        : null;
-  }
-
-  @Override
-  public boolean hasComplexValue() {
-    return !hasNullValue() && value.isComplex();
-  }
-
-  @Override
-  public ODataComplexValue<ODataProperty> getComplexValue() {
-    return hasComplexValue()
-        ? getValue().<ODataProperty> asComplex()
-        : null;
-  }
-
-  @Override
-  public ODataLinkedComplexValue getLinkedComplexValue() {
-    return hasComplexValue()
-        ? getValue().asLinkedComplex()
-        : null;
-  }
-
-  @Override
-  public boolean hasEnumValue() {
-    return !hasNullValue() && getValue().isEnum();
-  }
-
-  @Override
-  public ODataEnumValue getEnumValue() {
-    return hasEnumValue()
-        ? getValue().asEnum()
-        : null;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    return EqualsBuilder.reflectionEquals(this, obj);
-  }
-
-  @Override
-  public int hashCode() {
-    return HashCodeBuilder.reflectionHashCode(this);
-  }
-
-  @Override
-  public String toString() {
-    return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/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 548063e..4431303 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
@@ -61,13 +61,13 @@ 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.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.LinkedComplexValueImpl;
 import org.apache.olingo.commons.core.data.PropertyImpl;
-import org.apache.olingo.commons.core.data.v4.DeltaImpl;
 import org.apache.olingo.commons.core.edm.EdmTypeInfo;
 
 import com.fasterxml.aalto.stax.InputFactoryImpl;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/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 a9d4fb4..037b436 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
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.data.ContextURL;
@@ -31,8 +32,8 @@ import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 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 org.apache.olingo.commons.core.data.v4.DeltaImpl;
 
 import java.io.IOException;
 import java.io.InputStream;


[16/17] olingo-odata4 git commit: [OLINGO-575] Merge v4 packages in commons

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
index b14ea6b..86d1847 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
@@ -44,23 +44,23 @@ import org.apache.olingo.commons.api.data.ValueType;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataAnnotatable;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataDeltaLink;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.ODataInlineEntity;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
 import org.apache.olingo.commons.api.domain.ODataLinked;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.domain.ODataServiceDocument;
+import org.apache.olingo.commons.api.domain.ODataValuable;
 import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotatable;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity.Reason;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataDeletedEntity.Reason;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
 import org.apache.olingo.commons.api.edm.EdmElement;
 import org.apache.olingo.commons.api.edm.EdmEnumType;
@@ -71,10 +71,10 @@ import org.apache.olingo.commons.api.edm.geo.Geospatial;
 import org.apache.olingo.commons.core.data.AnnotationImpl;
 import org.apache.olingo.commons.core.data.LinkedComplexValueImpl;
 import org.apache.olingo.commons.core.data.PropertyImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataAnnotationImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeletedEntityImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeltaLinkImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataPropertyImpl;
+import org.apache.olingo.commons.core.domain.ODataAnnotationImpl;
+import org.apache.olingo.commons.core.domain.ODataDeletedEntityImpl;
+import org.apache.olingo.commons.core.domain.ODataDeltaLinkImpl;
+import org.apache.olingo.commons.core.domain.ODataPropertyImpl;
 import org.apache.olingo.commons.core.edm.EdmTypeInfo;
 import org.apache.olingo.commons.core.serialization.ContextURLParser;
 
@@ -133,10 +133,10 @@ public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder
               propertyValue instanceof LinkedComplexValue ? ValueType.LINKED_COMPLEX : ValueType.COMPLEX,
               propertyValue);
     } else if (odataValuable.hasCollectionValue()) {
-      final ODataCollectionValue<org.apache.olingo.commons.api.domain.v4.ODataValue> collectionValue =
+      final ODataCollectionValue<org.apache.olingo.commons.api.domain.ODataValue> collectionValue =
               odataValuable.getCollectionValue();
       propertyResource.setType(collectionValue.getTypeName());
-      final org.apache.olingo.commons.api.domain.v4.ODataValue value =
+      final org.apache.olingo.commons.api.domain.ODataValue value =
               collectionValue.iterator().hasNext() ? collectionValue.iterator().next() : null;
       ValueType valueType = ValueType.COLLECTION_PRIMITIVE;
       if (value == null) {
@@ -211,22 +211,22 @@ public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder
   @SuppressWarnings("unchecked")
   protected Object getValue(final ODataValue value) {
     Object valueResource;
-    if (value instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
-            && ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).isEnum()) {
+    if (value instanceof org.apache.olingo.commons.api.domain.ODataValue
+            && ((org.apache.olingo.commons.api.domain.ODataValue) value).isEnum()) {
 
       valueResource =
-              ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).asEnum().getValue();
+              ((org.apache.olingo.commons.api.domain.ODataValue) value).asEnum().getValue();
     } else {
       valueResource = super.getValue(value);
 
-      if (value instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
-              && ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).isLinkedComplex()) {
+      if (value instanceof org.apache.olingo.commons.api.domain.ODataValue
+              && ((org.apache.olingo.commons.api.domain.ODataValue) value).isLinkedComplex()) {
 
         final LinkedComplexValue lcValueResource = new LinkedComplexValueImpl();
         lcValueResource.getValue().addAll((List<Property>) valueResource);
 
         final ODataLinkedComplexValue linked =
-                ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).asLinkedComplex();
+                ((org.apache.olingo.commons.api.domain.ODataValue) value).asLinkedComplex();
         annotations(linked, lcValueResource);
         links(linked, lcValueResource);
 
@@ -255,7 +255,7 @@ public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder
       }
 
       final ODataAnnotation odataAnnotation = new ODataAnnotationImpl(annotation.getTerm(),
-              (org.apache.olingo.commons.api.domain.v4.ODataValue) getODataValue(fqn, annotation, null, null));
+              (org.apache.olingo.commons.api.domain.ODataValue) getODataValue(fqn, annotation, null, null));
       odataAnnotatable.getAnnotations().add(odataAnnotation);
     }
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
index 1480556..f9a7893 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
@@ -22,9 +22,9 @@ import java.io.InputStream;
 
 import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.serialization.ODataReader;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
index 700e7f2..6a83239 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
@@ -431,10 +431,10 @@ public final class URIUtils {
           value = param.getValue().asComplex().asJavaMap();
         } else if (param.getValue().isCollection()) {
           value = param.getValue().asCollection().asJavaCollection();
-        } else if (param.getValue() instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
-                && ((org.apache.olingo.commons.api.domain.v4.ODataValue) param.getValue()).isEnum()) {
+        } else if (param.getValue() instanceof org.apache.olingo.commons.api.domain.ODataValue
+                && ((org.apache.olingo.commons.api.domain.ODataValue) param.getValue()).isEnum()) {
 
-          value = ((org.apache.olingo.commons.api.domain.v4.ODataValue) param.getValue()).asEnum().toString();
+          value = ((org.apache.olingo.commons.api.domain.ODataValue) param.getValue()).asEnum().toString();
         }
 
         inlineParams.append(URIUtils.escape(serviceVersion, value)).append(',');

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
index bd0158f..b8282e2 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
@@ -22,8 +22,8 @@ import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
index 8f6f253..2b2882e 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
@@ -33,15 +33,15 @@ import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.client.core.EdmEnabledODataClientImpl;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.ResWrap;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.commons.api.domain.ODataLink;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.format.ODataFormat;
@@ -329,9 +329,9 @@ public class EntityTest extends AbstractTest {
     assertTrue(annotation.hasComplexValue());
 
     final ODataLink orders = entity.getNavigationLink("Orders");
-    assertFalse(((org.apache.olingo.commons.api.domain.v4.ODataLink) orders).getAnnotations().isEmpty());
+    assertFalse(((org.apache.olingo.commons.api.domain.ODataLink) orders).getAnnotations().isEmpty());
 
-    annotation = ((org.apache.olingo.commons.api.domain.v4.ODataLink) orders).getAnnotations().get(0);
+    annotation = ((org.apache.olingo.commons.api.domain.ODataLink) orders).getAnnotations().get(0);
     assertEquals("com.contoso.display.style", annotation.getTerm());
     assertEquals("com.contoso.display.styleType", annotation.getValue().getTypeName());
     assertTrue(annotation.hasComplexValue());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
index d70a07f..3a107a4 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
@@ -41,9 +41,9 @@ import org.apache.olingo.commons.api.data.Delta;
 import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.format.ODataFormat;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
index 91d0752..8de5e4f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
@@ -22,8 +22,8 @@ import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.AbstractTest;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
 import org.apache.olingo.commons.api.serialization.ODataSerializerException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotatable.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotatable.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotatable.java
new file mode 100644
index 0000000..fe10fba
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotatable.java
@@ -0,0 +1,26 @@
+/*
+ * 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.api.domain;
+
+import java.util.List;
+
+public interface ODataAnnotatable {
+
+  List<ODataAnnotation> getAnnotations();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotation.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotation.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotation.java
new file mode 100644
index 0000000..ec00417
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataAnnotation.java
@@ -0,0 +1,30 @@
+/*
+ * 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.api.domain;
+
+public interface ODataAnnotation extends ODataValuable {
+
+  /**
+   * Returns annotation name.
+   * 
+   * @return annotation name.
+   */
+  String getTerm();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeletedEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeletedEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeletedEntity.java
new file mode 100644
index 0000000..3b7a1bf
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeletedEntity.java
@@ -0,0 +1,36 @@
+/*
+ * 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.api.domain;
+
+import java.net.URI;
+
+public interface ODataDeletedEntity {
+
+  enum Reason {
+
+    deleted,
+    changed;
+
+  }
+
+  URI getId();
+
+  Reason getReason();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDelta.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDelta.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDelta.java
new file mode 100644
index 0000000..5492750
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDelta.java
@@ -0,0 +1,31 @@
+/*
+ * 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.api.domain;
+
+import java.util.List;
+
+public interface ODataDelta extends ODataEntitySet {
+
+  List<ODataDeletedEntity> getDeletedEntities();
+
+  List<ODataDeltaLink> getAddedLinks();
+
+  List<ODataDeltaLink> getDeletedLinks();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeltaLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeltaLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeltaLink.java
new file mode 100644
index 0000000..757def9
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataDeltaLink.java
@@ -0,0 +1,36 @@
+/*
+ * 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.api.domain;
+
+import java.net.URI;
+
+public interface ODataDeltaLink extends ODataAnnotatable {
+
+  URI getSource();
+
+  void setSource(URI source);
+
+  String getRelationship();
+
+  void setRelationship(String relationship);
+
+  URI getTarget();
+
+  void setTarget(URI target);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntity.java
new file mode 100644
index 0000000..bacda58
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntity.java
@@ -0,0 +1,52 @@
+/*
+ * 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.api.domain;
+
+import java.net.URI;
+import java.util.List;
+
+public interface ODataEntity extends CommonODataEntity, ODataAnnotatable {
+
+  @Override
+  ODataProperty getProperty(String name);
+
+  @Override
+  List<ODataProperty> getProperties();
+
+  /**
+   * To request entity references in place of the actual entities, the client issues a GET request with /$ref appended
+   * to the resource path.
+   * <br />
+   * If the resource path does not identify an entity or a collection of entities, the service returns 404 Not Found.
+   * <br />
+   * If the resource path terminates on a collection, the response MUST be the format-specific representation of a
+   * collection of entity references pointing to the related entities. If no entities are related, the response is the
+   * format-specific representation of an empty collection.
+   * <br />
+   * If the resource path terminates on a single entity, the response MUST be the format-specific representation of an
+   * entity reference pointing to the related single entity. If the resource path terminates on a single entity and no
+   * such entity exists, the service returns 404 Not Found.
+   * 
+   * @return entity reference.
+   */
+  URI getId();
+
+  void setId(URI id);
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntitySet.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntitySet.java
new file mode 100644
index 0000000..bce642a
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEntitySet.java
@@ -0,0 +1,42 @@
+/*
+ * 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.api.domain;
+
+import java.net.URI;
+import java.util.List;
+
+public interface ODataEntitySet extends CommonODataEntitySet, ODataAnnotatable {
+
+  @Override
+  List<ODataEntity> getEntities();
+
+  /**
+   * Gets delta link if exists.
+   * 
+   * @return delta link if exists; null otherwise.
+   */
+  URI getDeltaLink();
+
+  /**
+   * Sets delta link.
+   * 
+   * @param deltaLink delta link.
+   */
+  void setDeltaLink(URI deltaLink);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEnumValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEnumValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEnumValue.java
new file mode 100644
index 0000000..ef5852d
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataEnumValue.java
@@ -0,0 +1,27 @@
+/*
+ * 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.api.domain;
+
+public interface ODataEnumValue extends ODataValue {
+
+  String getValue();
+
+  @Override
+  String toString();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java
index b2aea49..574ff0d 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLink.java
@@ -18,14 +18,16 @@
  */
 package org.apache.olingo.commons.api.domain;
 
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
 import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 
 /**
  * OData link.
  */
-public class ODataLink extends ODataItem {
+public class ODataLink extends ODataItem implements ODataAnnotatable{
 
   public static class Builder {
 
@@ -105,6 +107,8 @@ public class ODataLink extends ODataItem {
    */
   protected String mediaETag;
 
+  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
+  
   /**
    * Constructor.
    * 
@@ -113,7 +117,7 @@ public class ODataLink extends ODataItem {
    * @param type type.
    * @param title title.
    */
-  protected ODataLink(final ODataServiceVersion version, final URI uri, final ODataLinkType type, final String title) {
+  public ODataLink(final ODataServiceVersion version, final URI uri, final ODataLinkType type, final String title) {
     super(title);
 
     link = uri;
@@ -185,4 +189,8 @@ public class ODataLink extends ODataItem {
   public String getMediaETag() {
     return mediaETag;
   }
+  
+  public List<ODataAnnotation> getAnnotations() {
+    return annotations;
+  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLinkedComplexValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLinkedComplexValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLinkedComplexValue.java
new file mode 100644
index 0000000..3009c78
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataLinkedComplexValue.java
@@ -0,0 +1,25 @@
+/*
+ * 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.api.domain;
+
+
+public interface ODataLinkedComplexValue
+    extends ODataValue, ODataLinked, ODataComplexValue<ODataProperty>, ODataAnnotatable {
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataObjectFactory.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataObjectFactory.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataObjectFactory.java
new file mode 100644
index 0000000..52b49e6
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataObjectFactory.java
@@ -0,0 +1,79 @@
+/*
+ * 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.api.domain;
+
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+
+import java.net.URI;
+
+public interface ODataObjectFactory extends CommonODataObjectFactory {
+
+  @Override
+  ODataEntitySet newEntitySet();
+
+  @Override
+  ODataEntitySet newEntitySet(URI next);
+
+  @Override
+  ODataEntity newEntity(FullQualifiedName typeName);
+
+  @Override
+  ODataEntity newEntity(FullQualifiedName typeName, URI link);
+
+  ODataSingleton newSingleton(FullQualifiedName typeName);
+
+  @Override
+  ODataLink newEntitySetNavigationLink(String name, URI link);
+
+  @Override
+  ODataLink newEntityNavigationLink(String name, URI link);
+
+  @Override
+  ODataLink newAssociationLink(String name, URI link);
+
+  @Override
+  ODataLink newMediaEditLink(String name, URI link);
+
+  ODataEnumValue newEnumValue(String typeName, String value);
+
+  @Override
+  ODataComplexValue<ODataProperty> newComplexValue(String typeName);
+
+  ODataLinkedComplexValue newLinkedComplexValue(String typeName);
+
+  @Override
+  ODataCollectionValue<ODataValue> newCollectionValue(String typeName);
+
+  @Override
+  ODataProperty newPrimitiveProperty(String name, ODataPrimitiveValue value);
+
+  ODataProperty newEnumProperty(String name, ODataEnumValue value);
+
+  @Override
+  ODataProperty newComplexProperty(String name, ODataComplexValue<? extends CommonODataProperty> value);
+
+  @Override
+  ODataProperty newCollectionProperty(String name,
+      ODataCollectionValue<? extends org.apache.olingo.commons.api.domain.ODataValue> value);
+
+  ODataDelta newDelta();
+
+  ODataDelta newDelta(URI next);
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataProperty.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataProperty.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataProperty.java
new file mode 100644
index 0000000..533d318
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataProperty.java
@@ -0,0 +1,23 @@
+/*
+ * 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.api.domain;
+
+
+public interface ODataProperty extends CommonODataProperty, ODataAnnotatable, ODataValuable {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataSingleton.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataSingleton.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataSingleton.java
new file mode 100644
index 0000000..6222d90
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataSingleton.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.domain;
+
+public interface ODataSingleton extends ODataEntity {}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValuable.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValuable.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValuable.java
new file mode 100644
index 0000000..f8612e3
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValuable.java
@@ -0,0 +1,101 @@
+/*
+ * 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.api.domain;
+
+
+public interface ODataValuable {
+
+  /**
+   * Returns annotation value.
+   * 
+   * @return annotation value.
+   */
+  ODataValue getValue();
+
+  /**
+   * Checks if has null value.
+   * 
+   * @return 'TRUE' if has null value; 'FALSE' otherwise.
+   */
+  boolean hasNullValue();
+
+  /**
+   * Checks if has primitive value.
+   * 
+   * @return 'TRUE' if has primitive value; 'FALSE' otherwise.
+   */
+  boolean hasPrimitiveValue();
+
+  /**
+   * Gets primitive value.
+   * 
+   * @return primitive value if exists; null otherwise.
+   */
+  ODataPrimitiveValue getPrimitiveValue();
+
+  /**
+   * Checks if has collection value.
+   * 
+   * @return 'TRUE' if has collection value; 'FALSE' otherwise.
+   */
+  boolean hasCollectionValue();
+
+  /**
+   * Gets collection value.
+   * 
+   * @return collection value if exists; null otherwise.
+   */
+  ODataCollectionValue<ODataValue> getCollectionValue();
+
+  /**
+   * Checks if has complex value.
+   * 
+   * @return 'TRUE' if has complex value; 'FALSE' otherwise.
+   */
+  boolean hasComplexValue();
+
+  /**
+   * Gets complex value.
+   * 
+   * @return complex value if exists; null otherwise.
+   */
+  ODataComplexValue<ODataProperty> getComplexValue();
+
+  /**
+   * Gets complex value with link information (if available).
+   * 
+   * @return complex value if exists; null otherwise.
+   */
+  ODataLinkedComplexValue getLinkedComplexValue();
+
+  /**
+   * Checks if has enum value.
+   * 
+   * @return 'TRUE' if has enum value; 'FALSE' otherwise.
+   */
+  boolean hasEnumValue();
+
+  /**
+   * Gets enum value.
+   * 
+   * @return enum value if exists; null otherwise.
+   */
+  ODataEnumValue getEnumValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java
index 7747d33..d0c69ad 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataValue.java
@@ -18,6 +18,7 @@
  */
 package org.apache.olingo.commons.api.domain;
 
+
 /**
  * Abstract representation of an OData entity property value.
  */
@@ -74,4 +75,32 @@ public interface ODataValue {
    */
   <OP extends CommonODataProperty> ODataComplexValue<OP> asComplex();
 
+  /**
+   * Check is is a linked complex value.
+   * 
+   * @return 'TRUE' if linked complex; 'FALSE' otherwise.
+   */
+  boolean isLinkedComplex();
+
+  /**
+   * Casts to complex value with link information (if available).
+   * 
+   * @return complex value with link information.
+   */
+  ODataLinkedComplexValue asLinkedComplex();
+
+  /**
+   * Check is is an enum value.
+   * 
+   * @return 'TRUE' if enum; 'FALSE' otherwise.
+   */
+  boolean isEnum();
+
+  /**
+   * Casts to enum value.
+   * 
+   * @return enum value.
+   */
+  ODataEnumValue asEnum();
+  
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotatable.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotatable.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotatable.java
deleted file mode 100644
index 1426622..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotatable.java
+++ /dev/null
@@ -1,26 +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.api.domain.v4;
-
-import java.util.List;
-
-public interface ODataAnnotatable {
-
-  List<ODataAnnotation> getAnnotations();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotation.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotation.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotation.java
deleted file mode 100644
index 4e5eb65..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataAnnotation.java
+++ /dev/null
@@ -1,30 +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.api.domain.v4;
-
-public interface ODataAnnotation extends ODataValuable {
-
-  /**
-   * Returns annotation name.
-   * 
-   * @return annotation name.
-   */
-  String getTerm();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeletedEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeletedEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeletedEntity.java
deleted file mode 100644
index 6162794..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeletedEntity.java
+++ /dev/null
@@ -1,36 +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.api.domain.v4;
-
-import java.net.URI;
-
-public interface ODataDeletedEntity {
-
-  enum Reason {
-
-    deleted,
-    changed;
-
-  }
-
-  URI getId();
-
-  Reason getReason();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDelta.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDelta.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDelta.java
deleted file mode 100644
index a300eaf..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDelta.java
+++ /dev/null
@@ -1,31 +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.api.domain.v4;
-
-import java.util.List;
-
-public interface ODataDelta extends ODataEntitySet {
-
-  List<ODataDeletedEntity> getDeletedEntities();
-
-  List<ODataDeltaLink> getAddedLinks();
-
-  List<ODataDeltaLink> getDeletedLinks();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java
deleted file mode 100644
index dbce507..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java
+++ /dev/null
@@ -1,36 +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.api.domain.v4;
-
-import java.net.URI;
-
-public interface ODataDeltaLink extends ODataAnnotatable {
-
-  URI getSource();
-
-  void setSource(URI source);
-
-  String getRelationship();
-
-  void setRelationship(String relationship);
-
-  URI getTarget();
-
-  void setTarget(URI target);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntity.java
deleted file mode 100644
index d3a625b..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntity.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.api.domain.v4;
-
-import org.apache.olingo.commons.api.domain.CommonODataEntity;
-
-import java.net.URI;
-import java.util.List;
-
-public interface ODataEntity extends CommonODataEntity, ODataAnnotatable {
-
-  @Override
-  ODataProperty getProperty(String name);
-
-  @Override
-  List<ODataProperty> getProperties();
-
-  /**
-   * To request entity references in place of the actual entities, the client issues a GET request with /$ref appended
-   * to the resource path.
-   * <br />
-   * If the resource path does not identify an entity or a collection of entities, the service returns 404 Not Found.
-   * <br />
-   * If the resource path terminates on a collection, the response MUST be the format-specific representation of a
-   * collection of entity references pointing to the related entities. If no entities are related, the response is the
-   * format-specific representation of an empty collection.
-   * <br />
-   * If the resource path terminates on a single entity, the response MUST be the format-specific representation of an
-   * entity reference pointing to the related single entity. If the resource path terminates on a single entity and no
-   * such entity exists, the service returns 404 Not Found.
-   * 
-   * @return entity reference.
-   */
-  URI getId();
-
-  void setId(URI id);
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntitySet.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntitySet.java
deleted file mode 100644
index 627067d..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEntitySet.java
+++ /dev/null
@@ -1,44 +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.api.domain.v4;
-
-import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
-
-import java.net.URI;
-import java.util.List;
-
-public interface ODataEntitySet extends CommonODataEntitySet, ODataAnnotatable {
-
-  @Override
-  List<ODataEntity> getEntities();
-
-  /**
-   * Gets delta link if exists.
-   * 
-   * @return delta link if exists; null otherwise.
-   */
-  URI getDeltaLink();
-
-  /**
-   * Sets delta link.
-   * 
-   * @param deltaLink delta link.
-   */
-  void setDeltaLink(URI deltaLink);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEnumValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEnumValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEnumValue.java
deleted file mode 100644
index e7dec3b..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataEnumValue.java
+++ /dev/null
@@ -1,27 +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.api.domain.v4;
-
-public interface ODataEnumValue extends ODataValue {
-
-  String getValue();
-
-  @Override
-  String toString();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLink.java
deleted file mode 100644
index 14906d4..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLink.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.api.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ODataLink extends org.apache.olingo.commons.api.domain.ODataLink implements ODataAnnotatable {
-
-  public static class Builder extends org.apache.olingo.commons.api.domain.ODataLink.Builder {
-
-    @Override
-    public Builder setVersion(final ODataServiceVersion version) {
-      super.setVersion(version);
-      return this;
-    }
-
-    @Override
-    public Builder setURI(final URI uri) {
-      super.setURI(uri);
-      return this;
-    }
-
-    @Override
-    public Builder setType(final ODataLinkType type) {
-      super.setType(type);
-      return this;
-    }
-
-    @Override
-    public Builder setTitle(final String title) {
-      super.setTitle(title);
-      return this;
-    }
-
-    @Override
-    public ODataLink build() {
-      return new ODataLink(version, uri, type, title);
-    }
-  }
-
-  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
-
-  public ODataLink(final ODataServiceVersion version, final URI uri, final ODataLinkType type, final String title) {
-    super(version, uri, type, title);
-  }
-
-  @Override
-  public List<ODataAnnotation> getAnnotations() {
-    return annotations;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLinkedComplexValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLinkedComplexValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLinkedComplexValue.java
deleted file mode 100644
index 01db3e6..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataLinkedComplexValue.java
+++ /dev/null
@@ -1,27 +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.api.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataLinked;
-
-public interface ODataLinkedComplexValue
-    extends ODataValue, ODataLinked, ODataComplexValue<ODataProperty>, ODataAnnotatable {
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataObjectFactory.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataObjectFactory.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataObjectFactory.java
deleted file mode 100644
index 972bad8..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataObjectFactory.java
+++ /dev/null
@@ -1,84 +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.api.domain.v4;
-
-import org.apache.olingo.commons.api.domain.CommonODataObjectFactory;
-import org.apache.olingo.commons.api.domain.CommonODataProperty;
-import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-
-import java.net.URI;
-
-public interface ODataObjectFactory extends CommonODataObjectFactory {
-
-  @Override
-  ODataEntitySet newEntitySet();
-
-  @Override
-  ODataEntitySet newEntitySet(URI next);
-
-  @Override
-  ODataEntity newEntity(FullQualifiedName typeName);
-
-  @Override
-  ODataEntity newEntity(FullQualifiedName typeName, URI link);
-
-  ODataSingleton newSingleton(FullQualifiedName typeName);
-
-  @Override
-  ODataLink newEntitySetNavigationLink(String name, URI link);
-
-  @Override
-  ODataLink newEntityNavigationLink(String name, URI link);
-
-  @Override
-  ODataLink newAssociationLink(String name, URI link);
-
-  @Override
-  ODataLink newMediaEditLink(String name, URI link);
-
-  ODataEnumValue newEnumValue(String typeName, String value);
-
-  @Override
-  ODataComplexValue<ODataProperty> newComplexValue(String typeName);
-
-  ODataLinkedComplexValue newLinkedComplexValue(String typeName);
-
-  @Override
-  ODataCollectionValue<ODataValue> newCollectionValue(String typeName);
-
-  @Override
-  ODataProperty newPrimitiveProperty(String name, ODataPrimitiveValue value);
-
-  ODataProperty newEnumProperty(String name, ODataEnumValue value);
-
-  @Override
-  ODataProperty newComplexProperty(String name, ODataComplexValue<? extends CommonODataProperty> value);
-
-  @Override
-  ODataProperty newCollectionProperty(String name,
-      ODataCollectionValue<? extends org.apache.olingo.commons.api.domain.ODataValue> value);
-
-  ODataDelta newDelta();
-
-  ODataDelta newDelta(URI next);
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataProperty.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataProperty.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataProperty.java
deleted file mode 100644
index f809681..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataProperty.java
+++ /dev/null
@@ -1,24 +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.api.domain.v4;
-
-import org.apache.olingo.commons.api.domain.CommonODataProperty;
-
-public interface ODataProperty extends CommonODataProperty, ODataAnnotatable, ODataValuable {
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataSingleton.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataSingleton.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataSingleton.java
deleted file mode 100644
index f166c9f..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataSingleton.java
+++ /dev/null
@@ -1,21 +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.api.domain.v4;
-
-public interface ODataSingleton extends ODataEntity {}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValuable.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValuable.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValuable.java
deleted file mode 100644
index cf8911a..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValuable.java
+++ /dev/null
@@ -1,104 +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.api.domain.v4;
-
-import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
-
-public interface ODataValuable {
-
-  /**
-   * Returns annotation value.
-   * 
-   * @return annotation value.
-   */
-  ODataValue getValue();
-
-  /**
-   * Checks if has null value.
-   * 
-   * @return 'TRUE' if has null value; 'FALSE' otherwise.
-   */
-  boolean hasNullValue();
-
-  /**
-   * Checks if has primitive value.
-   * 
-   * @return 'TRUE' if has primitive value; 'FALSE' otherwise.
-   */
-  boolean hasPrimitiveValue();
-
-  /**
-   * Gets primitive value.
-   * 
-   * @return primitive value if exists; null otherwise.
-   */
-  ODataPrimitiveValue getPrimitiveValue();
-
-  /**
-   * Checks if has collection value.
-   * 
-   * @return 'TRUE' if has collection value; 'FALSE' otherwise.
-   */
-  boolean hasCollectionValue();
-
-  /**
-   * Gets collection value.
-   * 
-   * @return collection value if exists; null otherwise.
-   */
-  ODataCollectionValue<ODataValue> getCollectionValue();
-
-  /**
-   * Checks if has complex value.
-   * 
-   * @return 'TRUE' if has complex value; 'FALSE' otherwise.
-   */
-  boolean hasComplexValue();
-
-  /**
-   * Gets complex value.
-   * 
-   * @return complex value if exists; null otherwise.
-   */
-  ODataComplexValue<ODataProperty> getComplexValue();
-
-  /**
-   * Gets complex value with link information (if available).
-   * 
-   * @return complex value if exists; null otherwise.
-   */
-  ODataLinkedComplexValue getLinkedComplexValue();
-
-  /**
-   * Checks if has enum value.
-   * 
-   * @return 'TRUE' if has enum value; 'FALSE' otherwise.
-   */
-  boolean hasEnumValue();
-
-  /**
-   * Gets enum value.
-   * 
-   * @return enum value if exists; null otherwise.
-   */
-  ODataEnumValue getEnumValue();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValue.java
deleted file mode 100644
index 424be6d..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataValue.java
+++ /dev/null
@@ -1,50 +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.api.domain.v4;
-
-public interface ODataValue extends org.apache.olingo.commons.api.domain.ODataValue {
-
-  /**
-   * Check is is a linked complex value.
-   * 
-   * @return 'TRUE' if linked complex; 'FALSE' otherwise.
-   */
-  boolean isLinkedComplex();
-
-  /**
-   * Casts to complex value with link information (if available).
-   * 
-   * @return complex value with link information.
-   */
-  ODataLinkedComplexValue asLinkedComplex();
-
-  /**
-   * Check is is an enum value.
-   * 
-   * @return 'TRUE' if enum; 'FALSE' otherwise.
-   */
-  boolean isEnum();
-
-  /**
-   * Casts to enum value.
-   * 
-   * @return enum value.
-   */
-  ODataEnumValue asEnum();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
index 1d440de..21c1854 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.commons.api.edm.annotation;
 
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataValue;
 
 public interface EdmConstantAnnotationExpression extends EdmAnnotationExpression {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaImpl.java
new file mode 100644
index 0000000..3165bd4
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaImpl.java
@@ -0,0 +1,48 @@
+/*
+ * 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.DeletedEntity;
+import org.apache.olingo.commons.api.data.Delta;
+import org.apache.olingo.commons.api.data.DeltaLink;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DeltaImpl extends EntitySetImpl implements Delta {
+
+  private final List<DeletedEntity> deletedEntities = new ArrayList<DeletedEntity>();
+  private final List<DeltaLink> addedLinks = new ArrayList<DeltaLink>();
+  private final List<DeltaLink> deletedLinks = new ArrayList<DeltaLink>();
+
+  @Override
+  public List<DeletedEntity> getDeletedEntities() {
+    return deletedEntities;
+  }
+
+  @Override
+  public List<DeltaLink> getAddedLinks() {
+    return addedLinks;
+  }
+
+  @Override
+  public List<DeltaLink> getDeletedLinks() {
+    return deletedLinks;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/DeltaImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/DeltaImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/DeltaImpl.java
deleted file mode 100755
index 6dd2a37..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/DeltaImpl.java
+++ /dev/null
@@ -1,49 +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.v4;
-
-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.core.data.EntitySetImpl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class DeltaImpl extends EntitySetImpl implements Delta {
-
-  private final List<DeletedEntity> deletedEntities = new ArrayList<DeletedEntity>();
-  private final List<DeltaLink> addedLinks = new ArrayList<DeltaLink>();
-  private final List<DeltaLink> deletedLinks = new ArrayList<DeltaLink>();
-
-  @Override
-  public List<DeletedEntity> getDeletedEntities() {
-    return deletedEntities;
-  }
-
-  @Override
-  public List<DeltaLink> getAddedLinks() {
-    return addedLinks;
-  }
-
-  @Override
-  public List<DeltaLink> getDeletedLinks() {
-    return deletedLinks;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataAnnotationImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataAnnotationImpl.java
new file mode 100644
index 0000000..140e8b8
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataAnnotationImpl.java
@@ -0,0 +1,109 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataCollectionValue;
+import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataValue;
+
+public class ODataAnnotationImpl implements ODataAnnotation {
+
+  private final String term;
+
+  private final ODataValuable valuable;
+
+  public ODataAnnotationImpl(final String term, final ODataValue value) {
+    this.term = term;
+    valuable = new ODataValuableImpl(value);
+  }
+
+  @Override
+  public String getTerm() {
+    return term;
+  }
+
+  @Override
+  public ODataValue getValue() {
+    return valuable.getValue();
+  }
+
+  @Override
+  public boolean hasNullValue() {
+    return valuable.hasNullValue();
+  }
+
+  @Override
+  public boolean hasPrimitiveValue() {
+    return valuable.hasPrimitiveValue();
+  }
+
+  @Override
+  public ODataPrimitiveValue getPrimitiveValue() {
+    return valuable.getPrimitiveValue();
+  }
+
+  @Override
+  public boolean hasCollectionValue() {
+    return valuable.hasCollectionValue();
+  }
+
+  @Override
+  public ODataCollectionValue<ODataValue> getCollectionValue() {
+    return valuable.getCollectionValue();
+  }
+
+  @Override
+  public boolean hasComplexValue() {
+    return valuable.hasComplexValue();
+  }
+
+  @Override
+  public ODataComplexValue<ODataProperty> getComplexValue() {
+    return valuable.getComplexValue();
+  }
+
+  @Override
+  public ODataLinkedComplexValue getLinkedComplexValue() {
+    return valuable.getLinkedComplexValue();
+  }
+
+  @Override
+  public boolean hasEnumValue() {
+    return valuable.hasEnumValue();
+  }
+
+  @Override
+  public ODataEnumValue getEnumValue() {
+    return valuable.getEnumValue();
+  }
+
+  @Override
+  public String toString() {
+    return "ODataPropertyImpl{"
+        + "term=" + term
+        + ",valuable=" + valuable
+        + '}';
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataCollectionValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataCollectionValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataCollectionValueImpl.java
new file mode 100644
index 0000000..6f519f8
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ODataCollectionValueImpl.java
@@ -0,0 +1,77 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataValue;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class ODataCollectionValueImpl extends AbstractODataCollectionValue<ODataValue> implements ODataValue {
+
+  public ODataCollectionValueImpl(final String typeName) {
+    super(typeName);
+  }
+
+  @Override
+  protected ODataCollectionValueImpl getThis() {
+    return this;
+  }
+
+  @Override
+  public boolean isEnum() {
+    return false;
+  }
+
+  @Override
+  public ODataEnumValue asEnum() {
+    return null;
+  }
+
+  @Override
+  public boolean isLinkedComplex() {
+    return false;
+  }
+
+  @Override
+  public ODataLinkedComplexValue asLinkedComplex() {
+    return null;
+  }
+
+  @Override
+  public Collection<Object> asJavaCollection() {
+    final List<Object> result = new ArrayList<Object>();
+    for (ODataValue value : values) {
+      if (value.isPrimitive()) {
+        result.add(value.asPrimitive().toValue());
+      } else if (value.isComplex()) {
+        result.add(value.asComplex().asJavaMap());
+      } else if (value.isCollection()) {
+        result.add(value.asCollection().asJavaCollection());
+      } else if (value.isEnum()) {
+        result.add(value.asEnum().toString());
+      }
+    }
+
+    return result;
+  }
+}


[17/17] olingo-odata4 git commit: [OLINGO-575] Merge v4 packages in commons

Posted by ch...@apache.org.
[OLINGO-575] Merge v4 packages in commons


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

Branch: refs/heads/master
Commit: 111239d7c387511557b64e2655605eeebe64f467
Parents: 109c33b
Author: Christian Amend <ch...@apache.org>
Authored: Wed Feb 18 16:52:10 2015 +0100
Committer: Christian Amend <ch...@apache.org>
Committed: Wed Feb 18 16:52:10 2015 +0100

----------------------------------------------------------------------
 .../AbstractCollectionInvocationHandler.java    |   4 +-
 ...stractEntityCollectionInvocationHandler.java |   6 +-
 .../commons/AbstractPersistenceManager.java     |   4 +-
 .../commons/AnnotatableInvocationHandler.java   |  11 +-
 .../ComplexCollectionInvocationHandler.java     |   3 +-
 .../proxy/commons/EntityInvocationHandler.java  |   4 +-
 .../commons/EntitySetInvocationHandler.java     |   2 +-
 .../ext/proxy/commons/EntitySetIterator.java    |   2 +-
 .../PrimitiveCollectionInvocationHandler.java   |   9 +-
 .../olingo/ext/proxy/utils/CoreUtils.java       |  18 +--
 .../olingo/fit/tecsvc/client/BasicITCase.java   |  14 +-
 .../fit/tecsvc/client/BatchClientITCase.java    |   4 +-
 .../fit/tecsvc/client/ExpandSelectITCase.java   |   5 +-
 .../fit/tecsvc/client/NavigationITCase.java     |   6 +-
 .../tecsvc/client/PrimitiveComplexITCase.java   |   2 +-
 .../olingo/fit/v4/AbstractTestITCase.java       |   8 +-
 .../apache/olingo/fit/v4/AsyncTestITCase.java   |   4 +-
 .../olingo/fit/v4/AuthBatchTestITCase.java      |   2 +-
 .../apache/olingo/fit/v4/BatchTestITCase.java   |   4 +-
 .../fit/v4/BoundOperationInvokeTestITCase.java  |  14 +-
 .../olingo/fit/v4/ConformanceTestITCase.java    |  12 +-
 .../apache/olingo/fit/v4/DeltaTestITCase.java   |   6 +-
 .../olingo/fit/v4/DerivedTypeTestITCase.java    |   8 +-
 .../olingo/fit/v4/EntityCreateTestITCase.java   |   4 +-
 .../olingo/fit/v4/EntityRetrieveTestITCase.java |   4 +-
 .../olingo/fit/v4/EntitySetTestITCase.java      |   4 +-
 .../olingo/fit/v4/EntityUpdateTestITCase.java   |   2 +-
 .../olingo/fit/v4/FilterFactoryTestITCase.java  |   4 +-
 .../fit/v4/JSONFormatConformanceTestITCase.java |  11 +-
 .../olingo/fit/v4/KeyAsSegmentTestITCase.java   |   4 +-
 .../olingo/fit/v4/MediaEntityTestITCase.java    |   4 +-
 .../apache/olingo/fit/v4/OAuth2TestITCase.java  |   2 +-
 .../olingo/fit/v4/OpenTypeTestITCase.java       |   4 +-
 .../fit/v4/OperationImportInvokeTestITCase.java |  10 +-
 .../olingo/fit/v4/PropertyTestITCase.java       |   6 +-
 .../olingo/fit/v4/PropertyValueTestITCase.java  |   4 +-
 .../olingo/fit/v4/QueryOptionsTestITCase.java   |   4 +-
 .../olingo/fit/v4/SingletonTestITCase.java      |   6 +-
 .../apache/olingo/client/api/ODataClient.java   |   2 +-
 .../request/cud/CUDRequestFactory.java          |   2 +-
 .../request/retrieve/ODataDeltaRequest.java     |   2 +-
 .../retrieve/RetrieveRequestFactory.java        |   8 +-
 .../client/api/serialization/ODataBinder.java   |   8 +-
 .../client/api/serialization/ODataReader.java   |   6 +-
 .../olingo/client/core/ODataClientImpl.java     |   4 +-
 .../request/cud/CUDRequestFactoryImpl.java      |   2 +-
 .../invoke/AbstractODataInvokeRequest.java      |   6 +-
 .../request/retrieve/ODataDeltaRequestImpl.java |   2 +-
 .../retrieve/RetrieveRequestFactoryImpl.java    |   8 +-
 .../EdmConstantAnnotationExpressionImpl.java    |  10 +-
 .../core/serialization/ODataBinderImpl.java     |  48 +++---
 .../core/serialization/ODataReaderImpl.java     |   6 +-
 .../apache/olingo/client/core/uri/URIUtils.java |   6 +-
 .../olingo/client/core/v4/EntitySetTest.java    |   4 +-
 .../olingo/client/core/v4/EntityTest.java       |  16 +-
 .../apache/olingo/client/core/v4/JSONTest.java  |   6 +-
 .../olingo/client/core/v4/PropertyTest.java     |   4 +-
 .../commons/api/domain/ODataAnnotatable.java    |  26 +++
 .../commons/api/domain/ODataAnnotation.java     |  30 ++++
 .../commons/api/domain/ODataDeletedEntity.java  |  36 +++++
 .../olingo/commons/api/domain/ODataDelta.java   |  31 ++++
 .../commons/api/domain/ODataDeltaLink.java      |  36 +++++
 .../olingo/commons/api/domain/ODataEntity.java  |  52 ++++++
 .../commons/api/domain/ODataEntitySet.java      |  42 +++++
 .../commons/api/domain/ODataEnumValue.java      |  27 ++++
 .../olingo/commons/api/domain/ODataLink.java    |  16 +-
 .../api/domain/ODataLinkedComplexValue.java     |  25 +++
 .../commons/api/domain/ODataObjectFactory.java  |  79 +++++++++
 .../commons/api/domain/ODataProperty.java       |  23 +++
 .../commons/api/domain/ODataSingleton.java      |  21 +++
 .../commons/api/domain/ODataValuable.java       | 101 ++++++++++++
 .../olingo/commons/api/domain/ODataValue.java   |  29 ++++
 .../commons/api/domain/v4/ODataAnnotatable.java |  26 ---
 .../commons/api/domain/v4/ODataAnnotation.java  |  30 ----
 .../api/domain/v4/ODataDeletedEntity.java       |  36 -----
 .../commons/api/domain/v4/ODataDelta.java       |  31 ----
 .../commons/api/domain/v4/ODataDeltaLink.java   |  36 -----
 .../commons/api/domain/v4/ODataEntity.java      |  54 -------
 .../commons/api/domain/v4/ODataEntitySet.java   |  44 -----
 .../commons/api/domain/v4/ODataEnumValue.java   |  27 ----
 .../olingo/commons/api/domain/v4/ODataLink.java |  73 ---------
 .../api/domain/v4/ODataLinkedComplexValue.java  |  27 ----
 .../api/domain/v4/ODataObjectFactory.java       |  84 ----------
 .../commons/api/domain/v4/ODataProperty.java    |  24 ---
 .../commons/api/domain/v4/ODataSingleton.java   |  21 ---
 .../commons/api/domain/v4/ODataValuable.java    | 104 ------------
 .../commons/api/domain/v4/ODataValue.java       |  50 ------
 .../EdmConstantAnnotationExpression.java        |   2 +-
 .../olingo/commons/core/data/DeltaImpl.java     |  48 ++++++
 .../olingo/commons/core/data/v4/DeltaImpl.java  |  49 ------
 .../core/domain/ODataAnnotationImpl.java        | 109 +++++++++++++
 .../core/domain/ODataCollectionValueImpl.java   |  77 +++++++++
 .../core/domain/ODataComplexValueImpl.java      | 161 ++++++++++++++++++
 .../core/domain/ODataDeletedEntityImpl.java     |  54 +++++++
 .../commons/core/domain/ODataDeltaImpl.java     |  60 +++++++
 .../commons/core/domain/ODataDeltaLinkImpl.java |  78 +++++++++
 .../commons/core/domain/ODataEntityImpl.java    |  70 ++++++++
 .../commons/core/domain/ODataEntitySetImpl.java |  65 ++++++++
 .../commons/core/domain/ODataEnumValueImpl.java |  65 ++++++++
 .../core/domain/ODataObjectFactoryImpl.java     | 156 ++++++++++++++++++
 .../core/domain/ODataPrimitiveValueImpl.java    |  69 ++++++++
 .../commons/core/domain/ODataPropertyImpl.java  |  88 ++++++++++
 .../commons/core/domain/ODataValuableImpl.java  | 120 ++++++++++++++
 .../core/domain/v4/ODataAnnotationImpl.java     | 109 -------------
 .../domain/v4/ODataCollectionValueImpl.java     |  78 ---------
 .../core/domain/v4/ODataComplexValueImpl.java   | 162 -------------------
 .../core/domain/v4/ODataDeletedEntityImpl.java  |  54 -------
 .../commons/core/domain/v4/ODataDeltaImpl.java  |  60 -------
 .../core/domain/v4/ODataDeltaLinkImpl.java      |  78 ---------
 .../commons/core/domain/v4/ODataEntityImpl.java |  71 --------
 .../core/domain/v4/ODataEntitySetImpl.java      |  66 --------
 .../core/domain/v4/ODataEnumValueImpl.java      |  65 --------
 .../core/domain/v4/ODataObjectFactoryImpl.java  | 157 ------------------
 .../core/domain/v4/ODataPrimitiveValueImpl.java |  70 --------
 .../core/domain/v4/ODataPropertyImpl.java       |  89 ----------
 .../core/domain/v4/ODataValuableImpl.java       | 120 --------------
 .../core/serialization/AtomDeserializer.java    |   2 +-
 .../serialization/JsonDeltaDeserializer.java    |   3 +-
 118 files changed, 1984 insertions(+), 2087 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
index 9566236..d5c0338 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
@@ -38,8 +38,8 @@ import org.apache.commons.lang3.tuple.Triple;
 import org.apache.olingo.client.api.uri.QueryOption;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.AbstractTerm;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
index c519614..154f875 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
@@ -26,8 +26,8 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.ext.proxy.api.EntityCollection;
 import org.apache.olingo.ext.proxy.api.AbstractSingleton;
@@ -103,7 +103,7 @@ public abstract class AbstractEntityCollectionInvocationHandler<
     final List<ODataAnnotation> anns = new ArrayList<ODataAnnotation>();
 
     if (isSingleton) {
-      final ODataRetrieveResponse<org.apache.olingo.commons.api.domain.v4.ODataSingleton> res =
+      final ODataRetrieveResponse<org.apache.olingo.commons.api.domain.ODataSingleton> res =
               ((ODataClient) getClient()).getRetrieveRequestFactory().getSingletonRequest(uri).execute();
 
       entities.add(res.getBody());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
index 7bed3af..95dfa1d 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
@@ -42,9 +42,9 @@ import org.apache.olingo.client.api.communication.request.streamed.ODataStreamUp
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.ODataRuntimeException;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.domain.ODataLink;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.EdmStreamValue;
@@ -243,7 +243,7 @@ abstract class AbstractPersistenceManager implements PersistenceManager {
 
         CoreUtils.addAnnotations(service.getClient(),
             entry.getValue().getAnnotations(),
-            (org.apache.olingo.commons.api.domain.v4.ODataLink) entity.getNavigationLink(entry.getKey()));
+            (org.apache.olingo.commons.api.domain.ODataLink) entity.getNavigationLink(entry.getKey()));
       }
     }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
index a219cdc..b08afba 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
@@ -18,9 +18,9 @@
  */
 package org.apache.olingo.ext.proxy.commons;
 
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
 import org.apache.olingo.ext.proxy.api.AbstractTerm;
 import org.apache.olingo.ext.proxy.api.Annotatable;
 import org.apache.olingo.ext.proxy.api.annotations.Namespace;
@@ -36,6 +36,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.olingo.ext.proxy.AbstractService;
 
 public class AnnotatableInvocationHandler extends AbstractInvocationHandler implements Annotatable {
@@ -83,12 +84,12 @@ public class AnnotatableInvocationHandler extends AbstractInvocationHandler impl
     if (entityHandler.getEntity() instanceof ODataEntity) {
       if (targetHandler.getInternal() instanceof ODataEntity) {
         result = propName == null
-                ? ((org.apache.olingo.commons.api.domain.v4.ODataLink) ((ODataEntity) targetHandler.getInternal()).
+                ? ((org.apache.olingo.commons.api.domain.ODataLink) ((ODataEntity) targetHandler.getInternal()).
                 getNavigationLink(navPropName)).getAnnotations()
                 : ((ODataEntity) targetHandler.getInternal()).getProperty(propName).getAnnotations();
       } else if (targetHandler.getInternal() instanceof ODataLinkedComplexValue) {
         result = propName == null
-                ? ((org.apache.olingo.commons.api.domain.v4.ODataLink) ((ODataLinkedComplexValue) targetHandler.
+                ? ((org.apache.olingo.commons.api.domain.ODataLink) ((ODataLinkedComplexValue) targetHandler.
                 getInternal()).getNavigationLink(navPropName)).getAnnotations()
                 : ((ODataLinkedComplexValue) targetHandler.getInternal()).get(propName).getAnnotations();
       }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
index 3854490..551d570 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.ImmutableTriple;
@@ -33,9 +34,9 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataProperty
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.ComplexCollection;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
index b7285be..3e7457e 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
@@ -37,8 +37,8 @@ import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.commons.api.ODataRuntimeException;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.format.ODataFormat;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
index 83f2e23..e185344 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
@@ -32,7 +32,7 @@ import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.ext.proxy.AbstractService;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
index 8ac25ed..60ff883 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
@@ -26,7 +26,7 @@ import java.util.List;
 import java.util.NoSuchElementException;
 
 import org.apache.commons.lang3.tuple.Triple;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
 import org.apache.olingo.ext.proxy.api.EntityCollection;
 import org.apache.olingo.ext.proxy.api.EntityType;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
index c313dcd..a17f27e 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
@@ -27,14 +27,15 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.tuple.ImmutableTriple;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
 import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.PrimitiveCollection;
@@ -91,17 +92,17 @@ public class PrimitiveCollectionInvocationHandler<T extends Serializable>
   @Override
   @SuppressWarnings("unchecked")
   public Triple<List<T>, URI, List<ODataAnnotation>> fetchPartial(final URI uri, final Class<T> typeRef) {
-    final ODataPropertyRequest<org.apache.olingo.commons.api.domain.v4.ODataProperty> req =
+    final ODataPropertyRequest<org.apache.olingo.commons.api.domain.ODataProperty> req =
             getClient().getRetrieveRequestFactory().getPropertyRequest(uri);
     if (getClient().getServiceVersion().compareTo(ODataServiceVersion.V30) > 0) {
       req.setPrefer(getClient().newPreferences().includeAnnotations("*"));
     }
 
-    final ODataRetrieveResponse<org.apache.olingo.commons.api.domain.v4.ODataProperty> res = req.execute();
+    final ODataRetrieveResponse<org.apache.olingo.commons.api.domain.ODataProperty> res = req.execute();
 
     final List<T> resItems = new ArrayList<T>();
 
-    final org.apache.olingo.commons.api.domain.v4.ODataProperty property = res.getBody();
+    final org.apache.olingo.commons.api.domain.ODataProperty property = res.getBody();
     if (property != null && !property.hasNullValue()) {
       for (ODataValue item : property.getCollectionValue()) {
         resItems.add((T) item.asPrimitive().toValue());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
index 1bf97c9..a3cc3a0 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
@@ -42,14 +42,14 @@ import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataAnnotatable;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
 import org.apache.olingo.commons.api.domain.ODataLink;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
 import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
 import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotatable;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmElement;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
@@ -58,7 +58,7 @@ import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.EdmTerm;
 import org.apache.olingo.commons.api.edm.EdmType;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.domain.v4.ODataAnnotationImpl;
+import org.apache.olingo.commons.core.domain.ODataAnnotationImpl;
 import org.apache.olingo.commons.core.edm.EdmTypeInfo;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 import org.apache.olingo.ext.proxy.AbstractService;
@@ -106,7 +106,7 @@ public final class CoreUtils {
         if (intType.isPrimitiveType()) {
           value.asCollection().add(getODataValue(client, intType, collectionItem).asPrimitive());
         } else if (intType.isEnumType()) {
-          value.asCollection().add(((org.apache.olingo.commons.api.domain.v4.ODataValue) getODataValue(
+          value.asCollection().add(((org.apache.olingo.commons.api.domain.ODataValue) getODataValue(
               client, intType, collectionItem)).asEnum());
         } else if (intType.isComplexType()) {
           value.asCollection().add(getODataValue(client, intType, collectionItem).asComplex());
@@ -139,7 +139,7 @@ public final class CoreUtils {
       }
 
     } else if (type.isEnumType()) {
-      value = ((org.apache.olingo.commons.api.domain.v4.ODataObjectFactory) client.getObjectFactory()).
+      value = ((org.apache.olingo.commons.api.domain.ODataObjectFactory) client.getObjectFactory()).
           newEnumValue(type.getFullQualifiedName().toString(), ((Enum<?>) obj).name());
     } else {
       value = client.getObjectFactory().newPrimitiveValueBuilder().setType(type.getPrimitiveTypeKind()).setValue(obj).
@@ -205,7 +205,7 @@ public final class CoreUtils {
               setTypeExpression(type.getFullQualifiedName().toString()).build();
 
       annotation = new ODataAnnotationImpl(term,
-          (org.apache.olingo.commons.api.domain.v4.ODataValue) getODataValue(client, valueType, obj));
+          (org.apache.olingo.commons.api.domain.ODataValue) getODataValue(client, valueType, obj));
     }
 
     return annotation;
@@ -233,7 +233,7 @@ public final class CoreUtils {
           property = client.getObjectFactory().newComplexProperty(name, value.asComplex());
         } else if (valueType.isEnumType()) {
           property = ((ODataObjectFactory) client.getObjectFactory()).newEnumProperty(name,
-              ((org.apache.olingo.commons.api.domain.v4.ODataValue) value).asEnum());
+              ((org.apache.olingo.commons.api.domain.ODataValue) value).asEnum());
         } else {
           throw new UnsupportedOperationException("Usupported object type " + valueType.getFullQualifiedName());
         }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
index f8cf05c..4518cdc 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
@@ -50,15 +50,15 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
 import org.apache.olingo.client.api.edm.xml.Reference;
 import org.apache.olingo.client.api.edm.xml.XMLMetadata;
 import org.apache.olingo.client.core.ODataClientFactory;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataLinkedComplexValue;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.domain.ODataServiceDocument;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ContentType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
index ef9329f..ed249fd 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
@@ -46,8 +46,8 @@ import org.apache.olingo.client.api.communication.response.ODataResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
 import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ContentType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
index 0183215..97aa06b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
@@ -23,17 +23,18 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
 import java.util.List;
+
 import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.domain.ODataInlineEntity;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.commons.api.domain.ODataLink;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.http.HttpStatusCode;
 import org.apache.olingo.fit.AbstractBaseTestITCase;
 import org.apache.olingo.fit.tecsvc.TecSvcConst;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
index 494f273..e12faa5 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
@@ -25,9 +25,9 @@ import org.apache.olingo.client.api.CommonODataClient;
 import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.http.HttpStatusCode;
 import org.apache.olingo.fit.AbstractBaseTestITCase;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
index 80c58ca..49396cb 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
@@ -38,7 +38,7 @@ import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.http.HttpHeader;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
index 0b091dd..c95d7cb 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
@@ -27,14 +27,14 @@ import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.core.domain.v4.ODataEntityImpl;
+import org.apache.olingo.commons.core.domain.ODataEntityImpl;
 import org.apache.olingo.fit.AbstractBaseTestITCase;
 import org.junit.BeforeClass;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
index eef0525..0f0fc80 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
@@ -26,10 +26,10 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.ODataInlineEntity;
 import org.apache.olingo.commons.api.domain.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
index 51b86b4..2729086 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
@@ -31,7 +31,7 @@ import org.apache.olingo.client.api.http.HttpClientException;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ContentType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
index fdec603..be26830 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
@@ -46,8 +46,8 @@ import org.apache.olingo.client.core.communication.request.batch.ODataSingleResp
 import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl;
 import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl.ODataEntityResponseImpl;
 import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
index d81443e..a8ef9f3 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
@@ -23,14 +23,14 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
 import org.apache.olingo.commons.api.domain.ODataOperation;
 import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
 import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
@@ -318,7 +318,7 @@ public class BoundOperationInvokeTestITCase extends AbstractTestITCase {
     boundOp = entity.getOperation("Microsoft.Test.OData.Services.ODataWCFService.ResetAddress");
     assertNotNull(boundOp);
 
-    final ODataCollectionValue<org.apache.olingo.commons.api.domain.v4.ODataValue> addresses =
+    final ODataCollectionValue<org.apache.olingo.commons.api.domain.ODataValue> addresses =
         client.getObjectFactory().
             newCollectionValue("Collection(Microsoft.Test.OData.Services.ODataWCFService.Address)");
     final ODataComplexValue<ODataProperty> address = client.getObjectFactory().
@@ -408,7 +408,7 @@ public class BoundOperationInvokeTestITCase extends AbstractTestITCase {
     assertTrue(getProductDetailsRes.hasEnumValue());
 
     // ResetAddress
-    final ODataCollectionValue<org.apache.olingo.commons.api.domain.v4.ODataValue> addresses =
+    final ODataCollectionValue<org.apache.olingo.commons.api.domain.ODataValue> addresses =
         edmClient.getObjectFactory().
             newCollectionValue("Collection(Microsoft.Test.OData.Services.ODataWCFService.Address)");
     final ODataComplexValue<ODataProperty> address = edmClient.getObjectFactory().

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
index 5260c8f..3259196 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
@@ -38,16 +38,16 @@ import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
 import org.apache.olingo.client.core.http.DefaultHttpClientFactory;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.core.domain.v4.ODataEntityImpl;
+import org.apache.olingo.commons.core.domain.ODataEntityImpl;
 import org.junit.Test;
 
 import java.math.BigDecimal;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
index da69f93..fa3b533 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
@@ -20,9 +20,9 @@ package org.apache.olingo.fit.v4;
 
 import org.apache.olingo.client.api.communication.request.retrieve.ODataDeltaRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
index cc040b6..b7e2c15 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
@@ -25,10 +25,10 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValuable;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ODataFormat;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
index a0ca554..a92db26 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
@@ -22,10 +22,10 @@ import org.apache.commons.lang3.RandomUtils;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.commons.api.domain.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
index 3a25a60..95b9ae6 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
@@ -35,12 +35,12 @@ import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.ODataInlineEntity;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.commons.api.domain.ODataLink;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
index 38f5a85..b79d709 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
@@ -28,8 +28,8 @@ import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
index d5a5de1..913d5db 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
@@ -32,8 +32,8 @@ import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddi
 import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataReferenceAddingResponse;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.domain.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
index ea1f464..b6f416f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
@@ -23,8 +23,8 @@ import org.apache.olingo.client.api.uri.FilterArgFactory;
 import org.apache.olingo.client.api.uri.FilterFactory;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
index 34d401a..e1e1edf 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
@@ -29,16 +29,17 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
 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.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataLink;
 import org.apache.olingo.commons.api.domain.ODataLinkType;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataLink;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;
+
 import java.math.BigDecimal;
 import java.net.URI;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
index 8addcc6..b92e39f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
@@ -24,8 +24,8 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.AfterClass;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
index f3dec24..ed3b65e 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
@@ -36,8 +36,8 @@ import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdat
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataValuable;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
index 089ca92..79aaba1 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
@@ -28,7 +28,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntity;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
index 08a5ada..1a3c14f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
@@ -23,8 +23,8 @@ import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.EdmSchema;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
index f89d1e7..940ba4b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
@@ -22,12 +22,12 @@ import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequ
 import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
 import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.domain.ODataValue;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;
@@ -253,7 +253,7 @@ public class OperationImportInvokeTestITCase extends AbstractTestITCase {
 
   private void bossEmails(final ODataFormat format) {
     // ResetBossEmail
-    final ODataCollectionValue<org.apache.olingo.commons.api.domain.v4.ODataValue> emails =
+    final ODataCollectionValue<org.apache.olingo.commons.api.domain.ODataValue> emails =
         getClient().getObjectFactory().newCollectionValue("Collection(Edm.String)");
     emails.add(getClient().getObjectFactory().newPrimitiveValueBuilder().buildString("first@olingo.apache.org"));
     emails.add(getClient().getObjectFactory().newPrimitiveValueBuilder().buildString("second@olingo.apache.org"));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
index e388c99..f55c56e 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
@@ -34,9 +34,9 @@ import org.apache.olingo.client.api.communication.response.ODataEntityCreateResp
 import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValuable;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.http.HttpMethod;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
index c8d5157..819edb0 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
@@ -24,8 +24,8 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataProperty
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataValuable;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.format.ODataFormat;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
index ca6df11..ec2c0bb 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
@@ -23,9 +23,9 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.QueryOption;
 import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
index 693ab11..5a2605b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
@@ -24,9 +24,9 @@ import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-import org.apache.olingo.commons.api.domain.v4.ODataValuable;
+import org.apache.olingo.commons.api.domain.ODataAnnotation;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
+import org.apache.olingo.commons.api.domain.ODataValuable;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.format.ODataFormat;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
index cabc722..e3d9c74 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
@@ -29,7 +29,7 @@ import org.apache.olingo.client.api.serialization.ODataReader;
 import org.apache.olingo.client.api.uri.FilterFactory;
 import org.apache.olingo.client.api.uri.SearchFactory;
 import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
 import org.apache.olingo.commons.api.format.ODataFormat;
 
 public interface ODataClient extends CommonODataClient<UpdateType> {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
index 32efe16..53c67ff 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.cud;
 
 import java.net.URI;
 
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
 
 public interface CUDRequestFactory extends CommonCUDRequestFactory<UpdateType> {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
index 43a706b..f64e7a1 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.communication.request.retrieve;
 
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataDelta;
 
 /**
  * Describes an OData retrieve request returning a delta object.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
index 089c5f5..bc2bf5e 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
@@ -20,10 +20,10 @@ package org.apache.olingo.client.api.communication.request.retrieve;
 
 import java.net.URI;
 
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
 
 @SuppressWarnings("unchecked")
 public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java
index 52862fa..d7b3685 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java
@@ -23,10 +23,10 @@ import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.Property;
 import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 
 public interface ODataBinder extends CommonODataBinder {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
index 814947e..2ba39a8 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java
@@ -20,9 +20,9 @@ package org.apache.olingo.client.api.serialization;
 
 import java.io.InputStream;
 
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java
index 7db4856..9bb86d9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java
@@ -44,11 +44,11 @@ import org.apache.olingo.client.core.serialization.ODataDeserializerImpl;
 import org.apache.olingo.client.core.serialization.ODataReaderImpl;
 import org.apache.olingo.client.core.uri.FilterFactoryImpl;
 import org.apache.olingo.client.core.uri.URIBuilderImpl;
-import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
+import org.apache.olingo.commons.api.domain.ODataObjectFactory;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.serialization.ODataSerializer;
-import org.apache.olingo.commons.core.domain.v4.ODataObjectFactoryImpl;
+import org.apache.olingo.commons.core.domain.ODataObjectFactoryImpl;
 import org.apache.olingo.commons.core.serialization.AtomSerializer;
 import org.apache.olingo.commons.core.serialization.JsonSerializer;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java
index cb5d5d6..b0b48ba 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java
@@ -26,7 +26,7 @@ import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateR
 import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddingRequest;
 import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
 import org.apache.olingo.commons.api.http.HttpMethod;
 
 public class CUDRequestFactoryImpl extends AbstractCUDRequestFactory<UpdateType> implements CUDRequestFactory {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
index 43c271a..a3f35eb 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java
@@ -128,12 +128,12 @@ public abstract class AbstractODataInvokeRequest<T extends ODataInvokeResult>
         } else if (param.getValue().isCollection()) {
           property = odataClient.getObjectFactory().
                   newCollectionProperty(param.getKey(), param.getValue().asCollection());
-        } else if (param.getValue() instanceof org.apache.olingo.commons.api.domain.v4.ODataValue
-                && ((org.apache.olingo.commons.api.domain.v4.ODataValue) param.getValue()).isEnum()) {
+        } else if (param.getValue() instanceof org.apache.olingo.commons.api.domain.ODataValue
+                && ((org.apache.olingo.commons.api.domain.ODataValue) param.getValue()).isEnum()) {
 
           property = ((ODataClient) odataClient).getObjectFactory().
                   newEnumProperty(param.getKey(),
-                  ((org.apache.olingo.commons.api.domain.v4.ODataValue) param.getValue()).asEnum());
+                  ((org.apache.olingo.commons.api.domain.ODataValue) param.getValue()).asEnum());
         }
 
         if (property != null) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java
index 4112221..7b818e1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java
@@ -30,7 +30,7 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
 import org.apache.olingo.client.api.http.HttpClientException;
 import org.apache.olingo.commons.api.data.Delta;
 import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+import org.apache.olingo.commons.api.domain.ODataDelta;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
index 781dc10..7f5eb09 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java
@@ -28,10 +28,10 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
 import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
 import org.apache.olingo.client.api.communication.request.retrieve.XMLMetadataRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+import org.apache.olingo.commons.api.domain.ODataEntity;
+import org.apache.olingo.commons.api.domain.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.ODataProperty;
+import org.apache.olingo.commons.api.domain.ODataSingleton;
 
 public class RetrieveRequestFactoryImpl extends AbstractRetrieveRequestFactory
         implements RetrieveRequestFactory {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/111239d7/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
index 50d0fc9..7d30fdc 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
@@ -24,17 +24,17 @@ import java.util.List;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.edm.xml.annotation.ConstantAnnotationExpression;
 import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
-import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.domain.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.ODataValue;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.annotation.EdmConstantAnnotationExpression;
 import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.core.domain.v4.ODataCollectionValueImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataEnumValueImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataPrimitiveValueImpl;
+import org.apache.olingo.commons.core.domain.ODataCollectionValueImpl;
+import org.apache.olingo.commons.core.domain.ODataEnumValueImpl;
+import org.apache.olingo.commons.core.domain.ODataPrimitiveValueImpl;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 
 public class EdmConstantAnnotationExpressionImpl implements EdmConstantAnnotationExpression {


[12/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ActionImport.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ActionImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ActionImport.java
new file mode 100644
index 0000000..2c5f8c7
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ActionImport.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface ActionImport extends OperationImport {
+
+  String getAction();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotatable.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotatable.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotatable.java
new file mode 100644
index 0000000..9c99f71
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotatable.java
@@ -0,0 +1,26 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.util.List;
+
+public interface Annotatable {
+  
+  List<Annotation> getAnnotations();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotation.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotation.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotation.java
new file mode 100644
index 0000000..f5f163f
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotation.java
@@ -0,0 +1,30 @@
+/*
+ * 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.client.api.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+
+public interface Annotation extends Annotatable {
+
+  String getTerm();
+
+  String getQualifier();
+
+  AnnotationExpression getExpression();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java
new file mode 100644
index 0000000..6c1027b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface Annotations extends CommonAnnotations, Annotatable {
+
+  Annotation getAnnotation(String term);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/BindingTarget.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/BindingTarget.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/BindingTarget.java
new file mode 100644
index 0000000..c702ebd
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/BindingTarget.java
@@ -0,0 +1,26 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.util.List;
+
+public interface BindingTarget extends Named, Annotatable {
+
+  List<? extends NavigationPropertyBinding> getNavigationPropertyBindings();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java
index 9e85e22..173eaeb 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java
@@ -20,13 +20,19 @@ package org.apache.olingo.client.api.edm.xml;
 
 import java.util.List;
 
-public interface ComplexType extends Named {
+public interface ComplexType extends Named, Annotatable {
 
-  CommonProperty getProperty(String name);
+  boolean isAbstractEntityType();
 
-  List<? extends CommonProperty> getProperties();
+  String getBaseType();
 
-  CommonNavigationProperty getNavigationProperty(String name);
+  boolean isOpenType();
 
-  List<? extends CommonNavigationProperty> getNavigationProperties();
+  Property getProperty(String name);
+
+  List<Property> getProperties();
+
+  NavigationProperty getNavigationProperty(String name);
+
+  List<NavigationProperty> getNavigationProperties();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/DataServices.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/DataServices.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/DataServices.java
index 961f69c..bb9fb0a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/DataServices.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/DataServices.java
@@ -26,5 +26,5 @@ public interface DataServices {
 
   String getMaxDataServiceVersion();
 
-  List<? extends Schema> getSchemas();
+  List<Schema> getSchemas();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Edmx.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Edmx.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Edmx.java
index ee495c2..38f0c13 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Edmx.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Edmx.java
@@ -1,26 +1,30 @@
 /*
  * 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.client.api.edm.xml;
 
+import java.util.List;
+
 public interface Edmx {
 
   String getVersion();
 
   DataServices getDataServices();
+
+  List<Reference> getReferences();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityContainer.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityContainer.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityContainer.java
index b748c5f..c04270e 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityContainer.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityContainer.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.edm.xml;
 
 import java.util.List;
 
-public interface EntityContainer extends Named {
+public interface EntityContainer extends Named, Annotatable {
 
   String getExtends();
 
@@ -30,11 +30,21 @@ public interface EntityContainer extends Named {
 
   EntitySet getEntitySet(String name);
 
-  List<? extends EntitySet> getEntitySets();
+  List<EntitySet> getEntitySets();
 
-  CommonFunctionImport getFunctionImport(String name);
+  List<Singleton> getSingletons();
 
-  List<? extends CommonFunctionImport> getFunctionImports(String name);
+  Singleton getSingleton(String name);
 
-  List<? extends CommonFunctionImport> getFunctionImports();
+  ActionImport getActionImport(String name);
+
+  List<ActionImport> getActionImports(String name);
+
+  List<ActionImport> getActionImports();
+
+  FunctionImport getFunctionImport(String name);
+
+  List<FunctionImport> getFunctionImports(String name);
+
+  List<FunctionImport> getFunctionImports();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntitySet.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntitySet.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntitySet.java
index 3dea8b4..1bf85a2 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntitySet.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntitySet.java
@@ -18,8 +18,10 @@
  */
 package org.apache.olingo.client.api.edm.xml;
 
-public interface EntitySet extends Named {
+public interface EntitySet extends Named, BindingTarget {
 
   String getEntityType();
+  
+  boolean isIncludeInServiceDocument();
 
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Function.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Function.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Function.java
new file mode 100644
index 0000000..90df25c
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Function.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface Function extends Action {
+
+  boolean isComposable();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java
new file mode 100644
index 0000000..e69bdf6
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface FunctionImport extends OperationImport, CommonFunctionImport {
+
+  String getFunction();
+
+  boolean isIncludeInServiceDocument();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Include.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Include.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Include.java
new file mode 100644
index 0000000..0b6d06d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Include.java
@@ -0,0 +1,26 @@
+/*
+ * 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.client.api.edm.xml;
+
+public interface Include {
+
+  String getAlias();
+
+  String getNamespace();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/IncludeAnnotations.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/IncludeAnnotations.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/IncludeAnnotations.java
new file mode 100644
index 0000000..c2506a1
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/IncludeAnnotations.java
@@ -0,0 +1,28 @@
+/*
+ * 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.client.api.edm.xml;
+
+public interface IncludeAnnotations {
+
+  String getQualifier();
+
+  String getTargetNamespace();
+
+  String getTermNamespace();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java
new file mode 100644
index 0000000..a08d4c7
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.util.List;
+
+public interface NavigationProperty extends CommonNavigationProperty, Annotatable {
+
+  String getType();
+
+  boolean isNullable();
+
+  String getPartner();
+
+  List<ReferentialConstraint> getReferentialConstraints();
+
+  OnDelete getOnDelete();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationPropertyBinding.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationPropertyBinding.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationPropertyBinding.java
new file mode 100644
index 0000000..6dda47d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationPropertyBinding.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.edm.xml;
+
+public interface NavigationPropertyBinding {
+
+  String getPath();
+
+  String getTarget();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/OperationImport.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/OperationImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/OperationImport.java
new file mode 100644
index 0000000..1272921
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/OperationImport.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface OperationImport extends Named, Annotatable {
+
+  String getEntitySet();
+
+  void setEntitySet(String entitySet);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java
new file mode 100644
index 0000000..85cf446
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java
@@ -0,0 +1,26 @@
+/*
+ * 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.client.api.edm.xml;
+
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+public interface Parameter extends CommonParameter, Annotatable {
+
+  SRID getSrid();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java
new file mode 100644
index 0000000..7c13e20
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface Property extends CommonProperty, Annotatable {
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Reference.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Reference.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Reference.java
new file mode 100644
index 0000000..599aa6a
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Reference.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.net.URI;
+import java.util.List;
+
+public interface Reference extends Annotatable {
+
+  URI getUri();
+
+  List<Include> getIncludes();
+
+  List<IncludeAnnotations> getIncludeAnnotations();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReferentialConstraint.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReferentialConstraint.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReferentialConstraint.java
new file mode 100644
index 0000000..559bf2c
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReferentialConstraint.java
@@ -0,0 +1,28 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface ReferentialConstraint extends Annotatable {
+
+  String getProperty();
+
+  String getReferencedProperty();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReturnType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReturnType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReturnType.java
new file mode 100644
index 0000000..85d5030
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ReturnType.java
@@ -0,0 +1,36 @@
+/*
+ * 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.client.api.edm.xml;
+
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+public interface ReturnType {
+
+  Integer getMaxLength();
+
+  Integer getPrecision();
+
+  Integer getScale();
+
+  SRID getSrid();
+
+  String getType();
+
+  boolean isNullable();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java
index 07a1b13..1b2796a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java
@@ -19,6 +19,7 @@
 package org.apache.olingo.client.api.edm.xml;
 
 import java.util.List;
+import java.util.Map;
 
 public interface Schema {
 
@@ -26,20 +27,10 @@ public interface Schema {
 
   String getAlias();
 
-  List<? extends EntityType> getEntityTypes();
-
   List<EnumType> getEnumTypes();
 
   EnumType getEnumType(String name);
 
-  List<? extends CommonAnnotations> getAnnotationGroups();
-
-  CommonAnnotations getAnnotationGroup(String target);
-
-  List<? extends ComplexType> getComplexTypes();
-
-  List<? extends EntityContainer> getEntityContainers();
-
   /**
    * Gets default entity container.
    *
@@ -55,20 +46,44 @@ public interface Schema {
    */
   EntityContainer getEntityContainer(String name);
 
-  /**
-   * Gets entity type with the given name.
-   *
-   * @param name name.
-   * @return entity type.
-   */
-  EntityType getEntityType(String name);
+  List<EntityContainer> getEntityContainers();
+
+  EntityContainer getEntityContainer();
 
-  /**
-   * Gets complex type with the given name.
-   *
-   * @param name name.
-   * @return complex type.
-   */
   ComplexType getComplexType(String name);
 
+  List<ComplexType> getComplexTypes();
+
+  EntityType getEntityType(String name);
+
+  List<EntityType> getEntityTypes();
+
+  List<Action> getActions();
+
+  List<Action> getActions(String name);
+
+  Annotation getAnnotation(String term);
+
+  Map<String, Annotatable> getAnnotatables();
+
+  List<Function> getFunctions();
+
+  List<Function> getFunctions(String name);
+
+  Term getTerm(String name);
+
+  List<Term> getTerms();
+
+  TypeDefinition getTypeDefinition(String name);
+
+  List<TypeDefinition> getTypeDefinitions();
+
+  List<Annotations> getAnnotationGroups();
+
+  Annotations getAnnotationGroup(String target);
+
+  
+  //TODO: Check if there are annotations in V4
+  List<Annotation> getAnnotations();
+  
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Singleton.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Singleton.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Singleton.java
new file mode 100644
index 0000000..7393b07
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Singleton.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.edm.xml;
+
+
+public interface Singleton extends EntitySet, BindingTarget {
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Term.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Term.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Term.java
new file mode 100644
index 0000000..fe9712e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Term.java
@@ -0,0 +1,44 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+public interface Term extends Named, Annotatable {
+
+  List<String> getAppliesTo();
+
+  String getBaseTerm();
+
+  String getDefaultValue();
+
+  Integer getMaxLength();
+
+  Integer getPrecision();
+
+  Integer getScale();
+
+  SRID getSrid();
+
+  String getType();
+
+  boolean isNullable();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/TypeDefinition.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/TypeDefinition.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/TypeDefinition.java
new file mode 100644
index 0000000..45ad41e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/TypeDefinition.java
@@ -0,0 +1,40 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+public interface TypeDefinition extends Named, Annotatable {
+
+  List<Annotation> getAnnotations();
+
+  Integer getMaxLength();
+
+  Integer getPrecision();
+
+  Integer getScale();
+
+  SRID getSrid();
+
+  String getUnderlyingType();
+
+  boolean isUnicode();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/XMLMetadata.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/XMLMetadata.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/XMLMetadata.java
index 8062077..9cf10b9 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/XMLMetadata.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/XMLMetadata.java
@@ -47,7 +47,9 @@ public interface XMLMetadata {
    *
    * @return all Schema objects defined in the EdM metadata document
    */
-  List<? extends Schema> getSchemas();
+  List<Schema> getSchemas();
 
   Map<String, Schema> getSchemaByNsOrAlias();
+  
+  List<Reference> getReferences();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationExpression.java
new file mode 100644
index 0000000..470f10a
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationExpression.java
@@ -0,0 +1,30 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface AnnotationExpression {
+
+  boolean isConstant();
+
+  ConstantAnnotationExpression asConstant();
+
+  boolean isDynamic();
+
+  DynamicAnnotationExpression asDynamic();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationPath.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationPath.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationPath.java
new file mode 100644
index 0000000..09b043e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/AnnotationPath.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface AnnotationPath extends DynamicAnnotationExpression {
+
+  String getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Apply.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Apply.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Apply.java
new file mode 100644
index 0000000..28b31e4
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Apply.java
@@ -0,0 +1,30 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+
+public interface Apply extends DynamicAnnotationExpression, Annotatable {
+
+  String getFunction();
+
+  List<AnnotationExpression> getParameters();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Cast.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Cast.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Cast.java
new file mode 100644
index 0000000..4a8cff5
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Cast.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+public interface Cast extends DynamicAnnotationExpression, Annotatable {
+
+  Integer getMaxLength();
+
+  Integer getPrecision();
+
+  Integer getScale();
+
+  SRID getSrid();
+
+  String getType();
+
+  DynamicAnnotationExpression getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Collection.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Collection.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Collection.java
new file mode 100644
index 0000000..61ec914
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Collection.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import java.util.List;
+
+public interface Collection extends DynamicAnnotationExpression {
+
+  List<AnnotationExpression> getItems();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/ConstantAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/ConstantAnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/ConstantAnnotationExpression.java
new file mode 100644
index 0000000..596d266
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/ConstantAnnotationExpression.java
@@ -0,0 +1,56 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface ConstantAnnotationExpression extends AnnotationExpression {
+
+  public enum Type {
+
+    Binary,
+    Bool,
+    Date,
+    DateTimeOffset,
+    Decimal,
+    Duration,
+    EnumMember,
+    Float,
+    Guid,
+    Int,
+    String,
+    TimeOfDay;
+
+    public static Type fromString(final String value) {
+      Type result = null;
+      try {
+        result = valueOf(value);
+      } catch (IllegalArgumentException e) {
+        // ignore
+      }
+      return result;
+    }
+  }
+
+  Type getType();
+
+  void setType(Type type);
+
+  String getValue();
+
+  void setValue(String value);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/DynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/DynamicAnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/DynamicAnnotationExpression.java
new file mode 100644
index 0000000..2e99d3d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/DynamicAnnotationExpression.java
@@ -0,0 +1,91 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface DynamicAnnotationExpression extends AnnotationExpression {
+
+  boolean isNot();
+
+  Not asNot();
+
+  boolean isTwoParamsOp();
+
+  TwoParamsOpDynamicAnnotationExpression asTwoParamsOp();
+
+  boolean isAnnotationPath();
+
+  AnnotationPath asAnnotationPath();
+
+  boolean isApply();
+
+  Apply asApply();
+
+  boolean isCast();
+
+  Cast asCast();
+
+  boolean isCollection();
+
+  Collection asCollection();
+
+  boolean isIf();
+
+  If asIf();
+
+  boolean isIsOf();
+
+  IsOf asIsOf();
+
+  boolean isLabeledElement();
+
+  LabeledElement asLabeledElement();
+
+  boolean isLabeledElementReference();
+
+  LabeledElementReference asLabeledElementReference();
+
+  boolean isNull();
+  
+  Null asNull();
+  
+  boolean isNavigationPropertyPath();
+
+  NavigationPropertyPath asNavigationPropertyPath();
+
+  boolean isPath();
+
+  Path asPath();
+
+  boolean isPropertyPath();
+
+  PropertyPath asPropertyPath();
+
+  boolean isPropertyValue();
+
+  PropertyValue asPropertyValue();
+
+  boolean isRecord();
+
+  Record asRecord();
+
+  boolean isUrlRef();
+
+  UrlRef asUrlRef();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/If.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/If.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/If.java
new file mode 100644
index 0000000..f73857f
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/If.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+
+public interface If extends DynamicAnnotationExpression, Annotatable {
+
+  AnnotationExpression getGuard();
+
+  AnnotationExpression getThen();
+
+  AnnotationExpression getElse();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/IsOf.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/IsOf.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/IsOf.java
new file mode 100644
index 0000000..dcaa4fa
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/IsOf.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+public interface IsOf extends DynamicAnnotationExpression, Annotatable {
+
+  Integer getMaxLength();
+
+  Integer getPrecision();
+
+  Integer getScale();
+
+  SRID getSrid();
+
+  String getType();
+
+  DynamicAnnotationExpression getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElement.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElement.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElement.java
new file mode 100644
index 0000000..9a509e9
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElement.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+
+public interface LabeledElement extends DynamicAnnotationExpression, Annotatable {
+
+  String getName();
+
+  DynamicAnnotationExpression getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElementReference.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElementReference.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElementReference.java
new file mode 100644
index 0000000..68ea203
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/LabeledElementReference.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface LabeledElementReference extends DynamicAnnotationExpression {
+
+  String getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/NavigationPropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/NavigationPropertyPath.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/NavigationPropertyPath.java
new file mode 100644
index 0000000..4d2d06c
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/NavigationPropertyPath.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface NavigationPropertyPath extends DynamicAnnotationExpression {
+
+  String getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Not.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Not.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Not.java
new file mode 100644
index 0000000..123dc93
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Not.java
@@ -0,0 +1,24 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface Not extends DynamicAnnotationExpression {
+
+  DynamicAnnotationExpression getExpression();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Null.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Null.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Null.java
new file mode 100644
index 0000000..8cbd447
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Null.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+
+public interface Null extends DynamicAnnotationExpression, Annotatable {
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Path.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Path.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Path.java
new file mode 100644
index 0000000..b24ceef
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Path.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface Path extends DynamicAnnotationExpression {
+
+  String getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyPath.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyPath.java
new file mode 100644
index 0000000..99ad87a
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyPath.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface PropertyPath extends DynamicAnnotationExpression {
+
+  String getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyValue.java
new file mode 100644
index 0000000..fbf4b40
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/PropertyValue.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+
+public interface PropertyValue extends DynamicAnnotationExpression, Annotatable {
+
+  String getProperty();
+
+  AnnotationExpression getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Record.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Record.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Record.java
new file mode 100644
index 0000000..b597558
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/Record.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+
+public interface Record extends DynamicAnnotationExpression, Annotatable {
+
+  List<PropertyValue> getPropertyValues();
+
+  String getType();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpression.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpression.java
new file mode 100644
index 0000000..276ba3d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/TwoParamsOpDynamicAnnotationExpression.java
@@ -0,0 +1,50 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface TwoParamsOpDynamicAnnotationExpression extends DynamicAnnotationExpression {
+
+  public static enum Type {
+
+    And,
+    Or,
+    Eq,
+    Ne,
+    Gt,
+    Ge,
+    Lt,
+    Le;
+
+    public static Type fromString(final String value) {
+      Type result = null;
+      for (Type type : values()) {
+        if (value.equals(type.name())) {
+          result = type;
+        }
+      }
+      return result;
+    }
+  }
+
+  Type getType();
+  
+  DynamicAnnotationExpression getLeftExpression();
+
+  DynamicAnnotationExpression getRightExpression();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/UrlRef.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/UrlRef.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/UrlRef.java
new file mode 100644
index 0000000..9f7c44c
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/annotation/UrlRef.java
@@ -0,0 +1,25 @@
+/*
+ * 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.client.api.edm.xml.annotation;
+
+public interface UrlRef extends DynamicAnnotationExpression {
+
+  AnnotationExpression getValue();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Action.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Action.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Action.java
deleted file mode 100644
index 996cac8..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Action.java
+++ /dev/null
@@ -1,37 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.Named;
-
-public interface Action extends Named, Annotatable {
-
-  boolean isBound();
-
-  String getEntitySetPath();
-
-  List<Parameter> getParameters();
-
-  Parameter getParameter(String name);
-
-  ReturnType getReturnType();
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ActionImport.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ActionImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ActionImport.java
deleted file mode 100644
index 3cf9713..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ActionImport.java
+++ /dev/null
@@ -1,24 +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.client.api.edm.xml.v4;
-
-public interface ActionImport extends OperationImport {
-
-  String getAction();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotatable.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotatable.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotatable.java
deleted file mode 100644
index d009212..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotatable.java
+++ /dev/null
@@ -1,26 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-public interface Annotatable {
-  
-  List<Annotation> getAnnotations();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotation.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotation.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotation.java
deleted file mode 100644
index 69c437e..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotation.java
+++ /dev/null
@@ -1,30 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-
-public interface Annotation extends Annotatable {
-
-  String getTerm();
-
-  String getQualifier();
-
-  AnnotationExpression getExpression();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotations.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotations.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotations.java
deleted file mode 100644
index f23bed3..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/Annotations.java
+++ /dev/null
@@ -1,26 +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.client.api.edm.xml.v4;
-
-import org.apache.olingo.client.api.edm.xml.CommonAnnotations;
-
-public interface Annotations extends CommonAnnotations, Annotatable {
-
-  Annotation getAnnotation(String term);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/BindingTarget.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/BindingTarget.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/BindingTarget.java
deleted file mode 100644
index 171c416..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/BindingTarget.java
+++ /dev/null
@@ -1,28 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.Named;
-
-public interface BindingTarget extends Named, Annotatable {
-
-  List<? extends NavigationPropertyBinding> getNavigationPropertyBindings();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ComplexType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ComplexType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ComplexType.java
deleted file mode 100644
index a72a329..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/v4/ComplexType.java
+++ /dev/null
@@ -1,43 +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.client.api.edm.xml.v4;
-
-import java.util.List;
-
-public interface ComplexType extends org.apache.olingo.client.api.edm.xml.ComplexType, Annotatable {
-
-  boolean isAbstractEntityType();
-
-  String getBaseType();
-
-  boolean isOpenType();
-
-  @Override
-  Property getProperty(String name);
-
-  @Override
-  List<Property> getProperties();
-
-  @Override
-  NavigationProperty getNavigationProperty(String name);
-
-  @Override
-  List<NavigationProperty> getNavigationProperties();
-
-}


[08/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestWrapperImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestWrapperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestWrapperImpl.java
deleted file mode 100644
index ce78d84..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/v4/AsyncRequestWrapperImpl.java
+++ /dev/null
@@ -1,316 +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.client.core.communication.request.v4;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.http.Header;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.impl.client.DecompressingHttpClient;
-import org.apache.http.util.EntityUtils;
-import org.apache.olingo.client.api.communication.ODataClientErrorException;
-import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.header.ODataPreferences;
-import org.apache.olingo.client.api.communication.request.ODataRequest;
-import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
-import org.apache.olingo.client.api.communication.request.v4.AsyncRequestWrapper;
-import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponseWrapper;
-import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.AbstractODataRequest;
-import org.apache.olingo.client.core.communication.request.AbstractRequest;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.api.http.HttpMethod;
-
-public class AsyncRequestWrapperImpl<R extends ODataResponse> extends AbstractRequest
-        implements AsyncRequestWrapper<R> {
-
-  protected static final int MAX_RETRY = 5;
-
-  protected final ODataClient odataClient;
-
-  /**
-   * Request to be wrapped.
-   */
-  protected final ODataRequest odataRequest;
-
-  /**
-   * HTTP client.
-   */
-  protected final HttpClient httpClient;
-
-  /**
-   * HTTP request.
-   */
-  protected final HttpUriRequest request;
-
-  /**
-   * Target URI.
-   */
-  protected final URI uri;
-
-  protected AsyncRequestWrapperImpl(final ODataClient odataClient, final ODataRequest odataRequest) {
-    this.odataRequest = odataRequest;
-    this.odataRequest.setAccept(this.odataRequest.getAccept());
-    this.odataRequest.setContentType(this.odataRequest.getContentType());
-
-    extendHeader(HeaderName.prefer.toString(), new ODataPreferences(ODataServiceVersion.V40).respondAsync());
-
-    this.odataClient = odataClient;
-    final HttpMethod method = odataRequest.getMethod();
-
-    // target uri
-    this.uri = odataRequest.getURI();
-
-    HttpClient _httpClient = odataClient.getConfiguration().getHttpClientFactory().create(method, this.uri);
-    if (odataClient.getConfiguration().isGzipCompression()) {
-      _httpClient = new DecompressingHttpClient(_httpClient);
-    }
-    this.httpClient = _httpClient;
-
-    this.request = odataClient.getConfiguration().getHttpUriRequestFactory().create(method, this.uri);
-  }
-
-  @Override
-  public final AsyncRequestWrapper<R> wait(final int waitInSeconds) {
-    extendHeader(HeaderName.prefer.toString(), new ODataPreferences(ODataServiceVersion.V40).wait(waitInSeconds));
-    return this;
-  }
-
-  @Override
-  public final AsyncRequestWrapper<R> callback(URI url) {
-    extendHeader(HeaderName.prefer.toString(),
-            new ODataPreferences(ODataServiceVersion.V40).callback(url.toASCIIString()));
-    return this;
-  }
-
-  protected final void extendHeader(final String headerName, final String headerValue) {
-    final StringBuilder extended = new StringBuilder();
-    if (this.odataRequest.getHeaderNames().contains(headerName)) {
-      extended.append(this.odataRequest.getHeader(headerName)).append(", ");
-    }
-
-    this.odataRequest.addCustomHeader(headerName, extended.append(headerValue).toString());
-  }
-
-  @Override
-  public AsyncResponseWrapper<R> execute() {
-    return new AsyncResponseWrapperImpl(doExecute());
-  }
-
-  protected HttpResponse doExecute() {
-    // Add all available headers
-    for (String key : odataRequest.getHeaderNames()) {
-      final String value = odataRequest.getHeader(key);
-      this.request.addHeader(key, value);
-      LOG.debug("HTTP header being sent {}: {}", key, value);
-    }
-
-    return executeHttpRequest(httpClient, this.request);
-  }
-
-  public class AsyncResponseWrapperImpl implements AsyncResponseWrapper<R> {
-
-    protected URI location = null;
-
-    protected R response = null;
-
-    protected int retryAfter = 5;
-
-    protected boolean preferenceApplied = false;
-
-    public AsyncResponseWrapperImpl() {
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param res HTTP response.
-     */
-    @SuppressWarnings("unchecked")
-    public AsyncResponseWrapperImpl(final HttpResponse res) {
-      if (res.getStatusLine().getStatusCode() == 202) {
-        retrieveMonitorDetails(res);
-      } else {
-        response = (R) ((AbstractODataRequest) odataRequest).getResponseTemplate().initFromHttpResponse(res);
-      }
-    }
-
-    @Override
-    public boolean isPreferenceApplied() {
-      return preferenceApplied;
-    }
-
-    @Override
-    public boolean isDone() {
-      if (response == null) {
-        // check to the monitor URL
-        final HttpResponse res = checkMonitor(location);
-
-        if (res.getStatusLine().getStatusCode() == 202) {
-          retrieveMonitorDetails(res);
-        } else {
-          response = instantiateResponse(res);
-        }
-      }
-
-      return response != null;
-    }
-
-    @Override
-    public R getODataResponse() {
-      HttpResponse res = null;
-      for (int i = 0; response == null && i < MAX_RETRY; i++) {
-        res = checkMonitor(location);
-
-        if (res.getStatusLine().getStatusCode() == 202) {
-
-          final Header[] headers = res.getHeaders(HeaderName.retryAfter.toString());
-          if (ArrayUtils.isNotEmpty(headers)) {
-            this.retryAfter = Integer.parseInt(headers[0].getValue());
-          }
-
-          try {
-            // wait for retry-after
-            Thread.sleep(retryAfter * 1000);
-          } catch (InterruptedException ignore) {
-            // ignore
-          }
-
-        } else {
-          location = null;
-          return instantiateResponse(res);
-        }
-      }
-
-      if (response == null) {
-        throw new ODataClientErrorException(res == null ? null : res.getStatusLine());
-      }
-
-      return response;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ODataDeleteResponse delete() {
-      final ODataDeleteRequest deleteRequest = odataClient.getCUDRequestFactory().getDeleteRequest(location);
-      return deleteRequest.execute();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public AsyncResponseWrapper<ODataDeleteResponse> asyncDelete() {
-      return odataClient.getAsyncRequestFactory().<ODataDeleteResponse>getAsyncRequestWrapper(
-              odataClient.getCUDRequestFactory().getDeleteRequest(location)).execute();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public AsyncResponseWrapper<R> forceNextMonitorCheck(final URI uri) {
-      this.location = uri;
-      this.response = null;
-      return this;
-    }
-
-    @SuppressWarnings("unchecked")
-    private R instantiateResponse(final HttpResponse res) {
-      R odataResponse;
-      try {
-        odataResponse = (R) ((AbstractODataRequest) odataRequest).getResponseTemplate().
-                initFromEnclosedPart(res.getEntity().getContent());
-
-      } catch (Exception e) {
-        LOG.error("Error instantiating odata response", e);
-        odataResponse = null;
-      }
-
-      return odataResponse;
-    }
-
-    private void retrieveMonitorDetails(final HttpResponse res) {
-      Header[] headers = res.getHeaders(HeaderName.location.toString());
-      if (ArrayUtils.isNotEmpty(headers)) {
-        this.location = URI.create(headers[0].getValue());
-      } else {
-        throw new AsyncRequestException(
-                "Invalid async request response. Monitor URL '" + headers[0].getValue() + "'");
-      }
-
-      headers = res.getHeaders(HeaderName.retryAfter.toString());
-      if (ArrayUtils.isNotEmpty(headers)) {
-        this.retryAfter = Integer.parseInt(headers[0].getValue());
-      }
-
-      headers = res.getHeaders(HeaderName.preferenceApplied.toString());
-      if (ArrayUtils.isNotEmpty(headers)) {
-        for (Header header : headers) {
-          if (header.getValue().equalsIgnoreCase(new ODataPreferences(ODataServiceVersion.V40).respondAsync())) {
-            preferenceApplied = true;
-          }
-        }
-      }
-      try {
-        EntityUtils.consume(res.getEntity());
-      } catch (IOException ex) {
-        Logger.getLogger(AsyncRequestWrapperImpl.class.getName()).log(Level.SEVERE, null, ex);
-      }
-    }
-  }
-
-  protected final HttpResponse checkMonitor(final URI location) {
-    if (location == null) {
-      throw new AsyncRequestException("Invalid async request response. Missing monitor URL");
-    }
-
-    final HttpUriRequest monitor = odataClient.getConfiguration().getHttpUriRequestFactory().
-            create(HttpMethod.GET, location);
-
-    return executeHttpRequest(httpClient, monitor);
-  }
-
-  protected final HttpResponse executeHttpRequest(final HttpClient client, final HttpUriRequest req) {
-    final HttpResponse response;
-    try {
-      response = client.execute(req);
-    } catch (IOException e) {
-      throw new HttpClientException(e);
-    } catch (RuntimeException e) {
-      req.abort();
-      throw new HttpClientException(e);
-    }
-
-    checkResponse(odataClient, response, odataRequest.getAccept());
-
-    return response;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AsyncResponseImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AsyncResponseImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AsyncResponseImpl.java
new file mode 100644
index 0000000..6f012c8
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/AsyncResponseImpl.java
@@ -0,0 +1,65 @@
+/*
+ * 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.client.core.communication.response;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator;
+import org.apache.olingo.client.api.communication.response.AsyncResponse;
+import org.apache.olingo.client.core.communication.request.batch.ODataBatchController;
+
+/**
+ * Abstract representation of an OData response.
+ */
+public class AsyncResponseImpl extends AbstractODataResponse implements AsyncResponse {
+
+  public AsyncResponseImpl(final CommonODataClient<?> odataClient, final HttpClient httpClient,
+          final HttpResponse res) {
+
+    super(odataClient, httpClient, res);
+  }
+
+  /**
+   * Constructor to be used inside a batch item.
+   */
+  public AsyncResponseImpl(
+          final Map.Entry<Integer, String> responseLine,
+          final Map<String, Collection<String>> headers,
+          final ODataBatchLineIterator batchLineIterator,
+          final String boundary) {
+
+    super(null, null, null);
+
+    if (hasBeenInitialized) {
+      throw new IllegalStateException("Request already initialized");
+    }
+
+    this.hasBeenInitialized = true;
+
+    this.batchInfo = new ODataBatchController(batchLineIterator, boundary);
+
+    this.statusCode = responseLine.getKey();
+    this.statusMessage = responseLine.getValue();
+    this.headers.putAll(headers);
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/v4/AsyncResponseImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/v4/AsyncResponseImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/v4/AsyncResponseImpl.java
deleted file mode 100644
index cdbfa8a..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/response/v4/AsyncResponseImpl.java
+++ /dev/null
@@ -1,66 +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.client.core.communication.response.v4;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponse;
-import org.apache.olingo.client.core.communication.request.batch.ODataBatchController;
-import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
-
-/**
- * Abstract representation of an OData response.
- */
-public class AsyncResponseImpl extends AbstractODataResponse implements AsyncResponse {
-
-  public AsyncResponseImpl(final CommonODataClient<?> odataClient, final HttpClient httpClient,
-          final HttpResponse res) {
-
-    super(odataClient, httpClient, res);
-  }
-
-  /**
-   * Constructor to be used inside a batch item.
-   */
-  public AsyncResponseImpl(
-          final Map.Entry<Integer, String> responseLine,
-          final Map<String, Collection<String>> headers,
-          final ODataBatchLineIterator batchLineIterator,
-          final String boundary) {
-
-    super(null, null, null);
-
-    if (hasBeenInitialized) {
-      throw new IllegalStateException("Request already initialized");
-    }
-
-    this.hasBeenInitialized = true;
-
-    this.batchInfo = new ODataBatchController(batchLineIterator, boundary);
-
-    this.statusCode = responseLine.getKey();
-    this.statusMessage = responseLine.getValue();
-    this.headers.putAll(headers);
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java
index 8340ec6..63cfa42 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.edm;
 
-import org.apache.olingo.client.api.edm.xml.v4.Action;
+import org.apache.olingo.client.api.edm.xml.Action;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
index 3478f48..d826486 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm;
 
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
+import org.apache.olingo.client.api.edm.xml.ActionImport;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmActionImport;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationHelperImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationHelperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationHelperImpl.java
index e7b334d..f6d0a25 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationHelperImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationHelperImpl.java
@@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmTerm;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationImpl.java
index 81b89a9..de46fae 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationImpl.java
@@ -21,15 +21,15 @@ package org.apache.olingo.client.core.edm;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyValue;
-import org.apache.olingo.client.core.edm.v4.annotation.EdmCastImpl;
-import org.apache.olingo.client.core.edm.v4.annotation.EdmConstantAnnotationExpressionImpl;
-import org.apache.olingo.client.core.edm.v4.annotation.EdmIsOfImpl;
-import org.apache.olingo.client.core.edm.v4.annotation.EdmRecordImpl;
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.client.api.edm.xml.annotation.PropertyValue;
+import org.apache.olingo.client.core.edm.annotation.EdmCastImpl;
+import org.apache.olingo.client.core.edm.annotation.EdmConstantAnnotationExpressionImpl;
+import org.apache.olingo.client.core.edm.annotation.EdmIsOfImpl;
+import org.apache.olingo.client.core.edm.annotation.EdmRecordImpl;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotatable;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationsImpl.java
index 5589033..ebd953d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationsImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmAnnotationsImpl.java
@@ -22,8 +22,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Annotations;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotations;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmAnnotations;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java
index ed26215..21b7e9b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java
@@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.BindingTarget;
-import org.apache.olingo.client.api.edm.xml.v4.NavigationPropertyBinding;
+import org.apache.olingo.client.api.edm.xml.BindingTarget;
+import org.apache.olingo.client.api.edm.xml.NavigationPropertyBinding;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
index 89468a7..6b9c9b9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
@@ -32,19 +32,19 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.olingo.client.api.edm.xml.Action;
+import org.apache.olingo.client.api.edm.xml.Annotatable;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotations;
 import org.apache.olingo.client.api.edm.xml.CommonParameter;
 import org.apache.olingo.client.api.edm.xml.ComplexType;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
 import org.apache.olingo.client.api.edm.xml.EntityType;
 import org.apache.olingo.client.api.edm.xml.EnumType;
+import org.apache.olingo.client.api.edm.xml.Function;
 import org.apache.olingo.client.api.edm.xml.Schema;
-import org.apache.olingo.client.api.edm.xml.v4.Action;
-import org.apache.olingo.client.api.edm.xml.v4.Annotatable;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Annotations;
-import org.apache.olingo.client.api.edm.xml.v4.Function;
-import org.apache.olingo.client.api.edm.xml.v4.Term;
-import org.apache.olingo.client.api.edm.xml.v4.TypeDefinition;
+import org.apache.olingo.client.api.edm.xml.Term;
+import org.apache.olingo.client.api.edm.xml.TypeDefinition;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmAnnotations;
@@ -140,8 +140,8 @@ public class EdmClientImpl extends AbstractEdm {
     EdmTypeDefinition result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(typeDefinitionName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final TypeDefinition xmlTypeDefinition = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
+    if (schema instanceof Schema) {
+      final TypeDefinition xmlTypeDefinition = ((Schema) schema).
               getTypeDefinition(typeDefinitionName.getName());
       if (xmlTypeDefinition != null) {
         result = new EdmTypeDefinitionImpl(version, this, typeDefinitionName, xmlTypeDefinition);
@@ -186,8 +186,8 @@ public class EdmClientImpl extends AbstractEdm {
     EdmAction result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(actionName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final List<Action> actions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
+    if (schema instanceof Schema) {
+      final List<Action> actions = ((Schema) schema).
               getActions(actionName.getName());
       boolean found = false;
       for (final Iterator<Action> itor = actions.iterator(); itor.hasNext() && !found;) {
@@ -206,8 +206,8 @@ public class EdmClientImpl extends AbstractEdm {
     final List<EdmFunction> result = new ArrayList<EdmFunction>();
 
     final Schema schema = xmlSchemaByNamespace.get(functionName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final List<Function> functions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
+    if (schema instanceof Schema) {
+      final List<Function> functions = ((Schema) schema).
               getFunctions(functionName.getName());
       for (final Iterator<Function> itor = functions.iterator(); itor.hasNext();) {
         final Function function = itor.next();
@@ -224,8 +224,8 @@ public class EdmClientImpl extends AbstractEdm {
     EdmFunction result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(functionName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final List<Function> functions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
+    if (schema instanceof Schema) {
+      final List<Function> functions = ((Schema) schema).
               getFunctions(functionName.getName());
       boolean found = false;
       for (final Iterator<Function> itor = functions.iterator(); itor.hasNext() && !found;) {
@@ -252,9 +252,9 @@ public class EdmClientImpl extends AbstractEdm {
     EdmAction result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(actionName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
+    if (schema instanceof Schema) {
       final List<Action> actions =
-              ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getActions(actionName.getName());
+              ((Schema) schema).getActions(actionName.getName());
       boolean found = false;
       for (final Iterator<Action> itor = actions.iterator(); itor.hasNext() && !found;) {
         final Action action = itor.next();
@@ -282,8 +282,8 @@ public class EdmClientImpl extends AbstractEdm {
     EdmFunction result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(functionName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final List<Function> functions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
+    if (schema instanceof Schema) {
+      final List<Function> functions = ((Schema) schema).
               getFunctions(functionName.getName());
       boolean found = false;
       for (final Iterator<Function> itor = functions.iterator(); itor.hasNext() && !found;) {
@@ -315,8 +315,8 @@ public class EdmClientImpl extends AbstractEdm {
     EdmTerm result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(termName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final Term term = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getTerm(termName.getName());
+    if (schema instanceof Schema) {
+      final Term term = ((Schema) schema).getTerm(termName.getName());
       if (term != null) {
         result = new EdmTermImpl(this, schema.getNamespace(), term);
       }
@@ -330,9 +330,9 @@ public class EdmClientImpl extends AbstractEdm {
     EdmAnnotationsImpl result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(targetName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
+    if (schema instanceof Schema) {
       final Annotations annotationGroup =
-              ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getAnnotationGroup(targetName.getName());
+              ((Schema) schema).getAnnotationGroup(targetName.getName());
       if (annotationGroup != null) {
         result = new EdmAnnotationsImpl(this, schemas.get(schema.getNamespace()), annotationGroup);
       }
@@ -346,9 +346,9 @@ public class EdmClientImpl extends AbstractEdm {
     List<EdmAnnotation> result = null;
 
     final Schema schema = xmlSchemaByNamespace.get(annotatedName.getNamespace());
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
+    if (schema instanceof Schema) {
       final Annotatable annotatable =
-              ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getAnnotatables().get(annotatedName.getName());
+              ((Schema) schema).getAnnotatables().get(annotatedName.getName());
       if (annotatable != null && annotatable.getAnnotations() != null) {
         result = new ArrayList<EdmAnnotation>();
         for (Annotation annotation : annotatable.getAnnotations()) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
index 6f70e36..e734200 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
@@ -44,8 +44,8 @@ public class EdmComplexTypeImpl extends AbstractEdmComplexType {
           final List<? extends Schema> xmlSchemas, final ComplexType complexType) {
 
     FullQualifiedName baseTypeName = null;
-    if (complexType instanceof org.apache.olingo.client.api.edm.xml.v4.ComplexType) {
-      final String baseType = ((org.apache.olingo.client.api.edm.xml.v4.ComplexType) complexType).getBaseType();
+    if (complexType instanceof org.apache.olingo.client.api.edm.xml.ComplexType) {
+      final String baseType = ((org.apache.olingo.client.api.edm.xml.ComplexType) complexType).getBaseType();
       baseTypeName = baseType == null
               ? null : new EdmTypeInfo.Builder().setTypeExpression(baseType).build().getFullQualifiedName();
     }
@@ -60,9 +60,9 @@ public class EdmComplexTypeImpl extends AbstractEdmComplexType {
 
     super(edm, fqn, baseTypeName);
     this.typeHelper = new EdmStructuredTypeHelperImpl(edm, getFullQualifiedName(), xmlSchemas, complexType);
-    if (complexType instanceof org.apache.olingo.client.api.edm.xml.v4.ComplexType) {
+    if (complexType instanceof org.apache.olingo.client.api.edm.xml.ComplexType) {
       this.annotationHelper = new EdmAnnotationHelperImpl(edm,
-              (org.apache.olingo.client.api.edm.xml.v4.ComplexType) complexType);
+              (org.apache.olingo.client.api.edm.xml.ComplexType) complexType);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
index defaf0f..b6cdc36 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
@@ -21,12 +21,12 @@ package org.apache.olingo.client.core.edm;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.olingo.client.api.edm.xml.ActionImport;
 import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
 import org.apache.olingo.client.api.edm.xml.EntitySet;
 import org.apache.olingo.client.api.edm.xml.Schema;
-import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Singleton;
+import org.apache.olingo.client.api.edm.xml.Singleton;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmActionImport;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
@@ -55,22 +55,22 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
 
     this.xmlEntityContainer = xmlEntityContainer;
     this.xmlSchemas = xmlSchemas;
-    if (xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer) {
+    if (xmlEntityContainer instanceof EntityContainer) {
       this.helper = new EdmAnnotationHelperImpl(edm,
-              (org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer);
+              (EntityContainer) xmlEntityContainer);
     }
   }
 
   @Override
   public boolean isDefault() {
-    return xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer
+    return xmlEntityContainer instanceof EntityContainer
             ? true
             : xmlEntityContainer.isDefaultEntityContainer();
   }
 
   @Override
   protected EdmSingleton createSingleton(final String singletonName) {
-    final Singleton singleton = ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).
+    final Singleton singleton = ((EntityContainer) xmlEntityContainer).
             getSingleton(singletonName);
     return singleton == null
             ? null
@@ -88,9 +88,9 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
     if (entitySet != null) {
       final FullQualifiedName entityType = new EdmTypeInfo.Builder().setTypeExpression(entitySet.getEntityType()).
               setDefaultNamespace(entityContainerName.getNamespace()).build().getFullQualifiedName();
-      if (entitySet instanceof org.apache.olingo.client.api.edm.xml.v4.EntitySet) {
+      if (entitySet instanceof EntitySet) {
         result = new EdmEntitySetImpl(edm, this, entitySetName, entityType,
-                (org.apache.olingo.client.api.edm.xml.v4.EntitySet) entitySet);
+                (EntitySet) entitySet);
       } 
     }
 
@@ -101,8 +101,8 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
   protected EdmActionImport createActionImport(final String actionImportName) {
     EdmActionImport result = null;
 
-    if (xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer) {
-      final ActionImport actionImport = ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).
+    if (xmlEntityContainer instanceof EntityContainer) {
+      final ActionImport actionImport = ((EntityContainer) xmlEntityContainer).
               getActionImport(actionImportName);
       if (actionImport != null) {
         result = new EdmActionImportImpl(edm, this, actionImportName, actionImport);
@@ -117,9 +117,9 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
 
     final CommonFunctionImport functionImport = xmlEntityContainer.getFunctionImport(functionImportName);
     if (functionImport != null) {
-      if (functionImport instanceof org.apache.olingo.client.api.edm.xml.v4.FunctionImport) {
+      if (functionImport instanceof org.apache.olingo.client.api.edm.xml.FunctionImport) {
         result = new EdmFunctionImportImpl(edm, this, functionImportName,
-                (org.apache.olingo.client.api.edm.xml.v4.FunctionImport) functionImport);
+                (org.apache.olingo.client.api.edm.xml.FunctionImport) functionImport);
       } 
     }
 
@@ -134,9 +134,9 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
         EdmEntitySet edmSet;
         final FullQualifiedName entityType = new EdmTypeInfo.Builder().setTypeExpression(entitySet.getEntityType()).
                 setDefaultNamespace(entityContainerName.getNamespace()).build().getFullQualifiedName();
-        if (entitySet instanceof org.apache.olingo.client.api.edm.xml.v4.EntitySet) {
+        if (entitySet instanceof EntitySet) {
           edmSet = new EdmEntitySetImpl(edm, this, entitySet.getName(), entityType,
-                  (org.apache.olingo.client.api.edm.xml.v4.EntitySet) entitySet);
+                  (EntitySet) entitySet);
           entitySets.put(edmSet.getName(), edmSet);
         } 
       }
@@ -149,9 +149,9 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
     final List<? extends CommonFunctionImport> localFunctionImports = xmlEntityContainer.getFunctionImports();
     for (CommonFunctionImport functionImport : localFunctionImports) {
       EdmFunctionImport edmFunctionImport;
-      if (functionImport instanceof org.apache.olingo.client.api.edm.xml.v4.FunctionImport) {
+      if (functionImport instanceof org.apache.olingo.client.api.edm.xml.FunctionImport) {
         edmFunctionImport = new EdmFunctionImportImpl(edm, this, functionImport.getName(),
-                (org.apache.olingo.client.api.edm.xml.v4.FunctionImport) functionImport);
+                (org.apache.olingo.client.api.edm.xml.FunctionImport) functionImport);
         functionImports.put(edmFunctionImport.getName(), edmFunctionImport);
       } 
     }
@@ -160,7 +160,7 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
   @Override
   protected void loadAllSingletons() {
     final List<Singleton> localSingletons =
-            ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).getSingletons();
+            ((EntityContainer) xmlEntityContainer).getSingletons();
     if (localSingletons != null) {
       for (Singleton singleton : localSingletons) {
         singletons.put(singleton.getName(), new EdmSingletonImpl(edm, this, singleton.getName(),
@@ -173,9 +173,9 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
 
   @Override
   protected void loadAllActionImports() {
-    if (xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer) {
+    if (xmlEntityContainer instanceof EntityContainer) {
       final List<ActionImport> localActionImports =
-              ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).getActionImports();
+              ((EntityContainer) xmlEntityContainer).getActionImports();
       if (actionImports != null) {
         for (ActionImport actionImport : localActionImports) {
           actionImports.put(actionImport.getName(),

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java
index 2c80ad1..d4aa183 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.edm;
 
-import org.apache.olingo.client.api.edm.xml.v4.EntitySet;
+import org.apache.olingo.client.api.edm.xml.EntitySet;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
 import org.apache.olingo.commons.api.edm.EdmEntitySet;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
index 27730b3..746047b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
@@ -80,9 +80,9 @@ public class EdmEntityTypeImpl extends AbstractEdmEntityType {
 
     super(edm, fqn, baseTypeName, entityType.isHasStream());
     this.typeHelper = new EdmStructuredTypeHelperImpl(edm, getFullQualifiedName(), xmlSchemas, entityType);
-    if (entityType instanceof org.apache.olingo.client.api.edm.xml.v4.EntityType) {
+    if (entityType instanceof EntityType) {
       this.annotationHelper = new EdmAnnotationHelperImpl(edm,
-          (org.apache.olingo.client.api.edm.xml.v4.EntityType) entityType);
+          (EntityType) entityType);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java
index d2831fc..1e7f9f6 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.edm;
 
-import org.apache.olingo.client.api.edm.xml.v4.Function;
+import org.apache.olingo.client.api.edm.xml.Function;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmFunction;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
index ade9bba..170c046 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm;
 
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
+import org.apache.olingo.client.api.edm.xml.FunctionImport;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmMemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmMemberImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmMemberImpl.java
index a06fcc9..bf19703 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmMemberImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmMemberImpl.java
@@ -22,7 +22,7 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.olingo.client.api.edm.xml.Member;
-import org.apache.olingo.client.core.edm.xml.v4.MemberImpl;
+import org.apache.olingo.client.core.edm.xml.MemberImpl;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmTerm;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
index 6aa3476..c3aec23 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
@@ -21,8 +21,8 @@ package org.apache.olingo.client.core.edm;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
-import org.apache.olingo.client.api.edm.xml.v4.ReferentialConstraint;
+import org.apache.olingo.client.api.edm.xml.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.ReferentialConstraint;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmReferentialConstraint;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java
index b09ce3f..498fece 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java
@@ -22,8 +22,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.edm.xml.Action;
 import org.apache.olingo.client.api.edm.xml.CommonParameter;
-import org.apache.olingo.client.api.edm.xml.v4.Action;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmParameter;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
index 8b2830a..c71d1e5 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
@@ -22,7 +22,7 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.olingo.client.api.edm.xml.CommonParameter;
-import org.apache.olingo.client.api.edm.xml.v4.Parameter;
+import org.apache.olingo.client.api.edm.xml.Parameter;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmMapping;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
index 7faba4f..36e2348 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
@@ -22,7 +22,7 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.olingo.client.api.edm.xml.CommonProperty;
-import org.apache.olingo.client.api.edm.xml.v4.Property;
+import org.apache.olingo.client.api.edm.xml.Property;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmMapping;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReferentialConstraintImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReferentialConstraintImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReferentialConstraintImpl.java
index 1564593..c9a80e9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReferentialConstraintImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReferentialConstraintImpl.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm;
 
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.ReferentialConstraint;
+import org.apache.olingo.client.api.edm.xml.ReferentialConstraint;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmTerm;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
index 4d7c9f4..071cbfa 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.edm;
 
-import org.apache.olingo.client.api.edm.xml.v4.ReturnType;
+import org.apache.olingo.client.api.edm.xml.ReturnType;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.geo.SRID;
 import org.apache.olingo.commons.core.edm.AbstractEdmReturnType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSchemaImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSchemaImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSchemaImpl.java
index eb6c31b..b1cbd1c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSchemaImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSchemaImpl.java
@@ -23,17 +23,17 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.olingo.client.api.edm.xml.Action;
+import org.apache.olingo.client.api.edm.xml.Annotation;
+import org.apache.olingo.client.api.edm.xml.Annotations;
 import org.apache.olingo.client.api.edm.xml.ComplexType;
 import org.apache.olingo.client.api.edm.xml.EntityContainer;
 import org.apache.olingo.client.api.edm.xml.EntityType;
 import org.apache.olingo.client.api.edm.xml.EnumType;
+import org.apache.olingo.client.api.edm.xml.Function;
 import org.apache.olingo.client.api.edm.xml.Schema;
-import org.apache.olingo.client.api.edm.xml.v4.Action;
-import org.apache.olingo.client.api.edm.xml.v4.Annotation;
-import org.apache.olingo.client.api.edm.xml.v4.Annotations;
-import org.apache.olingo.client.api.edm.xml.v4.Function;
-import org.apache.olingo.client.api.edm.xml.v4.Term;
-import org.apache.olingo.client.api.edm.xml.v4.TypeDefinition;
+import org.apache.olingo.client.api.edm.xml.Term;
+import org.apache.olingo.client.api.edm.xml.TypeDefinition;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
@@ -79,7 +79,7 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
     if (entityContainers == null) {
       entityContainerByName = new HashMap<FullQualifiedName, EdmEntityContainer>();
 
-      if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
+      if (schema instanceof Schema) {
         entityContainers = super.getEntityContainers();
         if (getEntityContainer() != null) {
           entityContainerByName.put(getEntityContainer().getFullQualifiedName(), getEntityContainer());
@@ -127,9 +127,9 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
   @Override
   protected List<EdmTypeDefinition> createTypeDefinitions() {
     final List<EdmTypeDefinition> typeDefinitions = new ArrayList<EdmTypeDefinition>();
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
+    if (schema instanceof Schema) {
       final List<TypeDefinition> providerTypeDefinitions =
-          ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getTypeDefinitions();
+          ((Schema) schema).getTypeDefinitions();
       if (providerTypeDefinitions != null) {
         for (TypeDefinition def : providerTypeDefinitions) {
           typeDefinitions.add(
@@ -182,8 +182,8 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
   @Override
   protected List<EdmAction> createActions() {
     final List<EdmAction> actions = new ArrayList<EdmAction>();
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final List<Action> providerActions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getActions();
+    if (schema instanceof Schema) {
+      final List<Action> providerActions = ((Schema) schema).getActions();
       if (providerActions != null) {
         for (Action action : providerActions) {
           actions.add(EdmActionImpl.getInstance(edm, new FullQualifiedName(namespace, action.getName()), action));
@@ -196,8 +196,8 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
   @Override
   protected List<EdmFunction> createFunctions() {
     final List<EdmFunction> functions = new ArrayList<EdmFunction>();
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final List<Function> providerFunctions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getFunctions();
+    if (schema instanceof Schema) {
+      final List<Function> providerFunctions = ((Schema) schema).getFunctions();
       if (providerFunctions != null) {
         for (Function function : providerFunctions) {
           functions.add(
@@ -212,8 +212,8 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
   @Override
   protected List<EdmTerm> createTerms() {
     final List<EdmTerm> terms = new ArrayList<EdmTerm>();
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
-      final List<Term> providerTerms = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getTerms();
+    if (schema instanceof Schema) {
+      final List<Term> providerTerms = ((Schema) schema).getTerms();
       if (providerTerms != null) {
         for (Term term : providerTerms) {
           terms.add(new EdmTermImpl(edm, getNamespace(), term));
@@ -226,9 +226,9 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
   @Override
   protected List<EdmAnnotations> createAnnotationGroups() {
     final List<EdmAnnotations> annotationGroups = new ArrayList<EdmAnnotations>();
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
+    if (schema instanceof Schema) {
       final List<Annotations> providerAnnotations =
-          ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getAnnotationGroups();
+          ((Schema) schema).getAnnotationGroups();
       if (providerAnnotations != null) {
         for (Annotations annotationGroup : providerAnnotations) {
           annotationGroups.add(new EdmAnnotationsImpl(edm, this, annotationGroup));
@@ -241,9 +241,9 @@ public class EdmSchemaImpl extends AbstractEdmSchema {
   @Override
   protected List<EdmAnnotation> createAnnotations() {
     final List<EdmAnnotation> annotations = new ArrayList<EdmAnnotation>();
-    if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
+    if (schema instanceof Schema) {
       final List<Annotation> providerAnnotations =
-          ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).getAnnotations();
+          ((Schema) schema).getAnnotations();
       if (providerAnnotations != null) {
         for (Annotation annotation : providerAnnotations) {
           annotations.add(new EdmAnnotationImpl(edm, annotation));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSingletonImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSingletonImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSingletonImpl.java
index 403c28f..4735569 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSingletonImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmSingletonImpl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.core.edm;
 
-import org.apache.olingo.client.api.edm.xml.v4.Singleton;
+import org.apache.olingo.client.api.edm.xml.Singleton;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
 import org.apache.olingo.commons.api.edm.EdmSingleton;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java
index 5315bfb..9a5e0c8 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java
@@ -72,10 +72,10 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper {
     if (navigationProperties == null) {
       navigationProperties = new LinkedHashMap<String, EdmNavigationProperty>();
       for (CommonNavigationProperty navigationProperty : complexType.getNavigationProperties()) {
-        if (navigationProperty instanceof org.apache.olingo.client.api.edm.xml.v4.NavigationProperty) {
+        if (navigationProperty instanceof org.apache.olingo.client.api.edm.xml.NavigationProperty) {
           navigationProperties.put(navigationProperty.getName(), new EdmNavigationPropertyImpl(
                   edm, structuredTypeName,
-                  (org.apache.olingo.client.api.edm.xml.v4.NavigationProperty) navigationProperty));
+                  (org.apache.olingo.client.api.edm.xml.NavigationProperty) navigationProperty));
         }
       }
     }
@@ -84,8 +84,8 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper {
 
   @Override
   public boolean isOpenType() {
-    return complexType instanceof org.apache.olingo.client.api.edm.xml.v4.ComplexType
-            ? ((org.apache.olingo.client.api.edm.xml.v4.ComplexType) complexType).isOpenType()
+    return complexType instanceof org.apache.olingo.client.api.edm.xml.ComplexType
+            ? ((org.apache.olingo.client.api.edm.xml.ComplexType) complexType).isOpenType()
             : complexType instanceof EntityType
             ? ((EntityType) complexType).isOpenType()
             : false;
@@ -93,8 +93,8 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper {
 
   @Override
   public boolean isAbstract() {
-    return complexType instanceof org.apache.olingo.client.api.edm.xml.v4.ComplexType
-            ? ((org.apache.olingo.client.api.edm.xml.v4.ComplexType) complexType).isAbstractEntityType()
+    return complexType instanceof org.apache.olingo.client.api.edm.xml.ComplexType
+            ? ((org.apache.olingo.client.api.edm.xml.ComplexType) complexType).isAbstractEntityType()
             : complexType instanceof EntityType
             ? ((EntityType) complexType).isAbstractEntityType()
             : false;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTermImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTermImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTermImpl.java
index daa2647..4d85e51 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTermImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTermImpl.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.lang3.ClassUtils;
-import org.apache.olingo.client.api.edm.xml.v4.Term;
+import org.apache.olingo.client.api.edm.xml.Term;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeDefinitionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeDefinitionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeDefinitionImpl.java
index e314f58..62f514d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeDefinitionImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmTypeDefinitionImpl.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm;
 
 import java.util.List;
 
-import org.apache.olingo.client.api.edm.xml.v4.TypeDefinition;
+import org.apache.olingo.client.api.edm.xml.TypeDefinition;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmCastImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmCastImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmCastImpl.java
new file mode 100644
index 0000000..68a9d66
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmCastImpl.java
@@ -0,0 +1,80 @@
+/*
+ * 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.client.core.edm.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.Cast;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmType;
+import org.apache.olingo.commons.api.edm.annotation.EdmCast;
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.core.edm.annotation.AbstractEdmAnnotatableDynamicAnnotationExpression;
+
+public class EdmCastImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmCast {
+
+  private final Edm edm;
+
+  private final Cast cast;
+
+  private final EdmDynamicAnnotationExpression value;
+
+  private EdmType type;
+
+  public EdmCastImpl(final Edm edm, final Cast cast, final EdmDynamicAnnotationExpression value) {
+    this.edm = edm;
+    this.cast = cast;
+    this.value = value;
+  }
+
+  @Override
+  public Integer getMaxLength() {
+    return cast.getMaxLength();
+  }
+
+  @Override
+  public Integer getPrecision() {
+    return cast.getPrecision();
+  }
+
+  @Override
+  public Integer getScale() {
+    return cast.getScale();
+  }
+
+  @Override
+  public SRID getSrid() {
+    return cast.getSrid();
+  }
+
+  @Override
+  public EdmType getType() {
+    if (type == null) {
+      final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(cast.getType()).build();
+      type = typeInfo.getType();
+    }
+    return type;
+  }
+
+  @Override
+  public EdmDynamicAnnotationExpression getValue() {
+    return value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
new file mode 100644
index 0000000..50d0fc9
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
@@ -0,0 +1,141 @@
+/*
+ * 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.client.core.edm.annotation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.edm.xml.annotation.ConstantAnnotationExpression;
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.commons.api.domain.v4.ODataEnumValue;
+import org.apache.olingo.commons.api.domain.v4.ODataValue;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
+import org.apache.olingo.commons.api.edm.annotation.EdmConstantAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.core.domain.v4.ODataCollectionValueImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataEnumValueImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataPrimitiveValueImpl;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
+
+public class EdmConstantAnnotationExpressionImpl implements EdmConstantAnnotationExpression {
+
+  private final ODataValue value;
+
+  public EdmConstantAnnotationExpressionImpl(final ConstantAnnotationExpression constExprConstruct) {
+    if (constExprConstruct.getType() == ConstantAnnotationExpression.Type.EnumMember) {
+      final List<ODataEnumValue> enumValues = new ArrayList<ODataEnumValue>();
+      String enumTypeName = null;
+      for (String split : StringUtils.split(constExprConstruct.getValue(), ' ')) {
+        final String[] enumSplit = StringUtils.split(split, '/');
+        enumTypeName = enumSplit[0];
+        enumValues.add(new ODataEnumValueImpl(enumSplit[0], enumSplit[1]));
+      }
+      if (enumValues.size() == 1) {
+        value = enumValues.get(0);
+      } else {
+        final ODataCollectionValueImpl collValue = new ODataCollectionValueImpl(enumTypeName);
+        for (ODataValue enumValue : enumValues) {
+          collValue.add(enumValue);
+        }
+        value = collValue;
+      }
+    } else {
+      EdmPrimitiveTypeKind kind;
+      switch (constExprConstruct.getType()) {
+        case Binary:
+          kind = EdmPrimitiveTypeKind.Binary;
+          break;
+        case Bool:
+          kind = EdmPrimitiveTypeKind.Boolean;
+          break;
+        case Date:
+          kind = EdmPrimitiveTypeKind.Date;
+          break;
+        case DateTimeOffset:
+          kind = EdmPrimitiveTypeKind.DateTimeOffset;
+          break;
+        case Decimal:
+          kind = EdmPrimitiveTypeKind.Decimal;
+          break;
+        case Duration:
+          kind = EdmPrimitiveTypeKind.Duration;
+          break;
+        case Float:
+          kind = EdmPrimitiveTypeKind.Single;
+          break;
+        case Guid:
+          kind = EdmPrimitiveTypeKind.Guid;
+          break;
+        case Int:
+          kind = EdmPrimitiveTypeKind.Int32;
+          break;
+        case TimeOfDay:
+          kind = EdmPrimitiveTypeKind.TimeOfDay;
+          break;
+        case String:
+        default:
+          kind = EdmPrimitiveTypeKind.String;
+      }
+      final ODataPrimitiveValueImpl.BuilderImpl primitiveValueBuilder =
+          new ODataPrimitiveValueImpl.BuilderImpl(ODataServiceVersion.V40);
+      primitiveValueBuilder.setType(kind);
+      try {
+        final EdmPrimitiveType primitiveType = EdmPrimitiveTypeFactory.getInstance(kind);
+        primitiveValueBuilder.setValue(
+            primitiveType.valueOfString(constExprConstruct.getValue(),
+                null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null,
+                primitiveType.getDefaultType()));
+      } catch (final EdmPrimitiveTypeException e) {
+        throw new IllegalArgumentException(e);
+      }
+
+      value = primitiveValueBuilder.build();
+    }
+  }
+
+  @Override
+  public boolean isConstant() {
+    return true;
+  }
+
+  @Override
+  public EdmConstantAnnotationExpression asConstant() {
+    return this;
+  }
+
+  @Override
+  public boolean isDynamic() {
+    return false;
+  }
+
+  @Override
+  public EdmDynamicAnnotationExpression asDynamic() {
+    return null;
+  }
+
+  @Override
+  public ODataValue getValue() {
+    return value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmIsOfImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmIsOfImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmIsOfImpl.java
new file mode 100644
index 0000000..8ff4757
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmIsOfImpl.java
@@ -0,0 +1,80 @@
+/*
+ * 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.client.core.edm.annotation;
+
+import org.apache.olingo.client.api.edm.xml.annotation.IsOf;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmType;
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmIsOf;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.core.edm.annotation.AbstractEdmAnnotatableDynamicAnnotationExpression;
+
+public class EdmIsOfImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmIsOf {
+
+  private final Edm edm;
+
+  private final IsOf isOf;
+
+  private final EdmDynamicAnnotationExpression value;
+
+  private EdmType type;
+
+  public EdmIsOfImpl(final Edm edm, final IsOf isOf, final EdmDynamicAnnotationExpression value) {
+    this.edm = edm;
+    this.isOf = isOf;
+    this.value = value;
+  }
+
+  @Override
+  public Integer getMaxLength() {
+    return isOf.getMaxLength();
+  }
+
+  @Override
+  public Integer getPrecision() {
+    return isOf.getPrecision();
+  }
+
+  @Override
+  public Integer getScale() {
+    return isOf.getScale();
+  }
+
+  @Override
+  public SRID getSrid() {
+    return isOf.getSrid();
+  }
+
+  @Override
+  public EdmType getType() {
+    if (type == null) {
+      final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(isOf.getType()).build();
+      type = typeInfo.getType();
+    }
+    return type;
+  }
+
+  @Override
+  public EdmDynamicAnnotationExpression getValue() {
+    return value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmRecordImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmRecordImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmRecordImpl.java
new file mode 100644
index 0000000..c5ea7e0
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/annotation/EdmRecordImpl.java
@@ -0,0 +1,55 @@
+/*
+ * 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.client.core.edm.annotation;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmStructuredType;
+import org.apache.olingo.commons.api.edm.annotation.EdmPropertyValue;
+import org.apache.olingo.commons.api.edm.annotation.EdmRecord;
+import org.apache.olingo.commons.core.edm.EdmTypeInfo;
+import org.apache.olingo.commons.core.edm.annotation.AbstractEdmAnnotatableDynamicAnnotationExpression;
+
+public class EdmRecordImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmRecord {
+
+  private final List<EdmPropertyValue> propertyValues;
+
+  private EdmStructuredType type;
+
+  public EdmRecordImpl(final Edm edm, final String type, final List<EdmPropertyValue> propertyValues) {
+    this.propertyValues = propertyValues;
+
+    if (type != null) {
+      final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(type).build();
+      this.type = typeInfo.getEntityType() == null ? typeInfo.getComplexType() : typeInfo.getEntityType();
+    }
+  }
+
+  @Override
+  public List<EdmPropertyValue> getPropertyValues() {
+    return propertyValues;
+  }
+
+  @Override
+  public EdmStructuredType getType() {
+    return type;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmCastImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmCastImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmCastImpl.java
deleted file mode 100644
index 0c05155..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/v4/annotation/EdmCastImpl.java
+++ /dev/null
@@ -1,80 +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.client.core.edm.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.Cast;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmType;
-import org.apache.olingo.commons.api.edm.annotation.EdmCast;
-import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-import org.apache.olingo.commons.core.edm.EdmTypeInfo;
-import org.apache.olingo.commons.core.edm.annotation.AbstractEdmAnnotatableDynamicAnnotationExpression;
-
-public class EdmCastImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmCast {
-
-  private final Edm edm;
-
-  private final Cast cast;
-
-  private final EdmDynamicAnnotationExpression value;
-
-  private EdmType type;
-
-  public EdmCastImpl(final Edm edm, final Cast cast, final EdmDynamicAnnotationExpression value) {
-    this.edm = edm;
-    this.cast = cast;
-    this.value = value;
-  }
-
-  @Override
-  public Integer getMaxLength() {
-    return cast.getMaxLength();
-  }
-
-  @Override
-  public Integer getPrecision() {
-    return cast.getPrecision();
-  }
-
-  @Override
-  public Integer getScale() {
-    return cast.getScale();
-  }
-
-  @Override
-  public SRID getSrid() {
-    return cast.getSrid();
-  }
-
-  @Override
-  public EdmType getType() {
-    if (type == null) {
-      final EdmTypeInfo typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(cast.getType()).build();
-      type = typeInfo.getType();
-    }
-    return type;
-  }
-
-  @Override
-  public EdmDynamicAnnotationExpression getValue() {
-    return value;
-  }
-
-}


[14/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
[OLINGO-575] Move v4 package content one package up


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

Branch: refs/heads/master
Commit: 109c33ba3950b461bc62e5f5cef3dce9fcf5a90a
Parents: c8865db
Author: Christian Amend <ch...@apache.org>
Authored: Wed Feb 18 16:33:56 2015 +0100
Committer: Christian Amend <ch...@apache.org>
Committed: Wed Feb 18 16:33:56 2015 +0100

----------------------------------------------------------------------
 .../org/apache/olingo/ext/proxy/api/Search.java |   2 +-
 .../AbstractCollectionInvocationHandler.java    |   4 +-
 ...stractEntityCollectionInvocationHandler.java |   3 +-
 .../commons/AbstractPersistenceManager.java     |  10 +-
 .../AbstractStructuredInvocationHandler.java    |   3 +-
 .../commons/EntitySetInvocationHandler.java     |   2 +-
 .../olingo/ext/proxy/commons/SearchImpl.java    |   7 +-
 .../olingo/ext/pojogen/V4POJOGenMojo.java       |   2 +-
 .../src/main/resources/service.vm               |   4 +-
 .../fit/proxy/v4/APIBasicDesignTestITCase.java  |   3 +-
 .../olingo/fit/proxy/v4/AbstractTestITCase.java |   2 +-
 .../proxy/v4/AuthEntityCreateTestITCase.java    |   2 +-
 .../proxy/v4/AuthEntityRetrieveTestITCase.java  |   2 +-
 .../olingo/fit/proxy/v4/ContextTestITCase.java  |   3 +-
 .../fit/proxy/v4/EntityCreateTestITCase.java    |   3 +-
 .../fit/proxy/v4/EntityUpdateTestITCase.java    |   2 +-
 .../fit/proxy/v4/KeyAsSegmentTestITCase.java    |   2 +-
 .../fit/proxy/v4/MediaEntityTestITCase.java     |   3 +-
 ...TransactionalAuthEntityCreateTestITCase.java |   2 +-
 .../NonTransactionalEntityCreateTestITCase.java |   2 +-
 .../NonTransactionalEntityUpdateTestITCase.java |   2 +-
 .../NonTransactionalMediaEntityTestITCase.java  |   2 +-
 .../olingo/fit/proxy/v4/OpenTypeTestITCase.java |   3 +-
 .../v4/UnauthorizedEntityCreateTestITCase.java  |   2 +-
 .../olingo/fit/proxy/v4/demo/Service.java       |   4 +-
 .../olingo/fit/proxy/v4/opentype/Service.java   |   4 +-
 .../fit/proxy/v4/staticservice/Service.java     |   4 +-
 .../olingo/fit/tecsvc/client/BasicITCase.java   |  10 +-
 .../fit/tecsvc/client/BatchClientITCase.java    |   6 +-
 .../olingo/fit/tecsvc/client/MediaITCase.java   |   2 +-
 .../fit/tecsvc/client/NavigationITCase.java     |   2 +-
 .../tecsvc/client/PrimitiveComplexITCase.java   |   2 +-
 .../olingo/fit/v4/AbstractTestITCase.java       |   4 +-
 .../apache/olingo/fit/v4/AsyncTestITCase.java   |   6 +-
 .../olingo/fit/v4/AuthBatchTestITCase.java      |   8 +-
 .../apache/olingo/fit/v4/BatchTestITCase.java   |  12 +-
 .../fit/v4/BoundOperationInvokeTestITCase.java  |   2 +-
 .../olingo/fit/v4/ConformanceTestITCase.java    |  10 +-
 .../apache/olingo/fit/v4/DeltaTestITCase.java   |   2 +-
 .../olingo/fit/v4/DerivedTypeTestITCase.java    |   2 +-
 .../olingo/fit/v4/EntityRetrieveTestITCase.java |   7 +-
 .../olingo/fit/v4/EntitySetTestITCase.java      |   4 +-
 .../olingo/fit/v4/EntityUpdateTestITCase.java   |   6 +-
 .../olingo/fit/v4/FilterFactoryTestITCase.java  |   6 +-
 .../olingo/fit/v4/KeyAsSegmentTestITCase.java   |   4 +-
 .../olingo/fit/v4/MediaEntityTestITCase.java    |   6 +-
 .../apache/olingo/fit/v4/OAuth2TestITCase.java  |   8 +-
 .../olingo/fit/v4/OpenTypeTestITCase.java       |   2 +-
 .../olingo/fit/v4/PropertyTestITCase.java       |   6 +-
 .../olingo/fit/v4/PropertyValueTestITCase.java  |   2 +-
 .../olingo/fit/v4/QueryOptionsTestITCase.java   |   2 +-
 .../olingo/fit/v4/SingletonTestITCase.java      |   6 +-
 .../client/api/EdmEnabledODataClient.java       |  32 ++
 .../apache/olingo/client/api/ODataClient.java   |  67 +++
 .../request/AsyncBatchRequestWrapper.java       |  46 ++
 .../request/AsyncRequestFactory.java            |  29 ++
 .../request/AsyncRequestWrapper.java            |  56 +++
 .../api/communication/request/ODataRequest.java |   4 +-
 .../request/batch/BatchRequestFactory.java      |  29 ++
 .../request/batch/ODataBatchRequest.java        |  27 ++
 .../request/batch/ODataOutsideUpdate.java       |  37 ++
 .../request/batch/v4/BatchRequestFactory.java   |  30 --
 .../request/batch/v4/ODataBatchRequest.java     |  29 --
 .../request/batch/v4/ODataOutsideUpdate.java    |  38 --
 .../request/cud/CUDRequestFactory.java          |  56 +++
 .../cud/ODataReferenceAddingRequest.java        |  38 ++
 .../communication/request/cud/UpdateType.java   |  52 +++
 .../request/cud/v4/CUDRequestFactory.java       |  58 ---
 .../cud/v4/ODataReferenceAddingRequest.java     |  38 --
 .../request/cud/v4/UpdateType.java              |  53 ---
 .../request/retrieve/ODataDeltaRequest.java     |  27 ++
 .../retrieve/RetrieveRequestFactory.java        |  46 ++
 .../request/retrieve/v4/ODataDeltaRequest.java  |  28 --
 .../retrieve/v4/RetrieveRequestFactory.java     |  51 ---
 .../request/v4/AsyncBatchRequestWrapper.java    |  47 --
 .../request/v4/AsyncRequestFactory.java         |  30 --
 .../request/v4/AsyncRequestWrapper.java         |  56 ---
 .../communication/response/AsyncResponse.java   |  23 +
 .../response/AsyncResponseWrapper.java          |  78 ++++
 .../response/ODataReferenceAddingResponse.java  |  31 ++
 .../response/v4/AsyncResponse.java              |  24 --
 .../response/v4/AsyncResponseWrapper.java       |  81 ----
 .../v4/ODataReferenceAddingResponse.java        |  32 --
 .../olingo/client/api/edm/xml/Action.java       |  35 ++
 .../olingo/client/api/edm/xml/ActionImport.java |  25 ++
 .../olingo/client/api/edm/xml/Annotatable.java  |  26 ++
 .../olingo/client/api/edm/xml/Annotation.java   |  30 ++
 .../olingo/client/api/edm/xml/Annotations.java  |  25 ++
 .../client/api/edm/xml/BindingTarget.java       |  26 ++
 .../olingo/client/api/edm/xml/ComplexType.java  |  16 +-
 .../olingo/client/api/edm/xml/DataServices.java |   2 +-
 .../apache/olingo/client/api/edm/xml/Edmx.java  |  18 +-
 .../client/api/edm/xml/EntityContainer.java     |  20 +-
 .../olingo/client/api/edm/xml/EntitySet.java    |   4 +-
 .../olingo/client/api/edm/xml/Function.java     |  25 ++
 .../client/api/edm/xml/FunctionImport.java      |  27 ++
 .../olingo/client/api/edm/xml/Include.java      |  26 ++
 .../client/api/edm/xml/IncludeAnnotations.java  |  28 ++
 .../client/api/edm/xml/NavigationProperty.java  |  35 ++
 .../api/edm/xml/NavigationPropertyBinding.java  |  27 ++
 .../client/api/edm/xml/OperationImport.java     |  27 ++
 .../olingo/client/api/edm/xml/Parameter.java    |  26 ++
 .../olingo/client/api/edm/xml/Property.java     |  24 ++
 .../olingo/client/api/edm/xml/Reference.java    |  31 ++
 .../api/edm/xml/ReferentialConstraint.java      |  28 ++
 .../olingo/client/api/edm/xml/ReturnType.java   |  36 ++
 .../olingo/client/api/edm/xml/Schema.java       |  61 ++-
 .../olingo/client/api/edm/xml/Singleton.java    |  24 ++
 .../apache/olingo/client/api/edm/xml/Term.java  |  44 ++
 .../client/api/edm/xml/TypeDefinition.java      |  40 ++
 .../olingo/client/api/edm/xml/XMLMetadata.java  |   4 +-
 .../xml/annotation/AnnotationExpression.java    |  30 ++
 .../api/edm/xml/annotation/AnnotationPath.java  |  25 ++
 .../client/api/edm/xml/annotation/Apply.java    |  30 ++
 .../client/api/edm/xml/annotation/Cast.java     |  38 ++
 .../api/edm/xml/annotation/Collection.java      |  27 ++
 .../ConstantAnnotationExpression.java           |  56 +++
 .../annotation/DynamicAnnotationExpression.java |  91 ++++
 .../client/api/edm/xml/annotation/If.java       |  31 ++
 .../client/api/edm/xml/annotation/IsOf.java     |  38 ++
 .../api/edm/xml/annotation/LabeledElement.java  |  29 ++
 .../xml/annotation/LabeledElementReference.java |  25 ++
 .../xml/annotation/NavigationPropertyPath.java  |  25 ++
 .../client/api/edm/xml/annotation/Not.java      |  24 ++
 .../client/api/edm/xml/annotation/Null.java     |  25 ++
 .../client/api/edm/xml/annotation/Path.java     |  25 ++
 .../api/edm/xml/annotation/PropertyPath.java    |  25 ++
 .../api/edm/xml/annotation/PropertyValue.java   |  29 ++
 .../client/api/edm/xml/annotation/Record.java   |  31 ++
 .../TwoParamsOpDynamicAnnotationExpression.java |  50 +++
 .../client/api/edm/xml/annotation/UrlRef.java   |  25 ++
 .../olingo/client/api/edm/xml/v4/Action.java    |  37 --
 .../client/api/edm/xml/v4/ActionImport.java     |  24 --
 .../client/api/edm/xml/v4/Annotatable.java      |  26 --
 .../client/api/edm/xml/v4/Annotation.java       |  30 --
 .../client/api/edm/xml/v4/Annotations.java      |  26 --
 .../client/api/edm/xml/v4/BindingTarget.java    |  28 --
 .../client/api/edm/xml/v4/ComplexType.java      |  43 --
 .../olingo/client/api/edm/xml/v4/Edmx.java      |  26 --
 .../client/api/edm/xml/v4/EntityContainer.java  |  49 ---
 .../olingo/client/api/edm/xml/v4/EntitySet.java |  24 --
 .../client/api/edm/xml/v4/EntityType.java       |  23 -
 .../olingo/client/api/edm/xml/v4/Function.java  |  24 --
 .../client/api/edm/xml/v4/FunctionImport.java   |  28 --
 .../olingo/client/api/edm/xml/v4/Include.java   |  26 --
 .../api/edm/xml/v4/IncludeAnnotations.java      |  28 --
 .../api/edm/xml/v4/NavigationProperty.java      |  38 --
 .../edm/xml/v4/NavigationPropertyBinding.java   |  27 --
 .../client/api/edm/xml/v4/OperationImport.java  |  28 --
 .../olingo/client/api/edm/xml/v4/Parameter.java |  27 --
 .../olingo/client/api/edm/xml/v4/Property.java  |  25 --
 .../olingo/client/api/edm/xml/v4/Reference.java |  31 --
 .../api/edm/xml/v4/ReferentialConstraint.java   |  27 --
 .../client/api/edm/xml/v4/ReturnType.java       |  36 --
 .../olingo/client/api/edm/xml/v4/Schema.java    |  69 ---
 .../olingo/client/api/edm/xml/v4/Singleton.java |  25 --
 .../olingo/client/api/edm/xml/v4/Term.java      |  45 --
 .../client/api/edm/xml/v4/TypeDefinition.java   |  41 --
 .../client/api/edm/xml/v4/XMLMetadata.java      |  36 --
 .../xml/v4/annotation/AnnotationExpression.java |  30 --
 .../edm/xml/v4/annotation/AnnotationPath.java   |  25 --
 .../client/api/edm/xml/v4/annotation/Apply.java |  30 --
 .../client/api/edm/xml/v4/annotation/Cast.java  |  38 --
 .../api/edm/xml/v4/annotation/Collection.java   |  27 --
 .../ConstantAnnotationExpression.java           |  56 ---
 .../annotation/DynamicAnnotationExpression.java |  91 ----
 .../client/api/edm/xml/v4/annotation/If.java    |  31 --
 .../client/api/edm/xml/v4/annotation/IsOf.java  |  38 --
 .../edm/xml/v4/annotation/LabeledElement.java   |  29 --
 .../v4/annotation/LabeledElementReference.java  |  25 --
 .../v4/annotation/NavigationPropertyPath.java   |  25 --
 .../client/api/edm/xml/v4/annotation/Not.java   |  24 --
 .../client/api/edm/xml/v4/annotation/Null.java  |  25 --
 .../client/api/edm/xml/v4/annotation/Path.java  |  25 --
 .../api/edm/xml/v4/annotation/PropertyPath.java |  25 --
 .../edm/xml/v4/annotation/PropertyValue.java    |  29 --
 .../api/edm/xml/v4/annotation/Record.java       |  31 --
 .../TwoParamsOpDynamicAnnotationExpression.java |  50 ---
 .../api/edm/xml/v4/annotation/UrlRef.java       |  25 --
 .../client/api/serialization/ODataBinder.java   |  43 ++
 .../api/serialization/ODataDeserializer.java    |  41 ++
 .../client/api/serialization/ODataReader.java   |  39 ++
 .../api/serialization/v4/ODataBinder.java       |  44 --
 .../api/serialization/v4/ODataDeserializer.java |  42 --
 .../api/serialization/v4/ODataReader.java       |  40 --
 .../olingo/client/api/uri/FilterArgFactory.java |  56 +++
 .../olingo/client/api/uri/FilterFactory.java    |  32 ++
 .../olingo/client/api/uri/SearchFactory.java    |  31 ++
 .../olingo/client/api/uri/URIBuilder.java       | 143 ++++++
 .../apache/olingo/client/api/uri/URISearch.java |  32 ++
 .../client/api/uri/v4/FilterArgFactory.java     |  59 ---
 .../olingo/client/api/uri/v4/FilterFactory.java |  35 --
 .../olingo/client/api/uri/v4/SearchFactory.java |  31 --
 .../olingo/client/api/uri/v4/URIBuilder.java    | 145 -------
 .../olingo/client/api/uri/v4/URISearch.java     |  32 --
 .../client/api/v4/EdmEnabledODataClient.java    |  33 --
 .../olingo/client/api/v4/ODataClient.java       |  68 ---
 .../apache/olingo/client/core/AndSearch.java    |  42 ++
 .../client/core/EdmEnabledODataClientImpl.java  |  86 ++++
 .../olingo/client/core/LiteralSearch.java       |  35 ++
 .../apache/olingo/client/core/NotSearch.java    |  35 ++
 .../olingo/client/core/ODataClientFactory.java  |   7 +-
 .../olingo/client/core/ODataClientImpl.java     | 156 +++++++
 .../org/apache/olingo/client/core/OrSearch.java |  42 ++
 .../olingo/client/core/SearchFactoryImpl.java   |  46 ++
 .../request/AbstractODataRequest.java           |   4 +-
 .../request/AsyncBatchRequestWrapperImpl.java   | 119 +++++
 .../request/AsyncRequestException.java          |  28 ++
 .../request/AsyncRequestFactoryImpl.java        |  46 ++
 .../request/AsyncRequestWrapperImpl.java        | 314 ++++++++++++++
 .../request/batch/BatchRequestFactoryImpl.java  |  37 ++
 .../request/batch/ODataBatchRequestImpl.java    | 120 ++++++
 .../batch/ODataChangesetResponseItem.java       |   2 +-
 .../request/batch/ODataSingleResponseItem.java  |   2 +-
 .../batch/v4/BatchRequestFactoryImpl.java       |  38 --
 .../request/batch/v4/ODataBatchRequestImpl.java | 122 ------
 .../request/cud/CUDRequestFactoryImpl.java      |  69 +++
 .../cud/ODataReferenceAddingRequestImpl.java    | 103 +++++
 .../request/cud/v4/CUDRequestFactoryImpl.java   |  70 ---
 .../cud/v4/ODataReferenceAddingRequestImpl.java | 103 -----
 .../invoke/AbstractODataInvokeRequest.java      |   2 +-
 .../EdmEnabledInvokeRequestFactoryImpl.java     |  51 +++
 .../invoke/InvokeRequestFactoryImpl.java        |  50 +++
 .../request/invoke/ODataInvokeRequestImpl.java  |  48 +++
 .../v4/EdmEnabledInvokeRequestFactoryImpl.java  |  52 ---
 .../invoke/v4/InvokeRequestFactoryImpl.java     |  51 ---
 .../invoke/v4/ODataInvokeRequestImpl.java       |  49 ---
 .../request/retrieve/ODataDeltaRequestImpl.java |  86 ++++
 .../retrieve/RetrieveRequestFactoryImpl.java    |  78 ++++
 .../retrieve/XMLMetadataRequestImpl.java        | 195 +++++++++
 .../retrieve/v4/ODataDeltaRequestImpl.java      |  87 ----
 .../retrieve/v4/RetrieveRequestFactoryImpl.java |  83 ----
 .../retrieve/v4/XMLMetadataRequestImpl.java     | 196 ---------
 .../v4/AsyncBatchRequestWrapperImpl.java        | 119 -----
 .../request/v4/AsyncRequestException.java       |  28 --
 .../request/v4/AsyncRequestFactoryImpl.java     |  46 --
 .../request/v4/AsyncRequestWrapperImpl.java     | 316 --------------
 .../response/AsyncResponseImpl.java             |  65 +++
 .../response/v4/AsyncResponseImpl.java          |  66 ---
 .../olingo/client/core/edm/EdmActionImpl.java   |   2 +-
 .../client/core/edm/EdmActionImportImpl.java    |   2 +-
 .../core/edm/EdmAnnotationHelperImpl.java       |   4 +-
 .../client/core/edm/EdmAnnotationImpl.java      |  18 +-
 .../client/core/edm/EdmAnnotationsImpl.java     |   4 +-
 .../client/core/edm/EdmBindingTargetImpl.java   |   4 +-
 .../olingo/client/core/edm/EdmClientImpl.java   |  50 +--
 .../client/core/edm/EdmComplexTypeImpl.java     |   8 +-
 .../client/core/edm/EdmEntityContainerImpl.java |  38 +-
 .../client/core/edm/EdmEntitySetImpl.java       |   2 +-
 .../client/core/edm/EdmEntityTypeImpl.java      |   4 +-
 .../olingo/client/core/edm/EdmFunctionImpl.java |   2 +-
 .../client/core/edm/EdmFunctionImportImpl.java  |   2 +-
 .../olingo/client/core/edm/EdmMemberImpl.java   |   2 +-
 .../core/edm/EdmNavigationPropertyImpl.java     |   4 +-
 .../client/core/edm/EdmOperationImpl.java       |   2 +-
 .../client/core/edm/EdmParameterImpl.java       |   2 +-
 .../olingo/client/core/edm/EdmPropertyImpl.java |   2 +-
 .../core/edm/EdmReferentialConstraintImpl.java  |   2 +-
 .../client/core/edm/EdmReturnTypeImpl.java      |   2 +-
 .../olingo/client/core/edm/EdmSchemaImpl.java   |  38 +-
 .../client/core/edm/EdmSingletonImpl.java       |   2 +-
 .../core/edm/EdmStructuredTypeHelperImpl.java   |  12 +-
 .../olingo/client/core/edm/EdmTermImpl.java     |   2 +-
 .../client/core/edm/EdmTypeDefinitionImpl.java  |   2 +-
 .../client/core/edm/annotation/EdmCastImpl.java |  80 ++++
 .../EdmConstantAnnotationExpressionImpl.java    | 141 ++++++
 .../client/core/edm/annotation/EdmIsOfImpl.java |  80 ++++
 .../core/edm/annotation/EdmRecordImpl.java      |  55 +++
 .../core/edm/v4/annotation/EdmCastImpl.java     |  80 ----
 .../EdmConstantAnnotationExpressionImpl.java    | 141 ------
 .../core/edm/v4/annotation/EdmIsOfImpl.java     |  80 ----
 .../core/edm/v4/annotation/EdmRecordImpl.java   |  55 ---
 .../core/edm/xml/AbstractAnnotatable.java       |  38 ++
 .../core/edm/xml/AbstractComplexType.java       |  10 +-
 .../core/edm/xml/AbstractEdmDeserializer.java   |   3 +-
 .../core/edm/xml/AbstractEntityContainer.java   |   8 +-
 .../core/edm/xml/AbstractXMLMetadata.java       |   4 +-
 .../client/core/edm/xml/ActionDeserializer.java |  61 +++
 .../olingo/client/core/edm/xml/ActionImpl.java  |  91 ++++
 .../client/core/edm/xml/ActionImportImpl.java   |  66 +++
 .../core/edm/xml/AnnotationDeserializer.java    |  61 +++
 .../client/core/edm/xml/AnnotationImpl.java     |  64 +++
 .../core/edm/xml/AnnotationsDeserializer.java   |  53 +++
 .../client/core/edm/xml/AnnotationsImpl.java    |  51 +++
 .../core/edm/xml/ComplexTypeDeserializer.java   |   4 -
 .../client/core/edm/xml/ComplexTypeImpl.java    |  97 +++++
 .../core/edm/xml/DataServicesDeserializer.java  |   3 -
 .../client/core/edm/xml/DataServicesImpl.java   |  37 ++
 .../client/core/edm/xml/EdmxDeserializer.java   |  10 +-
 .../olingo/client/core/edm/xml/EdmxImpl.java    |  43 ++
 .../edm/xml/EntityContainerDeserializer.java    |  19 +-
 .../core/edm/xml/EntityContainerImpl.java       | 123 ++++++
 .../core/edm/xml/EntitySetDeserializer.java     |  10 +-
 .../client/core/edm/xml/EntitySetImpl.java      |  57 +++
 .../core/edm/xml/EntityTypeDeserializer.java    |  13 +-
 .../client/core/edm/xml/EntityTypeImpl.java     |  64 +++
 .../core/edm/xml/EnumTypeDeserializer.java      |   9 +-
 .../client/core/edm/xml/EnumTypeImpl.java       |  38 ++
 .../core/edm/xml/FunctionDeserializer.java      |  63 +++
 .../client/core/edm/xml/FunctionImpl.java       |  41 ++
 .../edm/xml/FunctionImportDeserializer.java     |  58 +++
 .../client/core/edm/xml/FunctionImportImpl.java |  86 ++++
 .../core/edm/xml/IncludeAnnotationsImpl.java    |  65 +++
 .../olingo/client/core/edm/xml/IncludeImpl.java |  53 +++
 .../olingo/client/core/edm/xml/MemberImpl.java  |  38 ++
 .../edm/xml/NavigationPropertyBindingImpl.java  |  53 +++
 .../edm/xml/NavigationPropertyDeserializer.java |  67 +++
 .../core/edm/xml/NavigationPropertyImpl.java    |  94 ++++
 .../core/edm/xml/ParameterDeserializer.java     |   7 +-
 .../client/core/edm/xml/ParameterImpl.java      |  50 +++
 .../core/edm/xml/PropertyDeserializer.java      |   5 +-
 .../client/core/edm/xml/PropertyImpl.java       |  37 ++
 .../core/edm/xml/ReferenceDeserializer.java     |  58 +++
 .../client/core/edm/xml/ReferenceImpl.java      |  61 +++
 .../core/edm/xml/ReferentialConstraintImpl.java |  53 +++
 .../core/edm/xml/ReturnTypeDeserializer.java    |  66 +++
 .../client/core/edm/xml/ReturnTypeImpl.java     |  97 +++++
 .../client/core/edm/xml/SchemaDeserializer.java |  40 +-
 .../olingo/client/core/edm/xml/SchemaImpl.java  | 248 +++++++++++
 .../core/edm/xml/SingletonDeserializer.java     |  57 +++
 .../client/core/edm/xml/SingletonImpl.java      |  69 +++
 .../client/core/edm/xml/TermDeserializer.java   |  79 ++++
 .../olingo/client/core/edm/xml/TermImpl.java    | 140 ++++++
 .../edm/xml/TypeDefinitionDeserializer.java     |  70 +++
 .../client/core/edm/xml/TypeDefinitionImpl.java | 119 +++++
 .../client/core/edm/xml/XMLMetadataImpl.java    |  56 +++
 ...tAnnotatableDynamicAnnotationExpression.java |  38 ++
 .../AbstractAnnotationExpression.java           |  49 +++
 .../AbstractDynamicAnnotationExpression.java    | 218 ++++++++++
 .../AbstractElementOrAttributeExpression.java   |  37 ++
 .../edm/xml/annotation/AnnotationPathImpl.java  |  27 ++
 .../edm/xml/annotation/ApplyDeserializer.java   |  57 +++
 .../core/edm/xml/annotation/ApplyImpl.java      |  52 +++
 .../edm/xml/annotation/CastDeserializer.java    |  69 +++
 .../core/edm/xml/annotation/CastImpl.java       |  98 +++++
 .../xml/annotation/CollectionDeserializer.java  |  52 +++
 .../core/edm/xml/annotation/CollectionImpl.java |  41 ++
 .../ConstantAnnotationExpressionImpl.java       |  52 +++
 ...DynamicAnnotationExpressionDeserializer.java | 175 ++++++++
 .../client/core/edm/xml/annotation/IfImpl.java  |  61 +++
 .../edm/xml/annotation/IsOfDeserializer.java    |  69 +++
 .../core/edm/xml/annotation/IsOfImpl.java       |  98 +++++
 .../annotation/LabeledElementDeserializer.java  |  55 +++
 .../edm/xml/annotation/LabeledElementImpl.java  |  54 +++
 .../annotation/LabeledElementReferenceImpl.java |  28 ++
 .../annotation/NavigationPropertyPathImpl.java  |  27 ++
 .../client/core/edm/xml/annotation/NotImpl.java |  39 ++
 .../edm/xml/annotation/NullDeserializer.java    |  51 +++
 .../core/edm/xml/annotation/NullImpl.java       |  30 ++
 .../core/edm/xml/annotation/PathImpl.java       |  27 ++
 .../edm/xml/annotation/PropertyPathImpl.java    |  27 ++
 .../annotation/PropertyValueDeserializer.java   |  57 +++
 .../edm/xml/annotation/PropertyValueImpl.java   |  53 +++
 .../edm/xml/annotation/RecordDeserializer.java  |  55 +++
 .../core/edm/xml/annotation/RecordImpl.java     |  52 +++
 ...ParamsOpDynamicAnnotationExpressionImpl.java |  62 +++
 .../edm/xml/annotation/UrlRefDeserializer.java  |  52 +++
 .../core/edm/xml/annotation/UrlRefImpl.java     |  42 ++
 .../core/edm/xml/v4/AbstractAnnotatable.java    |  39 --
 .../core/edm/xml/v4/ActionDeserializer.java     |  62 ---
 .../client/core/edm/xml/v4/ActionImpl.java      |  91 ----
 .../core/edm/xml/v4/ActionImportImpl.java       |  66 ---
 .../core/edm/xml/v4/AnnotationDeserializer.java |  62 ---
 .../client/core/edm/xml/v4/AnnotationImpl.java  |  64 ---
 .../edm/xml/v4/AnnotationsDeserializer.java     |  55 ---
 .../client/core/edm/xml/v4/AnnotationsImpl.java |  52 ---
 .../client/core/edm/xml/v4/ComplexTypeImpl.java |  98 -----
 .../core/edm/xml/v4/DataServicesImpl.java       |  38 --
 .../olingo/client/core/edm/xml/v4/EdmxImpl.java |  44 --
 .../core/edm/xml/v4/EntityContainerImpl.java    | 124 ------
 .../client/core/edm/xml/v4/EntitySetImpl.java   |  58 ---
 .../client/core/edm/xml/v4/EntityTypeImpl.java  |  65 ---
 .../client/core/edm/xml/v4/EnumTypeImpl.java    |  39 --
 .../core/edm/xml/v4/FunctionDeserializer.java   |  64 ---
 .../client/core/edm/xml/v4/FunctionImpl.java    |  41 --
 .../edm/xml/v4/FunctionImportDeserializer.java  |  59 ---
 .../core/edm/xml/v4/FunctionImportImpl.java     |  86 ----
 .../core/edm/xml/v4/IncludeAnnotationsImpl.java |  66 ---
 .../client/core/edm/xml/v4/IncludeImpl.java     |  54 ---
 .../client/core/edm/xml/v4/MemberImpl.java      |  39 --
 .../xml/v4/NavigationPropertyBindingImpl.java   |  54 ---
 .../xml/v4/NavigationPropertyDeserializer.java  |  69 ---
 .../core/edm/xml/v4/NavigationPropertyImpl.java |  95 ----
 .../client/core/edm/xml/v4/ParameterImpl.java   |  51 ---
 .../client/core/edm/xml/v4/PropertyImpl.java    |  38 --
 .../core/edm/xml/v4/ReferenceDeserializer.java  |  60 ---
 .../client/core/edm/xml/v4/ReferenceImpl.java   |  61 ---
 .../edm/xml/v4/ReferentialConstraintImpl.java   |  53 ---
 .../core/edm/xml/v4/ReturnTypeDeserializer.java |  67 ---
 .../client/core/edm/xml/v4/ReturnTypeImpl.java  |  98 -----
 .../client/core/edm/xml/v4/SchemaImpl.java      | 249 -----------
 .../core/edm/xml/v4/SingletonDeserializer.java  |  59 ---
 .../client/core/edm/xml/v4/SingletonImpl.java   |  63 ---
 .../core/edm/xml/v4/TermDeserializer.java       |  80 ----
 .../olingo/client/core/edm/xml/v4/TermImpl.java | 140 ------
 .../edm/xml/v4/TypeDefinitionDeserializer.java  |  71 ---
 .../core/edm/xml/v4/TypeDefinitionImpl.java     | 120 ------
 .../client/core/edm/xml/v4/XMLMetadataImpl.java |  57 ---
 ...tAnnotatableDynamicAnnotationExpression.java |  38 --
 .../AbstractAnnotationExpression.java           |  49 ---
 .../AbstractDynamicAnnotationExpression.java    | 218 ----------
 .../AbstractElementOrAttributeExpression.java   |  37 --
 .../xml/v4/annotation/AnnotationPathImpl.java   |  27 --
 .../xml/v4/annotation/ApplyDeserializer.java    |  57 ---
 .../core/edm/xml/v4/annotation/ApplyImpl.java   |  52 ---
 .../edm/xml/v4/annotation/CastDeserializer.java |  69 ---
 .../core/edm/xml/v4/annotation/CastImpl.java    |  98 -----
 .../v4/annotation/CollectionDeserializer.java   |  52 ---
 .../edm/xml/v4/annotation/CollectionImpl.java   |  41 --
 .../ConstantAnnotationExpressionImpl.java       |  52 ---
 ...DynamicAnnotationExpressionDeserializer.java | 175 --------
 .../core/edm/xml/v4/annotation/IfImpl.java      |  61 ---
 .../edm/xml/v4/annotation/IsOfDeserializer.java |  69 ---
 .../core/edm/xml/v4/annotation/IsOfImpl.java    |  98 -----
 .../annotation/LabeledElementDeserializer.java  |  55 ---
 .../xml/v4/annotation/LabeledElementImpl.java   |  54 ---
 .../annotation/LabeledElementReferenceImpl.java |  28 --
 .../annotation/NavigationPropertyPathImpl.java  |  27 --
 .../core/edm/xml/v4/annotation/NotImpl.java     |  39 --
 .../edm/xml/v4/annotation/NullDeserializer.java |  51 ---
 .../core/edm/xml/v4/annotation/NullImpl.java    |  30 --
 .../core/edm/xml/v4/annotation/PathImpl.java    |  27 --
 .../edm/xml/v4/annotation/PropertyPathImpl.java |  27 --
 .../annotation/PropertyValueDeserializer.java   |  57 ---
 .../xml/v4/annotation/PropertyValueImpl.java    |  53 ---
 .../xml/v4/annotation/RecordDeserializer.java   |  55 ---
 .../core/edm/xml/v4/annotation/RecordImpl.java  |  52 ---
 ...ParamsOpDynamicAnnotationExpressionImpl.java |  62 ---
 .../xml/v4/annotation/UrlRefDeserializer.java   |  52 ---
 .../core/edm/xml/v4/annotation/UrlRefImpl.java  |  42 --
 .../core/serialization/AbstractODataBinder.java |   2 +-
 .../core/serialization/ODataBinderImpl.java     | 430 ++++++++++++++++++
 .../serialization/ODataDeserializerImpl.java    |  78 ++++
 .../core/serialization/ODataReaderImpl.java     |  54 +++
 .../core/serialization/v4/ODataBinderImpl.java  | 431 -------------------
 .../serialization/v4/ODataDeserializerImpl.java |  79 ----
 .../core/serialization/v4/ODataReaderImpl.java  |  55 ---
 .../client/core/uri/FilterArgFactoryImpl.java   | 112 +++++
 .../client/core/uri/FilterFactoryImpl.java      |  49 +++
 .../olingo/client/core/uri/URIBuilderImpl.java  | 144 +++++++
 .../core/uri/v4/FilterArgFactoryImpl.java       | 115 -----
 .../client/core/uri/v4/FilterFactoryImpl.java   |  52 ---
 .../client/core/uri/v4/URIBuilderImpl.java      | 145 -------
 .../apache/olingo/client/core/v4/AndSearch.java |  42 --
 .../core/v4/EdmEnabledODataClientImpl.java      |  86 ----
 .../olingo/client/core/v4/LiteralSearch.java    |  35 --
 .../apache/olingo/client/core/v4/NotSearch.java |  35 --
 .../olingo/client/core/v4/ODataClientImpl.java  | 157 -------
 .../apache/olingo/client/core/v4/OrSearch.java  |  42 --
 .../client/core/v4/SearchFactoryImpl.java       |  46 --
 .../apache/olingo/client/core/AbstractTest.java |   2 +-
 .../olingo/client/core/uri/URIEscapeTest.java   |   2 +-
 .../client/core/uri/v4/FilterFactoryTest.java   |   8 +-
 .../client/core/uri/v4/URIBuilderTest.java      |   4 +-
 .../apache/olingo/client/core/v4/AtomTest.java  |   4 +-
 .../olingo/client/core/v4/EntitySetTest.java    |   2 +-
 .../olingo/client/core/v4/EntityTest.java       |   6 +-
 .../apache/olingo/client/core/v4/ErrorTest.java |   2 +-
 .../apache/olingo/client/core/v4/JSONTest.java  |   4 +-
 .../olingo/client/core/v4/MetadataTest.java     |  42 +-
 .../client/core/v4/PrimitiveValueTest.java      |   2 +-
 .../olingo/client/core/v4/PropertyTest.java     |   2 +-
 .../client/core/v4/ServiceDocumentTest.java     |   2 +-
 463 files changed, 10600 insertions(+), 10940 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Search.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Search.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Search.java
index 2359653..75e6eb3 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Search.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Search.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.ext.proxy.api;
 
-import org.apache.olingo.client.api.uri.v4.URISearch;
+import org.apache.olingo.client.api.uri.URISearch;
 
 import java.io.Serializable;
 import java.util.Collection;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
index 073ccb3..9566236 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
@@ -19,6 +19,7 @@
 package org.apache.olingo.ext.proxy.commons;
 
 import java.io.Serializable;
+
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
 
 import java.lang.reflect.Proxy;
@@ -31,11 +32,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Future;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.olingo.client.api.uri.QueryOption;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
 import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
index 92f4d4a..c519614 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
@@ -20,10 +20,10 @@ package org.apache.olingo.ext.proxy.commons;
 
 import org.apache.commons.lang3.tuple.ImmutableTriple;
 import org.apache.commons.lang3.tuple.Triple;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
 import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
@@ -37,6 +37,7 @@ import java.lang.reflect.Type;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
+
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
 import org.apache.olingo.ext.proxy.api.EntityType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
index f72945a..7bed3af 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
@@ -32,13 +32,13 @@ import java.util.concurrent.Callable;
 import java.util.concurrent.Future;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.api.communication.header.ODataPreferences;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.ODataReferenceAddingRequest;
+import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddingRequest;
 import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityUpdateRequest;
 import org.apache.olingo.client.api.communication.request.streamed.ODataStreamUpdateRequest;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.ODataRuntimeException;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
@@ -465,7 +465,7 @@ abstract class AbstractPersistenceManager implements PersistenceManager {
     final ODataEntityUpdateRequest<CommonODataEntity> req =
         ((EdmEnabledODataClient) service.getClient()).getCUDRequestFactory().
             getEntityUpdateRequest(handler.getEntityURI(),
-                org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
+                org.apache.olingo.client.api.communication.request.cud.UpdateType.PATCH, changes);
 
     req.setPrefer(new ODataPreferences(service.getClient().getServiceVersion()).returnContent());
 
@@ -487,7 +487,7 @@ abstract class AbstractPersistenceManager implements PersistenceManager {
 
     if (service.getClient().getServiceVersion().compareTo(ODataServiceVersion.V30) >= 1) {
       final ODataReferenceAddingRequest req =
-          ((org.apache.olingo.client.api.v4.EdmEnabledODataClient) service.getClient()).getCUDRequestFactory().
+          ((org.apache.olingo.client.api.EdmEnabledODataClient) service.getClient()).getCUDRequestFactory().
               getReferenceAddingRequest(sericeRoot, source, targetRef);
 
       req.setPrefer(new ODataPreferences(service.getClient().getServiceVersion()).returnContent());
@@ -517,7 +517,7 @@ abstract class AbstractPersistenceManager implements PersistenceManager {
     final ODataEntityUpdateRequest<CommonODataEntity> req =
         ((EdmEnabledODataClient) service.getClient()).getCUDRequestFactory().
             getEntityUpdateRequest(uri,
-                org.apache.olingo.client.api.communication.request.cud.v4.UpdateType.PATCH, changes);
+                org.apache.olingo.client.api.communication.request.cud.UpdateType.PATCH, changes);
 
     req.setPrefer(new ODataPreferences(service.getClient().getServiceVersion()).returnContent());
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
index aaae42c..ca080a3 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
@@ -34,12 +34,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.Callable;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
 import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
index b61c4cc..83f2e23 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
@@ -28,9 +28,9 @@ import java.util.concurrent.Callable;
 import java.util.concurrent.Future;
 
 import org.apache.commons.lang3.tuple.Triple;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SearchImpl.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SearchImpl.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SearchImpl.java
index 7956226..5deceac 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SearchImpl.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/SearchImpl.java
@@ -19,10 +19,11 @@
 package org.apache.olingo.ext.proxy.commons;
 
 import java.net.URI;
+
 import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.uri.v4.URISearch;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.client.api.uri.URISearch;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.ext.proxy.api.EntityCollection;
 import org.apache.olingo.ext.proxy.api.EntityType;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/V4POJOGenMojo.java
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/V4POJOGenMojo.java b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/V4POJOGenMojo.java
index 13d97b7..dd85277 100644
--- a/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/V4POJOGenMojo.java
+++ b/ext/pojogen-maven-plugin/src/main/java/org/apache/olingo/ext/pojogen/V4POJOGenMojo.java
@@ -20,7 +20,7 @@ package org.apache.olingo.ext.pojogen;
 
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmSchema;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/ext/pojogen-maven-plugin/src/main/resources/service.vm
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/resources/service.vm b/ext/pojogen-maven-plugin/src/main/resources/service.vm
index 2d43e58..292ba8f 100644
--- a/ext/pojogen-maven-plugin/src/main/resources/service.vm
+++ b/ext/pojogen-maven-plugin/src/main/resources/service.vm
@@ -56,7 +56,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param serviceRoot OData service root
    * @return OData 4.0 instance for given service root, operating in transactions (with batch requests)
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
           final String serviceRoot) {
 
     return getV4(serviceRoot, true);
@@ -69,7 +69,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param transactional whether operating in transactions (with batch requests) or not
    * @return OData 4.0 instance for given service root
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
           final String serviceRoot, final boolean transactional) {
 
     return getInstance(ODataServiceVersion.V40, serviceRoot, transactional);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
index f02ba75..9581734 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
@@ -31,10 +31,11 @@ import java.math.BigDecimal;
 import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.TimeZone;
+
 //CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.EdmStreamValue;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
index 41c41d0..70b34f5 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AbstractTestITCase.java
@@ -30,7 +30,7 @@ import java.util.Calendar;
 import java.util.TimeZone;
 
 import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.api.PrimitiveCollection;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityCreateTestITCase.java
index 47d4417..8ff1ddb 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityCreateTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.staticservice.Service;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityRetrieveTestITCase.java
index 1b4fede..6eaf4cc 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityRetrieveTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/AuthEntityRetrieveTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.staticservice.Service;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/ContextTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/ContextTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/ContextTestITCase.java
index bd3d2b8..feb2b0f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/ContextTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/ContextTestITCase.java
@@ -25,7 +25,8 @@ import static org.junit.Assert.fail;
 import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.TimeZone;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.ext.proxy.api.ODataFlushException;
 import org.apache.olingo.ext.proxy.api.PrimitiveCollection;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
index aaff867..63c88e5 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityCreateTestITCase.java
@@ -20,7 +20,7 @@ package org.apache.olingo.fit.proxy.v4;
 
 //CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.commons.lang3.RandomUtils;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.AccessLevel;
@@ -44,6 +44,7 @@ import java.math.BigDecimal;
 import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.TimeZone;
+
 import org.apache.olingo.ext.proxy.api.PrimitiveCollection;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
index 863d041..6be75de 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java
@@ -21,7 +21,7 @@ package org.apache.olingo.fit.proxy.v4;
 //CHECKSTYLE:OFF (Maven checkstyle)
 import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.ext.proxy.AbstractService;
 import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.CompanyAddress;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
index 5e546bf..9ca25a9 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/KeyAsSegmentTestITCase.java
@@ -21,7 +21,7 @@ package org.apache.olingo.fit.proxy.v4;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.staticservice.Service;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
index c268f30..26d1257 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/MediaEntityTestITCase.java
@@ -27,9 +27,10 @@ import java.io.IOException;
 import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.UUID;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.ext.proxy.api.EdmStreamValue;
 import org.apache.olingo.fit.proxy.v4.demo.Service;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
index dbb5101..7422389 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalAuthEntityCreateTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.staticservice.Service;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
index 46f236b..df22b7c 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityCreateTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.staticservice.Service;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
index ccb070c..4202043 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalEntityUpdateTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.staticservice.Service;
 import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.InMemoryEntities;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
index 696532a..43068dc 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/NonTransactionalMediaEntityTestITCase.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.demo.Service;
 import org.apache.olingo.fit.proxy.v4.demo.odatademo.DemoService;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
index 082331e..192a2aa 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
@@ -29,7 +29,8 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.UUID;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
+
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.ext.proxy.api.annotations.EntityType;
 import org.apache.olingo.fit.proxy.v4.opentype.Service;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
index cfc116e..a97dc72 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/UnauthorizedEntityCreateTestITCase.java
@@ -18,8 +18,8 @@
  */
 package org.apache.olingo.fit.proxy.v4;
 
+import org.apache.olingo.client.api.EdmEnabledODataClient;
 import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
 import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
 import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.fit.proxy.v4.staticservice.Service;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/Service.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/Service.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/Service.java
index 116a756..8f13726 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/Service.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/demo/Service.java
@@ -54,7 +54,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param serviceRoot OData service root
    * @return OData 4.0 instance for given service root, operating in transactions (with batch requests)
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
           final String serviceRoot) {
 
     return getV4(serviceRoot, true);
@@ -67,7 +67,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param transactional whether operating in transactions (with batch requests) or not
    * @return OData 4.0 instance for given service root
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
           final String serviceRoot, final boolean transactional) {
 
     return getInstance(ODataServiceVersion.V40, serviceRoot, transactional);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/Service.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/Service.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/Service.java
index dbdfd96..1b1a0ba 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/Service.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/opentype/Service.java
@@ -55,7 +55,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param serviceRoot OData service root
    * @return OData 4.0 instance for given service root, operating in transactions (with batch requests)
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
       final String serviceRoot) {
 
     return getV4(serviceRoot, true);
@@ -68,7 +68,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param transactional whether operating in transactions (with batch requests) or not
    * @return OData 4.0 instance for given service root
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
       final String serviceRoot, final boolean transactional) {
 
     return getInstance(ODataServiceVersion.V40, serviceRoot, transactional);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/Service.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/Service.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/Service.java
index 05b7dc8..1fbc53f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/Service.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/staticservice/Service.java
@@ -55,7 +55,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param serviceRoot OData service root
    * @return OData 4.0 instance for given service root, operating in transactions (with batch requests)
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
       final String serviceRoot) {
 
     return getV4(serviceRoot, true);
@@ -68,7 +68,7 @@ public class Service<C extends CommonEdmEnabledODataClient<?>> extends AbstractS
    * @param transactional whether operating in transactions (with batch requests) or not
    * @return OData 4.0 instance for given service root
    */
-  public static Service<org.apache.olingo.client.api.v4.EdmEnabledODataClient> getV4(
+  public static Service<org.apache.olingo.client.api.EdmEnabledODataClient> getV4(
       final String serviceRoot, final boolean transactional) {
 
     return getInstance(ODataServiceVersion.V40, serviceRoot, transactional);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
index 17a0e29..f8cf05c 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
@@ -32,11 +32,12 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.EdmMetadataRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
@@ -46,9 +47,8 @@ import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
+import org.apache.olingo.client.api.edm.xml.Reference;
 import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v4.Reference;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.ODataError;
 import org.apache.olingo.commons.api.domain.ODataServiceDocument;
@@ -119,11 +119,11 @@ public class BasicITCase extends AbstractBaseTestITCase {
     XMLMetadata xmlMetadata = response.getBody();
 
     assertNotNull(xmlMetadata);
-    assertTrue(xmlMetadata instanceof org.apache.olingo.client.api.edm.xml.v4.XMLMetadata);
+    assertTrue(xmlMetadata instanceof XMLMetadata);
     assertEquals(2, xmlMetadata.getSchemas().size());
     assertEquals("olingo.odata.test1", xmlMetadata.getSchema("olingo.odata.test1").getNamespace());
     final List<Reference> references =
-        ((org.apache.olingo.client.api.edm.xml.v4.XMLMetadata) xmlMetadata).getReferences();
+        ((XMLMetadata) xmlMetadata).getReferences();
     assertEquals(1, references.size());
     assertThat(references.get(0).getUri().toASCIIString(), containsString("vocabularies/Org.OData.Core.V1"));
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
index 1152bb0..ef9329f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
@@ -31,19 +31,19 @@ import java.util.Iterator;
 
 import org.apache.olingo.client.api.ODataBatchConstants;
 import org.apache.olingo.client.api.communication.request.batch.BatchManager;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
 import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
 import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
index 2e82699..e1a56b9 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
@@ -29,6 +29,7 @@ import java.net.URI;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataMediaRequest;
@@ -38,7 +39,6 @@ import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
index 0693836..494f273 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
 import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
index 49624ab..80c58ca 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
@@ -29,13 +29,13 @@ import java.net.URI;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
 import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
 import org.apache.olingo.commons.api.domain.v4.ODataProperty;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
index 6dd1e56..0b091dd 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
@@ -18,13 +18,13 @@
  */
 package org.apache.olingo.fit.v4;
 
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
index 8a901fa..eef0525 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
@@ -18,12 +18,12 @@
  */
 package org.apache.olingo.fit.v4;
 
+import org.apache.olingo.client.api.communication.request.AsyncRequestWrapper;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.client.api.communication.request.v4.AsyncRequestWrapper;
+import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponseWrapper;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
 import org.apache.olingo.commons.api.domain.ODataInlineEntity;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
index 1edcc21..51b86b4 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
@@ -18,17 +18,17 @@
  */
 package org.apache.olingo.fit.v4;
 
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.header.HeaderName;
 import org.apache.olingo.client.api.communication.request.batch.BatchManager;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
 import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
index 62f0f25..fdec603 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
@@ -21,24 +21,24 @@ package org.apache.olingo.fit.v4;
 import org.apache.http.HttpResponse;
 import org.apache.olingo.client.api.ODataBatchConstants;
 import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.request.AsyncBatchRequestWrapper;
 import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.request.batch.BatchManager;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
 import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.client.api.communication.request.v4.AsyncBatchRequestWrapper;
+import org.apache.olingo.client.api.communication.response.AsyncResponse;
+import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
 import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponseWrapper;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.communication.request.AbstractODataStreamManager;
 import org.apache.olingo.client.core.communication.request.Wrapper;
 import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
index 5be15f7..d81443e 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
@@ -20,7 +20,7 @@ package org.apache.olingo.fit.v4;
 
 import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataCollectionValue;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
 import org.apache.olingo.commons.api.domain.ODataOperation;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
index 653c2a1..5260c8f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
@@ -19,21 +19,21 @@
 package org.apache.olingo.fit.v4;
 
 import org.apache.olingo.client.api.communication.header.HeaderName;
+import org.apache.olingo.client.api.communication.request.AsyncRequestWrapper;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
+import org.apache.olingo.client.api.communication.request.retrieve.ODataDeltaRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.v4.ODataDeltaRequest;
-import org.apache.olingo.client.api.communication.request.v4.AsyncRequestWrapper;
+import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
 import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponseWrapper;
 import org.apache.olingo.client.api.uri.CommonURIBuilder;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
 import org.apache.olingo.client.core.http.DefaultHttpClientFactory;
 import org.apache.olingo.client.core.uri.URIUtils;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
index 27093fd..da69f93 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
@@ -18,8 +18,8 @@
  */
 package org.apache.olingo.fit.v4;
 
+import org.apache.olingo.client.api.communication.request.retrieve.ODataDeltaRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.v4.ODataDeltaRequest;
 import org.apache.olingo.commons.api.domain.v4.ODataDelta;
 import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.v4.ODataProperty;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
index 3102802..cc040b6 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
@@ -23,7 +23,7 @@ import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateR
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
index 58e9330..3a25a60 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
@@ -24,13 +24,13 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataRawRequest;
 import org.apache.olingo.client.api.communication.response.ODataRawResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
@@ -44,6 +44,7 @@ import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.Test;
+
 import java.net.URI;
 import java.sql.Timestamp;
 import java.util.LinkedHashMap;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
index 4deb265..38f5a85 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
@@ -18,14 +18,14 @@
  */
 package org.apache.olingo.fit.v4;
 
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataRawRequest;
 import org.apache.olingo.client.api.communication.response.ODataRawResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.uri.URIUtils;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;


[13/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package content one package up

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
index 3f6ab92..d5a5de1 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
@@ -28,10 +28,10 @@ import java.util.TimeZone;
 import java.util.UUID;
 
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.ODataReferenceAddingRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddingRequest;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
-import org.apache.olingo.client.api.communication.response.v4.ODataReferenceAddingResponse;
+import org.apache.olingo.client.api.communication.response.ODataReferenceAddingResponse;
 import org.apache.olingo.commons.api.domain.ODataLink;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
index a1e5c3c..ea1f464 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
@@ -19,10 +19,10 @@
 package org.apache.olingo.fit.v4;
 
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
+import org.apache.olingo.client.api.uri.FilterArgFactory;
+import org.apache.olingo.client.api.uri.FilterFactory;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
-import org.apache.olingo.client.api.uri.v4.FilterFactory;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.format.ODataFormat;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
index 7e543ec..8addcc6 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
@@ -19,11 +19,11 @@
 package org.apache.olingo.fit.v4;
 
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataProperty;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
index e8d5449..f3dec24 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
@@ -20,9 +20,10 @@ package org.apache.olingo.fit.v4;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.header.HeaderName;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataMediaRequest;
 import org.apache.olingo.client.api.communication.request.streamed.MediaEntityCreateStreamManager;
@@ -33,8 +34,7 @@ import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResp
 import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataValuable;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
index c3ca7c8..089ca92 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
@@ -22,18 +22,20 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.ODataClientFactory;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
+
 import java.net.URI;
+
 import org.apache.olingo.client.core.http.DefaultHttpClientFactory;
 import org.apache.olingo.fit.CXFOAuth2HttpClientFactory;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
index 19da20f..08a5ada 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
@@ -21,7 +21,7 @@ package org.apache.olingo.fit.v4;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataComplexValue;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataProperty;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
index bf7662c..e388c99 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
@@ -23,17 +23,17 @@ import static org.junit.Assert.assertNotNull;
 
 import java.io.IOException;
 
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataPropertyUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
 import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
 import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
 import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataProperty;
 import org.apache.olingo.commons.api.domain.v4.ODataValuable;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
index e4f9131..c8d5157 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
@@ -22,7 +22,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
 import org.apache.olingo.commons.api.domain.v4.ODataProperty;
 import org.apache.olingo.commons.api.domain.v4.ODataValuable;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
index f86f1c2..ca6df11 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
@@ -22,7 +22,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
 import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
 import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
index 9e0ef83..693ab11 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
@@ -18,12 +18,12 @@
  */
 package org.apache.olingo.fit.v4;
 
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
 import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
 import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
 import org.apache.olingo.commons.api.domain.v4.ODataValuable;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java
new file mode 100644
index 0000000..0a5b1fb
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.api;
+
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
+import org.apache.olingo.client.api.communication.request.invoke.EdmEnabledInvokeRequestFactory;
+import org.apache.olingo.client.api.uri.URIBuilder;
+
+public interface EdmEnabledODataClient extends CommonEdmEnabledODataClient<UpdateType>, ODataClient {
+
+  @Override
+  URIBuilder newURIBuilder();
+
+  @Override
+  EdmEnabledInvokeRequestFactory getInvokeRequestFactory();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
new file mode 100644
index 0000000..cabc722
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
@@ -0,0 +1,67 @@
+/*
+ * 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.client.api;
+
+import org.apache.olingo.client.api.communication.request.AsyncRequestFactory;
+import org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
+import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
+import org.apache.olingo.client.api.serialization.ODataBinder;
+import org.apache.olingo.client.api.serialization.ODataDeserializer;
+import org.apache.olingo.client.api.serialization.ODataReader;
+import org.apache.olingo.client.api.uri.FilterFactory;
+import org.apache.olingo.client.api.uri.SearchFactory;
+import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
+import org.apache.olingo.commons.api.format.ODataFormat;
+
+public interface ODataClient extends CommonODataClient<UpdateType> {
+
+  @Override
+  ODataDeserializer getDeserializer(ODataFormat format);
+
+  @Override
+  ODataReader getReader();
+
+  @Override
+  ODataBinder getBinder();
+
+  @Override
+  URIBuilder newURIBuilder(String serviceRoot);
+  
+  @Override
+  FilterFactory getFilterFactory();
+
+  SearchFactory getSearchFactory();
+
+  @Override
+  ODataObjectFactory getObjectFactory();
+
+  AsyncRequestFactory getAsyncRequestFactory();
+
+  @Override
+  RetrieveRequestFactory getRetrieveRequestFactory();
+
+  @Override
+  CUDRequestFactory getCUDRequestFactory();
+
+  @Override
+  BatchRequestFactory getBatchRequestFactory();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java
new file mode 100644
index 0000000..06ea19d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java
@@ -0,0 +1,46 @@
+/*
+ * 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.client.api.communication.request;
+
+import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+
+public interface AsyncBatchRequestWrapper extends AsyncRequestWrapper<ODataBatchResponse> {
+
+  /**
+   * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
+   *
+   * @return ODataChangeset instance.
+   */
+  ODataChangeset addChangeset();
+
+  /**
+   * Adds a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
+   *
+   * @param request retrieve request to batch.
+   */
+  void addRetrieve(final ODataBatchableRequest request);
+
+  /**
+   * Adds an outside change batch item instance. An outside item can be submitted embedded into a batch request only.
+   *
+   * @param request update request to batch outside a changeset.
+   */
+  void addOutsideUpdate(final ODataBatchableRequest request);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java
new file mode 100644
index 0000000..764898b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.api.communication.request;
+
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
+import org.apache.olingo.client.api.communication.response.ODataResponse;
+
+public interface AsyncRequestFactory {
+
+  <R extends ODataResponse> AsyncRequestWrapper<R> getAsyncRequestWrapper(final ODataRequest odataRequest);
+
+  AsyncBatchRequestWrapper getAsyncBatchRequestWrapper(final ODataBatchRequest odataRequest);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java
new file mode 100644
index 0000000..db06083
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java
@@ -0,0 +1,56 @@
+/*
+ * 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.client.api.communication.request;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
+import org.apache.olingo.client.api.communication.response.ODataResponse;
+
+public interface AsyncRequestWrapper<R extends ODataResponse> {
+
+  /**
+   * Add wait http header.
+   *
+   * @param waitInSeconds wait time in seconds.
+   * @return the current AsyncRequestWrapper instance.
+   */
+  AsyncRequestWrapper<R> wait(int waitInSeconds);
+
+  /**
+   * The odata.callback preference MUST include the parameter url whose value is the URL of a callback endpoint to be
+   * invoked by the OData service when data is available. The syntax of the odata.callback preference is specified in
+   * [OData-ABNF].
+   * <br />
+   * For HTTP based callbacks, the OData service executes an HTTP GET request against the specified URL.
+   * <br/>
+   * Services that support odata.callback SHOULD support notifying the client through HTTP.
+   *
+   * @param url callback URL
+   * @return the current AsyncRequestWrapper instance.
+   */
+  AsyncRequestWrapper<R> callback(final URI url);
+
+  /**
+   * execute the request for the first time.
+   *
+   * @return the current AsyncRequestWrapper instance.
+   */
+  AsyncResponseWrapper<R> execute();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
index 7a15320..02566f5 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
@@ -29,9 +29,9 @@ import org.apache.olingo.commons.api.http.HttpMethod;
  * Abstract representation of an OData request. Get instance by using factories.
  *
  * @see org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory
- * @see org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory
+ * @see org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory
  * @see org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestFactory
- * @see org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory
+ * @see org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory
  * @see org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory
  */
 public interface ODataRequest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
new file mode 100644
index 0000000..48a08fc
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.api.communication.request.batch;
+
+
+public interface BatchRequestFactory extends CommonBatchRequestFactory {
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  ODataBatchRequest getBatchRequest(String serviceRoot);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java
new file mode 100644
index 0000000..3a07e25
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.communication.request.batch;
+
+import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+
+public interface ODataBatchRequest
+        extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchManager> {
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java
new file mode 100644
index 0000000..e92961f
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java
@@ -0,0 +1,37 @@
+/*
+ * 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.client.api.communication.request.batch;
+
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+
+/**
+ * Retrieve request wrapper for the corresponding batch item.
+ */
+public interface ODataOutsideUpdate extends ODataBatchRequestItem {
+
+  /**
+   * Serialize and send the given request.
+   * <p>
+   * An IllegalArgumentException is thrown in case of no GET request.
+   *
+   * @param request request to be serialized.
+   * @return current item instance.
+   */
+  ODataOutsideUpdate setRequest(final ODataBatchableRequest request);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
deleted file mode 100644
index 240e978..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
+++ /dev/null
@@ -1,30 +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.client.api.communication.request.batch.v4;
-
-import org.apache.olingo.client.api.communication.request.batch.CommonBatchRequestFactory;
-
-public interface BatchRequestFactory extends CommonBatchRequestFactory {
-
-  /**
-   * {@inheritDoc }
-   */
-  @Override
-  ODataBatchRequest getBatchRequest(String serviceRoot);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
deleted file mode 100644
index 0c948d5..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
+++ /dev/null
@@ -1,29 +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.client.api.communication.request.batch.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
-import org.apache.olingo.client.api.communication.request.batch.BatchManager;
-import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-
-public interface ODataBatchRequest
-        extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchManager> {
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java
deleted file mode 100644
index 203ee95..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java
+++ /dev/null
@@ -1,38 +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.client.api.communication.request.batch.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequestItem;
-
-/**
- * Retrieve request wrapper for the corresponding batch item.
- */
-public interface ODataOutsideUpdate extends ODataBatchRequestItem {
-
-  /**
-   * Serialize and send the given request.
-   * <p>
-   * An IllegalArgumentException is thrown in case of no GET request.
-   *
-   * @param request request to be serialized.
-   * @return current item instance.
-   */
-  ODataOutsideUpdate setRequest(final ODataBatchableRequest request);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
new file mode 100644
index 0000000..32efe16
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
@@ -0,0 +1,56 @@
+/*
+ * 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.client.api.communication.request.cud;
+
+import java.net.URI;
+
+import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+
+public interface CUDRequestFactory extends CommonCUDRequestFactory<UpdateType> {
+
+  ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
+      URI targetURI, UpdateType type, ODataSingleton changes);
+
+  ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
+      UpdateType type, ODataSingleton entity);
+
+  /**
+   * A successful POST request to a navigation property's references collection adds a relationship to an existing
+   * entity. The request body MUST contain a single entity reference that identifies the entity to be added.
+   * [OData-Protocol 4.0 - 11.4.6.1]
+   * 
+   * @param serviceRoot serviceRoot URI
+   * @param targetURI navigation property reference collection URI
+   * @param reference entity reference
+   * @return new ODataReferenceAddingRequest instance.
+   */
+  ODataReferenceAddingRequest getReferenceAddingRequest(URI serviceRoot, URI targetURI, URI reference);
+
+  /**
+   * A successful PUT request to a single-valued navigation property�s reference resource changes the related entity.
+   * The request body MUST contain a single entity reference that identifies the existing entity to be related.
+   * [OData-Protocol 4.0 - 11.4.6.3]
+   * 
+   * @param serviceRoot serviceRoot URI
+   * @param targetURI single-valued navigation property URI
+   * @param reference reference
+   * @return new ODataReferenceAddingRequest instance
+   */
+  ODataReferenceAddingRequest getReferenceSingleChangeRequest(URI serviceRoot, URI targetURI, URI reference);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java
new file mode 100644
index 0000000..df729d5
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.api.communication.request.cud;
+
+import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+import org.apache.olingo.client.api.communication.response.ODataReferenceAddingResponse;
+
+/**
+ * This class implements an OData reference adding request.
+ * 
+ * ODataReferenceAdding requests eighter add or change the reference of navigation properties.
+ * 
+ * If the navigation property is a collection of navigation references, the request adds a new reference to the
+ * collection.  [OData Protocol 4.0 - 11.4.6.1]
+ * 
+ * If the request addresses an navigation property, which references a single entity, the reference will
+ * be changed to the value provided by the request. [OData-Protocol 4.0 - 11.4.6.3]
+ */
+public interface ODataReferenceAddingRequest
+        extends ODataBasicRequest<ODataReferenceAddingResponse>, ODataBatchableRequest {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java
new file mode 100644
index 0000000..07a1b62
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.api.communication.request.cud;
+
+import org.apache.olingo.commons.api.http.HttpMethod;
+
+/**
+ * Update type.
+ */
+public enum UpdateType implements CommonUpdateType {
+
+  /**
+   * Replace all and remove missing attributes.
+   */
+  REPLACE(HttpMethod.PUT),
+  /**
+   * Differential update with only specified input property values to be replaced.
+   */
+  PATCH(HttpMethod.PATCH);
+
+  private final HttpMethod method;
+
+  private UpdateType(final HttpMethod method) {
+    this.method = method;
+  }
+
+  /**
+   * Gets HTTP request method.
+   *
+   * @return HTTP request method.
+   */
+  @Override
+  public HttpMethod getMethod() {
+    return method;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
deleted file mode 100644
index 0e4900d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
+++ /dev/null
@@ -1,58 +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.client.api.communication.request.cud.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-
-public interface CUDRequestFactory extends CommonCUDRequestFactory<UpdateType> {
-
-  ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
-      URI targetURI, UpdateType type, ODataSingleton changes);
-
-  ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
-      UpdateType type, ODataSingleton entity);
-
-  /**
-   * A successful POST request to a navigation property's references collection adds a relationship to an existing
-   * entity. The request body MUST contain a single entity reference that identifies the entity to be added.
-   * [OData-Protocol 4.0 - 11.4.6.1]
-   * 
-   * @param serviceRoot serviceRoot URI
-   * @param targetURI navigation property reference collection URI
-   * @param reference entity reference
-   * @return new ODataReferenceAddingRequest instance.
-   */
-  ODataReferenceAddingRequest getReferenceAddingRequest(URI serviceRoot, URI targetURI, URI reference);
-
-  /**
-   * A successful PUT request to a single-valued navigation property�s reference resource changes the related entity.
-   * The request body MUST contain a single entity reference that identifies the existing entity to be related.
-   * [OData-Protocol 4.0 - 11.4.6.3]
-   * 
-   * @param serviceRoot serviceRoot URI
-   * @param targetURI single-valued navigation property URI
-   * @param reference reference
-   * @return new ODataReferenceAddingRequest instance
-   */
-  ODataReferenceAddingRequest getReferenceSingleChangeRequest(URI serviceRoot, URI targetURI, URI reference);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java
deleted file mode 100644
index 73a6ef4..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java
+++ /dev/null
@@ -1,38 +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.client.api.communication.request.cud.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.response.v4.ODataReferenceAddingResponse;
-
-/**
- * This class implements an OData reference adding request.
- * 
- * ODataReferenceAdding requests eighter add or change the reference of navigation properties.
- * 
- * If the navigation property is a collection of navigation references, the request adds a new reference to the
- * collection.  [OData Protocol 4.0 - 11.4.6.1]
- * 
- * If the request addresses an navigation property, which references a single entity, the reference will
- * be changed to the value provided by the request. [OData-Protocol 4.0 - 11.4.6.3]
- */
-public interface ODataReferenceAddingRequest
-        extends ODataBasicRequest<ODataReferenceAddingResponse>, ODataBatchableRequest {
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java
deleted file mode 100644
index 389a36d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java
+++ /dev/null
@@ -1,53 +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.client.api.communication.request.cud.v4;
-
-import org.apache.olingo.client.api.communication.request.cud.CommonUpdateType;
-import org.apache.olingo.commons.api.http.HttpMethod;
-
-/**
- * Update type.
- */
-public enum UpdateType implements CommonUpdateType {
-
-  /**
-   * Replace all and remove missing attributes.
-   */
-  REPLACE(HttpMethod.PUT),
-  /**
-   * Differential update with only specified input property values to be replaced.
-   */
-  PATCH(HttpMethod.PATCH);
-
-  private final HttpMethod method;
-
-  private UpdateType(final HttpMethod method) {
-    this.method = method;
-  }
-
-  /**
-   * Gets HTTP request method.
-   *
-   * @return HTTP request method.
-   */
-  @Override
-  public HttpMethod getMethod() {
-    return method;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
new file mode 100644
index 0000000..43a706b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.communication.request.retrieve;
+
+import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+
+/**
+ * Describes an OData retrieve request returning a delta object.
+ */
+public interface ODataDeltaRequest extends ODataRetrieveRequest<ODataDelta> {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
new file mode 100644
index 0000000..089c5f5
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
@@ -0,0 +1,46 @@
+/*
+ * 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.client.api.communication.request.retrieve;
+
+import java.net.URI;
+
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+
+@SuppressWarnings("unchecked")
+public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory {
+
+  @Override
+  ODataEntitySetRequest<ODataEntitySet> getEntitySetRequest(URI uri);
+
+  @Override
+  ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> getEntitySetIteratorRequest(URI uri);
+
+  ODataEntityRequest<ODataSingleton> getSingletonRequest(URI uri);
+
+  @Override
+  ODataEntityRequest<ODataEntity> getEntityRequest(URI uri);
+
+  @Override
+  ODataPropertyRequest<ODataProperty> getPropertyRequest(URI uri);
+
+  ODataDeltaRequest getDeltaRequest(URI uri);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java
deleted file mode 100644
index d10713a..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java
+++ /dev/null
@@ -1,28 +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.client.api.communication.request.retrieve.v4;
-
-import org.apache.olingo.client.api.communication.request.retrieve.ODataRetrieveRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-
-/**
- * Describes an OData retrieve request returning a delta object.
- */
-public interface ODataDeltaRequest extends ODataRetrieveRequest<ODataDelta> {
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
deleted file mode 100644
index 667bd4f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
+++ /dev/null
@@ -1,51 +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.client.api.communication.request.retrieve.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-
-@SuppressWarnings("unchecked")
-public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory {
-
-  @Override
-  ODataEntitySetRequest<ODataEntitySet> getEntitySetRequest(URI uri);
-
-  @Override
-  ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> getEntitySetIteratorRequest(URI uri);
-
-  ODataEntityRequest<ODataSingleton> getSingletonRequest(URI uri);
-
-  @Override
-  ODataEntityRequest<ODataEntity> getEntityRequest(URI uri);
-
-  @Override
-  ODataPropertyRequest<ODataProperty> getPropertyRequest(URI uri);
-
-  ODataDeltaRequest getDeltaRequest(URI uri);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
deleted file mode 100644
index 65f98ec..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.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.client.api.communication.request.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-
-public interface AsyncBatchRequestWrapper extends AsyncRequestWrapper<ODataBatchResponse> {
-
-  /**
-   * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
-   *
-   * @return ODataChangeset instance.
-   */
-  ODataChangeset addChangeset();
-
-  /**
-   * Adds a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
-   *
-   * @param request retrieve request to batch.
-   */
-  void addRetrieve(final ODataBatchableRequest request);
-
-  /**
-   * Adds an outside change batch item instance. An outside item can be submitted embedded into a batch request only.
-   *
-   * @param request update request to batch outside a changeset.
-   */
-  void addOutsideUpdate(final ODataBatchableRequest request);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.java
deleted file mode 100644
index 45dfc11..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.java
+++ /dev/null
@@ -1,30 +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.client.api.communication.request.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataRequest;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-public interface AsyncRequestFactory {
-
-  <R extends ODataResponse> AsyncRequestWrapper<R> getAsyncRequestWrapper(final ODataRequest odataRequest);
-
-  AsyncBatchRequestWrapper getAsyncBatchRequestWrapper(final ODataBatchRequest odataRequest);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java
deleted file mode 100644
index 220e063..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java
+++ /dev/null
@@ -1,56 +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.client.api.communication.request.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponseWrapper;
-
-public interface AsyncRequestWrapper<R extends ODataResponse> {
-
-  /**
-   * Add wait http header.
-   *
-   * @param waitInSeconds wait time in seconds.
-   * @return the current AsyncRequestWrapper instance.
-   */
-  AsyncRequestWrapper<R> wait(int waitInSeconds);
-
-  /**
-   * The odata.callback preference MUST include the parameter url whose value is the URL of a callback endpoint to be
-   * invoked by the OData service when data is available. The syntax of the odata.callback preference is specified in
-   * [OData-ABNF].
-   * <br />
-   * For HTTP based callbacks, the OData service executes an HTTP GET request against the specified URL.
-   * <br/>
-   * Services that support odata.callback SHOULD support notifying the client through HTTP.
-   *
-   * @param url callback URL
-   * @return the current AsyncRequestWrapper instance.
-   */
-  AsyncRequestWrapper<R> callback(final URI url);
-
-  /**
-   * execute the request for the first time.
-   *
-   * @return the current AsyncRequestWrapper instance.
-   */
-  AsyncResponseWrapper<R> execute();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java
new file mode 100644
index 0000000..2bf6d8d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java
@@ -0,0 +1,23 @@
+/*
+ * 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.client.api.communication.response;
+
+
+public interface AsyncResponse extends ODataResponse {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java
new file mode 100644
index 0000000..702611e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java
@@ -0,0 +1,78 @@
+/*
+ * 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.client.api.communication.response;
+
+import java.net.URI;
+
+public interface AsyncResponseWrapper<R extends ODataResponse> {
+
+  /**
+   * Checks for preference applied.
+   *
+   * @return 'TRUE' if respond-async preference has been applied; 'FALSE' otherwise.
+   */
+  boolean isPreferenceApplied();
+
+  /**
+   * Checks if asynchronous processing has been terminated.
+   *
+   * @return 'TRUE' the process has been terminated; 'FALSE' otherwise.
+   */
+  boolean isDone();
+
+  /**
+   * Gets the real response.
+   * <br />
+   * If asynchronous processing has been terminated then the response will be returned immediately. This method retries
+   * after a delay, specified by the 'Retry-After' header indicating the time, in seconds, the client should wait before
+   * retry. If there isn't any 'Retry-After' response header available, a default of 5 seconds will be chosen. The query
+   * will be retried for a maximum of five times.
+   *
+   * @return real OData response.
+   */
+  R getODataResponse();
+
+  /**
+   * Specifies the location for the next monitor check.
+   * <br />
+   * Overrides the location value retrieved among headers and nullifies the previous valid response (if exists).
+   *
+   * @param uri monitor location.
+   * @return the current async response wrapper.
+   */
+  AsyncResponseWrapper<R> forceNextMonitorCheck(URI uri);
+
+  /**
+   * DeleteA DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled. A
+   * 200 OK or to a 204 No Content response indicates that the asynchronous processing has been successfully canceled.
+   *
+   * @return OData delete response.
+   */
+  ODataDeleteResponse delete();
+
+  /**
+   * A client can request that the DELETE should be executed asynchronously. A 202 Accepted response indicates that the
+   * cancellation is being processed asynchronously; the client can use the returned Location header (which MUST be
+   * different from the status monitor resource of the initial request) to query for the status of the cancellation. If
+   * a delete request is not supported by the service, the service returns 405 Method Not Allowed.
+   *
+   * @return OData delete response.
+   */
+  AsyncResponseWrapper<ODataDeleteResponse> asyncDelete();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java
new file mode 100644
index 0000000..05ad3f7
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.communication.response;
+
+
+/**
+ * This class implements the response to an OData Reference Adding request.
+ *
+ * If the request was successful, the service response has status code 204 and
+ * the body has to be empty.
+ *
+ * @see org.apache.olingo.client.api.communication.request.cud.api.request.cud.v4.ODataReferenceAddingRequest
+ */
+public interface ODataReferenceAddingResponse extends ODataResponse {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java
deleted file mode 100644
index f3fe972..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java
+++ /dev/null
@@ -1,24 +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.client.api.communication.response.v4;
-
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-public interface AsyncResponse extends ODataResponse {
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java
deleted file mode 100644
index c59f351..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java
+++ /dev/null
@@ -1,81 +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.client.api.communication.response.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-public interface AsyncResponseWrapper<R extends ODataResponse> {
-
-  /**
-   * Checks for preference applied.
-   *
-   * @return 'TRUE' if respond-async preference has been applied; 'FALSE' otherwise.
-   */
-  boolean isPreferenceApplied();
-
-  /**
-   * Checks if asynchronous processing has been terminated.
-   *
-   * @return 'TRUE' the process has been terminated; 'FALSE' otherwise.
-   */
-  boolean isDone();
-
-  /**
-   * Gets the real response.
-   * <br />
-   * If asynchronous processing has been terminated then the response will be returned immediately. This method retries
-   * after a delay, specified by the 'Retry-After' header indicating the time, in seconds, the client should wait before
-   * retry. If there isn't any 'Retry-After' response header available, a default of 5 seconds will be chosen. The query
-   * will be retried for a maximum of five times.
-   *
-   * @return real OData response.
-   */
-  R getODataResponse();
-
-  /**
-   * Specifies the location for the next monitor check.
-   * <br />
-   * Overrides the location value retrieved among headers and nullifies the previous valid response (if exists).
-   *
-   * @param uri monitor location.
-   * @return the current async response wrapper.
-   */
-  AsyncResponseWrapper<R> forceNextMonitorCheck(URI uri);
-
-  /**
-   * DeleteA DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled. A
-   * 200 OK or to a 204 No Content response indicates that the asynchronous processing has been successfully canceled.
-   *
-   * @return OData delete response.
-   */
-  ODataDeleteResponse delete();
-
-  /**
-   * A client can request that the DELETE should be executed asynchronously. A 202 Accepted response indicates that the
-   * cancellation is being processed asynchronously; the client can use the returned Location header (which MUST be
-   * different from the status monitor resource of the initial request) to query for the status of the cancellation. If
-   * a delete request is not supported by the service, the service returns 405 Method Not Allowed.
-   *
-   * @return OData delete response.
-   */
-  AsyncResponseWrapper<ODataDeleteResponse> asyncDelete();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java
deleted file mode 100644
index 9527d38..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java
+++ /dev/null
@@ -1,32 +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.client.api.communication.response.v4;
-
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-/**
- * This class implements the response to an OData Reference Adding request.
- *
- * If the request was successful, the service response has status code 204 and
- * the body has to be empty.
- *
- * @see org.apache.olingo.api.request.cud.v4.ODataReferenceAddingRequest
- */
-public interface ODataReferenceAddingResponse extends ODataResponse {
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java
new file mode 100644
index 0000000..920b0f3
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.util.List;
+
+public interface Action extends Named, Annotatable {
+
+  boolean isBound();
+
+  String getEntitySetPath();
+
+  List<Parameter> getParameters();
+
+  Parameter getParameter(String name);
+
+  ReturnType getReturnType();
+
+}