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

[02/57] [abbrv] [OLINGO-169] First huge import from ODataJClient: for the moment, it just build (no tests yet) and dummy Edm interfaces are used instead of the ones from commons-api

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SchemaImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SchemaImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SchemaImpl.java
new file mode 100644
index 0000000..16b9c63
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SchemaImpl.java
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.Schema;
+import org.apache.olingo.odata4.client.api.edm.v4.Annotation;
+import org.apache.olingo.odata4.client.core.edm.AbstractSchema;
+
+public class SchemaImpl extends AbstractSchema<EntityContainerImpl, EntityTypeImpl, ComplexTypeImpl, FunctionImportImpl>
+        implements Schema, AnnotatedEdmItem {
+
+  private static final long serialVersionUID = 4453992249818796144L;
+
+  private final List<ActionImpl> actions = new ArrayList<ActionImpl>();
+
+  private final List<AnnotationsImpl> annotationsList = new ArrayList<AnnotationsImpl>();
+
+  private final List<AnnotationImpl> annotations = new ArrayList<AnnotationImpl>();
+
+  private final List<ComplexTypeImpl> complexTypes = new ArrayList<ComplexTypeImpl>();
+
+  private EntityContainerImpl entityContainer;
+
+  private final List<EnumTypeImpl> enumTypes = new ArrayList<EnumTypeImpl>();
+
+  private final List<EntityTypeImpl> entityTypes = new ArrayList<EntityTypeImpl>();
+
+  private final List<FunctionImpl> functions = new ArrayList<FunctionImpl>();
+
+  private final List<TermImpl> terms = new ArrayList<TermImpl>();
+
+  private final List<TypeDefinitionImpl> typeDefinitions = new ArrayList<TypeDefinitionImpl>();
+
+  private Annotation annotation;
+
+  public List<ActionImpl> getActions() {
+    return actions;
+  }
+
+  public List<ActionImpl> getActions(final String name) {
+    final List<ActionImpl> result = new ArrayList<ActionImpl>();
+    for (ActionImpl action : getActions()) {
+      if (name.equals(action.getName())) {
+        result.add(action);
+      }
+    }
+    return result;
+  }
+
+  @Override
+  public List<AnnotationsImpl> getAnnotationsList() {
+    return annotationsList;
+  }
+
+  @Override
+  public AnnotationsImpl getAnnotationsList(final String target) {
+    AnnotationsImpl result = null;
+    for (AnnotationsImpl annots : getAnnotationsList()) {
+      if (target.equals(annots.getTarget())) {
+        result = annots;
+      }
+    }
+    return result;
+  }
+
+  public List<AnnotationImpl> getAnnotations() {
+    return annotations;
+  }
+
+  @Override
+  public List<EnumTypeImpl> getEnumTypes() {
+    return enumTypes;
+  }
+
+  @Override
+  public EnumTypeImpl getEnumType(final String name) {
+    EnumTypeImpl result = null;
+    for (EnumTypeImpl type : getEnumTypes()) {
+      if (name.equals(type.getName())) {
+        result = type;
+      }
+    }
+    return result;
+  }
+
+  public List<FunctionImpl> getFunctions() {
+    return functions;
+  }
+
+  public List<FunctionImpl> getFunctions(final String name) {
+    final List<FunctionImpl> result = new ArrayList<FunctionImpl>();
+    for (FunctionImpl function : getFunctions()) {
+      if (name.equals(function.getName())) {
+        result.add(function);
+      }
+    }
+    return result;
+  }
+
+  public List<TermImpl> getTerms() {
+    return terms;
+  }
+
+  public List<TypeDefinitionImpl> getTypeDefinitions() {
+    return typeDefinitions;
+  }
+
+  public EntityContainerImpl getEntityContainer() {
+    return entityContainer;
+  }
+
+  public void setEntityContainer(final EntityContainerImpl entityContainer) {
+    this.entityContainer = entityContainer;
+  }
+
+  @Override
+  public List<EntityContainerImpl> getEntityContainers() {
+    return entityContainer == null
+            ? Collections.<EntityContainerImpl>emptyList() : Collections.singletonList(entityContainer);
+  }
+
+  @Override
+  public EntityContainerImpl getDefaultEntityContainer() {
+    return entityContainer;
+  }
+
+  @Override
+  public EntityContainerImpl getEntityContainer(final String name) {
+    if (entityContainer != null && name.equals(entityContainer.getName())) {
+      return entityContainer;
+    }
+    throw new IllegalArgumentException("No EntityContainer found with name " + name);
+  }
+
+  @Override
+  public List<EntityTypeImpl> getEntityTypes() {
+    return entityTypes;
+  }
+
+  @Override
+  public List<ComplexTypeImpl> getComplexTypes() {
+    return complexTypes;
+  }
+
+  @Override
+  public Annotation getAnnotation() {
+    return annotation;
+  }
+
+  @Override
+  public void setAnnotation(final Annotation annotation) {
+    this.annotation = annotation;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SingletonDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SingletonDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SingletonDeserializer.java
new file mode 100644
index 0000000..306aabb
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/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.odata4.client.core.edm.v4;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+
+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.setType(jp.nextTextValue());
+        } else if ("NavigationPropertyBinding".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          singleton.getNavigationPropertyBindings().add(
+                  jp.getCodec().readValue(jp, NavigationPropertyBindingImpl.class));
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          singleton.setAnnotation(jp.getCodec().readValue(jp, AnnotationImpl.class));
+        }
+      }
+    }
+
+    return singleton;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SingletonImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SingletonImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SingletonImpl.java
new file mode 100644
index 0000000..6c62467
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/SingletonImpl.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.NavigationPropertyBinding;
+import org.apache.olingo.odata4.client.api.edm.v4.Singleton;
+
+@JsonDeserialize(using = SingletonDeserializer.class)
+public class SingletonImpl extends AbstractAnnotatedEdmItem implements Singleton {
+
+  private static final long serialVersionUID = 941802518279658559L;
+
+  private String name;
+
+  private String type;
+
+  private final List<NavigationPropertyBinding> navigationPropertyBindings
+          = new ArrayList<NavigationPropertyBinding>();
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  public List<NavigationPropertyBinding> getNavigationPropertyBindings() {
+    return navigationPropertyBindings;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermDeserializer.java
new file mode 100644
index 0000000..af18cf4
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermDeserializer.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import java.math.BigInteger;
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.odata4.client.api.edm.v4.CSDLElement;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+
+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())) {
+          term.setMaxLength(jp.nextTextValue());
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          term.setPrecision(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          term.setScale(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          term.setSrid(jp.nextTextValue());
+        } else if ("AppliesTo".equals(jp.getCurrentName())) {
+          for (String split : StringUtils.split(jp.nextTextValue())) {
+            term.getAppliesTo().add(CSDLElement.valueOf(split));
+          }
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          term.setAnnotation(jp.getCodec().readValue(jp, AnnotationImpl.class));
+        }
+      }
+    }
+
+    return term;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermImpl.java
new file mode 100644
index 0000000..28e3f4f
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TermImpl.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.v4.CSDLElement;
+import org.apache.olingo.odata4.client.api.edm.v4.Term;
+
+@JsonDeserialize(using = TermDeserializer.class)
+public class TermImpl extends AbstractAnnotatedEdmItem implements Term {
+
+  private static final long serialVersionUID = -5888231162358116515L;
+
+  private String name;
+
+  private String type;
+
+  private String baseTerm;
+
+  private String defaultValue;
+
+  private boolean nullable = true;
+
+  private String maxLength;
+
+  private BigInteger precision;
+
+  private BigInteger scale;
+
+  private String srid;
+
+  private final List<CSDLElement> appliesTo = new ArrayList<CSDLElement>();
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  public String getBaseTerm() {
+    return baseTerm;
+  }
+
+  public void setBaseTerm(final String baseTerm) {
+    this.baseTerm = baseTerm;
+  }
+
+  public String getDefaultValue() {
+    return defaultValue;
+  }
+
+  public void setDefaultValue(final String defaultValue) {
+    this.defaultValue = defaultValue;
+  }
+
+  public boolean isNullable() {
+    return nullable;
+  }
+
+  public void setNullable(final boolean nullable) {
+    this.nullable = nullable;
+  }
+
+  public String getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final String maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  public BigInteger getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final BigInteger precision) {
+    this.precision = precision;
+  }
+
+  public BigInteger getScale() {
+    return scale;
+  }
+
+  public void setScale(final BigInteger scale) {
+    this.scale = scale;
+  }
+
+  public String getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final String srid) {
+    this.srid = srid;
+  }
+
+  public List<CSDLElement> getAppliesTo() {
+    return appliesTo;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionDeserializer.java
new file mode 100644
index 0000000..df340f1
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionDeserializer.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.odata4.client.core.edm.v4;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import java.math.BigInteger;
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+
+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.nextTextValue());
+        } else if ("Unicode".equals(jp.getCurrentName())) {
+          typeDefinition.setUnicode(BooleanUtils.toBoolean(jp.nextTextValue()));
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          typeDefinition.setPrecision(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          typeDefinition.setScale(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          typeDefinition.setSrid(jp.nextTextValue());
+        } else if ("Annotation".equals(jp.getCurrentName())) {
+          jp.nextToken();
+          typeDefinition.getAnnotations().add(jp.getCodec().readValue(jp, AnnotationImpl.class));
+        }
+      }
+    }
+
+    return typeDefinition;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionImpl.java
new file mode 100644
index 0000000..08ba6b2
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/TypeDefinitionImpl.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.v4.Annotation;
+import org.apache.olingo.odata4.client.api.edm.v4.TypeDefinition;
+import org.apache.olingo.odata4.client.core.edm.AbstractEdmItem;
+
+public class TypeDefinitionImpl extends AbstractEdmItem implements TypeDefinition {
+
+  private static final long serialVersionUID = -5888231162358116515L;
+
+  private String name;
+
+  private String underlyingType;
+
+  private String maxLength;
+
+  private BigInteger precision;
+
+  private BigInteger scale;
+
+  private boolean unicode = true;
+
+  private String srid;
+
+  private final List<Annotation> annotations = new ArrayList<Annotation>();
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  public String getUnderlyingType() {
+    return underlyingType;
+  }
+
+  public void setUnderlyingType(final String underlyingType) {
+    this.underlyingType = underlyingType;
+  }
+
+  public String getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final String maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  public BigInteger getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final BigInteger precision) {
+    this.precision = precision;
+  }
+
+  public BigInteger getScale() {
+    return scale;
+  }
+
+  public void setScale(final BigInteger scale) {
+    this.scale = scale;
+  }
+
+  public boolean isUnicode() {
+    return unicode;
+  }
+
+  public void setUnicode(final boolean unicode) {
+    this.unicode = unicode;
+  }
+
+  public String getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final String srid) {
+    this.srid = srid;
+  }
+
+  public List<Annotation> getAnnotations() {
+    return annotations;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AbstractElOrAttrConstruct.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AbstractElOrAttrConstruct.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AbstractElOrAttrConstruct.java
new file mode 100644
index 0000000..f8e7725
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AbstractElOrAttrConstruct.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.odata4.client.core.edm.v4.annotation;
+
+/**
+ * Groups dynamic expressions that may be provided using element notation or attribute notation.
+ */
+abstract class AbstractElOrAttrConstruct extends DynExprConstruct {
+
+  private static final long serialVersionUID = 5503275111425750339L;
+
+  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/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AnnotatedDynExprConstruct.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AnnotatedDynExprConstruct.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AnnotatedDynExprConstruct.java
new file mode 100644
index 0000000..1f9adfb
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AnnotatedDynExprConstruct.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.odata4.client.core.edm.v4.annotation;
+
+import org.apache.olingo.odata4.client.api.edm.v4.Annotation;
+import org.apache.olingo.odata4.client.core.edm.v4.AnnotatedEdmItem;
+
+public abstract class AnnotatedDynExprConstruct extends DynExprConstruct implements AnnotatedEdmItem {
+
+  private static final long serialVersionUID = -8117155475397749038L;
+
+  private Annotation annotation;
+
+  @Override
+  public Annotation getAnnotation() {
+    return annotation;
+  }
+
+  @Override
+  public void setAnnotation(final Annotation annotation) {
+    this.annotation = annotation;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AnnotationPath.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AnnotationPath.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/AnnotationPath.java
new file mode 100644
index 0000000..f04778c
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/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.odata4.client.core.edm.v4.annotation;
+
+public class AnnotationPath extends AbstractElOrAttrConstruct {
+
+  private static final long serialVersionUID = 6198019768659098819L;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Apply.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Apply.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Apply.java
new file mode 100644
index 0000000..3f05ec1
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Apply.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+
+@JsonDeserialize(using = ApplyDeserializer.class)
+public class Apply extends AnnotatedDynExprConstruct {
+
+  private static final long serialVersionUID = 6198019768659098819L;
+
+  public static final String CANONICAL_FUNCTION_CONCAT = "odata.concat";
+
+  public static final String CANONICAL_FUNCTION_FILLURITEMPLATE = "odata.fillUriTemplate";
+
+  public static final String CANONICAL_FUNCTION_URIENCODE = "odata.uriEncode";
+
+  private String function;
+
+  private final List<ExprConstruct> parameters = new ArrayList<ExprConstruct>();
+
+  public String getFunction() {
+    return function;
+  }
+
+  public void setFunction(final String function) {
+    this.function = function;
+  }
+
+  public List<ExprConstruct> getParameters() {
+    return parameters;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ApplyDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ApplyDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ApplyDeserializer.java
new file mode 100644
index 0000000..2c427ea
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ApplyDeserializer.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+import org.apache.olingo.odata4.client.core.edm.v4.AnnotationImpl;
+
+public class ApplyDeserializer extends AbstractEdmDeserializer<Apply> {
+
+  @Override
+  protected Apply doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final Apply apply = new Apply();
+
+    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.setAnnotation(jp.getCodec().readValue(jp, AnnotationImpl.class));
+        } else if (isAnnotationConstExprConstruct(jp)) {
+          apply.getParameters().add(parseAnnotationConstExprConstruct(jp));
+        } else {
+          apply.getParameters().add(jp.getCodec().readValue(jp, DynExprConstruct.class));
+        }
+      }
+    }
+
+    return apply;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Cast.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Cast.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Cast.java
new file mode 100644
index 0000000..efb00d4
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Cast.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.math.BigInteger;
+
+@JsonDeserialize(using = CastDeserializer.class)
+public class Cast extends AnnotatedDynExprConstruct {
+
+  private static final long serialVersionUID = -7836626668653004926L;
+
+  private String type;
+
+  private String maxLength;
+
+  private BigInteger precision;
+
+  private BigInteger scale;
+
+  private String srid;
+
+  private DynExprConstruct value;
+
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  public String getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final String maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  public BigInteger getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final BigInteger precision) {
+    this.precision = precision;
+  }
+
+  public BigInteger getScale() {
+    return scale;
+  }
+
+  public void setScale(final BigInteger scale) {
+    this.scale = scale;
+  }
+
+  public String getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final String srid) {
+    this.srid = srid;
+  }
+
+  public DynExprConstruct getValue() {
+    return value;
+  }
+
+  public void setValue(final DynExprConstruct value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CastDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CastDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CastDeserializer.java
new file mode 100644
index 0000000..7721171
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CastDeserializer.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import java.math.BigInteger;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+import org.apache.olingo.odata4.client.core.edm.v4.AnnotationImpl;
+
+public class CastDeserializer extends AbstractEdmDeserializer<Cast> {
+
+  @Override
+  protected Cast doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final Cast cast = new Cast();
+
+    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.setAnnotation(jp.getCodec().readValue(jp, AnnotationImpl.class));
+        } else if ("MaxLength".equals(jp.getCurrentName())) {
+          cast.setMaxLength(jp.nextTextValue());
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          cast.setPrecision(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          cast.setScale(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          cast.setSrid(jp.nextTextValue());
+        } else {
+          cast.setValue(jp.getCodec().readValue(jp, DynExprConstruct.class));
+        }
+      }
+    }
+
+    return cast;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Collection.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Collection.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Collection.java
new file mode 100644
index 0000000..dd2efb7
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Collection.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+
+@JsonDeserialize(using = CollectionDeserializer.class)
+public class Collection extends DynExprConstruct {
+
+  private static final long serialVersionUID = -4975881520695477686L;
+
+  private final List<ExprConstruct> items = new ArrayList<ExprConstruct>();
+
+  public List<ExprConstruct> getItems() {
+    return items;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CollectionDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CollectionDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CollectionDeserializer.java
new file mode 100644
index 0000000..e117536
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/CollectionDeserializer.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+
+public class CollectionDeserializer extends AbstractEdmDeserializer<Collection> {
+
+  @Override
+  protected Collection doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final Collection collection = new Collection();
+
+    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.getCodec().readValue(jp, DynExprConstruct.class));
+        }
+      }
+    }
+
+    return collection;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ConstExprConstruct.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ConstExprConstruct.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ConstExprConstruct.java
new file mode 100644
index 0000000..d7ff53b
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ConstExprConstruct.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4.annotation;
+
+public class ConstExprConstruct extends ExprConstruct {
+
+  private static final long serialVersionUID = 2250072064504668969L;
+
+  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;
+    }
+  }
+
+  private Type type;
+
+  private String value;
+
+  public Type getType() {
+    return type;
+  }
+
+  public void setType(final Type type) {
+    this.type = type;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+  public void setValue(final String value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstruct.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstruct.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstruct.java
new file mode 100644
index 0000000..0316674
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstruct.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = DynExprConstructDeserializer.class)
+public abstract class DynExprConstruct extends ExprConstruct {
+
+  private static final long serialVersionUID = -642012862023177349L;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstructDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstructDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstructDeserializer.java
new file mode 100644
index 0000000..01ea538
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprConstructDeserializer.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4.annotation;
+
+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.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.ClassUtils;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+
+public class DynExprConstructDeserializer extends AbstractEdmDeserializer<DynExprConstruct> {
+
+    private static final String[] EL_OR_ATTR = { AnnotationPath.class.getSimpleName(), Path.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 AbstractElOrAttrConstruct getElOrAttrInstance(final String simpleClassName) throws JsonParseException {
+        try {
+            @SuppressWarnings("unchecked")
+            Class<? extends AbstractElOrAttrConstruct> elOrAttrClass =
+                    (Class<? extends AbstractElOrAttrConstruct>) ClassUtils.getClass(
+                            getClass().getPackage().getName() + "." + simpleClassName);
+            return elOrAttrClass.newInstance();
+        } catch (Exception e) {
+            throw new JsonParseException("Could not instantiate " + simpleClassName, JsonLocation.NA, e);
+        }
+    }
+
+    private ExprConstruct parseConstOrEnumExprConstruct(final JsonParser jp) throws IOException {
+        ExprConstruct result;
+        if (isAnnotationConstExprConstruct(jp)) {
+            result = parseAnnotationConstExprConstruct(jp);
+        } else {
+            result = jp.getCodec().readValue(jp, DynExprConstruct.class);
+        }
+        jp.nextToken();
+
+        return result;
+    }
+
+    @Override
+    protected DynExprConstruct doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+            throws IOException, JsonProcessingException {
+
+        DynExprConstruct construct = null;
+
+        if (DynExprSingleParamOp.Type.fromString(jp.getCurrentName()) != null) {
+            final DynExprSingleParamOp dynExprSingleParamOp = new DynExprSingleParamOp();
+            dynExprSingleParamOp.setType(DynExprSingleParamOp.Type.fromString(jp.getCurrentName()));
+
+            jp.nextToken();
+            jp.nextToken();
+            dynExprSingleParamOp.setExpression(jp.getCodec().readValue(jp, DynExprConstruct.class));
+
+            construct = dynExprSingleParamOp;
+        } else if (DynExprDoubleParamOp.Type.fromString(jp.getCurrentName()) != null) {
+            final DynExprDoubleParamOp dynExprDoubleParamOp = new DynExprDoubleParamOp();
+            dynExprDoubleParamOp.setType(DynExprDoubleParamOp.Type.fromString(jp.getCurrentName()));
+
+            jp.nextToken();
+            jp.nextToken();
+            dynExprDoubleParamOp.setLeft(jp.getCodec().readValue(jp, DynExprConstruct.class));
+            dynExprDoubleParamOp.setRight(jp.getCodec().readValue(jp, DynExprConstruct.class));
+
+            construct = dynExprDoubleParamOp;
+        } else if (ArrayUtils.contains(EL_OR_ATTR, jp.getCurrentName())) {
+            final AbstractElOrAttrConstruct elOrAttr = getElOrAttrInstance(jp.getCurrentName());
+            elOrAttr.setValue(jp.nextTextValue());
+
+            construct = elOrAttr;
+        } else if (APPLY.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, Apply.class);
+        } else if (CAST.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, Cast.class);
+        } else if (COLLECTION.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, Collection.class);
+        } else if (IF.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            jp.nextToken();
+
+            final If _if = new If();
+            _if.setGuard(parseConstOrEnumExprConstruct(jp));
+            _if.setThen(parseConstOrEnumExprConstruct(jp));
+            _if.setElse(parseConstOrEnumExprConstruct(jp));
+
+            construct = _if;
+        } else if (IS_OF.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, IsOf.class);
+        } else if (LABELED_ELEMENT.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, LabeledElement.class);
+        } else if (NULL.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, Null.class);
+        } else if (RECORD.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, Record.class);
+        } else if (URL_REF.equals(jp.getCurrentName())) {
+            jp.nextToken();
+            construct = jp.getCodec().readValue(jp, UrlRef.class);
+        }
+
+        return construct;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprDoubleParamOp.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprDoubleParamOp.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprDoubleParamOp.java
new file mode 100644
index 0000000..a2dbc0a
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprDoubleParamOp.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4.annotation;
+
+public class DynExprDoubleParamOp extends DynExprConstruct {
+
+  private static final long serialVersionUID = -7974475975925167731L;
+
+  public static enum Type {
+
+    And,
+    Or;
+
+    public static Type fromString(final String value) {
+      Type result = null;
+      for (Type type : values()) {
+        if (value.equals(type.name())) {
+          result = type;
+        }
+      }
+      return result;
+    }
+  }
+
+  private Type type;
+
+  private DynExprConstruct left;
+
+  private DynExprConstruct right;
+
+  public Type getType() {
+    return type;
+  }
+
+  public void setType(final Type type) {
+    this.type = type;
+  }
+
+  public DynExprConstruct getLeft() {
+    return left;
+  }
+
+  public void setLeft(final DynExprConstruct left) {
+    this.left = left;
+  }
+
+  public DynExprConstruct getRight() {
+    return right;
+  }
+
+  public void setRight(final DynExprConstruct right) {
+    this.right = right;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprSingleParamOp.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprSingleParamOp.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprSingleParamOp.java
new file mode 100644
index 0000000..06fc03a
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/DynExprSingleParamOp.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.odata4.client.core.edm.v4.annotation;
+
+public class DynExprSingleParamOp extends DynExprConstruct {
+
+  private static final long serialVersionUID = -7974475975925167731L;
+
+  public static enum Type {
+
+    Not,
+    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;
+    }
+
+  }
+
+  private Type type;
+
+  private DynExprConstruct expression;
+
+  public Type getType() {
+    return type;
+  }
+
+  public void setType(final Type type) {
+    this.type = type;
+  }
+
+  public DynExprConstruct getExpression() {
+    return expression;
+  }
+
+  public void setExpression(final DynExprConstruct expression) {
+    this.expression = expression;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ExprConstruct.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ExprConstruct.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ExprConstruct.java
new file mode 100644
index 0000000..597edf2
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/ExprConstruct.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.odata4.client.core.edm.v4.annotation;
+
+import org.apache.olingo.odata4.client.core.edm.AbstractEdmItem;
+
+public abstract class ExprConstruct extends AbstractEdmItem {
+
+  private static final long serialVersionUID = 7108626008005050492L;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/If.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/If.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/If.java
new file mode 100644
index 0000000..e08a5a4
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/If.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.odata4.client.core.edm.v4.annotation;
+
+public class If extends AnnotatedDynExprConstruct {
+
+  private static final long serialVersionUID = 6752952406406218936L;
+
+  private ExprConstruct guard;
+
+  private ExprConstruct _then;
+
+  private ExprConstruct _else;
+
+  public ExprConstruct getGuard() {
+    return guard;
+  }
+
+  public void setGuard(final ExprConstruct guard) {
+    this.guard = guard;
+  }
+
+  public ExprConstruct getThen() {
+    return _then;
+  }
+
+  public void setThen(final ExprConstruct _then) {
+    this._then = _then;
+  }
+
+  public ExprConstruct getElse() {
+    return _else;
+  }
+
+  public void setElse(final ExprConstruct _else) {
+    this._else = _else;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOf.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOf.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOf.java
new file mode 100644
index 0000000..6258ea9
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOf.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.math.BigInteger;
+
+@JsonDeserialize(using = IsOfDeserializer.class)
+public class IsOf extends AnnotatedDynExprConstruct {
+
+  private static final long serialVersionUID = 6958304670385303776L;
+
+  private String type;
+
+  private String maxLength;
+
+  private BigInteger precision;
+
+  private BigInteger scale;
+
+  private String srid;
+
+  private DynExprConstruct value;
+
+  public String getType() {
+    return type;
+  }
+
+  public void setType(final String type) {
+    this.type = type;
+  }
+
+  public String getMaxLength() {
+    return maxLength;
+  }
+
+  public void setMaxLength(final String maxLength) {
+    this.maxLength = maxLength;
+  }
+
+  public BigInteger getPrecision() {
+    return precision;
+  }
+
+  public void setPrecision(final BigInteger precision) {
+    this.precision = precision;
+  }
+
+  public BigInteger getScale() {
+    return scale;
+  }
+
+  public void setScale(final BigInteger scale) {
+    this.scale = scale;
+  }
+
+  public String getSrid() {
+    return srid;
+  }
+
+  public void setSrid(final String srid) {
+    this.srid = srid;
+  }
+
+  public DynExprConstruct getValue() {
+    return value;
+  }
+
+  public void setValue(final DynExprConstruct value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOfDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOfDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOfDeserializer.java
new file mode 100644
index 0000000..52187f4
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/IsOfDeserializer.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import java.math.BigInteger;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+import org.apache.olingo.odata4.client.core.edm.v4.AnnotationImpl;
+
+public class IsOfDeserializer extends AbstractEdmDeserializer<IsOf> {
+
+  @Override
+  protected IsOf doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final IsOf isof = new IsOf();
+
+    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.setAnnotation(jp.getCodec().readValue(jp, AnnotationImpl.class));
+        } else if ("MaxLength".equals(jp.getCurrentName())) {
+          isof.setMaxLength(jp.nextTextValue());
+        } else if ("Precision".equals(jp.getCurrentName())) {
+          isof.setPrecision(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("Scale".equals(jp.getCurrentName())) {
+          isof.setScale(BigInteger.valueOf(jp.nextLongValue(0L)));
+        } else if ("SRID".equals(jp.getCurrentName())) {
+          isof.setSrid(jp.nextTextValue());
+        } else {
+          isof.setValue(jp.getCodec().readValue(jp, DynExprConstruct.class));
+        }
+      }
+    }
+
+    return isof;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElement.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElement.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElement.java
new file mode 100644
index 0000000..cfd4929
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElement.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = LabeledElementDeserializer.class)
+public class LabeledElement extends AnnotatedDynExprConstruct {
+
+  private static final long serialVersionUID = 6938971787086282939L;
+
+  private String name;
+
+  private DynExprConstruct value;
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(final String name) {
+    this.name = name;
+  }
+
+  public DynExprConstruct getValue() {
+    return value;
+  }
+
+  public void setValue(final DynExprConstruct value) {
+    this.value = value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElementDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElementDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElementDeserializer.java
new file mode 100644
index 0000000..ae70f55
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElementDeserializer.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.data.impl.AbstractEdmDeserializer;
+import org.apache.olingo.odata4.client.core.edm.v4.AnnotationImpl;
+
+public class LabeledElementDeserializer extends AbstractEdmDeserializer<LabeledElement> {
+
+  @Override
+  protected LabeledElement doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+          throws IOException, JsonProcessingException {
+
+    final LabeledElement element = new LabeledElement();
+
+    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.setAnnotation(jp.getCodec().readValue(jp, AnnotationImpl.class));
+        } else {
+          element.setValue(jp.getCodec().readValue(jp, DynExprConstruct.class));
+        }
+      }
+    }
+
+    return element;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElementReference.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElementReference.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/LabeledElementReference.java
new file mode 100644
index 0000000..c6f3b35
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/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.odata4.client.core.edm.v4.annotation;
+
+public class LabeledElementReference extends AbstractElOrAttrConstruct {
+
+  private static final long serialVersionUID = 3649068436729494270L;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/NavigationPropertyPath.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/NavigationPropertyPath.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/NavigationPropertyPath.java
new file mode 100644
index 0000000..8105b3e
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/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.odata4.client.core.edm.v4.annotation;
+
+public class NavigationPropertyPath extends AbstractElOrAttrConstruct {
+
+  private static final long serialVersionUID = -8066400142504963043L;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/4f927e76/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Null.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Null.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Null.java
new file mode 100644
index 0000000..d6d6bb0
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/v4/annotation/Null.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.odata4.client.core.edm.v4.annotation;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = NullDeserializer.class)
+public class Null extends AnnotatedDynExprConstruct {
+
+  private static final long serialVersionUID = -3611384710172781951L;
+
+}

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