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/05/05 17:17:16 UTC

[05/15] [OLINGO-263][OLINGO-264] First draft Edm annotation interfaces + client-side implementation (server components have TODO)

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java
deleted file mode 100644
index 59266a5..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructDeserializer.java
+++ /dev/null
@@ -1,147 +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 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.client.core.edm.xml.AbstractEdmDeserializer;
-
-public class DynExprConstructDeserializer extends AbstractEdmDeserializer<DynExprConstructImpl> {
-
-    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 ExprConstructImpl parseConstOrEnumExprConstruct(final JsonParser jp) throws IOException {
-        ExprConstructImpl result;
-        if (isAnnotationConstExprConstruct(jp)) {
-            result = parseAnnotationConstExprConstruct(jp);
-        } else {
-            result = jp.readValueAs( DynExprConstructImpl.class);
-        }
-        jp.nextToken();
-
-        return result;
-    }
-
-    @Override
-    protected DynExprConstructImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
-            throws IOException, JsonProcessingException {
-
-        DynExprConstructImpl 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.readValueAs( DynExprConstructImpl.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.readValueAs( DynExprConstructImpl.class));
-            dynExprDoubleParamOp.setRight(jp.readValueAs( DynExprConstructImpl.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.readValueAs( Apply.class);
-        } else if (CAST.equals(jp.getCurrentName())) {
-            jp.nextToken();
-            construct = jp.readValueAs( Cast.class);
-        } else if (COLLECTION.equals(jp.getCurrentName())) {
-            jp.nextToken();
-            construct = jp.readValueAs( 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.readValueAs( IsOf.class);
-        } else if (LABELED_ELEMENT.equals(jp.getCurrentName())) {
-            jp.nextToken();
-            construct = jp.readValueAs( LabeledElement.class);
-        } else if (NULL.equals(jp.getCurrentName())) {
-            jp.nextToken();
-            construct = jp.readValueAs( Null.class);
-        } else if (RECORD.equals(jp.getCurrentName())) {
-            jp.nextToken();
-            construct = jp.readValueAs( Record.class);
-        } else if (URL_REF.equals(jp.getCurrentName())) {
-            jp.nextToken();
-            construct = jp.readValueAs( UrlRef.class);
-        }
-
-        return construct;
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructImpl.java
deleted file mode 100644
index 8d73943..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprConstructImpl.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 com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynExprConstruct;
-
-@JsonDeserialize(using = DynExprConstructDeserializer.class)
-public abstract class DynExprConstructImpl extends ExprConstructImpl implements DynExprConstruct {
-
-  private static final long serialVersionUID = -642012862023177349L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprDoubleParamOp.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprDoubleParamOp.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprDoubleParamOp.java
deleted file mode 100644
index 85ec044..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprDoubleParamOp.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.client.core.edm.xml.v4.annotation;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynExprConstruct;
-
-public class DynExprDoubleParamOp extends DynExprConstructImpl {
-
-  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/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprSingleParamOp.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprSingleParamOp.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprSingleParamOp.java
deleted file mode 100644
index 06797e9..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynExprSingleParamOp.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 org.apache.olingo.client.api.edm.xml.v4.annotation.DynExprConstruct;
-
-public class DynExprSingleParamOp extends DynExprConstructImpl {
-
-  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/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..c5054aa
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/DynamicAnnotationExpressionDeserializer.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.client.core.edm.xml.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.core.JsonToken;
+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.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;
+
+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/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ExprConstructImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ExprConstructImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ExprConstructImpl.java
deleted file mode 100644
index c0bd626..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/ExprConstructImpl.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.ExprConstruct;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
-
-public abstract class ExprConstructImpl extends AbstractEdmItem implements ExprConstruct {
-
-  private static final long serialVersionUID = 7108626008005050492L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/If.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/If.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/If.java
deleted file mode 100644
index 8477bd4..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/If.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 org.apache.olingo.client.api.edm.xml.v4.annotation.ExprConstruct;
-
-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/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..aea0e1b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.v4.annotation;
+
+import org.apache.olingo.client.api.edm.xml.v4.annotation.If;
+import org.apache.olingo.client.api.edm.xml.v4.annotation.AnnotationExpression;
+
+public class IfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements If {
+
+  private static final long serialVersionUID = 6752952406406218936L;
+
+  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/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOf.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOf.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOf.java
deleted file mode 100644
index 6854fd2..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/IsOf.java
+++ /dev/null
@@ -1,92 +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 com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import java.math.BigInteger;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynExprConstruct;
-
-@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/olingo-odata4/blob/726fbe52/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
index 160ce63..6539cc4 100644
--- 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
@@ -24,18 +24,18 @@ import com.fasterxml.jackson.core.JsonToken;
 import com.fasterxml.jackson.databind.DeserializationContext;
 
 import java.io.IOException;
-import java.math.BigInteger;
 
 import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
+import org.apache.olingo.commons.api.edm.geo.SRID;
 
-public class IsOfDeserializer extends AbstractEdmDeserializer<IsOf> {
+public class IsOfDeserializer extends AbstractEdmDeserializer<IsOfImpl> {
 
   @Override
-  protected IsOf doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+  protected IsOfImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final IsOf isof = new IsOf();
+    final IsOfImpl isof = new IsOfImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -43,17 +43,22 @@ public class IsOfDeserializer extends AbstractEdmDeserializer<IsOf> {
         if ("Type".equals(jp.getCurrentName())) {
           isof.setType(jp.nextTextValue());
         } else if ("Annotation".equals(jp.getCurrentName())) {
-          isof.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+          isof.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
         } else if ("MaxLength".equals(jp.getCurrentName())) {
-          isof.setMaxLength(jp.nextTextValue());
+          final String maxLenght = jp.nextTextValue();
+          isof.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
         } else if ("Precision".equals(jp.getCurrentName())) {
-          isof.setPrecision(BigInteger.valueOf(jp.nextLongValue(0L)));
+          isof.setPrecision(Integer.valueOf(jp.nextTextValue()));
         } else if ("Scale".equals(jp.getCurrentName())) {
-          isof.setScale(BigInteger.valueOf(jp.nextLongValue(0L)));
+          final String scale = jp.nextTextValue();
+          isof.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
         } else if ("SRID".equals(jp.getCurrentName())) {
-          isof.setSrid(jp.nextTextValue());
+          final String srid = jp.nextTextValue();
+          if (srid != null) {
+            isof.setSrid(SRID.valueOf(srid));
+          }
         } else {
-          isof.setValue(jp.readValueAs(DynExprConstructImpl.class));
+          isof.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..a281ff8
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.v4.annotation;
+
+import org.apache.olingo.client.api.edm.xml.v4.annotation.IsOf;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.geo.SRID;
+
+@JsonDeserialize(using = IsOfDeserializer.class)
+public class IsOfImpl extends AbstractAnnotatableDynamicAnnotationExpression implements IsOf {
+
+  private static final long serialVersionUID = 6958304670385303776L;
+
+  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/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElement.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElement.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElement.java
deleted file mode 100644
index ccfdc37..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElement.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.core.edm.xml.v4.annotation;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.DynExprConstruct;
-
-@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/olingo-odata4/blob/726fbe52/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
index df3f747..78c5c51 100644
--- 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
@@ -28,13 +28,13 @@ import java.io.IOException;
 import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
 
-public class LabeledElementDeserializer extends AbstractEdmDeserializer<LabeledElement> {
+public class LabeledElementDeserializer extends AbstractEdmDeserializer<LabeledElementImpl> {
 
   @Override
-  protected LabeledElement doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+  protected LabeledElementImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final LabeledElement element = new LabeledElement();
+    final LabeledElementImpl element = new LabeledElementImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -42,9 +42,9 @@ public class LabeledElementDeserializer extends AbstractEdmDeserializer<LabeledE
         if ("Name".equals(jp.getCurrentName())) {
           element.setName(jp.nextTextValue());
         } else if ("Annotation".equals(jp.getCurrentName())) {
-          element.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+          element.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
         } else {
-          element.setValue(jp.readValueAs(DynExprConstructImpl.class));
+          element.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..c47b4cc
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.v4.annotation;
+
+import org.apache.olingo.client.api.edm.xml.v4.annotation.LabeledElement;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.v4.annotation.DynamicAnnotationExpression;
+
+@JsonDeserialize(using = LabeledElementDeserializer.class)
+public class LabeledElementImpl
+        extends AbstractAnnotatableDynamicAnnotationExpression implements LabeledElement {
+
+  private static final long serialVersionUID = 6938971787086282939L;
+
+  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/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementReference.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementReference.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/LabeledElementReference.java
deleted file mode 100644
index d33c955..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/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.core.edm.xml.v4.annotation;
-
-public class LabeledElementReference extends AbstractElOrAttrConstruct {
-
-  private static final long serialVersionUID = 3649068436729494270L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..7e49d35
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.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 = 3649068436729494270L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NavigationPropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NavigationPropertyPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/NavigationPropertyPath.java
deleted file mode 100644
index f6b21d1..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/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.core.edm.xml.v4.annotation;
-
-public class NavigationPropertyPath extends AbstractElOrAttrConstruct {
-
-  private static final long serialVersionUID = -8066400142504963043L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..01bb85e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.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 = -8066400142504963043L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..30dee34
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.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 = -7974475975925167731L;
+
+  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/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/Null.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/Null.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/Null.java
deleted file mode 100644
index 0ff8a1e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/Null.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 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/olingo-odata4/blob/726fbe52/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
index 36c6791..86d6b52 100644
--- 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
@@ -28,19 +28,19 @@ import java.io.IOException;
 import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
 
-public class NullDeserializer extends AbstractEdmDeserializer<Null> {
+public class NullDeserializer extends AbstractEdmDeserializer<NullImpl> {
 
   @Override
-  protected Null doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+  protected NullImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final Null _null = new Null();
+    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.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+          _null.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
         }
       }
     }

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

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/Path.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/Path.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/Path.java
deleted file mode 100644
index b9c4136..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/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.core.edm.xml.v4.annotation;
-
-public class Path extends AbstractElOrAttrConstruct {
-
-  private static final long serialVersionUID = -2551058493469292082L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..3033f77
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.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 = -2551058493469292082L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyPath.java
deleted file mode 100644
index ca47253..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/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.core.edm.xml.v4.annotation;
-
-public class PropertyPath extends AbstractElOrAttrConstruct {
-
-  private static final long serialVersionUID = 2328584735437885159L;
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..d319f4d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.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 = 2328584735437885159L;
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValue.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValue.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValue.java
deleted file mode 100644
index 5493c33..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/PropertyValue.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.core.edm.xml.v4.annotation;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.ExprConstruct;
-
-@JsonDeserialize(using = PropertyValueDeserializer.class)
-public class PropertyValue extends AnnotatedDynExprConstruct {
-
-  private static final long serialVersionUID = 3081968466425707461L;
-
-  private String property;
-
-  private ExprConstruct value;
-
-  public String getProperty() {
-    return property;
-  }
-
-  public void setProperty(final String property) {
-    this.property = property;
-  }
-
-  public ExprConstruct getValue() {
-    return value;
-  }
-
-  public void setValue(final ExprConstruct value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
index 6841c6e..488c581 100644
--- 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
@@ -28,13 +28,13 @@ import java.io.IOException;
 import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
 
-public class PropertyValueDeserializer extends AbstractEdmDeserializer<PropertyValue> {
+public class PropertyValueDeserializer extends AbstractEdmDeserializer<PropertyValueImpl> {
 
   @Override
-  protected PropertyValue doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+  protected PropertyValueImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final PropertyValue propValue = new PropertyValue();
+    final PropertyValueImpl propValue = new PropertyValueImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -42,11 +42,11 @@ public class PropertyValueDeserializer extends AbstractEdmDeserializer<PropertyV
         if ("Property".equals(jp.getCurrentName())) {
           propValue.setProperty(jp.nextTextValue());
         } else if ("Annotation".equals(jp.getCurrentName())) {
-          propValue.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+          propValue.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
         } else if (isAnnotationConstExprConstruct(jp)) {
           propValue.setValue(parseAnnotationConstExprConstruct(jp));
         } else {
-          propValue.setValue(jp.readValueAs(DynExprConstructImpl.class));
+          propValue.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
         }
       }
     }

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

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
index 279eb8c..71f2cb1 100644
--- 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
@@ -28,23 +28,23 @@ import java.io.IOException;
 import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
 import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
 
-public class RecordDeserializer extends AbstractEdmDeserializer<Record> {
+public class RecordDeserializer extends AbstractEdmDeserializer<RecordImpl> {
 
   @Override
-  protected Record doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+  protected RecordImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final Record record = new Record();
+    final RecordImpl record = new RecordImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
       if (token == JsonToken.FIELD_NAME) {
-        if ("Tyoe".equals(jp.getCurrentName())) {
+        if ("Type".equals(jp.getCurrentName())) {
           record.setType(jp.nextTextValue());
         } else if ("Annotation".equals(jp.getCurrentName())) {
-          record.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+          record.getAnnotations().add(jp.readValueAs(AnnotationImpl.class));
         } else {
-          record.getPropertyValues().add(jp.readValueAs(PropertyValue.class));
+          record.getPropertyValues().add(jp.readValueAs(PropertyValueImpl.class));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
new file mode 100644
index 0000000..80255a3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/RecordImpl.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.v4.annotation;
+
+import org.apache.olingo.client.api.edm.xml.v4.annotation.Record;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.client.api.edm.xml.v4.annotation.PropertyValue;
+
+@JsonDeserialize(using = RecordDeserializer.class)
+public class RecordImpl extends AbstractAnnotatableDynamicAnnotationExpression implements Record {
+
+  private static final long serialVersionUID = -2886526224721870304L;
+
+  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/726fbe52/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
new file mode 100644
index 0000000..ccdfb6a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/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.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 = -7974475975925167731L;
+
+  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/726fbe52/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRef.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRef.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRef.java
deleted file mode 100644
index ebaea99..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/annotation/UrlRef.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.core.edm.xml.v4.annotation;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import org.apache.olingo.client.api.edm.xml.v4.annotation.ExprConstruct;
-
-@JsonDeserialize(using = UrlRefDeserializer.class)
-public class UrlRef extends DynExprConstructImpl {
-
-  private static final long serialVersionUID = 3755101394647430897L;
-
-  private ExprConstruct value;
-
-  public ExprConstruct getValue() {
-    return value;
-  }
-
-  public void setValue(final ExprConstruct value) {
-    this.value = value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/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
index e2fcfbb..4e54af9 100644
--- 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
@@ -27,13 +27,13 @@ import java.io.IOException;
 
 import org.apache.olingo.client.core.edm.xml.AbstractEdmDeserializer;
 
-public class UrlRefDeserializer extends AbstractEdmDeserializer<UrlRef> {
+public class UrlRefDeserializer extends AbstractEdmDeserializer<UrlRefImpl> {
 
   @Override
-  protected UrlRef doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+  protected UrlRefImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
           throws IOException, JsonProcessingException {
 
-    final UrlRef urlref = new UrlRef();
+    final UrlRefImpl urlref = new UrlRefImpl();
 
     for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
       final JsonToken token = jp.getCurrentToken();
@@ -41,7 +41,7 @@ public class UrlRefDeserializer extends AbstractEdmDeserializer<UrlRef> {
         if (isAnnotationConstExprConstruct(jp)) {
           urlref.setValue(parseAnnotationConstExprConstruct(jp));
         } else {
-          urlref.setValue(jp.readValueAs( DynExprConstructImpl.class));
+          urlref.setValue(jp.readValueAs(AbstractDynamicAnnotationExpression.class));
         }
       }
     }

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