You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2014/03/16 05:26:16 UTC
[6/6] git commit: [OLINGO-191] change package name: part 2 of
1.edm.xml->edm.xml.shared, 2, edm.xml.v4->edm.xml
[OLINGO-191] change package name: part 2 of 1.edm.xml->edm.xml.shared, 2, edm.xml.v4->edm.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/commit/87c3bcb2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/tree/87c3bcb2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/diff/87c3bcb2
Branch: refs/heads/olingo191
Commit: 87c3bcb2f01661a39bc3bb2fd67922451e3c0687
Parents: 192a707
Author: challenh <ch...@apache.org>
Authored: Sun Mar 16 12:24:59 2014 +0800
Committer: challenh <ch...@apache.org>
Committed: Sun Mar 16 12:24:59 2014 +0800
----------------------------------------------------------------------
.../client/core/edm/EdmServiceMetadataImpl.java | 2 +-
.../shared/AbstractEdmServiceMetadataImpl.java | 2 +-
.../core/edm/xml/AbstractAnnotatedEdmItem.java | 45 +++++
.../client/core/edm/xml/ActionDeserializer.java | 62 +++++++
.../olingo/client/core/edm/xml/ActionImpl.java | 91 ++++++++++
.../client/core/edm/xml/ActionImportImpl.java | 66 +++++++
.../core/edm/xml/AnnotationDeserializer.java | 59 ++++++
.../client/core/edm/xml/AnnotationImpl.java | 77 ++++++++
.../core/edm/xml/AnnotationsDeserializer.java | 55 ++++++
.../client/core/edm/xml/AnnotationsImpl.java | 51 ++++++
.../client/core/edm/xml/ComplexTypeImpl.java | 102 +++++++++++
.../client/core/edm/xml/DataServicesImpl.java | 38 ++++
.../olingo/client/core/edm/xml/EdmxImpl.java | 44 +++++
.../core/edm/xml/EntityContainerImpl.java | 129 +++++++++++++
.../client/core/edm/xml/EntitySetImpl.java | 62 +++++++
.../client/core/edm/xml/EntityTypeImpl.java | 69 +++++++
.../client/core/edm/xml/EnumTypeImpl.java | 40 ++++
.../core/edm/xml/FunctionDeserializer.java | 64 +++++++
.../client/core/edm/xml/FunctionImpl.java | 41 +++++
.../client/core/edm/xml/FunctionImportImpl.java | 93 ++++++++++
.../core/edm/xml/IncludeAnnotationsImpl.java | 66 +++++++
.../olingo/client/core/edm/xml/IncludeImpl.java | 54 ++++++
.../olingo/client/core/edm/xml/MemberImpl.java | 45 +++++
.../edm/xml/NavigationPropertyBindingImpl.java | 54 ++++++
.../edm/xml/NavigationPropertyDeserializer.java | 70 +++++++
.../core/edm/xml/NavigationPropertyImpl.java | 110 +++++++++++
.../client/core/edm/xml/ParameterImpl.java | 39 ++++
.../client/core/edm/xml/PropertyImpl.java | 42 +++++
.../core/edm/xml/ReferenceDeserializer.java | 60 ++++++
.../client/core/edm/xml/ReferenceImpl.java | 70 +++++++
.../core/edm/xml/ReferentialConstraintImpl.java | 53 ++++++
.../core/edm/xml/ReturnTypeDeserializer.java | 63 +++++++
.../client/core/edm/xml/ReturnTypeImpl.java | 97 ++++++++++
.../olingo/client/core/edm/xml/SchemaImpl.java | 181 +++++++++++++++++++
.../core/edm/xml/SingletonDeserializer.java | 59 ++++++
.../client/core/edm/xml/SingletonImpl.java | 63 +++++++
.../client/core/edm/xml/TermDeserializer.java | 78 ++++++++
.../olingo/client/core/edm/xml/TermImpl.java | 140 ++++++++++++++
.../edm/xml/TypeDefinitionDeserializer.java | 67 +++++++
.../client/core/edm/xml/TypeDefinitionImpl.java | 119 ++++++++++++
.../client/core/edm/xml/XMLMetadataImpl.java | 56 ++++++
.../annotation/AbstractElOrAttrConstruct.java | 37 ++++
.../annotation/AnnotatedDynExprConstruct.java | 38 ++++
.../core/edm/xml/annotation/AnnotationPath.java | 25 +++
.../client/core/edm/xml/annotation/Apply.java | 55 ++++++
.../edm/xml/annotation/ApplyDeserializer.java | 57 ++++++
.../client/core/edm/xml/annotation/Cast.java | 92 ++++++++++
.../edm/xml/annotation/CastDeserializer.java | 64 +++++++
.../core/edm/xml/annotation/Collection.java | 39 ++++
.../xml/annotation/CollectionDeserializer.java | 52 ++++++
.../xml/annotation/ConstExprConstructImpl.java | 51 ++++++
.../DynExprConstructDeserializer.java | 147 +++++++++++++++
.../xml/annotation/DynExprConstructImpl.java | 30 +++
.../xml/annotation/DynExprDoubleParamOp.java | 73 ++++++++
.../xml/annotation/DynExprSingleParamOp.java | 69 +++++++
.../edm/xml/annotation/ExprConstructImpl.java | 28 +++
.../client/core/edm/xml/annotation/If.java | 57 ++++++
.../client/core/edm/xml/annotation/IsOf.java | 92 ++++++++++
.../edm/xml/annotation/IsOfDeserializer.java | 64 +++++++
.../core/edm/xml/annotation/LabeledElement.java | 50 +++++
.../annotation/LabeledElementDeserializer.java | 55 ++++++
.../xml/annotation/LabeledElementReference.java | 25 +++
.../xml/annotation/NavigationPropertyPath.java | 25 +++
.../client/core/edm/xml/annotation/Null.java | 28 +++
.../edm/xml/annotation/NullDeserializer.java | 51 ++++++
.../client/core/edm/xml/annotation/Path.java | 25 +++
.../core/edm/xml/annotation/PropertyPath.java | 25 +++
.../core/edm/xml/annotation/PropertyValue.java | 50 +++++
.../annotation/PropertyValueDeserializer.java | 57 ++++++
.../client/core/edm/xml/annotation/Record.java | 46 +++++
.../edm/xml/annotation/RecordDeserializer.java | 55 ++++++
.../client/core/edm/xml/annotation/UrlRef.java | 40 ++++
.../edm/xml/annotation/UrlRefDeserializer.java | 52 ++++++
.../xml/shared/DataServicesDeserializer.java | 6 +-
.../core/edm/xml/shared/EdmxDeserializer.java | 10 +-
.../edm/xml/shared/ParameterDeserializer.java | 4 +-
.../edm/xml/shared/PropertyDeserializer.java | 6 +-
.../edm/xml/v4/AbstractAnnotatedEdmItem.java | 45 -----
.../core/edm/xml/v4/ActionDeserializer.java | 62 -------
.../client/core/edm/xml/v4/ActionImpl.java | 91 ----------
.../core/edm/xml/v4/ActionImportImpl.java | 66 -------
.../core/edm/xml/v4/AnnotationDeserializer.java | 59 ------
.../client/core/edm/xml/v4/AnnotationImpl.java | 77 --------
.../edm/xml/v4/AnnotationsDeserializer.java | 55 ------
.../client/core/edm/xml/v4/AnnotationsImpl.java | 51 ------
.../client/core/edm/xml/v4/ComplexTypeImpl.java | 102 -----------
.../core/edm/xml/v4/DataServicesImpl.java | 38 ----
.../olingo/client/core/edm/xml/v4/EdmxImpl.java | 44 -----
.../core/edm/xml/v4/EntityContainerImpl.java | 129 -------------
.../client/core/edm/xml/v4/EntitySetImpl.java | 62 -------
.../client/core/edm/xml/v4/EntityTypeImpl.java | 69 -------
.../client/core/edm/xml/v4/EnumTypeImpl.java | 40 ----
.../core/edm/xml/v4/FunctionDeserializer.java | 64 -------
.../client/core/edm/xml/v4/FunctionImpl.java | 41 -----
.../core/edm/xml/v4/FunctionImportImpl.java | 93 ----------
.../core/edm/xml/v4/IncludeAnnotationsImpl.java | 66 -------
.../client/core/edm/xml/v4/IncludeImpl.java | 54 ------
.../client/core/edm/xml/v4/MemberImpl.java | 45 -----
.../xml/v4/NavigationPropertyBindingImpl.java | 54 ------
.../xml/v4/NavigationPropertyDeserializer.java | 70 -------
.../core/edm/xml/v4/NavigationPropertyImpl.java | 110 -----------
.../client/core/edm/xml/v4/ParameterImpl.java | 39 ----
.../client/core/edm/xml/v4/PropertyImpl.java | 42 -----
.../core/edm/xml/v4/ReferenceDeserializer.java | 60 ------
.../client/core/edm/xml/v4/ReferenceImpl.java | 70 -------
.../edm/xml/v4/ReferentialConstraintImpl.java | 53 ------
.../core/edm/xml/v4/ReturnTypeDeserializer.java | 63 -------
.../client/core/edm/xml/v4/ReturnTypeImpl.java | 97 ----------
.../client/core/edm/xml/v4/SchemaImpl.java | 181 -------------------
.../core/edm/xml/v4/SingletonDeserializer.java | 59 ------
.../client/core/edm/xml/v4/SingletonImpl.java | 63 -------
.../core/edm/xml/v4/TermDeserializer.java | 78 --------
.../olingo/client/core/edm/xml/v4/TermImpl.java | 140 --------------
.../edm/xml/v4/TypeDefinitionDeserializer.java | 67 -------
.../core/edm/xml/v4/TypeDefinitionImpl.java | 119 ------------
.../client/core/edm/xml/v4/XMLMetadataImpl.java | 56 ------
.../annotation/AbstractElOrAttrConstruct.java | 37 ----
.../annotation/AnnotatedDynExprConstruct.java | 38 ----
.../edm/xml/v4/annotation/AnnotationPath.java | 25 ---
.../core/edm/xml/v4/annotation/Apply.java | 55 ------
.../xml/v4/annotation/ApplyDeserializer.java | 57 ------
.../client/core/edm/xml/v4/annotation/Cast.java | 92 ----------
.../edm/xml/v4/annotation/CastDeserializer.java | 64 -------
.../core/edm/xml/v4/annotation/Collection.java | 39 ----
.../v4/annotation/CollectionDeserializer.java | 52 ------
.../v4/annotation/ConstExprConstructImpl.java | 51 ------
.../DynExprConstructDeserializer.java | 147 ---------------
.../xml/v4/annotation/DynExprConstructImpl.java | 30 ---
.../xml/v4/annotation/DynExprDoubleParamOp.java | 73 --------
.../xml/v4/annotation/DynExprSingleParamOp.java | 69 -------
.../xml/v4/annotation/ExprConstructImpl.java | 28 ---
.../client/core/edm/xml/v4/annotation/If.java | 57 ------
.../client/core/edm/xml/v4/annotation/IsOf.java | 92 ----------
.../edm/xml/v4/annotation/IsOfDeserializer.java | 64 -------
.../edm/xml/v4/annotation/LabeledElement.java | 50 -----
.../annotation/LabeledElementDeserializer.java | 55 ------
.../v4/annotation/LabeledElementReference.java | 25 ---
.../v4/annotation/NavigationPropertyPath.java | 25 ---
.../client/core/edm/xml/v4/annotation/Null.java | 28 ---
.../edm/xml/v4/annotation/NullDeserializer.java | 51 ------
.../client/core/edm/xml/v4/annotation/Path.java | 25 ---
.../edm/xml/v4/annotation/PropertyPath.java | 25 ---
.../edm/xml/v4/annotation/PropertyValue.java | 50 -----
.../annotation/PropertyValueDeserializer.java | 57 ------
.../core/edm/xml/v4/annotation/Record.java | 46 -----
.../xml/v4/annotation/RecordDeserializer.java | 55 ------
.../core/edm/xml/v4/annotation/UrlRef.java | 40 ----
.../xml/v4/annotation/UrlRefDeserializer.java | 52 ------
.../core/op/impl/AbstractEdmDeserializer.java | 4 +-
.../core/op/impl/ComplexTypeDeserializer.java | 20 +-
.../op/impl/EntityContainerDeserializer.java | 22 +--
.../core/op/impl/EntitySetDeserializer.java | 12 +-
.../core/op/impl/EntityTypeDeserializer.java | 14 +-
.../core/op/impl/EnumTypeDeserializer.java | 10 +-
.../core/op/impl/ODataV4DeserializerImpl.java | 4 +-
.../client/core/op/impl/SchemaDeserializer.java | 40 ++--
.../client/core/v4/FilterFactoryTest.java | 2 +-
.../olingo/client/core/v4/MetadataTest.java | 8 +-
158 files changed, 4511 insertions(+), 4511 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmServiceMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmServiceMetadataImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmServiceMetadataImpl.java
index 74f10cf..ad3358a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmServiceMetadataImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmServiceMetadataImpl.java
@@ -27,7 +27,7 @@ import org.apache.olingo.client.api.edm.xml.v4.EntityContainer;
import org.apache.olingo.client.api.edm.xml.v4.Schema;
import org.apache.olingo.client.api.edm.xml.v4.Singleton;
import org.apache.olingo.client.core.edm.shared.AbstractEdmServiceMetadataImpl;
-import org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl;
+import org.apache.olingo.client.core.edm.xml.XMLMetadataImpl;
import org.apache.olingo.commons.api.edm.EdmActionImportInfo;
import org.apache.olingo.commons.api.edm.EdmFunctionImportInfo;
import org.apache.olingo.commons.api.edm.EdmSingletonInfo;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/shared/AbstractEdmServiceMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/shared/AbstractEdmServiceMetadataImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/shared/AbstractEdmServiceMetadataImpl.java
index 5865ae9..450ddf4 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/shared/AbstractEdmServiceMetadataImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/shared/AbstractEdmServiceMetadataImpl.java
@@ -51,7 +51,7 @@ public abstract class AbstractEdmServiceMetadataImpl implements EdmServiceMetada
? new org.apache.olingo.client.core.edm.v3.EdmServiceMetadataImpl(
(org.apache.olingo.client.core.edm.xml.v3.XMLMetadataImpl) xmlMetadata)
: new org.apache.olingo.client.core.edm.EdmServiceMetadataImpl(
- (org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl) xmlMetadata);
+ (org.apache.olingo.client.core.edm.xml.XMLMetadataImpl) xmlMetadata);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatedEdmItem.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatedEdmItem.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatedEdmItem.java
new file mode 100644
index 0000000..402597b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatedEdmItem.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.v4.AnnotatedEdmItem;
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public abstract class AbstractAnnotatedEdmItem extends AbstractEdmItem implements AnnotatedEdmItem {
+
+ private static final long serialVersionUID = -8859729466090997718L;
+
+ @JsonProperty("Annotation")
+ private AnnotationImpl annotation;
+
+ @Override
+ public AnnotationImpl getAnnotation() {
+ return annotation;
+ }
+
+ @JsonIgnore
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = (AnnotationImpl) annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.java
new file mode 100644
index 0000000..f40fa05
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionDeserializer.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;
+
+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.BooleanUtils;
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+
+public class ActionDeserializer extends AbstractEdmDeserializer<ActionImpl> {
+
+ @Override
+ protected ActionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final ActionImpl action = new ActionImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Name".equals(jp.getCurrentName())) {
+ action.setName(jp.nextTextValue());
+ } else if ("IsBound".equals(jp.getCurrentName())) {
+ action.setBound(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("EntitySetPath".equals(jp.getCurrentName())) {
+ action.setEntitySetPath(jp.nextTextValue());
+ } else if ("Parameter".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ action.getParameters().add(jp.readValueAs(ParameterImpl.class));
+ } else if ("ReturnType".equals(jp.getCurrentName())) {
+ action.setReturnType(parseReturnType(jp, "Action"));
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ action.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+ }
+ }
+ }
+
+ return action;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java
new file mode 100644
index 0000000..3a003b2
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.v4.Action;
+import org.apache.olingo.client.api.edm.xml.v4.Parameter;
+import org.apache.olingo.client.api.edm.xml.v4.ReturnType;
+
+@JsonDeserialize(using = ActionDeserializer.class)
+public class ActionImpl extends AbstractAnnotatedEdmItem implements Action {
+
+ private static final long serialVersionUID = -99977447455438193L;
+
+ private String name;
+
+ private boolean bound = false;
+
+ private String entitySetPath;
+
+ private final List<Parameter> parameters = new ArrayList<Parameter>();
+
+ private ReturnType returnType;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public boolean isBound() {
+ return bound;
+ }
+
+ public void setBound(final boolean bound) {
+ this.bound = bound;
+ }
+
+ @Override
+ public String getEntitySetPath() {
+ return entitySetPath;
+ }
+
+ public void setEntitySetPath(final String entitySetPath) {
+ this.entitySetPath = entitySetPath;
+ }
+
+ @Override
+ public Parameter getParameter(final String name) {
+ return getOneByName(name, getParameters());
+ }
+
+ @Override
+ public List<Parameter> getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public ReturnType getReturnType() {
+ return returnType;
+ }
+
+ public void setReturnType(final ReturnType returnType) {
+ this.returnType = returnType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java
new file mode 100644
index 0000000..70365fc
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
+
+public class ActionImportImpl extends AbstractAnnotatedEdmItem implements ActionImport {
+
+ private static final long serialVersionUID = -866422101558426421L;
+
+ @JsonProperty(value = "Name", required = true)
+ private String name;
+
+ @JsonProperty(value = "Action", required = true)
+ private String action;
+
+ @JsonProperty(value = "EntitySet")
+ private String entitySet;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getAction() {
+ return action;
+ }
+
+ public void setAction(final String action) {
+ this.action = action;
+ }
+
+ @Override
+ public String getEntitySet() {
+ return entitySet;
+ }
+
+ @Override
+ public void setEntitySet(final String entitySet) {
+ this.entitySet = entitySet;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.java
new file mode 100644
index 0000000..19cde13
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationDeserializer.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.client.core.edm.xml;
+
+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.client.core.edm.xml.annotation.DynExprConstructImpl;
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+
+public class AnnotationDeserializer extends AbstractEdmDeserializer<AnnotationImpl> {
+
+ @Override
+ protected AnnotationImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AnnotationImpl annotation = new AnnotationImpl();
+
+ for (; jp.getCurrentToken() != null && jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Term".equals(jp.getCurrentName())) {
+ annotation.setTerm(jp.nextTextValue());
+ } else if ("Qualifier".equals(jp.getCurrentName())) {
+ annotation.setQualifier(jp.nextTextValue());
+ } else if (isAnnotationConstExprConstruct(jp)) {
+ // Constant Expressions
+ annotation.setConstExpr(parseAnnotationConstExprConstruct(jp));
+ } else {
+ // Dynamic Expressions
+ annotation.setDynExpr(jp.readValueAs( DynExprConstructImpl.class));
+ }
+ }
+ }
+
+ return annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java
new file mode 100644
index 0000000..b891893
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.annotation.ConstExprConstruct;
+import org.apache.olingo.client.api.edm.xml.v4.annotation.DynExprConstruct;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
+
+@JsonDeserialize(using = AnnotationDeserializer.class)
+public class AnnotationImpl extends AbstractEdmItem implements Annotation {
+
+ private static final long serialVersionUID = -5600031479702563436L;
+
+ private String term;
+
+ private String qualifier;
+
+ private ConstExprConstruct constExpr;
+
+ private DynExprConstruct dynExpr;
+
+ @Override
+ public String getTerm() {
+ return term;
+ }
+
+ public void setTerm(final String term) {
+ this.term = term;
+ }
+
+ @Override
+ public String getQualifier() {
+ return qualifier;
+ }
+
+ public void setQualifier(final String qualifier) {
+ this.qualifier = qualifier;
+ }
+
+ @Override
+ public ConstExprConstruct getConstExpr() {
+ return constExpr;
+ }
+
+ public void setConstExpr(final ConstExprConstruct constExpr) {
+ this.constExpr = constExpr;
+ }
+
+ @Override
+ public DynExprConstruct getDynExpr() {
+ return dynExpr;
+ }
+
+ public void setDynExpr(final DynExprConstruct dynExpr) {
+ this.dynExpr = dynExpr;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java
new file mode 100644
index 0000000..b2df7e5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsDeserializer.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+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.client.core.op.impl.AbstractEdmDeserializer;
+
+public class AnnotationsDeserializer extends AbstractEdmDeserializer<AnnotationsImpl> {
+
+ @Override
+ protected AnnotationsImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AnnotationsImpl annotations = new AnnotationsImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Target".equals(jp.getCurrentName())) {
+ annotations.setTarget(jp.nextTextValue());
+ } else if ("Qualifier".equals(jp.getCurrentName())) {
+ annotations.setQualifier(jp.nextTextValue());
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ annotations.getAnnotations().add(jp.readValueAs( AnnotationImpl.class));
+ }
+ }
+ }
+
+ return annotations;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java
new file mode 100644
index 0000000..92eaba4
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationsImpl.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.v4.Annotations;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractAnnotations;
+
+@JsonDeserialize(using = AnnotationsDeserializer.class)
+public class AnnotationsImpl extends AbstractAnnotations implements Annotations {
+
+ private static final long serialVersionUID = 3877353656301805410L;
+
+ private final List<AnnotationImpl> annotations = new ArrayList<AnnotationImpl>();
+
+ @Override
+ public List<AnnotationImpl> getAnnotations() {
+ return annotations;
+ }
+
+ @Override
+ public AnnotationImpl getAnnotation(final String term) {
+ AnnotationImpl result = null;
+ for (AnnotationImpl annotation : getAnnotations()) {
+ if (term.equals(annotation.getTerm())) {
+ result = annotation;
+ }
+ }
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java
new file mode 100644
index 0000000..e875013
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ComplexTypeImpl.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or >ied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.ComplexType;
+import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.v4.Property;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractComplexType;
+
+public class ComplexTypeImpl extends AbstractComplexType implements ComplexType {
+
+ private static final long serialVersionUID = -1251230308269425962L;
+
+ private boolean abstractEntityType = false;
+
+ private String baseType;
+
+ private boolean openType = false;
+
+ private final List<Property> properties = new ArrayList<Property>();
+
+ private final List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
+
+ private Annotation annotation;
+
+ @Override
+ public boolean isAbstractEntityType() {
+ return abstractEntityType;
+ }
+
+ public void setAbstractEntityType(final boolean abstractEntityType) {
+ this.abstractEntityType = abstractEntityType;
+ }
+
+ @Override
+ public String getBaseType() {
+ return baseType;
+ }
+
+ public void setBaseType(final String baseType) {
+ this.baseType = baseType;
+ }
+
+ @Override
+ public boolean isOpenType() {
+ return openType;
+ }
+
+ public void setOpenType(final boolean openType) {
+ this.openType = openType;
+ }
+
+ @Override
+ public Property getProperty(final String name) {
+ return (Property) super.getProperty(name);
+ }
+
+ @Override
+ public List<Property> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public NavigationProperty getNavigationProperty(final String name) {
+ return (NavigationProperty) super.getNavigationProperty(name);
+ }
+
+ @Override
+ public List<NavigationProperty> getNavigationProperties() {
+ return navigationProperties;
+ }
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java
new file mode 100644
index 0000000..d834a18
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/DataServicesImpl.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.v4.Schema;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractDataServices;
+
+public class DataServicesImpl extends AbstractDataServices {
+
+ private static final long serialVersionUID = -7954360771258897632L;
+
+ private final List<Schema> schemas = new ArrayList<Schema>();
+
+ @Override
+ public List<Schema> getSchemas() {
+ return schemas;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java
new file mode 100644
index 0000000..5a1d63c
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EdmxImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.v4.Edmx;
+import org.apache.olingo.client.api.edm.xml.v4.Reference;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmx;
+
+public class EdmxImpl extends AbstractEdmx implements Edmx {
+
+ private static final long serialVersionUID = -8031883176876401375L;
+
+ private final List<Reference> references = new ArrayList<Reference>();
+
+ @Override
+ public DataServicesImpl getDataServices() {
+ return (DataServicesImpl) super.getDataServices();
+ }
+
+ @Override
+ public List<Reference> getReferences() {
+ return references;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.java
new file mode 100644
index 0000000..736102c
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityContainerImpl.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.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
+import org.apache.olingo.client.api.edm.xml.v4.AnnotatedEdmItem;
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.EntityContainer;
+import org.apache.olingo.client.api.edm.xml.v4.EntitySet;
+import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
+import org.apache.olingo.client.api.edm.xml.v4.Singleton;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEntityContainer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class EntityContainerImpl extends AbstractEntityContainer implements AnnotatedEdmItem, EntityContainer {
+
+ private static final long serialVersionUID = 2526002525927260320L;
+
+ private final List<EntitySet> entitySets = new ArrayList<EntitySet>();
+
+ private final List<Singleton> singletons = new ArrayList<Singleton>();
+
+ private final List<ActionImport> actionImports = new ArrayList<ActionImport>();
+
+ private final List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
+
+ private Annotation annotation;
+
+ @Override
+ public void setDefaultEntityContainer(final boolean defaultEntityContainer) {
+ // no action: a single entity container MUST be available as per OData 4.0
+ }
+
+ @Override
+ public boolean isDefaultEntityContainer() {
+ return true;
+ }
+
+ @Override
+ public EntitySet getEntitySet(final String name) {
+ return (EntitySet) super.getEntitySet(name);
+ }
+
+ @Override
+ public List<EntitySet> getEntitySets() {
+ return entitySets;
+ }
+
+ @Override
+ public List<Singleton> getSingletons() {
+ return singletons;
+ }
+
+ @Override
+ public Singleton getSingleton(final String name) {
+ return getOneByName(name, getSingletons());
+ }
+
+ @Override
+ public FunctionImport getFunctionImport(final String name) {
+ return (FunctionImport) super.getFunctionImport(name);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public List<FunctionImport> getFunctionImports(final String name) {
+ return (List<FunctionImport>) super.getFunctionImports(name);
+ }
+
+ /**
+ * Gets the first action import with given name.
+ *
+ * @param name name.
+ * @return action import.
+ */
+ @Override
+ public ActionImport getActionImport(final String name) {
+ return getOneByName(name, getActionImports());
+ }
+
+ /**
+ * Gets all action imports with given name.
+ *
+ * @param name name.
+ * @return action imports.
+ */
+ @Override
+ public List<ActionImport> getActionImports(final String name) {
+ return getAllByName(name, getActionImports());
+ }
+
+ @Override
+ public List<ActionImport> getActionImports() {
+ return actionImports;
+ }
+
+ @Override
+ public List<FunctionImport> getFunctionImports() {
+ return functionImports;
+ }
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.java
new file mode 100644
index 0000000..5c8f282
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntitySetImpl.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;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.EntitySet;
+import org.apache.olingo.client.api.edm.xml.v4.NavigationPropertyBinding;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEntitySet;
+
+public class EntitySetImpl extends AbstractEntitySet implements EntitySet {
+
+ private static final long serialVersionUID = 5570833733884884012L;
+
+ private boolean includeInServiceDocument = true;
+
+ private Annotation annotation;
+
+ private final List<NavigationPropertyBinding> navigationPropertyBindings = new ArrayList<NavigationPropertyBinding>();
+
+ @Override
+ public boolean isIncludeInServiceDocument() {
+ return includeInServiceDocument;
+ }
+
+ public void setIncludeInServiceDocument(final boolean includeInServiceDocument) {
+ this.includeInServiceDocument = includeInServiceDocument;
+ }
+
+ @Override
+ public List<NavigationPropertyBinding> getNavigationPropertyBindings() {
+ return navigationPropertyBindings;
+ }
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java
new file mode 100644
index 0000000..0384590
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EntityTypeImpl.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.EntityType;
+import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.v4.Property;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEntityType;
+
+public class EntityTypeImpl extends AbstractEntityType implements EntityType {
+
+ private static final long serialVersionUID = 8727765036150269547L;
+
+ private final List<Property> properties = new ArrayList<Property>();
+
+ private final List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
+
+ private Annotation annotation;
+
+ @Override
+ public Property getProperty(final String name) {
+ return (Property) super.getProperty(name);
+ }
+
+ @Override
+ public List<Property> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public NavigationProperty getNavigationProperty(final String name) {
+ return (NavigationProperty) super.getNavigationProperty(name);
+ }
+
+ @Override
+ public List<NavigationProperty> getNavigationProperties() {
+ return navigationProperties;
+ }
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java
new file mode 100644
index 0000000..12080aa
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/EnumTypeImpl.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.v4.AnnotatedEdmItem;
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEnumType;
+
+public class EnumTypeImpl extends AbstractEnumType implements AnnotatedEdmItem {
+
+ private static final long serialVersionUID = -3329664331877556957L;
+
+ private Annotation annotation;
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java
new file mode 100644
index 0000000..cfd43e3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionDeserializer.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import 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.BooleanUtils;
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+
+public class FunctionDeserializer extends AbstractEdmDeserializer<FunctionImpl> {
+
+ @Override
+ protected FunctionImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final FunctionImpl functionImpl = new FunctionImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Name".equals(jp.getCurrentName())) {
+ functionImpl.setName(jp.nextTextValue());
+ } else if ("IsBound".equals(jp.getCurrentName())) {
+ functionImpl.setBound(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("IsComposable".equals(jp.getCurrentName())) {
+ functionImpl.setComposable(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("EntitySetPath".equals(jp.getCurrentName())) {
+ functionImpl.setEntitySetPath(jp.nextTextValue());
+ } else if ("Parameter".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ functionImpl.getParameters().add(jp.readValueAs(ParameterImpl.class));
+ } else if ("ReturnType".equals(jp.getCurrentName())) {
+ functionImpl.setReturnType(parseReturnType(jp, "Function"));
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ functionImpl.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+ }
+ }
+ }
+
+ return functionImpl;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java
new file mode 100644
index 0000000..ac38d5f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.v4.Function;
+
+@JsonDeserialize(using = FunctionDeserializer.class)
+public class FunctionImpl extends ActionImpl implements Function {
+
+ private static final long serialVersionUID = -5888231162358116515L;
+
+ private boolean composable = false;
+
+ @Override
+ public boolean isComposable() {
+ return composable;
+ }
+
+ public void setComposable(final boolean composable) {
+ this.composable = composable;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java
new file mode 100644
index 0000000..1d1d86e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/FunctionImportImpl.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
+
+public class FunctionImportImpl implements FunctionImport {
+
+ private static final long serialVersionUID = 3023813358471000019L;
+
+ @JsonProperty(value = "Name", required = true)
+ private String name;
+
+ @JsonProperty(value = "Function", required = true)
+ private String function;
+
+ @JsonProperty(value = "EntitySet")
+ private String entitySet;
+
+ @JsonProperty(value = "IncludeInServiceDocument")
+ private boolean includeInServiceDocument = false;
+
+ @JsonProperty(value = "Annotation")
+ private Annotation annotation;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getFunction() {
+ return function;
+ }
+
+ public void setFunction(final String function) {
+ this.function = function;
+ }
+
+ @Override
+ public String getEntitySet() {
+ return entitySet;
+ }
+
+ @Override
+ public void setEntitySet(final String entitySet) {
+ this.entitySet = entitySet;
+ }
+
+ @Override
+ public boolean isIncludeInServiceDocument() {
+ return includeInServiceDocument;
+ }
+
+ public void setIncludeInServiceDocument(final boolean includeInServiceDocument) {
+ this.includeInServiceDocument = includeInServiceDocument;
+ }
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ @JsonIgnore
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java
new file mode 100644
index 0000000..69b9b46
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeAnnotationsImpl.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.v4.IncludeAnnotations;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
+
+public class IncludeAnnotationsImpl extends AbstractEdmItem implements IncludeAnnotations {
+
+ private static final long serialVersionUID = -5600031479702563436L;
+
+ @JsonProperty(value = "TermNamespace", required = true)
+ private String termNamespace;
+
+ @JsonProperty(value = "Qualifier")
+ private String qualifier;
+
+ @JsonProperty(value = "TargetNamespace")
+ private String targeyNamespace;
+
+ @Override
+ public String getTermNamespace() {
+ return termNamespace;
+ }
+
+ public void setTermNamespace(final String termNamespace) {
+ this.termNamespace = termNamespace;
+ }
+
+ @Override
+ public String getQualifier() {
+ return qualifier;
+ }
+
+ public void setQualifier(final String qualifier) {
+ this.qualifier = qualifier;
+ }
+
+ @Override
+ public String getTargeyNamespace() {
+ return targeyNamespace;
+ }
+
+ public void setTargeyNamespace(final String targeyNamespace) {
+ this.targeyNamespace = targeyNamespace;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.java
new file mode 100644
index 0000000..233ce04
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/IncludeImpl.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;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.v4.Include;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
+
+public class IncludeImpl extends AbstractEdmItem implements Include {
+
+ private static final long serialVersionUID = -5600031479702563436L;
+
+ @JsonProperty(value = "Namespace", required = true)
+ private String namespace;
+
+ @JsonProperty(value = "Alias")
+ private String alias;
+
+ @Override
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public void setNamespace(final String namespace) {
+ this.namespace = namespace;
+ }
+
+ @Override
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(final String alias) {
+ this.alias = alias;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java
new file mode 100644
index 0000000..0f1d03f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/MemberImpl.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import org.apache.olingo.client.api.edm.xml.v4.AnnotatedEdmItem;
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractMember;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class MemberImpl extends AbstractMember implements AnnotatedEdmItem {
+
+ private static final long serialVersionUID = -344920557183058824L;
+
+ @JsonProperty("Annotation")
+ private Annotation annotation;
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ @JsonIgnore
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.java
new file mode 100644
index 0000000..558dd72
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyBindingImpl.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;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.v4.NavigationPropertyBinding;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
+
+public class NavigationPropertyBindingImpl extends AbstractEdmItem implements NavigationPropertyBinding {
+
+ private static final long serialVersionUID = -6026065326479176817L;
+
+ @JsonProperty(value = "Path", required = true)
+ private String path;
+
+ @JsonProperty(value = "Target", required = true)
+ private String target;
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(final String path) {
+ this.path = path;
+ }
+
+ @Override
+ public String getTarget() {
+ return target;
+ }
+
+ public void setTarget(final String target) {
+ this.target = target;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java
new file mode 100644
index 0000000..0c23309
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyDeserializer.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import org.apache.olingo.client.core.edm.xml.shared.OnDeleteImpl;
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+
+public class NavigationPropertyDeserializer extends AbstractEdmDeserializer<NavigationPropertyImpl> {
+
+ @Override
+ protected NavigationPropertyImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final NavigationPropertyImpl property = new NavigationPropertyImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Name".equals(jp.getCurrentName())) {
+ property.setName(jp.nextTextValue());
+ } else if ("Type".equals(jp.getCurrentName())) {
+ property.setType(jp.nextTextValue());
+ } else if ("Nullable".equals(jp.getCurrentName())) {
+ property.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("Partner".equals(jp.getCurrentName())) {
+ property.setPartner(jp.nextTextValue());
+ } else if ("ContainsTarget".equals(jp.getCurrentName())) {
+ property.setContainsTarget(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("ReferentialConstraint".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ property.getReferentialConstraints().add(jp.readValueAs(ReferentialConstraintImpl.class));
+ } else if ("OnDelete".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ property.setOnDelete(jp.readValueAs(OnDeleteImpl.class));
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ property.setAnnotation(jp.readValueAs(AnnotationImpl.class));
+ }
+ }
+ }
+
+ return property;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java
new file mode 100644
index 0000000..631aa8d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/NavigationPropertyImpl.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.OnDelete;
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
+import org.apache.olingo.client.api.edm.xml.v4.ReferentialConstraint;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractNavigationProperty;
+
+@JsonDeserialize(using = NavigationPropertyDeserializer.class)
+public class NavigationPropertyImpl extends AbstractNavigationProperty implements NavigationProperty {
+
+ private static final long serialVersionUID = -2889417442815563307L;
+
+ private String type;
+
+ private boolean nullable = true;
+
+ private String partner;
+
+ private boolean containsTarget = false;
+
+ private final List<ReferentialConstraint> referentialConstraints = new ArrayList<ReferentialConstraint>();
+
+ private OnDelete onDelete;
+
+ private Annotation annotation;
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ @Override
+ public boolean isNullable() {
+ return nullable;
+ }
+
+ public void setNullable(final boolean nullable) {
+ this.nullable = nullable;
+ }
+
+ @Override
+ public String getPartner() {
+ return partner;
+ }
+
+ public void setPartner(final String partner) {
+ this.partner = partner;
+ }
+
+ @Override
+ public boolean isContainsTarget() {
+ return containsTarget;
+ }
+
+ public void setContainsTarget(final boolean containsTarget) {
+ this.containsTarget = containsTarget;
+ }
+
+ @Override
+ public List<ReferentialConstraint> getReferentialConstraints() {
+ return referentialConstraints;
+ }
+
+ @Override
+ public OnDelete getOnDelete() {
+ return onDelete;
+ }
+
+ public void setOnDelete(final OnDelete onDelete) {
+ this.onDelete = onDelete;
+ }
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.java
new file mode 100644
index 0000000..1375e4d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ParameterImpl.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;
+
+import org.apache.olingo.client.api.edm.xml.v4.Parameter;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractParameter;
+
+public class ParameterImpl extends AbstractParameter implements Parameter {
+
+ private static final long serialVersionUID = -1067642515116697747L;
+
+ private String srid;
+
+ @Override
+ public String getSrid() {
+ return srid;
+ }
+
+ public void setSrid(final String srid) {
+ this.srid = srid;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.java
new file mode 100644
index 0000000..59d0398
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/PropertyImpl.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;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import org.apache.olingo.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.client.api.edm.xml.v4.Property;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractProperty;
+
+public class PropertyImpl extends AbstractProperty implements Property {
+
+ private static final long serialVersionUID = -5541908235094985412L;
+
+ private Annotation annotation;
+
+ @Override
+ public Annotation getAnnotation() {
+ return annotation;
+ }
+
+ @JsonIgnore
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = annotation;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/87c3bcb2/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java
new file mode 100644
index 0000000..22647e6
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ReferenceDeserializer.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+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.net.URI;
+
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+
+public class ReferenceDeserializer extends AbstractEdmDeserializer<ReferenceImpl> {
+
+ @Override
+ protected ReferenceImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final ReferenceImpl reference = new ReferenceImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Uri".equals(jp.getCurrentName())) {
+ reference.setUri(URI.create(jp.nextTextValue()));
+ } else if ("Include".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ reference.getIncludes().add(jp.readValueAs( IncludeImpl.class));
+ } else if ("IncludeAnnotations".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ reference.getIncludeAnnotations().add(jp.readValueAs( IncludeAnnotationsImpl.class));
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ reference.getAnnotations().add(jp.readValueAs( AnnotationImpl.class));
+ }
+ }
+ }
+
+ return reference;
+ }
+
+}