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 04:44:21 UTC
[2/3] [OLINGO-191] change package name: part 1 of
1.edm.xml->edm.xml.shared, 2, edm.xml.v4->edm.xml
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityContainer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityContainer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityContainer.java
new file mode 100644
index 0000000..00eb7de
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityContainer.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, 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.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
+import org.apache.olingo.client.api.edm.xml.EntityContainer;
+import org.apache.olingo.client.api.edm.xml.EntitySet;
+import org.apache.olingo.client.core.op.impl.EntityContainerDeserializer;
+
+@JsonDeserialize(using = EntityContainerDeserializer.class)
+public abstract class AbstractEntityContainer extends AbstractEdmItem implements EntityContainer {
+
+ private static final long serialVersionUID = 4121974387552855032L;
+
+ private String name;
+
+ private String _extends;
+
+ private boolean lazyLoadingEnabled;
+
+ private boolean defaultEntityContainer;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getExtends() {
+ return _extends;
+ }
+
+ public void setExtends(final String _extends) {
+ this._extends = _extends;
+ }
+
+ @Override
+ public boolean isLazyLoadingEnabled() {
+ return lazyLoadingEnabled;
+ }
+
+ public void setLazyLoadingEnabled(final boolean lazyLoadingEnabled) {
+ this.lazyLoadingEnabled = lazyLoadingEnabled;
+ }
+
+ @Override
+ public boolean isDefaultEntityContainer() {
+ return defaultEntityContainer;
+ }
+
+ public void setDefaultEntityContainer(final boolean defaultEntityContainer) {
+ this.defaultEntityContainer = defaultEntityContainer;
+ }
+
+ @Override
+ public EntitySet getEntitySet(final String name) {
+ return getOneByName(name, getEntitySets());
+ }
+
+ /**
+ * Gets the first function import with given name.
+ *
+ * @param name name.
+ * @return function import.
+ */
+ @Override
+ public CommonFunctionImport getFunctionImport(final String name) {
+ return getOneByName(name, getFunctionImports());
+ }
+
+ /**
+ * Gets all function imports with given name.
+ *
+ * @param name name.
+ * @return function imports.
+ */
+ @Override
+ public List<? extends CommonFunctionImport> getFunctionImports(final String name) {
+ return getAllByName(name, getFunctionImports());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntitySet.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntitySet.java
new file mode 100644
index 0000000..8cac704
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntitySet.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.EntitySet;
+import org.apache.olingo.client.core.op.impl.EntitySetDeserializer;
+
+@JsonDeserialize(using = EntitySetDeserializer.class)
+public abstract class AbstractEntitySet extends AbstractEdmItem implements EntitySet {
+
+ private static final long serialVersionUID = -6577263439520376420L;
+
+ private String name;
+
+ private String entityType;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getEntityType() {
+ return entityType;
+ }
+
+ public void setEntityType(final String entityType) {
+ this.entityType = entityType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityType.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityType.java
new file mode 100644
index 0000000..8aac609
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEntityType.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, 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.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.EntityKey;
+import org.apache.olingo.client.api.edm.xml.EntityType;
+import org.apache.olingo.client.core.op.impl.EntityTypeDeserializer;
+
+@JsonDeserialize(using = EntityTypeDeserializer.class)
+public abstract class AbstractEntityType extends AbstractComplexType implements EntityType {
+
+ private static final long serialVersionUID = -1579462552966168139L;
+
+ private boolean abstractEntityType = false;
+
+ private String baseType;
+
+ private boolean openType = false;
+
+ private boolean hasStream = false;
+
+ private EntityKeyImpl key;
+
+ @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 EntityKeyImpl getKey() {
+ return key;
+ }
+
+ public void setKey(final EntityKey key) {
+ this.key = (EntityKeyImpl) key;
+ }
+
+ @Override
+ public boolean isHasStream() {
+ return hasStream;
+ }
+
+ public void setHasStream(final boolean hasStream) {
+ this.hasStream = hasStream;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEnumType.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEnumType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEnumType.java
new file mode 100644
index 0000000..03bc068
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractEnumType.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.EnumType;
+import org.apache.olingo.client.api.edm.xml.Member;
+import org.apache.olingo.client.core.op.impl.EnumTypeDeserializer;
+
+@JsonDeserialize(using = EnumTypeDeserializer.class)
+public abstract class AbstractEnumType extends AbstractEdmItem implements EnumType {
+
+ private static final long serialVersionUID = 2688487586103418210L;
+
+ private String name;
+
+ private String underlyingType;
+
+ private boolean flags;
+
+ private final List<Member> members = new ArrayList<Member>();
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getUnderlyingType() {
+ return underlyingType;
+ }
+
+ public void setUnderlyingType(final String underlyingType) {
+ this.underlyingType = underlyingType;
+ }
+
+ @Override
+ public boolean isFlags() {
+ return flags;
+ }
+
+ public void setFlags(final boolean flags) {
+ this.flags = flags;
+ }
+
+ @Override
+ public Member getMember(final String name) {
+ Member result = null;
+ for (Member member : getMembers()) {
+ if (name.equals(member.getName())) {
+ result = member;
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public Member getMember(final Integer value) {
+ Member result = null;
+ for (Member member : getMembers()) {
+ if (value.equals(member.getValue())) {
+ result = member;
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public List<Member> getMembers() {
+ return members;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractMember.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractMember.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractMember.java
new file mode 100644
index 0000000..cf8511c
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractMember.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml.shared;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.Member;
+
+public abstract class AbstractMember extends AbstractEdmItem implements Member {
+
+ private static final long serialVersionUID = -1852481655317148552L;
+
+ @JsonProperty(value = "Name", required = true)
+ private String name;
+
+ @JsonProperty("Value")
+ private String value;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(final String value) {
+ this.value = value;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractNavigationProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractNavigationProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractNavigationProperty.java
new file mode 100644
index 0000000..c9059ee
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractNavigationProperty.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.shared;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.CommonNavigationProperty;
+
+public class AbstractNavigationProperty extends AbstractEdmItem implements CommonNavigationProperty {
+
+ private static final long serialVersionUID = 3112463683071069594L;
+
+ @JsonProperty(value = "Name", required = true)
+ private String name;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractParameter.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractParameter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractParameter.java
new file mode 100644
index 0000000..94c07cc
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractParameter.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, 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.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.CommonParameter;
+
+@JsonDeserialize(using = ParameterDeserializer.class)
+public abstract class AbstractParameter extends AbstractEdmItem implements CommonParameter {
+
+ private static final long serialVersionUID = -4305016554930334342L;
+
+ private String name;
+
+ private String type;
+
+ private boolean nullable = true;
+
+ private Integer maxLength;
+
+ private Integer precision;
+
+ private Integer scale;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ @Override
+ public boolean isNullable() {
+ return nullable;
+ }
+
+ public void setNullable(final boolean nullable) {
+ this.nullable = nullable;
+ }
+
+ @Override
+ public Integer getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(final Integer maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ @Override
+ public Integer getPrecision() {
+ return precision;
+ }
+
+ public void setPrecision(final Integer precision) {
+ this.precision = precision;
+ }
+
+ @Override
+ public Integer getScale() {
+ return scale;
+ }
+
+ public void setScale(final Integer scale) {
+ this.scale = scale;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractProperty.java
new file mode 100644
index 0000000..7f40b66
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractProperty.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, 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.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.CommonProperty;
+
+@JsonDeserialize(using = PropertyDeserializer.class)
+public abstract class AbstractProperty extends AbstractEdmItem implements CommonProperty {
+
+ private static final long serialVersionUID = -6004492361142315153L;
+
+ private String name;
+
+ private String type;
+
+ private boolean nullable = true;
+
+ private String defaultValue;
+
+ private Integer maxLength;
+
+ private Integer precision;
+
+ private Integer scale;
+
+ private boolean unicode = true;
+
+ private String srid;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ @Override
+ public boolean isNullable() {
+ return nullable;
+ }
+
+ public void setNullable(final boolean nullable) {
+ this.nullable = nullable;
+ }
+
+ @Override
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(final String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ @Override
+ public Integer getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(final Integer maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ @Override
+ public Integer getPrecision() {
+ return precision;
+ }
+
+ public void setPrecision(final Integer precision) {
+ this.precision = precision;
+ }
+
+ @Override
+ public Integer getScale() {
+ return scale;
+ }
+
+ public void setScale(final Integer scale) {
+ this.scale = scale;
+ }
+
+ @Override
+ public boolean isUnicode() {
+ return unicode;
+ }
+
+ public void setUnicode(final boolean unicode) {
+ this.unicode = unicode;
+ }
+
+ @Override
+ public 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/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractSchema.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractSchema.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractSchema.java
new file mode 100644
index 0000000..0f63d70
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractSchema.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.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import org.apache.olingo.client.api.edm.xml.ComplexType;
+import org.apache.olingo.client.api.edm.xml.EntityType;
+import org.apache.olingo.client.api.edm.xml.EnumType;
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.client.core.op.impl.SchemaDeserializer;
+
+@JsonDeserialize(using = SchemaDeserializer.class)
+public abstract class AbstractSchema extends AbstractEdmItem implements Schema {
+
+ private static final long serialVersionUID = -1356392748971378455L;
+
+ private String namespace;
+
+ 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;
+ }
+
+ @Override
+ public EnumType getEnumType(final String name) {
+ return getOneByName(name, getEnumTypes());
+ }
+
+ @Override
+ public ComplexType getComplexType(final String name) {
+ return getOneByName(name, getComplexTypes());
+ }
+
+ @Override
+ public EntityType getEntityType(final String name) {
+ return getOneByName(name, getEntityTypes());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractXMLMetadata.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractXMLMetadata.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractXMLMetadata.java
new file mode 100644
index 0000000..464a48f
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/AbstractXMLMetadata.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.client.core.edm.xml.shared;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.edm.xml.Edmx;
+import org.apache.olingo.client.api.edm.xml.Schema;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+
+/**
+ * Entry point for access information about EDM metadata.
+ */
+public abstract class AbstractXMLMetadata extends AbstractEdmItem implements XMLMetadata {
+
+ private static final long serialVersionUID = -1214173426671503187L;
+
+ protected final Edmx edmx;
+
+ protected final Map<String, Schema> schemaByNsOrAlias;
+
+ public AbstractXMLMetadata(final Edmx edmx) {
+ this.edmx = edmx;
+
+ this.schemaByNsOrAlias = new HashMap<String, Schema>();
+ for (Schema schema : edmx.getDataServices().getSchemas()) {
+ this.schemaByNsOrAlias.put(schema.getNamespace(), schema);
+ if (StringUtils.isNotBlank(schema.getAlias())) {
+ this.schemaByNsOrAlias.put(schema.getAlias(), schema);
+ }
+ }
+ }
+
+ /**
+ * Checks whether the given key is a valid namespace or alias in the EdM metadata document.
+ *
+ * @param key namespace or alias
+ * @return true if key is valid namespace or alias
+ */
+ @Override
+ public boolean isNsOrAlias(final String key) {
+ return this.schemaByNsOrAlias.keySet().contains(key);
+ }
+
+ /**
+ * Returns the Schema at the specified position in the EdM metadata document.
+ *
+ * @param index index of the Schema to return
+ * @return the Schema at the specified position in the EdM metadata document
+ */
+ @Override
+ public Schema getSchema(final int index) {
+ return this.edmx.getDataServices().getSchemas().get(index);
+ }
+
+ /**
+ * Returns the Schema with the specified key (namespace or alias) in the EdM metadata document.
+ *
+ * @param key namespace or alias
+ * @return the Schema with the specified key in the EdM metadata document
+ */
+ @Override
+ public Schema getSchema(final String key) {
+ return this.schemaByNsOrAlias.get(key);
+ }
+
+ /**
+ * Returns all Schema objects defined in the EdM metadata document.
+ *
+ * @return all Schema objects defined in the EdM metadata document
+ */
+ @Override
+ public List<? extends Schema> getSchemas() {
+ return this.edmx.getDataServices().getSchemas();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/DataServicesDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/DataServicesDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/DataServicesDeserializer.java
new file mode 100644
index 0000000..75750bf
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/DataServicesDeserializer.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.shared;
+
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+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;
+
+public class DataServicesDeserializer extends AbstractEdmDeserializer<AbstractDataServices> {
+
+ @Override
+ protected AbstractDataServices doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AbstractDataServices dataServices = ODataServiceVersion.V30 == client.getServiceVersion()
+ ? new org.apache.olingo.client.core.edm.xml.v3.DataServicesImpl()
+ : new org.apache.olingo.client.core.edm.xml.v4.DataServicesImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("DataServiceVersion".equals(jp.getCurrentName())) {
+ dataServices.setDataServiceVersion(jp.nextTextValue());
+ } else if ("MaxDataServiceVersion".equals(jp.getCurrentName())) {
+ dataServices.setMaxDataServiceVersion(jp.nextTextValue());
+ } else if ("Schema".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ if (dataServices instanceof org.apache.olingo.client.core.edm.xml.v3.DataServicesImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.DataServicesImpl) dataServices).
+ getSchemas().add(jp.readValueAs(
+ org.apache.olingo.client.core.edm.xml.v3.SchemaImpl.class));
+
+ } else {
+ ((org.apache.olingo.client.core.edm.xml.v4.DataServicesImpl) dataServices).
+ getSchemas().add(jp.readValueAs(
+ org.apache.olingo.client.core.edm.xml.v4.SchemaImpl.class));
+ }
+ }
+ }
+ }
+
+ return dataServices;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EdmxDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EdmxDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EdmxDeserializer.java
new file mode 100644
index 0000000..49bd481
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EdmxDeserializer.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.shared;
+
+import org.apache.olingo.client.core.edm.xml.v4.ReferenceImpl;
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+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;
+
+@SuppressWarnings("rawtypes")
+public class EdmxDeserializer extends AbstractEdmDeserializer<AbstractEdmx> {
+
+ @Override
+ protected AbstractEdmx doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AbstractEdmx edmx = ODataServiceVersion.V30 == client.getServiceVersion()
+ ? new org.apache.olingo.client.core.edm.xml.v3.EdmxImpl()
+ : new org.apache.olingo.client.core.edm.xml.v4.EdmxImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Version".equals(jp.getCurrentName())) {
+ edmx.setVersion(jp.nextTextValue());
+ } else if ("DataServices".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ if (edmx instanceof org.apache.olingo.client.core.edm.xml.v3.EdmxImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.EdmxImpl) edmx).
+ setDataServices(jp.readValueAs(
+ org.apache.olingo.client.core.edm.xml.v3.DataServicesImpl.class));
+ } else {
+ ((org.apache.olingo.client.core.edm.xml.v4.EdmxImpl) edmx).
+ setDataServices(jp.readValueAs(
+ org.apache.olingo.client.core.edm.xml.v4.DataServicesImpl.class));
+ }
+ } else if ("Reference".equals(jp.getCurrentName())) {
+ jp.nextToken();
+ ((org.apache.olingo.client.core.edm.xml.v4.EdmxImpl) edmx).getReferences().
+ add(jp.readValueAs( ReferenceImpl.class));
+ }
+ }
+ }
+
+ return edmx;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EntityKeyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EntityKeyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EntityKeyImpl.java
new file mode 100644
index 0000000..8e44b18
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/EntityKeyImpl.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.shared;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.edm.xml.EntityKey;
+import org.apache.olingo.client.api.edm.xml.PropertyRef;
+import org.apache.olingo.client.core.op.impl.EntityKeyDeserializer;
+
+@JsonDeserialize(using = EntityKeyDeserializer.class)
+public class EntityKeyImpl extends AbstractEdmItem implements EntityKey {
+
+ private static final long serialVersionUID = 2586047015894794685L;
+
+ private final List<PropertyRef> propertyRefs = new ArrayList<PropertyRef>();
+
+ @Override
+ public List<PropertyRef> getPropertyRefs() {
+ return propertyRefs;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/OnDeleteImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/OnDeleteImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/OnDeleteImpl.java
new file mode 100644
index 0000000..65b4010
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/OnDeleteImpl.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.shared;
+
+import org.apache.olingo.client.api.edm.xml.OnDelete;
+import org.apache.olingo.client.api.edm.xml.OnDeleteAction;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class OnDeleteImpl extends AbstractEdmItem implements OnDelete {
+
+ private static final long serialVersionUID = -5321523424474336347L;
+
+ @JsonProperty(value = "Action", required = true)
+ private OnDeleteAction action = OnDeleteAction.None;
+
+ @Override
+ public OnDeleteAction getAction() {
+ return action;
+ }
+
+ public void setAction(final OnDeleteAction action) {
+ this.action = action;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/ParameterDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/ParameterDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/ParameterDeserializer.java
new file mode 100644
index 0000000..d575f57
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/ParameterDeserializer.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, 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.shared;
+
+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.api.edm.xml.v3.ParameterMode;
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+public class ParameterDeserializer extends AbstractEdmDeserializer<AbstractParameter> {
+
+ @Override
+ protected AbstractParameter doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AbstractParameter parameter = ODataServiceVersion.V30 == client.getServiceVersion()
+ ? new org.apache.olingo.client.core.edm.xml.v3.ParameterImpl()
+ : new org.apache.olingo.client.core.edm.xml.v4.ParameterImpl();
+
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Name".equals(jp.getCurrentName())) {
+ parameter.setName(jp.nextTextValue());
+ } else if ("Type".equals(jp.getCurrentName())) {
+ parameter.setType(jp.nextTextValue());
+ } else if ("Nullable".equals(jp.getCurrentName())) {
+ parameter.setNullable(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("MaxLength".equals(jp.getCurrentName())) {
+ final String maxLenght = jp.nextTextValue();
+ parameter.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
+ } else if ("Precision".equals(jp.getCurrentName())) {
+ parameter.setPrecision(Integer.valueOf(jp.nextTextValue()));
+ } else if ("Scale".equals(jp.getCurrentName())) {
+ final String scale = jp.nextTextValue();
+ parameter.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
+ } else if ("Mode".equals(jp.getCurrentName())) {
+ ((org.apache.olingo.client.core.edm.xml.v3.ParameterImpl) parameter).
+ setMode(ParameterMode.valueOf(jp.nextTextValue()));
+ } else if ("SRID".equals(jp.getCurrentName())) {
+ ((org.apache.olingo.client.core.edm.xml.v4.ParameterImpl) parameter).setSrid(jp.nextTextValue());
+ }
+ }
+ }
+
+ return parameter;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyDeserializer.java
new file mode 100644
index 0000000..13c371a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyDeserializer.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.shared;
+
+import java.io.IOException;
+
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.olingo.client.api.edm.ConcurrencyMode;
+import org.apache.olingo.client.api.edm.StoreGeneratedPattern;
+import org.apache.olingo.client.core.edm.xml.v4.AnnotationImpl;
+import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
+import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
+import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+
+public class PropertyDeserializer extends AbstractEdmDeserializer<AbstractProperty> {
+
+ @Override
+ protected AbstractProperty doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+
+ final AbstractProperty property = ODataServiceVersion.V30 == client.getServiceVersion()
+ ? new org.apache.olingo.client.core.edm.xml.v3.PropertyImpl()
+ : new org.apache.olingo.client.core.edm.xml.v4.PropertyImpl();
+
+ 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 ("DefaultValue".equals(jp.getCurrentName())) {
+ property.setDefaultValue(jp.nextTextValue());
+ } else if ("MaxLength".equals(jp.getCurrentName())) {
+ final String maxLenght = jp.nextTextValue();
+ property.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
+ } else if ("FixedLength".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setFixedLength(BooleanUtils.toBoolean(jp.nextTextValue()));
+ }
+ } else if ("Precision".equals(jp.getCurrentName())) {
+ property.setPrecision(Integer.valueOf(jp.nextTextValue()));
+ } else if ("Scale".equals(jp.getCurrentName())) {
+ final String scale = jp.nextTextValue();
+ property.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
+ } else if ("Unicode".equals(jp.getCurrentName())) {
+ property.setUnicode(BooleanUtils.toBoolean(jp.nextTextValue()));
+ } else if ("Collation".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setCollation(jp.nextTextValue());
+ }
+ } else if ("SRID".equals(jp.getCurrentName())) {
+ property.setSrid(jp.nextTextValue());
+ } else if ("ConcurrencyMode".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setConcurrencyMode(ConcurrencyMode.valueOf(jp.nextTextValue()));
+ }
+ } else if ("StoreGeneratedPattern".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setStoreGeneratedPattern(StoreGeneratedPattern.valueOf(jp.nextTextValue()));
+ }
+ } else if ("FC_SourcePath".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setFcSourcePath(jp.nextTextValue());
+ }
+ } else if ("FC_TargetPath".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setFcTargetPath(jp.nextTextValue());
+ }
+ } else if ("FC_ContentKind".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setFcContentKind(EdmContentKind.valueOf(jp.nextTextValue()));
+ }
+ } else if ("FC_NsPrefix".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setFcNSPrefix(jp.nextTextValue());
+ }
+ } else if ("FC_NsUri".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setFcNSURI(jp.nextTextValue());
+ }
+ } else if ("FC_KeepInContent".equals(jp.getCurrentName())) {
+ if (property instanceof org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) {
+ ((org.apache.olingo.client.core.edm.xml.v3.PropertyImpl) property).
+ setFcKeepInContent(BooleanUtils.toBoolean(jp.nextTextValue()));
+ }
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ ((org.apache.olingo.client.core.edm.xml.v4.PropertyImpl) property).
+ setAnnotation(jp.readValueAs(AnnotationImpl.class));
+ }
+ }
+ }
+
+ return property;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyRefImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyRefImpl.java
new file mode 100644
index 0000000..3a45e8a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/shared/PropertyRefImpl.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml.shared;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import org.apache.olingo.client.api.edm.xml.PropertyRef;
+
+public class PropertyRefImpl extends AbstractEdmItem implements PropertyRef {
+
+ private static final long serialVersionUID = 6738212067449628983L;
+
+ @JsonProperty(value = "Name", required = true)
+ private String name;
+
+ @JsonProperty(value = "Alias")
+ private String alias;
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ @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/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsImpl.java
index e9d9258..20b31ef 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AnnotationsImpl.java
@@ -26,7 +26,7 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.v3.Annotations;
import org.apache.olingo.client.api.edm.xml.v3.TypeAnnotation;
import org.apache.olingo.client.api.edm.xml.v3.ValueAnnotation;
-import org.apache.olingo.client.core.edm.xml.AbstractAnnotations;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractAnnotations;
@JsonDeserialize(using = AnnotationsDeserializer.class)
public class AnnotationsImpl extends AbstractAnnotations implements Annotations {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationEndImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationEndImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationEndImpl.java
index e5942da..759745a 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationEndImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationEndImpl.java
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.olingo.client.api.edm.xml.OnDelete;
import org.apache.olingo.client.api.edm.xml.v3.AssociationEnd;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
public class AssociationEndImpl extends AbstractEdmItem implements AssociationEnd {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationImpl.java
index af7b5b5..57952a3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationImpl.java
@@ -26,7 +26,7 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.v3.Association;
import org.apache.olingo.client.api.edm.xml.v3.AssociationEnd;
import org.apache.olingo.client.api.edm.xml.v3.ReferentialConstraint;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
@JsonDeserialize(using = AssociationDeserializer.class)
public class AssociationImpl extends AbstractEdmItem implements Association {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetEndImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetEndImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetEndImpl.java
index f39beb0..340cd16 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetEndImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetEndImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.v3;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.olingo.client.api.edm.xml.v3.AssociationSetEnd;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
public class AssociationSetEndImpl extends AbstractEdmItem implements AssociationSetEnd {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetImpl.java
index d49aa44..2619c83 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/AssociationSetImpl.java
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.v3.AssociationSet;
import org.apache.olingo.client.api.edm.xml.v3.AssociationSetEnd;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
@JsonDeserialize(using = AssociationSetDeserializer.class)
public class AssociationSetImpl extends AbstractEdmItem implements AssociationSet {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ComplexTypeImpl.java
index 6f4c837..fbdf8dc 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ComplexTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ComplexTypeImpl.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.olingo.client.api.edm.xml.ComplexType;
-import org.apache.olingo.client.core.edm.xml.AbstractComplexType;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractComplexType;
public class ComplexTypeImpl extends AbstractComplexType implements ComplexType {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/DataServicesImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/DataServicesImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/DataServicesImpl.java
index 542c20d..651b7d2 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/DataServicesImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/DataServicesImpl.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.olingo.client.api.edm.xml.Schema;
-import org.apache.olingo.client.core.edm.xml.AbstractDataServices;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractDataServices;
public class DataServicesImpl extends AbstractDataServices {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EdmxImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EdmxImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EdmxImpl.java
index 78d3471..0a00134 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EdmxImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EdmxImpl.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.core.edm.xml.v3;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmx;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmx;
public class EdmxImpl extends AbstractEdmx {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityContainerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityContainerImpl.java
index 1866a57..1cfcbc2 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityContainerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityContainerImpl.java
@@ -24,7 +24,7 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.EntitySet;
import org.apache.olingo.client.api.edm.xml.v3.AssociationSet;
import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
-import org.apache.olingo.client.core.edm.xml.AbstractEntityContainer;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEntityContainer;
public class EntityContainerImpl extends AbstractEntityContainer {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntitySetImpl.java
index 1757c35..76d8624 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntitySetImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntitySetImpl.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.core.edm.xml.v3;
-import org.apache.olingo.client.core.edm.xml.AbstractEntitySet;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEntitySet;
public class EntitySetImpl extends AbstractEntitySet {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityTypeImpl.java
index d20e981..9584306 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EntityTypeImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.v3;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.client.core.edm.xml.AbstractEntityType;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEntityType;
public class EntityTypeImpl extends AbstractEntityType {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EnumTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EnumTypeImpl.java
index 942a2b8..6d3e352 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EnumTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/EnumTypeImpl.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.olingo.client.api.edm.xml.Member;
-import org.apache.olingo.client.core.edm.xml.AbstractEnumType;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEnumType;
public class EnumTypeImpl extends AbstractEnumType {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/MemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/MemberImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/MemberImpl.java
index 7ef4d86..13124bb 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/MemberImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/MemberImpl.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.core.edm.xml.v3;
-import org.apache.olingo.client.core.edm.xml.AbstractMember;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractMember;
public class MemberImpl extends AbstractMember {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/NavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/NavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/NavigationPropertyImpl.java
index 2c7aa90..4ea5895 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/NavigationPropertyImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/NavigationPropertyImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.v3;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.olingo.client.api.edm.xml.v3.NavigationProperty;
-import org.apache.olingo.client.core.edm.xml.AbstractNavigationProperty;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractNavigationProperty;
public class NavigationPropertyImpl extends AbstractNavigationProperty implements NavigationProperty {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ParameterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ParameterImpl.java
index f555406..dfeb233 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ParameterImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ParameterImpl.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm.xml.v3;
import org.apache.olingo.client.api.edm.xml.v3.Parameter;
import org.apache.olingo.client.api.edm.xml.v3.ParameterMode;
-import org.apache.olingo.client.core.edm.xml.AbstractParameter;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractParameter;
public class ParameterImpl extends AbstractParameter implements Parameter {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyImpl.java
index 6d8918d..3f7adae 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.v3;
import org.apache.olingo.client.api.edm.ConcurrencyMode;
import org.apache.olingo.client.api.edm.StoreGeneratedPattern;
import org.apache.olingo.client.api.edm.xml.v3.Property;
-import org.apache.olingo.client.core.edm.xml.AbstractProperty;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractProperty;
import org.apache.olingo.commons.api.edm.constants.EdmContentKind;
public class PropertyImpl extends AbstractProperty implements Property {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyValueImpl.java
index 17c5369..d1dddb7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyValueImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/PropertyValueImpl.java
@@ -25,7 +25,7 @@ import java.math.BigInteger;
import java.util.Date;
import org.apache.olingo.client.api.edm.xml.v3.PropertyValue;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
public class PropertyValueImpl extends AbstractEdmItem implements PropertyValue {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintImpl.java
index b60f581..e2029db 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintImpl.java
@@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.olingo.client.api.edm.xml.v3.ReferentialConstraint;
import org.apache.olingo.client.api.edm.xml.v3.ReferentialConstraintRole;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
public class ReferentialConstraintImpl extends AbstractEdmItem implements ReferentialConstraint {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
index 6a46e1e..6e74823 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleDeserializer.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
-import org.apache.olingo.client.core.edm.xml.PropertyRefImpl;
+import org.apache.olingo.client.core.edm.xml.shared.PropertyRefImpl;
import org.apache.olingo.client.core.op.impl.AbstractEdmDeserializer;
public class ReferentialConstraintRoleDeserializer extends AbstractEdmDeserializer<ReferentialConstraintRoleImpl> {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java
index 4f2ddd5..5e38995 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ReferentialConstraintRoleImpl.java
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.PropertyRef;
import org.apache.olingo.client.api.edm.xml.v3.ReferentialConstraintRole;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
@JsonDeserialize(using = ReferentialConstraintRoleDeserializer.class)
public class ReferentialConstraintRoleImpl extends AbstractEdmItem implements ReferentialConstraintRole {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/SchemaImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/SchemaImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/SchemaImpl.java
index 9f6bba4..8743364 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/SchemaImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/SchemaImpl.java
@@ -30,7 +30,7 @@ import org.apache.olingo.client.api.edm.xml.v3.Annotations;
import org.apache.olingo.client.api.edm.xml.v3.Association;
import org.apache.olingo.client.api.edm.xml.v3.Using;
import org.apache.olingo.client.api.edm.xml.v3.ValueTerm;
-import org.apache.olingo.client.core.edm.xml.AbstractSchema;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractSchema;
public class SchemaImpl extends AbstractSchema implements Schema {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationImpl.java
index fe713d4..67d07f8 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/TypeAnnotationImpl.java
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.olingo.client.api.edm.xml.v3.PropertyValue;
import org.apache.olingo.client.api.edm.xml.v3.TypeAnnotation;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
@JsonDeserialize(using = TypeAnnotationDeserializer.class)
public class TypeAnnotationImpl extends AbstractEdmItem implements TypeAnnotation {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/UsingImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/UsingImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/UsingImpl.java
index e701682..14b4790 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/UsingImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/UsingImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.v3;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.olingo.client.api.edm.xml.v3.Using;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
public class UsingImpl extends AbstractEdmItem implements Using {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueAnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueAnnotationImpl.java
index b55270f..b910f98 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueAnnotationImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueAnnotationImpl.java
@@ -25,7 +25,7 @@ import java.math.BigInteger;
import java.util.Date;
import org.apache.olingo.client.api.edm.xml.v3.ValueAnnotation;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
public class ValueAnnotationImpl extends AbstractEdmItem implements ValueAnnotation {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueTermImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueTermImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueTermImpl.java
index 9b2e663..36fe4a3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueTermImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/ValueTermImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.edm.xml.v3;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.olingo.client.api.edm.xml.v3.ValueTerm;
-import org.apache.olingo.client.core.edm.xml.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
public class ValueTermImpl extends AbstractEdmItem implements ValueTerm {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/XMLMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/XMLMetadataImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/XMLMetadataImpl.java
index 82601db..2c93398 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/XMLMetadataImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v3/XMLMetadataImpl.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.core.edm.xml.v3;
-import org.apache.olingo.client.core.edm.xml.AbstractXMLMetadata;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractXMLMetadata;
public class XMLMetadataImpl extends AbstractXMLMetadata {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java
index 18b01be..996a7ed 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AbstractAnnotatedEdmItem.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.edm.xml.v4;
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.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java
index d495b8c..9188923 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationImpl.java
@@ -23,7 +23,7 @@ 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.AbstractEdmItem;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractEdmItem;
@JsonDeserialize(using = AnnotationDeserializer.class)
public class AnnotationImpl extends AbstractEdmItem implements Annotation {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java
index a579624..d35e6d0 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/AnnotationsImpl.java
@@ -24,7 +24,7 @@ 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.AbstractAnnotations;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractAnnotations;
@JsonDeserialize(using = AnnotationsDeserializer.class)
public class AnnotationsImpl extends AbstractAnnotations implements Annotations {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java
index b91259a..f9430cd 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/ComplexTypeImpl.java
@@ -25,7 +25,7 @@ import org.apache.olingo.client.api.edm.xml.v4.Annotation;
import org.apache.olingo.client.api.edm.xml.v4.ComplexType;
import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
import org.apache.olingo.client.api.edm.xml.v4.Property;
-import org.apache.olingo.client.core.edm.xml.AbstractComplexType;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractComplexType;
public class ComplexTypeImpl extends AbstractComplexType implements ComplexType {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/192a7078/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java
index bf4ed66..c720634 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/v4/DataServicesImpl.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.olingo.client.api.edm.xml.v4.Schema;
-import org.apache.olingo.client.core.edm.xml.AbstractDataServices;
+import org.apache.olingo.client.core.edm.xml.shared.AbstractDataServices;
public class DataServicesImpl extends AbstractDataServices {