You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2015/04/30 17:02:20 UTC
[07/50] [abbrv] olingo-odata4 git commit: [OLINGO-564] Moved client
edm classes
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPath.java
new file mode 100644
index 0000000..3d790d7
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPath.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import org.apache.olingo.commons.api.edm.provider.annotation.Path;
+
+class ClientPath extends AbstractClientElementOrAttributeExpression implements Path {
+
+ private static final long serialVersionUID = 6020168217561402545L;
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientProperty.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientProperty.java
index 920c383..7389d67 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientProperty.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientProperty.java
@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.IOException;
@JsonDeserialize(using = ClientProperty.PropertyDeserializer.class)
-public class ClientProperty extends Property {
+class ClientProperty extends Property {
private static final long serialVersionUID = -4521766603286651372L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyPath.java
new file mode 100644
index 0000000..b74da28
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyPath.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import org.apache.olingo.commons.api.edm.provider.annotation.PropertyPath;
+
+class ClientPropertyPath extends AbstractClientElementOrAttributeExpression implements PropertyPath {
+
+ private static final long serialVersionUID = -9133862135834738470L;
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyRef.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyRef.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyRef.java
index 82dc0b0..3f1c8e3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyRef.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyRef.java
@@ -27,7 +27,7 @@ import org.apache.olingo.commons.api.edm.provider.PropertyRef;
import java.io.IOException;
@JsonDeserialize(using = ClientPropertyRef.PropertyRefDeserializer.class)
-public class ClientPropertyRef extends PropertyRef {
+class ClientPropertyRef extends PropertyRef {
private static final long serialVersionUID = 1504095609268590326L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyValue.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyValue.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyValue.java
new file mode 100644
index 0000000..9b9aa8e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientPropertyValue.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
+import org.apache.olingo.commons.api.edm.provider.annotation.PropertyValue;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.io.IOException;
+
+@JsonDeserialize(using = ClientPropertyValue.PropertyValueDeserializer.class)
+class ClientPropertyValue extends AbstractClientAnnotatableDynamicAnnotationExpression implements PropertyValue {
+
+ private static final long serialVersionUID = -8437649215282645228L;
+
+ private String property;
+
+ private AnnotationExpression value;
+
+ @Override
+ public String getProperty() {
+ return property;
+ }
+
+ public void setProperty(final String property) {
+ this.property = property;
+ }
+
+ @Override
+ public AnnotationExpression getValue() {
+ return value;
+ }
+
+ public void setValue(final AnnotationExpression value) {
+ this.value = value;
+ }
+
+ static class PropertyValueDeserializer extends AbstractClientEdmDeserializer<ClientPropertyValue> {
+ @Override
+ protected ClientPropertyValue doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException {
+ final ClientPropertyValue propValue = new ClientPropertyValue();
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Property".equals(jp.getCurrentName())) {
+ propValue.setProperty(jp.nextTextValue());
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ propValue.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
+ } else if (isAnnotationConstExprConstruct(jp)) {
+ propValue.setValue(parseAnnotationConstExprConstruct(jp));
+ } else {
+ propValue.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
+ }
+ }
+ }
+ return propValue;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientRecord.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientRecord.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientRecord.java
new file mode 100644
index 0000000..264adae
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientRecord.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import org.apache.olingo.commons.api.edm.provider.annotation.PropertyValue;
+import org.apache.olingo.commons.api.edm.provider.annotation.Record;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+@JsonDeserialize(using = ClientRecord.RecordDeserializer.class)
+class ClientRecord extends AbstractClientAnnotatableDynamicAnnotationExpression implements Record {
+
+ private static final long serialVersionUID = 4275271751615410709L;
+
+ private String type;
+
+ private final List<PropertyValue> propertyValues = new ArrayList<PropertyValue>();
+
+ @Override
+ public String getType() {
+ return type;
+ }
+
+ public void setType(final String type) {
+ this.type = type;
+ }
+
+ @Override
+ public List<PropertyValue> getPropertyValues() {
+ return propertyValues;
+ }
+
+ static class RecordDeserializer extends AbstractClientEdmDeserializer<ClientRecord> {
+ @Override
+ protected ClientRecord doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException {
+ final ClientRecord record = new ClientRecord();
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if ("Type".equals(jp.getCurrentName())) {
+ record.setType(jp.nextTextValue());
+ } else if ("Annotation".equals(jp.getCurrentName())) {
+ record.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
+ } else {
+ record.getPropertyValues().add(jp.readValueAs(ClientPropertyValue.class));
+ }
+ }
+ }
+ return record;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReference.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReference.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReference.java
index a989ba3..a172405 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReference.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReference.java
@@ -35,7 +35,7 @@ import org.apache.olingo.commons.api.edm.provider.Annotation;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@JsonDeserialize(using = ClientReference.ReferenceDeserializer.class)
-public class ClientReference extends AbstractEdmItem implements Reference {
+class ClientReference extends AbstractEdmItem implements Reference {
private static final long serialVersionUID = 7720274712545267654L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReferentialConstraint.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReferentialConstraint.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReferentialConstraint.java
index 9524e74..04b554d 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReferentialConstraint.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReferentialConstraint.java
@@ -27,7 +27,7 @@ import org.apache.olingo.commons.api.edm.provider.ReferentialConstraint;
import java.io.IOException;
@JsonDeserialize(using = ClientReferentialConstraint.ReferentialConstraintDeserializer.class)
-public class ClientReferentialConstraint extends ReferentialConstraint {
+class ClientReferentialConstraint extends ReferentialConstraint {
private static final long serialVersionUID = -5822115908069878139L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReturnType.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReturnType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReturnType.java
index 587a189..987d374 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReturnType.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientReturnType.java
@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.IOException;
@JsonDeserialize(using = ClientReturnType.ReturnTypeDeserializer.class)
-public class ClientReturnType extends ReturnType {
+class ClientReturnType extends ReturnType {
private static final long serialVersionUID = 6261092793901735110L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSchema.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSchema.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSchema.java
index 46e76cd..5846b36 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSchema.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSchema.java
@@ -28,7 +28,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.IOException;
@JsonDeserialize(using = ClientSchema.SchemaDeserializer.class)
-public class ClientSchema extends Schema {
+class ClientSchema extends Schema {
private static final long serialVersionUID = 1911087363912024939L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSingleton.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSingleton.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSingleton.java
index efe25ea..cba4b32 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSingleton.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientSingleton.java
@@ -28,7 +28,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.IOException;
@JsonDeserialize(using = ClientSingleton.SingletonDeserializer.class)
-public class ClientSingleton extends Singleton {
+class ClientSingleton extends Singleton {
private static final long serialVersionUID = 1656749615107151921L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTerm.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTerm.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTerm.java
index b343ee9..ed78e03 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTerm.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTerm.java
@@ -32,7 +32,7 @@ import java.io.IOException;
import java.util.Arrays;
@JsonDeserialize(using = ClientTerm.TermDeserializer.class)
-public class ClientTerm extends Term {
+class ClientTerm extends Term {
private static final long serialVersionUID = -8350072064720586186L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTwoParamsOpDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTwoParamsOpDynamicAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTwoParamsOpDynamicAnnotationExpression.java
new file mode 100644
index 0000000..8ce3167
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTwoParamsOpDynamicAnnotationExpression.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.edm.xml;
+
+import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.provider.annotation.TwoParamsOpDynamicAnnotationExpression;
+
+class ClientTwoParamsOpDynamicAnnotationExpression
+ extends AbstractClientDynamicAnnotationExpression implements TwoParamsOpDynamicAnnotationExpression {
+
+ private static final long serialVersionUID = 6241842185452451946L;
+
+ private Type type;
+
+ private DynamicAnnotationExpression left;
+
+ private DynamicAnnotationExpression right;
+
+ @Override
+ public Type getType() {
+ return type;
+ }
+
+ public void setType(final Type type) {
+ this.type = type;
+ }
+
+ @Override
+ public DynamicAnnotationExpression getLeftExpression() {
+ return left;
+ }
+
+ public void setLeftExpression(final DynamicAnnotationExpression left) {
+ this.left = left;
+ }
+
+ @Override
+ public DynamicAnnotationExpression getRightExpression() {
+ return right;
+ }
+
+ public void setRightExpression(final DynamicAnnotationExpression right) {
+ this.right = right;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTypeDefinition.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTypeDefinition.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTypeDefinition.java
index 87e2bb8..e0dd12b 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTypeDefinition.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientTypeDefinition.java
@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.IOException;
@JsonDeserialize(using = ClientTypeDefinition.TypeDefinitionDeserializer.class)
-public class ClientTypeDefinition extends TypeDefinition {
+class ClientTypeDefinition extends TypeDefinition {
private static final long serialVersionUID = -902407149079419602L;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientUrlRef.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientUrlRef.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientUrlRef.java
new file mode 100644
index 0000000..053a52e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientUrlRef.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.client.core.edm.xml;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
+import org.apache.olingo.commons.api.edm.provider.annotation.UrlRef;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+
+import java.io.IOException;
+
+@JsonDeserialize(using = ClientUrlRef.UrlRefDeserializer.class)
+class ClientUrlRef extends AbstractClientDynamicAnnotationExpression implements UrlRef {
+
+ private static final long serialVersionUID = -7693224811739000440L;
+
+ private AnnotationExpression value;
+
+ @Override
+ public AnnotationExpression getValue() {
+ return value;
+ }
+
+ public void setValue(final AnnotationExpression value) {
+ this.value = value;
+ }
+
+ static class UrlRefDeserializer extends AbstractClientEdmDeserializer<ClientUrlRef> {
+ @Override
+ protected ClientUrlRef doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
+ throws IOException {
+ final ClientUrlRef urlref = new ClientUrlRef();
+ for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
+ final JsonToken token = jp.getCurrentToken();
+ if (token == JsonToken.FIELD_NAME) {
+ if (isAnnotationConstExprConstruct(jp)) {
+ urlref.setValue(parseAnnotationConstExprConstruct(jp));
+ } else {
+ urlref.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
+ }
+ }
+ }
+ return urlref;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientXMLMetadata.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientXMLMetadata.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientXMLMetadata.java
deleted file mode 100644
index 680e622..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientXMLMetadata.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml;
-
-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.Reference;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.commons.api.edm.provider.AbstractEdmItem;
-import org.apache.olingo.commons.api.edm.provider.Schema;
-
-/**
- * Entry point for access information about EDM metadata.
- */
-public class ClientXMLMetadata extends AbstractEdmItem implements XMLMetadata {
-
- private static final long serialVersionUID = 6025723060298454901L;
- protected final Edmx edmx;
-
- public ClientXMLMetadata(final Edmx edmx) {
- this.edmx = edmx;
- }
-
- @Override
- public List<Schema> getSchemas() {
- return this.edmx.getDataServices().getSchemas();
- }
-
- @Override
- public Schema getSchema(final int index) {
- return getSchemas().get(index);
- }
-
- @Override
- public Schema getSchema(final String key) {
- return getSchemaByNsOrAlias().get(key);
- }
-
- @Override
- public Map<String, Schema> getSchemaByNsOrAlias() {
- final Map<String, Schema> schemaByNsOrAlias = new HashMap<String, Schema>();
- for (Schema schema : getSchemas()) {
- schemaByNsOrAlias.put(schema.getNamespace(), schema);
- if (StringUtils.isNotBlank(schema.getAlias())) {
- schemaByNsOrAlias.put(schema.getAlias(), schema);
- }
- }
- return schemaByNsOrAlias;
- }
-
- @Override
- public List<Reference> getReferences() {
- return this.edmx.getReferences();
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotatableDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotatableDynamicAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotatableDynamicAnnotationExpression.java
deleted file mode 100644
index 2f020c7..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotatableDynamicAnnotationExpression.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.commons.api.edm.provider.Annotatable;
-import org.apache.olingo.commons.api.edm.provider.Annotation;
-
-abstract class AbstractClientAnnotatableDynamicAnnotationExpression
- extends AbstractClientDynamicAnnotationExpression implements Annotatable {
-
- private static final long serialVersionUID = -450668773857358139L;
-
- private final List<Annotation> annotations = new ArrayList<Annotation>();
-
- @Override
- public List<Annotation> getAnnotations() {
- return annotations;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotationExpression.java
deleted file mode 100644
index 18761be..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientAnnotationExpression.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.AbstractEdmItem;
-import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.ConstantAnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
-
-public abstract class AbstractClientAnnotationExpression extends AbstractEdmItem implements AnnotationExpression {
-
- private static final long serialVersionUID = -4238652997159205377L;
-
- @Override
- public boolean isConstant() {
- return this instanceof ConstantAnnotationExpression;
- }
-
- @Override
- public ConstantAnnotationExpression asConstant() {
- return isConstant() ? (ConstantAnnotationExpression) this : null;
- }
-
- @Override
- public boolean isDynamic() {
- return this instanceof DynamicAnnotationExpression;
- }
-
- @Override
- public DynamicAnnotationExpression asDynamic() {
- return isDynamic() ? (DynamicAnnotationExpression) this : null;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientDynamicAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientDynamicAnnotationExpression.java
deleted file mode 100644
index 82e2d9f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientDynamicAnnotationExpression.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import com.fasterxml.jackson.core.JsonLocation;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.ClassUtils;
-import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
-import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationPath;
-import org.apache.olingo.commons.api.edm.provider.annotation.Apply;
-import org.apache.olingo.commons.api.edm.provider.annotation.Cast;
-import org.apache.olingo.commons.api.edm.provider.annotation.Collection;
-import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.If;
-import org.apache.olingo.commons.api.edm.provider.annotation.IsOf;
-import org.apache.olingo.commons.api.edm.provider.annotation.LabeledElement;
-import org.apache.olingo.commons.api.edm.provider.annotation.LabeledElementReference;
-import org.apache.olingo.commons.api.edm.provider.annotation.NavigationPropertyPath;
-import org.apache.olingo.commons.api.edm.provider.annotation.Not;
-import org.apache.olingo.commons.api.edm.provider.annotation.Null;
-import org.apache.olingo.commons.api.edm.provider.annotation.Path;
-import org.apache.olingo.commons.api.edm.provider.annotation.PropertyPath;
-import org.apache.olingo.commons.api.edm.provider.annotation.PropertyValue;
-import org.apache.olingo.commons.api.edm.provider.annotation.Record;
-import org.apache.olingo.commons.api.edm.provider.annotation.TwoParamsOpDynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.UrlRef;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import java.io.IOException;
-
-@JsonDeserialize(using = AbstractClientDynamicAnnotationExpression.DynamicAnnotationExpressionDeserializer.class)
-public abstract class AbstractClientDynamicAnnotationExpression
- extends AbstractClientAnnotationExpression implements DynamicAnnotationExpression {
-
- private static final long serialVersionUID = 1093411847477874348L;
-
- @Override
- public boolean isNot() {
- return this instanceof Not;
- }
-
- @Override
- public Not asNot() {
- return isNot() ? (Not) this : null;
-
- }
-
- @Override
- public boolean isTwoParamsOp() {
- return this instanceof TwoParamsOpDynamicAnnotationExpression;
- }
-
- @Override
- public TwoParamsOpDynamicAnnotationExpression asTwoParamsOp() {
- return isTwoParamsOp() ? (TwoParamsOpDynamicAnnotationExpression) this : null;
- }
-
- @Override
- public boolean isAnnotationPath() {
- return this instanceof AnnotationPath;
- }
-
- @Override
- public AnnotationPath asAnnotationPath() {
- return isAnnotationPath() ? (AnnotationPath) this : null;
- }
-
- @Override
- public boolean isApply() {
- return this instanceof Apply;
- }
-
- @Override
- public Apply asApply() {
- return isApply() ? (Apply) this : null;
- }
-
- @Override
- public boolean isCast() {
- return this instanceof Cast;
- }
-
- @Override
- public Cast asCast() {
- return isCast() ? (Cast) this : null;
- }
-
- @Override
- public boolean isCollection() {
- return this instanceof Collection;
- }
-
- @Override
- public Collection asCollection() {
- return isCollection() ? (Collection) this : null;
- }
-
- @Override
- public boolean isIf() {
- return this instanceof If;
- }
-
- @Override
- public If asIf() {
- return isIf() ? (If) this : null;
- }
-
- @Override
- public boolean isIsOf() {
- return this instanceof IsOf;
- }
-
- @Override
- public IsOf asIsOf() {
- return isIsOf() ? (IsOf) this : null;
- }
-
- @Override
- public boolean isLabeledElement() {
- return this instanceof LabeledElement;
- }
-
- @Override
- public LabeledElement asLabeledElement() {
- return isLabeledElement() ? (LabeledElement) this : null;
- }
-
- @Override
- public boolean isLabeledElementReference() {
- return this instanceof LabeledElementReference;
- }
-
- @Override
- public LabeledElementReference asLabeledElementReference() {
- return isLabeledElementReference() ? (LabeledElementReference) this : null;
- }
-
- @Override
- public boolean isNull() {
- return this instanceof Null;
- }
-
- @Override
- public Null asNull() {
- return isNull() ? (Null) this : null;
- }
-
- @Override
- public boolean isNavigationPropertyPath() {
- return this instanceof NavigationPropertyPath;
- }
-
- @Override
- public NavigationPropertyPath asNavigationPropertyPath() {
- return isNavigationPropertyPath() ? (NavigationPropertyPath) this : null;
- }
-
- @Override
- public boolean isPath() {
- return this instanceof Path;
- }
-
- @Override
- public Path asPath() {
- return isPath() ? (Path) this : null;
- }
-
- @Override
- public boolean isPropertyPath() {
- return this instanceof PropertyPath;
- }
-
- @Override
- public PropertyPath asPropertyPath() {
- return isPropertyPath() ? (PropertyPath) this : null;
- }
-
- @Override
- public boolean isPropertyValue() {
- return this instanceof PropertyValue;
- }
-
- @Override
- public PropertyValue asPropertyValue() {
- return isPropertyValue() ? (PropertyValue) this : null;
- }
-
- @Override
- public boolean isRecord() {
- return this instanceof Record;
- }
-
- @Override
- public Record asRecord() {
- return isRecord() ? (Record) this : null;
- }
-
- @Override
- public boolean isUrlRef() {
- return this instanceof UrlRef;
- }
-
- @Override
- public UrlRef asUrlRef() {
- return isUrlRef() ? (UrlRef) this : null;
- }
-
- static class DynamicAnnotationExpressionDeserializer
- extends AbstractClientEdmDeserializer<AbstractClientDynamicAnnotationExpression> {
-
- private static final String[] EL_OR_ATTR = {
- AnnotationPath.class.getSimpleName(), NavigationPropertyPath.class.getSimpleName(),
- Path.class.getSimpleName(), PropertyPath.class.getSimpleName()
- };
-
- private static final String APPLY = Apply.class.getSimpleName();
- private static final String CAST = Cast.class.getSimpleName();
- private static final String COLLECTION = Collection.class.getSimpleName();
- private static final String IF = If.class.getSimpleName();
- private static final String IS_OF = IsOf.class.getSimpleName();
- private static final String LABELED_ELEMENT = LabeledElement.class.getSimpleName();
- private static final String NULL = Null.class.getSimpleName();
- private static final String RECORD = Record.class.getSimpleName();
- private static final String URL_REF = UrlRef.class.getSimpleName();
-
- private AbstractClientElementOrAttributeExpression getElementOrAttributeExpression(final String simpleClassName)
- throws JsonParseException {
-
- try {
- @SuppressWarnings("unchecked")
- Class<? extends AbstractClientElementOrAttributeExpression> elOrAttrClass =
- (Class<? extends AbstractClientElementOrAttributeExpression>) ClassUtils.getClass(
- getClass().getPackage().getName() + ".Client" + simpleClassName);
- return elOrAttrClass.newInstance();
- } catch (Exception e) {
- throw new JsonParseException("Could not instantiate " + simpleClassName, JsonLocation.NA, e);
- }
- }
-
- private AbstractClientAnnotationExpression parseConstOrEnumExpression(final JsonParser jp) throws IOException {
- AbstractClientAnnotationExpression result;
- if (isAnnotationConstExprConstruct(jp)) {
- result = parseAnnotationConstExprConstruct(jp);
- } else {
- result = jp.readValueAs(AbstractClientDynamicAnnotationExpression.class);
- }
- jp.nextToken();
-
- return result;
- }
-
- @Override
- protected AbstractClientDynamicAnnotationExpression doDeserialize(final JsonParser jp,
- final DeserializationContext ctxt) throws IOException {
-
- AbstractClientDynamicAnnotationExpression expression = null;
-
- if ("Not".equals(jp.getCurrentName())) {
- final ClientNot not = new ClientNot();
-
- jp.nextToken();
- //Search for field name
- while (jp.getCurrentToken() != JsonToken.FIELD_NAME) {
- jp.nextToken();
- }
- not.setExpression(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- //Search for end object
- while (jp.getCurrentToken() != JsonToken.END_OBJECT || !jp.getCurrentName().equals("Not")) {
- jp.nextToken();
- }
-
- expression = not;
- } else if (TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()) != null) {
- final ClientTwoParamsOpDynamicAnnotationExpression dynExprDoubleParamOp =
- new ClientTwoParamsOpDynamicAnnotationExpression();
- dynExprDoubleParamOp.setType(TwoParamsOpDynamicAnnotationExpression.Type.fromString(jp.getCurrentName()));
-
- jp.nextToken();
- //Search for field name
- while (jp.getCurrentToken() != JsonToken.FIELD_NAME) {
- jp.nextToken();
- }
- dynExprDoubleParamOp.setLeftExpression(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- dynExprDoubleParamOp.setRightExpression(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- //Search for expression
- while (jp.getCurrentToken() != JsonToken.END_OBJECT || !jp.getCurrentName().equals(dynExprDoubleParamOp
- .getType().name())) {
- jp.nextToken();
- }
-
- expression = dynExprDoubleParamOp;
- } else if (ArrayUtils.contains(EL_OR_ATTR, jp.getCurrentName())) {
- final AbstractClientElementOrAttributeExpression elOrAttr =
- getElementOrAttributeExpression(jp.getCurrentName());
- elOrAttr.setValue(jp.nextTextValue());
- expression = elOrAttr;
- } else if (APPLY.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientApply.class);
- } else if (CAST.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientCast.class);
- } else if (COLLECTION.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientCollection.class);
- } else if (IF.equals(jp.getCurrentName())) {
- jp.nextToken();
- jp.nextToken();
-
- final ClientIf ifImpl = new ClientIf();
- ifImpl.setGuard(parseConstOrEnumExpression(jp));
- ifImpl.setThen(parseConstOrEnumExpression(jp));
- ifImpl.setElse(parseConstOrEnumExpression(jp));
-
- expression = ifImpl;
- } else if (IS_OF.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientIsOf.class);
- } else if (LABELED_ELEMENT.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientLabeledElement.class);
- } else if (NULL.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientNull.class);
- } else if (RECORD.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientRecord.class);
- } else if (URL_REF.equals(jp.getCurrentName())) {
- jp.nextToken();
- expression = jp.readValueAs(ClientUrlRef.class);
- }
-
- return expression;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientElementOrAttributeExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientElementOrAttributeExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientElementOrAttributeExpression.java
deleted file mode 100644
index 34601fd..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/AbstractClientElementOrAttributeExpression.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-/**
- * Groups dynamic expressions that may be provided using element notation or attribute notation.
- */
-abstract class AbstractClientElementOrAttributeExpression extends AbstractClientDynamicAnnotationExpression {
-
- private static final long serialVersionUID = 1588336268773032932L;
-
- private String value;
-
- public String getValue() {
- return value;
- }
-
- public void setValue(final String value) {
- this.value = value;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientAnnotationPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientAnnotationPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientAnnotationPath.java
deleted file mode 100644
index 1787708..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientAnnotationPath.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationPath;
-
-public class ClientAnnotationPath extends AbstractClientElementOrAttributeExpression implements AnnotationPath {
-
- private static final long serialVersionUID = 5360735207353494466L;
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientApply.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientApply.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientApply.java
deleted file mode 100644
index c731036..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientApply.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
-import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.Apply;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = ClientApply.ApplyDeserializer.class)
-public class ClientApply extends AbstractClientAnnotatableDynamicAnnotationExpression implements Apply {
-
- private static final long serialVersionUID = 4358398303405059879L;
-
- private String function;
-
- private final List<AnnotationExpression> parameters = new ArrayList<AnnotationExpression>();
-
- @Override
- public String getFunction() {
- return function;
- }
-
- public void setFunction(final String function) {
- this.function = function;
- }
-
- @Override
- public List<AnnotationExpression> getParameters() {
- return parameters;
- }
-
- static class ApplyDeserializer extends AbstractClientEdmDeserializer<ClientApply> {
-
- @Override
- protected ClientApply doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
- throws IOException {
- final ClientApply apply = new ClientApply();
- for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
- final JsonToken token = jp.getCurrentToken();
- if (token == JsonToken.FIELD_NAME) {
- if ("Function".equals(jp.getCurrentName())) {
- apply.setFunction(jp.nextTextValue());
- } else if ("Annotation".equals(jp.getCurrentName())) {
- apply.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
- } else if (isAnnotationConstExprConstruct(jp)) {
- apply.getParameters().add(parseAnnotationConstExprConstruct(jp));
- } else {
- apply.getParameters().add(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- }
- }
- }
-
- return apply;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCast.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCast.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCast.java
deleted file mode 100644
index f8eb827..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCast.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-import org.apache.olingo.commons.api.edm.provider.annotation.Cast;
-import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import java.io.IOException;
-
-@JsonDeserialize(using = ClientCast.CastDeserializer.class)
-public class ClientCast extends AbstractClientAnnotatableDynamicAnnotationExpression implements Cast {
-
- private static final long serialVersionUID = 3312415984116005313L;
-
- private String type;
-
- private Integer maxLength;
-
- private Integer precision;
-
- private Integer scale;
-
- private SRID srid;
-
- private DynamicAnnotationExpression value;
-
- @Override
- public String getType() {
- return type;
- }
-
- public void setType(final String type) {
- this.type = type;
- }
-
- @Override
- public Integer getMaxLength() {
- return maxLength;
- }
-
- public void setMaxLength(final Integer maxLength) {
- this.maxLength = maxLength;
- }
-
- @Override
- public Integer getPrecision() {
- return precision;
- }
-
- public void setPrecision(final Integer precision) {
- this.precision = precision;
- }
-
- @Override
- public Integer getScale() {
- return scale;
- }
-
- public void setScale(final Integer scale) {
- this.scale = scale;
- }
-
- @Override
- public SRID getSrid() {
- return srid;
- }
-
- public void setSrid(final SRID srid) {
- this.srid = srid;
- }
-
- @Override
- public DynamicAnnotationExpression getValue() {
- return value;
- }
-
- public void setValue(final DynamicAnnotationExpression value) {
- this.value = value;
- }
-
- static class CastDeserializer extends AbstractClientEdmDeserializer<ClientCast> {
-
- @Override
- protected ClientCast doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
- throws IOException {
- final ClientCast cast = new ClientCast();
- for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
- final JsonToken token = jp.getCurrentToken();
- if (token == JsonToken.FIELD_NAME) {
- if ("Type".equals(jp.getCurrentName())) {
- cast.setType(jp.nextTextValue());
- } else if ("Annotation".equals(jp.getCurrentName())) {
- cast.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
- } else if ("MaxLength".equals(jp.getCurrentName())) {
- final String maxLenght = jp.nextTextValue();
- cast.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
- } else if ("Precision".equals(jp.getCurrentName())) {
- cast.setPrecision(Integer.valueOf(jp.nextTextValue()));
- } else if ("Scale".equals(jp.getCurrentName())) {
- final String scale = jp.nextTextValue();
- cast.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
- } else if ("SRID".equals(jp.getCurrentName())) {
- final String srid = jp.nextTextValue();
- if (srid != null) {
- cast.setSrid(SRID.valueOf(srid));
- }
- } else {
- cast.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- }
- }
- }
- return cast;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCollection.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCollection.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCollection.java
deleted file mode 100644
index 83419a3..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCollection.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
-import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.Collection;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-@JsonDeserialize(using = ClientCollection.CollectionDeserializer.class)
-public class ClientCollection extends AbstractClientDynamicAnnotationExpression implements Collection {
-
- private static final long serialVersionUID = -724749123749715643L;
-
- private final List<AnnotationExpression> items = new ArrayList<AnnotationExpression>();
-
- @Override
- public List<AnnotationExpression> getItems() {
- return items;
- }
-
- static class CollectionDeserializer extends AbstractClientEdmDeserializer<ClientCollection> {
- @Override
- protected ClientCollection doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
- throws IOException {
- final ClientCollection collection = new ClientCollection();
- for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
- final JsonToken token = jp.getCurrentToken();
- if (token == JsonToken.FIELD_NAME) {
- if (isAnnotationConstExprConstruct(jp)) {
- collection.getItems().add(parseAnnotationConstExprConstruct(jp));
- } else {
- collection.getItems().add(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- }
- }
- }
-
- return collection;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientConstantAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientConstantAnnotationExpression.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientConstantAnnotationExpression.java
deleted file mode 100644
index 13d9e72..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientConstantAnnotationExpression.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.ConstantAnnotationExpression;
-
-public class ClientConstantAnnotationExpression
- extends AbstractClientAnnotationExpression implements ConstantAnnotationExpression {
-
- private static final long serialVersionUID = 5618680702707972904L;
-
- private Type type;
-
- private String value;
-
- @Override
- public Type getType() {
- return type;
- }
-
- @Override
- public void setType(final Type type) {
- this.type = type;
- }
-
- @Override
- public String getValue() {
- return value;
- }
-
- @Override
- public void setValue(final String value) {
- this.value = value;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIf.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIf.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIf.java
deleted file mode 100644
index 4795f14..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIf.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.AnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.If;
-
-public class ClientIf extends AbstractClientAnnotatableDynamicAnnotationExpression implements If {
-
- private static final long serialVersionUID = -8571383625077590656L;
-
- private AnnotationExpression guard;
-
- private AnnotationExpression _then;
-
- private AnnotationExpression _else;
-
- @Override
- public AnnotationExpression getGuard() {
- return guard;
- }
-
- public void setGuard(final AnnotationExpression guard) {
- this.guard = guard;
- }
-
- @Override
- public AnnotationExpression getThen() {
- return _then;
- }
-
- public void setThen(final AnnotationExpression _then) {
- this._then = _then;
- }
-
- @Override
- public AnnotationExpression getElse() {
- return _else;
- }
-
- public void setElse(final AnnotationExpression _else) {
- this._else = _else;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIsOf.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIsOf.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIsOf.java
deleted file mode 100644
index ed13dbc..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientIsOf.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
-import org.apache.olingo.commons.api.edm.geo.SRID;
-import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.IsOf;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import java.io.IOException;
-
-@JsonDeserialize(using = ClientIsOf.IsOfDeserializer.class)
-public class ClientIsOf extends AbstractClientAnnotatableDynamicAnnotationExpression implements IsOf {
-
- private static final long serialVersionUID = -893355856129761174L;
-
- private String type;
-
- private Integer maxLength;
-
- private Integer precision;
-
- private Integer scale;
-
- private SRID srid;
-
- private DynamicAnnotationExpression value;
-
- @Override
- public String getType() {
- return type;
- }
-
- public void setType(final String type) {
- this.type = type;
- }
-
- @Override
- public Integer getMaxLength() {
- return maxLength;
- }
-
- public void setMaxLength(final Integer maxLength) {
- this.maxLength = maxLength;
- }
-
- @Override
- public Integer getPrecision() {
- return precision;
- }
-
- public void setPrecision(final Integer precision) {
- this.precision = precision;
- }
-
- @Override
- public Integer getScale() {
- return scale;
- }
-
- public void setScale(final Integer scale) {
- this.scale = scale;
- }
-
- @Override
- public SRID getSrid() {
- return srid;
- }
-
- public void setSrid(final SRID srid) {
- this.srid = srid;
- }
-
- @Override
- public DynamicAnnotationExpression getValue() {
- return value;
- }
-
- public void setValue(final DynamicAnnotationExpression value) {
- this.value = value;
- }
-
- static class IsOfDeserializer extends AbstractClientEdmDeserializer<ClientIsOf> {
- @Override
- protected ClientIsOf doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
- throws IOException {
- final ClientIsOf isof = new ClientIsOf();
- for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
- final JsonToken token = jp.getCurrentToken();
- if (token == JsonToken.FIELD_NAME) {
- if ("Type".equals(jp.getCurrentName())) {
- isof.setType(jp.nextTextValue());
- } else if ("Annotation".equals(jp.getCurrentName())) {
- isof.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
- } else if ("MaxLength".equals(jp.getCurrentName())) {
- final String maxLenght = jp.nextTextValue();
- isof.setMaxLength(maxLenght.equalsIgnoreCase("max") ? Integer.MAX_VALUE : Integer.valueOf(maxLenght));
- } else if ("Precision".equals(jp.getCurrentName())) {
- isof.setPrecision(Integer.valueOf(jp.nextTextValue()));
- } else if ("Scale".equals(jp.getCurrentName())) {
- final String scale = jp.nextTextValue();
- isof.setScale(scale.equalsIgnoreCase("variable") ? 0 : Integer.valueOf(scale));
- } else if ("SRID".equals(jp.getCurrentName())) {
- final String srid = jp.nextTextValue();
- if (srid != null) {
- isof.setSrid(SRID.valueOf(srid));
- }
- } else {
- isof.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- }
- }
- }
- return isof;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElement.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElement.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElement.java
deleted file mode 100644
index 3273585..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
-import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.LabeledElement;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import java.io.IOException;
-
-@JsonDeserialize(using = ClientLabeledElement.LabeledElementDeserializer.class)
-public class ClientLabeledElement
- extends AbstractClientAnnotatableDynamicAnnotationExpression implements LabeledElement {
-
- private static final long serialVersionUID = 4909387630253341824L;
-
- private String name;
-
- private DynamicAnnotationExpression value;
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- @Override
- public DynamicAnnotationExpression getValue() {
- return value;
- }
-
- public void setValue(final DynamicAnnotationExpression value) {
- this.value = value;
- }
-
- static class LabeledElementDeserializer extends AbstractClientEdmDeserializer<ClientLabeledElement> {
- @Override
- protected ClientLabeledElement doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
- throws IOException {
- final ClientLabeledElement element = new ClientLabeledElement();
- for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
- final JsonToken token = jp.getCurrentToken();
- if (token == JsonToken.FIELD_NAME) {
- if ("Name".equals(jp.getCurrentName())) {
- element.setName(jp.nextTextValue());
- } else if ("Annotation".equals(jp.getCurrentName())) {
- element.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
- } else {
- element.setValue(jp.readValueAs(AbstractClientDynamicAnnotationExpression.class));
- }
- }
- }
- return element;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElementReference.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElementReference.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElementReference.java
deleted file mode 100644
index fd19270..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientLabeledElementReference.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.LabeledElementReference;
-
-public class ClientLabeledElementReference
- extends AbstractClientElementOrAttributeExpression implements LabeledElementReference {
-
- private static final long serialVersionUID = 7560525604021670529L;
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNavigationPropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNavigationPropertyPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNavigationPropertyPath.java
deleted file mode 100644
index b7be32e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNavigationPropertyPath.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.NavigationPropertyPath;
-
-public class ClientNavigationPropertyPath extends AbstractClientElementOrAttributeExpression
- implements NavigationPropertyPath {
-
- private static final long serialVersionUID = 879840502446301312L;
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNot.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNot.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNot.java
deleted file mode 100644
index a85c052..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNot.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.DynamicAnnotationExpression;
-import org.apache.olingo.commons.api.edm.provider.annotation.Not;
-
-public class ClientNot extends AbstractClientDynamicAnnotationExpression implements Not {
-
- private static final long serialVersionUID = -437788415922966812L;
-
- private DynamicAnnotationExpression expression;
-
- @Override
- public DynamicAnnotationExpression getExpression() {
- return expression;
- }
-
- public void setExpression(final DynamicAnnotationExpression expression) {
- this.expression = expression;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNull.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNull.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNull.java
deleted file mode 100644
index d8d5de1..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientNull.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import org.apache.olingo.client.core.edm.xml.AbstractClientEdmDeserializer;
-import org.apache.olingo.client.core.edm.xml.ClientAnnotation;
-import org.apache.olingo.commons.api.edm.provider.annotation.Null;
-
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-
-import java.io.IOException;
-
-@JsonDeserialize(using = ClientNull.NullDeserializer.class)
-public class ClientNull extends AbstractClientAnnotatableDynamicAnnotationExpression implements Null {
-
- private static final long serialVersionUID = -3148516847180393142L;
-
- static class NullDeserializer extends AbstractClientEdmDeserializer<ClientNull> {
- @Override
- protected ClientNull doDeserialize(final JsonParser jp, final DeserializationContext ctxt)
- throws IOException {
- final ClientNull _null = new ClientNull();
- for (; jp.getCurrentToken() != JsonToken.END_OBJECT; jp.nextToken()) {
- final JsonToken token = jp.getCurrentToken();
- if (token == JsonToken.FIELD_NAME) {
- if ("Annotation".equals(jp.getCurrentName())) {
- _null.getAnnotations().add(jp.readValueAs(ClientAnnotation.class));
- }
- }
- }
- return _null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPath.java
deleted file mode 100644
index 6dd5518..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPath.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.Path;
-
-public class ClientPath extends AbstractClientElementOrAttributeExpression implements Path {
-
- private static final long serialVersionUID = 6020168217561402545L;
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/cbbe3da6/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPropertyPath.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPropertyPath.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPropertyPath.java
deleted file mode 100644
index e4804fe..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientPropertyPath.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.edm.xml.annotation;
-
-import org.apache.olingo.commons.api.edm.provider.annotation.PropertyPath;
-
-public class ClientPropertyPath extends AbstractClientElementOrAttributeExpression implements PropertyPath {
-
- private static final long serialVersionUID = -9133862135834738470L;
-
-}