You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/05 16:06:22 UTC
[03/22] [OLINGO-169] Package renaming according to latest ML
discussion
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationDeserializer.java
new file mode 100644
index 0000000..0de5a19
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationDeserializer.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.op.impl.AbstractEdmDeserializer;
+
+public class AssociationDeserializer extends AbstractEdmDeserializer<AssociationImpl> {
+
+ @Override
+ protected AssociationImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AssociationImpl association = new AssociationImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Name".equals(jp.getCurrentName())) {
+ association.setName(jp.nextTextValue());
+ } else if ("ReferentialConstraint".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ association.setReferentialConstraint(jp.readValueAs( ReferentialConstraintImpl.class));
+ } else if ("End".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ association.getEnds().add(jp.readValueAs( AssociationEndImpl.class));
+ }
+ }
+ }
+
+ return association;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationEndImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationEndImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationEndImpl.java
new file mode 100644
index 0000000..e6494b4
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationEndImpl.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.OnDelete;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.AssociationEnd;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+public class AssociationEndImpl extends AbstractEdmItem implements AssociationEnd {
+
+ private static final long serialVersionUID = 3305394053564979376L;
+
+ @JsonProperty(value = "Type", required = true)
+ private String type;
+
+ @JsonProperty(value = "Role")
+ private String role;
+
+ @JsonProperty(value = "Multiplicity")
+ private String multiplicity;
+
+ @JsonProperty(value = "OnDelete")
+ private OnDelete onDelete;
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ @Override
+ public String getRole() {
+ return role;
+ }
+
+ @Override
+ public void setRole(final String role) {
+ this.role = role;
+ }
+
+ @Override
+ public String getMultiplicity() {
+ return multiplicity;
+ }
+
+ @Override
+ public void setMultiplicity(final String multiplicity) {
+ this.multiplicity = multiplicity;
+ }
+
+ @Override
+ public OnDelete getOnDelete() {
+ return onDelete;
+ }
+
+ @Override
+ public void setOnDelete(final OnDelete onDelete) {
+ this.onDelete = onDelete;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationImpl.java
new file mode 100644
index 0000000..35572bd
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationImpl.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.Association;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.ReferentialConstraint;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+@JsonDeserialize(using = AssociationDeserializer.class)
+public class AssociationImpl extends AbstractEdmItem implements Association {
+
+ private static final long serialVersionUID = 73763231919532482L;
+
+ private String name;
+
+ private ReferentialConstraint referentialConstraint;
+
+ private List<AssociationEndImpl> ends = new ArrayList<AssociationEndImpl>();
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public ReferentialConstraint getReferentialConstraint() {
+ return referentialConstraint;
+ }
+
+ @Override
+ public void setReferentialConstraint(final ReferentialConstraint referentialConstraint) {
+ this.referentialConstraint = referentialConstraint;
+ }
+
+ @Override
+ public List<AssociationEndImpl> getEnds() {
+ return ends;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetDeserializer.java
new file mode 100644
index 0000000..16cae5a
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetDeserializer.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.op.impl.AbstractEdmDeserializer;
+
+public class AssociationSetDeserializer extends AbstractEdmDeserializer<AssociationSetImpl> {
+
+ @Override
+ protected AssociationSetImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AssociationSetImpl associationSet = new AssociationSetImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Name".equals(jp.getCurrentName())) {
+ associationSet.setName(jp.nextTextValue());
+ } else if ("Association".equals(jp.getCurrentName())) {
+ associationSet.setAssociation(jp.nextTextValue());
+ } else if ("End".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ associationSet.getEnds().add(jp.readValueAs( AssociationSetEndImpl.class));
+ }
+ }
+ }
+
+ return associationSet;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetEndImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetEndImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetEndImpl.java
new file mode 100644
index 0000000..08cc6b2
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetEndImpl.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.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.AssociationSetEnd;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+public class AssociationSetEndImpl extends AbstractEdmItem implements AssociationSetEnd {
+
+ private static final long serialVersionUID = -6238344152962217446L;
+
+ @JsonProperty("Role")
+ private String role;
+
+ @JsonProperty(value = "EntitySet", required = true)
+ private String entitySet;
+
+ @Override
+ public String getRole() {
+ return role;
+ }
+
+ @Override
+ public void setRole(final String role) {
+ this.role = role;
+ }
+
+ @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/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetImpl.java
new file mode 100644
index 0000000..70ca595
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/AssociationSetImpl.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.AssociationSet;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+@JsonDeserialize(using = AssociationSetDeserializer.class)
+public class AssociationSetImpl extends AbstractEdmItem implements AssociationSet {
+
+ private static final long serialVersionUID = 1248430921598774799L;
+
+ private String name;
+
+ private String association;
+
+ private List<AssociationSetEndImpl> ends = new ArrayList<AssociationSetEndImpl>();
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getAssociation() {
+ return association;
+ }
+
+ @Override
+ public void setAssociation(final String association) {
+ this.association = association;
+ }
+
+ @Override
+ public List<AssociationSetEndImpl> getEnds() {
+ return ends;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ComplexTypeImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ComplexTypeImpl.java
new file mode 100644
index 0000000..276cac1
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ComplexTypeImpl.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.odata4.client.core.edm.xml.v3;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.ComplexType;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractComplexType;
+
+public class ComplexTypeImpl extends AbstractComplexType implements ComplexType {
+
+ private static final long serialVersionUID = -1251230308269425962L;
+
+ private final List<PropertyImpl> properties = new ArrayList<PropertyImpl>();
+
+ private final List<NavigationPropertyImpl> navigationProperties = new ArrayList<NavigationPropertyImpl>();
+
+ @Override
+ public PropertyImpl getProperty(final String name) {
+ return (PropertyImpl) super.getProperty(name);
+ }
+
+ @Override
+ public List<PropertyImpl> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public NavigationPropertyImpl getNavigationProperty(String name) {
+ return (NavigationPropertyImpl) super.getNavigationProperty(name);
+ }
+
+ @Override
+ public List<NavigationPropertyImpl> getNavigationProperties() {
+ return navigationProperties;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/DataServicesImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/DataServicesImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/DataServicesImpl.java
new file mode 100644
index 0000000..78c68ca
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/DataServicesImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractDataServices;
+
+public class DataServicesImpl extends AbstractDataServices {
+
+ private static final long serialVersionUID = 633129618050875211L;
+
+ private final List<SchemaImpl> schemas = new ArrayList<SchemaImpl>();
+
+ @Override
+ public List<SchemaImpl> getSchemas() {
+ return schemas;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EdmxImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EdmxImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EdmxImpl.java
new file mode 100644
index 0000000..a64d5eb
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EdmxImpl.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmx;
+
+public class EdmxImpl extends AbstractEdmx {
+
+ private static final long serialVersionUID = -8031883176876401375L;
+
+ @Override
+ public DataServicesImpl getDataServices() {
+ return (DataServicesImpl) super.getDataServices();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityContainerImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityContainerImpl.java
new file mode 100644
index 0000000..8ac2f16
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityContainerImpl.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEntityContainer;
+
+public class EntityContainerImpl extends AbstractEntityContainer {
+
+ private static final long serialVersionUID = 8934431875078180370L;
+
+ private final List<EntitySetImpl> entitySets = new ArrayList<EntitySetImpl>();
+
+ private final List<AssociationSetImpl> associationSets = new ArrayList<AssociationSetImpl>();
+
+ private final List<FunctionImportImpl> functionImports = new ArrayList<FunctionImportImpl>();
+
+ @Override
+ public EntitySetImpl getEntitySet(final String name) {
+ return (EntitySetImpl) super.getEntitySet(name);
+ }
+
+ @Override
+ public List<EntitySetImpl> getEntitySets() {
+ return entitySets;
+ }
+
+ public List<AssociationSetImpl> getAssociationSets() {
+ return associationSets;
+ }
+
+ @Override
+ public FunctionImportImpl getFunctionImport(final String name) {
+ return (FunctionImportImpl) super.getFunctionImport(name);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public List<FunctionImportImpl> getFunctionImports(final String name) {
+ return (List<FunctionImportImpl>) super.getFunctionImports(name);
+ }
+
+ @Override
+ public List<FunctionImportImpl> getFunctionImports() {
+ return functionImports;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntitySetImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntitySetImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntitySetImpl.java
new file mode 100644
index 0000000..bc28cc6
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntitySetImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEntitySet;
+
+public class EntitySetImpl extends AbstractEntitySet {
+
+ private static final long serialVersionUID = 5570833733884884012L;
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityTypeImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityTypeImpl.java
new file mode 100644
index 0000000..7f10fa6
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EntityTypeImpl.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEntityType;
+
+public class EntityTypeImpl extends AbstractEntityType {
+
+ private static final long serialVersionUID = 8727765036150269547L;
+
+ private final List<PropertyImpl> properties = new ArrayList<PropertyImpl>();
+
+ private final List<NavigationPropertyImpl> navigationProperties = new ArrayList<NavigationPropertyImpl>();
+
+ @Override
+ public PropertyImpl getProperty(final String name) {
+ return (PropertyImpl) super.getProperty(name);
+ }
+
+ @Override
+ public List<PropertyImpl> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public NavigationPropertyImpl getNavigationProperty(final String name) {
+ return (NavigationPropertyImpl) super.getNavigationProperty(name);
+ }
+
+ @Override
+ public List<NavigationPropertyImpl> getNavigationProperties() {
+ return navigationProperties;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EnumTypeImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EnumTypeImpl.java
new file mode 100644
index 0000000..9185f45
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/EnumTypeImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEnumType;
+
+public class EnumTypeImpl extends AbstractEnumType {
+
+ private static final long serialVersionUID = 8967396195669128419L;
+
+ private final List<MemberImpl> members = new ArrayList<MemberImpl>();
+
+ @Override
+ public List<MemberImpl> getMembers() {
+ return members;
+ }
+
+ @Override
+ public MemberImpl getMember(final String name) {
+ return (MemberImpl) super.getMember(name);
+ }
+
+ @Override
+ public MemberImpl getMember(final Integer value) {
+ return (MemberImpl) super.getMember(value);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportDeserializer.java
new file mode 100644
index 0000000..bdb5a1c
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportDeserializer.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+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.odata4.client.core.op.impl.AbstractEdmDeserializer;
+
+public class FunctionImportDeserializer extends AbstractEdmDeserializer<FunctionImportImpl> {
+
+ @Override
+ protected FunctionImportImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final FunctionImportImpl funcImp = new FunctionImportImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Name".equals(jp.getCurrentName())) {
+ funcImp.setName(jp.nextTextValue());
+ } else if ("ReturnType".equals(jp.getCurrentName())) {
+ funcImp.setReturnType(jp.nextTextValue());
+ } else if ("EntitySet".equals(jp.getCurrentName())) {
+ funcImp.setEntitySet(jp.nextTextValue());
+ } else if ("EntitySetPath".equals(jp.getCurrentName())) {
+ funcImp.setEntitySetPath(jp.nextTextValue());
+ } else if ("IsComposable".equals(jp.getCurrentName())) {
+ funcImp.setComposable(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("IsSideEffecting".equals(jp.getCurrentName())) {
+ funcImp.setSideEffecting(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("IsBindable".equals(jp.getCurrentName())) {
+ funcImp.setBindable(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("IsAlwaysBindable".equals(jp.getCurrentName())) {
+ funcImp.setAlwaysBindable(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("HttpMethod".equals(jp.getCurrentName())) {
+ funcImp.setHttpMethod(jp.nextTextValue());
+ } else if ("Parameter".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ funcImp.getParameters().add(jp.readValueAs( ParameterImpl.class));
+ }
+ }
+ }
+
+ return funcImp;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportImpl.java
new file mode 100644
index 0000000..234b623
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/FunctionImportImpl.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.FunctionImport;
+
+@JsonDeserialize(using = FunctionImportDeserializer.class)
+public class FunctionImportImpl implements FunctionImport {
+
+ private static final long serialVersionUID = -6214472528425935461L;
+
+ private String name;
+
+ private String returnType;
+
+ private String entitySet;
+
+ private String entitySetPath;
+
+ private boolean composable;
+
+ private boolean sideEffecting = true;
+
+ private boolean bindable;
+
+ private boolean alwaysBindable;
+
+ private String httpMethod;
+
+ private final List<ParameterImpl> parameters = new ArrayList<ParameterImpl>();
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getReturnType() {
+ return returnType;
+ }
+
+ @Override
+ public void setReturnType(final String returnType) {
+ this.returnType = returnType;
+ }
+
+ @Override
+ public String getEntitySet() {
+ return entitySet;
+ }
+
+ @Override
+ public void setEntitySet(final String entitySet) {
+ this.entitySet = entitySet;
+ }
+
+ @Override
+ public String getEntitySetPath() {
+ return entitySetPath;
+ }
+
+ @Override
+ public void setEntitySetPath(final String entitySetPath) {
+ this.entitySetPath = entitySetPath;
+ }
+
+ @Override
+ public boolean isComposable() {
+ return composable;
+ }
+
+ @Override
+ public void setComposable(final boolean composable) {
+ this.composable = composable;
+ }
+
+ @Override
+ public boolean isSideEffecting() {
+ return sideEffecting;
+ }
+
+ @Override
+ public void setSideEffecting(final boolean sideEffecting) {
+ this.sideEffecting = sideEffecting;
+ }
+
+ @Override
+ public boolean isBindable() {
+ return bindable;
+ }
+
+ @Override
+ public void setBindable(final boolean bindable) {
+ this.bindable = bindable;
+ }
+
+ @Override
+ public boolean isAlwaysBindable() {
+ return alwaysBindable;
+ }
+
+ @Override
+ public void setAlwaysBindable(final boolean alwaysBindable) {
+ this.alwaysBindable = alwaysBindable;
+ }
+
+ @Override
+ public String getHttpMethod() {
+ return httpMethod;
+ }
+
+ @Override
+ public void setHttpMethod(final String httpMethod) {
+ this.httpMethod = httpMethod;
+ }
+
+ @Override
+ public List<ParameterImpl> getParameters() {
+ return parameters;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/MemberImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/MemberImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/MemberImpl.java
new file mode 100644
index 0000000..91577f7
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/MemberImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractMember;
+
+public class MemberImpl extends AbstractMember {
+
+ private static final long serialVersionUID = 6605381518349837929L;
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/NavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/NavigationPropertyImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/NavigationPropertyImpl.java
new file mode 100644
index 0000000..cbda596
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/NavigationPropertyImpl.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.NavigationProperty;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractNavigationProperty;
+
+public class NavigationPropertyImpl extends AbstractNavigationProperty implements NavigationProperty {
+
+ private static final long serialVersionUID = -2889417442815563307L;
+
+ @JsonProperty(value = "Relationship", required = true)
+ private String relationship;
+
+ @JsonProperty(value = "ToRole", required = true)
+ private String toRole;
+
+ @JsonProperty(value = "FromRole", required = true)
+ private String fromRole;
+
+ @Override
+ public String getRelationship() {
+ return relationship;
+ }
+
+ @Override
+ public void setRelationship(final String relationship) {
+ this.relationship = relationship;
+ }
+
+ @Override
+ public String getToRole() {
+ return toRole;
+ }
+
+ @Override
+ public void setToRole(final String toRole) {
+ this.toRole = toRole;
+ }
+
+ @Override
+ public String getFromRole() {
+ return fromRole;
+ }
+
+ @Override
+ public void setFromRole(final String fromRole) {
+ this.fromRole = fromRole;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ParameterImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ParameterImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ParameterImpl.java
new file mode 100644
index 0000000..d0a8559
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ParameterImpl.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import org.apache.olingo.odata4.client.api.edm.xml.v3.ParameterMode;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.Parameter;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractParameter;
+
+public class ParameterImpl extends AbstractParameter implements Parameter {
+
+ private static final long serialVersionUID = 7596724999614891358L;
+
+ @JsonProperty("Mode")
+ private ParameterMode mode;
+
+ @Override
+ public ParameterMode getMode() {
+ return mode;
+ }
+
+ @Override
+ public void setMode(final ParameterMode mode) {
+ this.mode = mode;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyImpl.java
new file mode 100644
index 0000000..b4bf986
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyImpl.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.Property;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractProperty;
+import org.apache.olingo.odata4.commons.api.edm.constants.EdmContentKind;
+
+public class PropertyImpl extends AbstractProperty implements Property {
+
+ private static final long serialVersionUID = 6224524803474652100L;
+
+ @JsonProperty("FC_SourcePath")
+ private String fcSourcePath;
+
+ @JsonProperty("FC_TargetPath")
+ private String fcTargetPath;
+
+ @JsonProperty("FC_ContentKind")
+ private EdmContentKind fcContentKind = EdmContentKind.text;
+
+ @JsonProperty("FC_NsPrefix")
+ private String fcNSPrefix;
+
+ @JsonProperty("FC_NsUri")
+ private String fcNSURI;
+
+ @JsonProperty("FC_KeepInContent")
+ private boolean fcKeepInContent = true;
+
+ public String getFcSourcePath() {
+ return fcSourcePath;
+ }
+
+ public void setFcSourcePath(final String fcSourcePath) {
+ this.fcSourcePath = fcSourcePath;
+ }
+
+ public String getFcTargetPath() {
+ return fcTargetPath;
+ }
+
+ public void setFcTargetPath(final String fcTargetPath) {
+ this.fcTargetPath = fcTargetPath;
+ }
+
+ public EdmContentKind getFcContentKind() {
+ return fcContentKind;
+ }
+
+ public void setFcContentKind(final EdmContentKind fcContentKind) {
+ this.fcContentKind = fcContentKind;
+ }
+
+ public String getFcNSPrefix() {
+ return fcNSPrefix;
+ }
+
+ public void setFcNSPrefix(final String fcNSPrefix) {
+ this.fcNSPrefix = fcNSPrefix;
+ }
+
+ public String getFcNSURI() {
+ return fcNSURI;
+ }
+
+ public void setFcNSURI(final String fcNSURI) {
+ this.fcNSURI = fcNSURI;
+ }
+
+ public boolean isFcKeepInContent() {
+ return fcKeepInContent;
+ }
+
+ public void setFcKeepInContent(final boolean fcKeepInContent) {
+ this.fcKeepInContent = fcKeepInContent;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyValueImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyValueImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyValueImpl.java
new file mode 100644
index 0000000..5b4042a
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/PropertyValueImpl.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.PropertyValue;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+public class PropertyValueImpl extends AbstractEdmItem implements PropertyValue {
+
+ private static final long serialVersionUID = -6580934436491418564L;
+
+ @JsonProperty(value = "Property", required = true)
+ private String property;
+
+ @JsonProperty("Path")
+ private String path;
+
+ @JsonProperty("String")
+ private String string;
+
+ @JsonProperty("Int")
+ private BigInteger _int;
+
+ @JsonProperty("Float")
+ private Double _float;
+
+ @JsonProperty("Decimal")
+ private BigDecimal decimal;
+
+ @JsonProperty("Bool")
+ private Boolean bool;
+
+ @JsonProperty("DateTime")
+ private Date dateTime;
+
+ @Override
+ public String getProperty() {
+ return property;
+ }
+
+ @Override
+ public void setProperty(final String property) {
+ this.property = property;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(final String path) {
+ this.path = path;
+ }
+
+ @Override
+ public String getString() {
+ return string;
+ }
+
+ @Override
+ public void setString(final String string) {
+ this.string = string;
+ }
+
+ @Override
+ public BigInteger getInt() {
+ return _int;
+ }
+
+ @Override
+ public void setInt(final BigInteger _int) {
+ this._int = _int;
+ }
+
+ @Override
+ public Double getFloat() {
+ return _float;
+ }
+
+ @Override
+ public void setFloat(final Double _float) {
+ this._float = _float;
+ }
+
+ @Override
+ public BigDecimal getDecimal() {
+ return decimal;
+ }
+
+ @Override
+ public void setDecimal(final BigDecimal decimal) {
+ this.decimal = decimal;
+ }
+
+ @Override
+ public Boolean getBool() {
+ return bool;
+ }
+
+ @Override
+ public void setBool(final Boolean bool) {
+ this.bool = bool;
+ }
+
+ @Override
+ public Date getDateTime() {
+ return dateTime;
+ }
+
+ @Override
+ public void setDateTime(final Date dateTime) {
+ this.dateTime = dateTime;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintImpl.java
new file mode 100644
index 0000000..af8f8ce
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintImpl.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.ReferentialConstraint;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.ReferentialConstraintRole;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+public class ReferentialConstraintImpl extends AbstractEdmItem implements ReferentialConstraint {
+
+ private static final long serialVersionUID = 9067893732765127269L;
+
+ @JsonProperty(value = "Principal", required = true)
+ private ReferentialConstraintRoleImpl principal;
+
+ @JsonProperty(value = "Dependent", required = true)
+ private ReferentialConstraintRoleImpl dependent;
+
+ @Override
+ public ReferentialConstraintRoleImpl getPrincipal() {
+ return principal;
+ }
+
+ @JsonIgnore
+ @Override
+ public void setPrincipal(final ReferentialConstraintRole principal) {
+ this.principal = (ReferentialConstraintRoleImpl) principal;
+ }
+
+ @Override
+ public ReferentialConstraintRoleImpl getDependent() {
+ return dependent;
+ }
+
+ @JsonIgnore
+ @Override
+ public void setDependent(final ReferentialConstraintRole dependent) {
+ this.dependent = (ReferentialConstraintRoleImpl) dependent;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
new file mode 100644
index 0000000..b565225
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.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.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.odata4.client.core.edm.xml.PropertyRefImpl;
+
+public class ReferentialConstraintRoleDeserializer extends AbstractEdmDeserializer<ReferentialConstraintRoleImpl> {
+
+ @Override
+ protected ReferentialConstraintRoleImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final ReferentialConstraintRoleImpl refConstRole = new ReferentialConstraintRoleImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Role".equals(jp.getCurrentName())) {
+ refConstRole.setRole(jp.nextTextValue());
+ } else if ("PropertyRef".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ refConstRole.getPropertyRefs().add(jp.readValueAs( PropertyRefImpl.class));
+ }
+ }
+ }
+
+ return refConstRole;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java
new file mode 100644
index 0000000..edd7ff6
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.ReferentialConstraintRole;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.odata4.client.core.edm.xml.PropertyRefImpl;
+
+@JsonDeserialize(using = ReferentialConstraintRoleDeserializer.class)
+public class ReferentialConstraintRoleImpl extends AbstractEdmItem implements ReferentialConstraintRole {
+
+ private static final long serialVersionUID = -3712887115248634164L;
+
+ private String role;
+
+ private List<PropertyRefImpl> propertyRefs = new ArrayList<PropertyRefImpl>();
+
+ @Override
+ public String getRole() {
+ return role;
+ }
+
+ @Override
+ public void setRole(final String role) {
+ this.role = role;
+ }
+
+ public List<PropertyRefImpl> getPropertyRefs() {
+ return propertyRefs;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/SchemaImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/SchemaImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/SchemaImpl.java
new file mode 100644
index 0000000..70257b1
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/SchemaImpl.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.Schema;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractSchema;
+
+public class SchemaImpl extends AbstractSchema implements Schema {
+
+ private static final long serialVersionUID = 4453992249818796144L;
+
+ private final List<AnnotationsImpl> annotationList = new ArrayList<AnnotationsImpl>();
+
+ private final List<AssociationImpl> associations = new ArrayList<AssociationImpl>();
+
+ private final List<ComplexTypeImpl> complexTypes = new ArrayList<ComplexTypeImpl>();
+
+ private final List<EntityContainerImpl> entityContainers = new ArrayList<EntityContainerImpl>();
+
+ private final List<EntityTypeImpl> entityTypes = new ArrayList<EntityTypeImpl>();
+
+ private final List<EnumTypeImpl> enumTypes = new ArrayList<EnumTypeImpl>();
+
+ private final List<UsingImpl> usings = new ArrayList<UsingImpl>();
+
+ private final List<ValueTermImpl> valueTerms = new ArrayList<ValueTermImpl>();
+
+ public AssociationImpl getAssociation(final String name) {
+ return getOneByName(name, getAssociations());
+ }
+
+ @Override
+ public List<AnnotationsImpl> getAnnotationsList() {
+ return annotationList;
+ }
+
+ @Override
+ public AnnotationsImpl getAnnotationsList(final String target) {
+ AnnotationsImpl result = null;
+ for (AnnotationsImpl annots : getAnnotationsList()) {
+ if (target.equals(annots.getTarget())) {
+ result = annots;
+ }
+ }
+ return result;
+ }
+
+ public List<AssociationImpl> getAssociations() {
+ return associations;
+ }
+
+ public List<UsingImpl> getUsings() {
+ return usings;
+ }
+
+ public List<ValueTermImpl> getValueTerms() {
+ return valueTerms;
+ }
+
+ @Override
+ public List<EntityContainerImpl> getEntityContainers() {
+ return entityContainers;
+ }
+
+ @Override
+ public EntityContainerImpl getDefaultEntityContainer() {
+ EntityContainerImpl result = null;
+ for (EntityContainerImpl container : getEntityContainers()) {
+ if (container.isDefaultEntityContainer()) {
+ result = container;
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public EntityContainerImpl getEntityContainer(final String name) {
+ return getOneByName(name, getEntityContainers());
+ }
+
+ @Override
+ public EnumTypeImpl getEnumType(final String name) {
+ return (EnumTypeImpl) super.getEnumType(name);
+ }
+
+ @Override
+ public List<EnumTypeImpl> getEnumTypes() {
+ return enumTypes;
+ }
+
+ @Override
+ public ComplexTypeImpl getComplexType(final String name) {
+ return (ComplexTypeImpl) super.getComplexType(name);
+ }
+
+ @Override
+ public List<ComplexTypeImpl> getComplexTypes() {
+ return complexTypes;
+ }
+
+ @Override
+ public EntityTypeImpl getEntityType(final String name) {
+ return (EntityTypeImpl) super.getEntityType(name);
+ }
+
+ @Override
+ public List<EntityTypeImpl> getEntityTypes() {
+ return entityTypes;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationDeserializer.java
new file mode 100644
index 0000000..c6a10bc
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationDeserializer.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.olingo.odata4.client.core.op.impl.AbstractEdmDeserializer;
+
+public class TypeAnnotationDeserializer extends AbstractEdmDeserializer<TypeAnnotationImpl> {
+
+ @Override
+ protected TypeAnnotationImpl doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final TypeAnnotationImpl typeAnnot = new TypeAnnotationImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Term".equals(jp.getCurrentName())) {
+ typeAnnot.setTerm(jp.nextTextValue());
+ } else if ("Qualifier".equals(jp.getCurrentName())) {
+ typeAnnot.setQualifier(jp.nextTextValue());
+ } else if ("PropertyValue".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ typeAnnot.getPropertyValues().add(jp.readValueAs( PropertyValueImpl.class));
+ }
+ }
+ }
+
+ return typeAnnot;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationImpl.java
new file mode 100644
index 0000000..acfc7ce
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/TypeAnnotationImpl.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.TypeAnnotation;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+@JsonDeserialize(using = TypeAnnotationDeserializer.class)
+public class TypeAnnotationImpl extends AbstractEdmItem implements TypeAnnotation {
+
+ private static final long serialVersionUID = -7585489230017331877L;
+
+ private String term;
+
+ private String qualifier;
+
+ private List<PropertyValueImpl> propertyValues = new ArrayList<PropertyValueImpl>();
+
+ @Override
+ public String getTerm() {
+ return term;
+ }
+
+ @Override
+ public void setTerm(final String term) {
+ this.term = term;
+ }
+
+ @Override
+ public String getQualifier() {
+ return qualifier;
+ }
+
+ @Override
+ public void setQualifier(final String qualifier) {
+ this.qualifier = qualifier;
+ }
+
+ @Override
+ public List<PropertyValueImpl> getPropertyValues() {
+ return propertyValues;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/UsingImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/UsingImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/UsingImpl.java
new file mode 100644
index 0000000..0c77371
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/UsingImpl.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.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.Using;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+public class UsingImpl extends AbstractEdmItem implements Using {
+
+ private static final long serialVersionUID = 2086957510154443445L;
+
+ @JsonProperty(value = "Namespace", required = true)
+ private String namespace;
+
+ @JsonProperty("Alias")
+ private String alias;
+
+ @Override
+ public String getNamespace() {
+ return namespace;
+ }
+
+ @Override
+ public void setNamespace(final String namespace) {
+ this.namespace = namespace;
+ }
+
+ @Override
+ public String getAlias() {
+ return alias;
+ }
+
+ @Override
+ public void setAlias(final String alias) {
+ this.alias = alias;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueAnnotationImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueAnnotationImpl.java
new file mode 100644
index 0000000..20d31f5
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueAnnotationImpl.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.ValueAnnotation;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+public class ValueAnnotationImpl extends AbstractEdmItem implements ValueAnnotation {
+
+ private static final long serialVersionUID = -1826414005417952278L;
+
+ @JsonProperty(value = "Term", required = true)
+ private String term;
+
+ @JsonProperty("Qualifier")
+ private String qualifier;
+
+ @JsonProperty("Path")
+ private String path;
+
+ @JsonProperty("String")
+ private String string;
+
+ @JsonProperty("Int")
+ private BigInteger _int;
+
+ @JsonProperty("Float")
+ private Double _float;
+
+ @JsonProperty("Decimal")
+ private BigDecimal decimal;
+
+ @JsonProperty("Bool")
+ private Boolean bool;
+
+ @JsonProperty("DateTime")
+ private Date dateTime;
+
+ @Override
+ public String getTerm() {
+ return term;
+ }
+
+ @Override
+ public void setTerm(final String term) {
+ this.term = term;
+ }
+
+ @Override
+ public String getQualifier() {
+ return qualifier;
+ }
+
+ @Override
+ public void setQualifier(final String qualifier) {
+ this.qualifier = qualifier;
+ }
+
+ @Override
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public void setPath(final String path) {
+ this.path = path;
+ }
+
+ @Override
+ public String getString() {
+ return string;
+ }
+
+ @Override
+ public void setString(final String string) {
+ this.string = string;
+ }
+
+ @Override
+ public BigInteger getInt() {
+ return _int;
+ }
+
+ @Override
+ public void setInt(final BigInteger _int) {
+ this._int = _int;
+ }
+
+ @Override
+ public Double getFloat() {
+ return _float;
+ }
+
+ @Override
+ public void setFloat(final Double _float) {
+ this._float = _float;
+ }
+
+ @Override
+ public BigDecimal getDecimal() {
+ return decimal;
+ }
+
+ @Override
+ public void setDecimal(final BigDecimal decimal) {
+ this.decimal = decimal;
+ }
+
+ @Override
+ public Boolean getBool() {
+ return bool;
+ }
+
+ @Override
+ public void setBool(final Boolean bool) {
+ this.bool = bool;
+ }
+
+ @Override
+ public Date getDateTime() {
+ return dateTime == null ? null : new Date(dateTime.getTime());
+ }
+
+ @Override
+ public void setDateTime(final Date dateTime) {
+ this.dateTime = dateTime == null ? null : new Date(dateTime.getTime());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueTermImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueTermImpl.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueTermImpl.java
new file mode 100644
index 0000000..c13a29f
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v3/ValueTermImpl.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.odata4.client.core.edm.xml.v3;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v3.ValueTerm;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+public class ValueTermImpl extends AbstractEdmItem implements ValueTerm {
+
+ private static final long serialVersionUID = 6149019886137610604L;
+
+ @JsonProperty(value = "Name", required = true)
+ private String name;
+
+ @JsonProperty(value = "Type", required = true)
+ private String type;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ public void setType(final String type) {
+ this.type = type;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java
new file mode 100644
index 0000000..39e87b8
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/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.odata4.client.core.edm.xml.v4;
+
+import org.apache.olingo.odata4.client.api.edm.xml.v4.AnnotatedEdmItem;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.olingo.odata4.client.api.edm.xml.v4.Annotation;
+import org.apache.olingo.odata4.client.core.edm.xml.AbstractEdmItem;
+
+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
+ @Override
+ public void setAnnotation(final Annotation annotation) {
+ this.annotation = (AnnotationImpl) annotation;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/cdb520e3/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/ActionDeserializer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/ActionDeserializer.java b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/ActionDeserializer.java
new file mode 100644
index 0000000..ea93d75
--- /dev/null
+++ b/odata4-lib/odata4-client-core/src/main/java/org/apache/olingo/odata4/client/core/edm/xml/v4/ActionDeserializer.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.odata4.client.core.edm.xml.v4;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.io.IOException;
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.olingo.odata4.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;
+ }
+}