You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/05/04 18:24:05 UTC
[2/9] [OLINGO-263][OLINGO-264] First draft Edm annotation interfaces
+ client-side implementation (server components have TODO)
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmProperty.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmProperty.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmProperty.java
index c54239f..a0396fe 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmProperty.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmProperty.java
@@ -20,12 +20,8 @@ package org.apache.olingo.commons.core.edm;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmException;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.EdmProperty;
import org.apache.olingo.commons.api.edm.EdmType;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
public abstract class AbstractEdmProperty extends EdmElementImpl implements EdmProperty {
@@ -35,37 +31,38 @@ public abstract class AbstractEdmProperty extends EdmElementImpl implements EdmP
super(edm, name);
}
- protected abstract FullQualifiedName getTypeFQN();
+ protected abstract EdmTypeInfo getTypeInfo();
@Override
public boolean isPrimitive() {
- return EdmPrimitiveType.EDM_NAMESPACE.equals(getTypeFQN().getNamespace());
+ return getTypeInfo().isPrimitiveType();
}
@Override
public EdmType getType() {
if (propertyType == null) {
- final FullQualifiedName typeName = getTypeFQN();
- if (isPrimitive()) {
- try {
- propertyType = EdmPrimitiveTypeFactory.getInstance(EdmPrimitiveTypeKind.valueOf(typeName.getName()));
- } catch (IllegalArgumentException e) {
- throw new EdmException("Cannot find type with name: " + typeName, e);
- }
- } else {
- propertyType = edm.getComplexType(typeName);
- if (propertyType == null) {
- propertyType = edm.getEnumType(typeName);
- if (propertyType == null) {
- propertyType = edm.getTypeDefinition(typeName);
- if (propertyType == null) {
- throw new EdmException("Cannot find type with name: " + typeName);
- }
- }
- }
+ propertyType = getTypeInfo().getType();
+ if (propertyType == null) {
+ throw new EdmException("Cannot find type with name: " + getTypeInfo().getFullQualifiedName());
}
}
return propertyType;
}
+
+ @Override
+ public boolean isCollection() {
+ return getTypeInfo().isCollection();
+ }
+
+ @Override
+ public TargetType getAnnotationsTargetType() {
+ return TargetType.Property;
+ }
+
+ @Override
+ public String getAnnotationsTargetPath() {
+ return getName();
+ }
+
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReferentialConstraint.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReferentialConstraint.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReferentialConstraint.java
new file mode 100644
index 0000000..1116af3
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReferentialConstraint.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm;
+
+import org.apache.olingo.commons.api.edm.EdmReferentialConstraint;
+
+public abstract class AbstractEdmReferentialConstraint implements EdmReferentialConstraint {
+
+ private final String property;
+
+ private final String referencedProperty;
+
+ public AbstractEdmReferentialConstraint(final String property, final String referencedProperty) {
+ this.property = property;
+ this.referencedProperty = referencedProperty;
+ }
+
+ @Override
+ public String getPropertyName() {
+ return property;
+ }
+
+ @Override
+ public String getReferencedPropertyName() {
+ return referencedProperty;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReturnType.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReturnType.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReturnType.java
index 532f666..db22174 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReturnType.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmReturnType.java
@@ -20,67 +20,30 @@ package org.apache.olingo.commons.core.edm;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmException;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.EdmReturnType;
import org.apache.olingo.commons.api.edm.EdmType;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
public abstract class AbstractEdmReturnType implements EdmReturnType {
- private final Edm edm;
-
- private final FullQualifiedName typeName;
+ private final EdmTypeInfo typeInfo;
private EdmType typeImpl;
public AbstractEdmReturnType(final Edm edm, final FullQualifiedName typeName) {
- this.edm = edm;
- this.typeName = typeName;
+ this.typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(typeName.toString()).build();
}
@Override
public EdmType getType() {
if (typeImpl == null) {
- if (EdmPrimitiveType.EDM_NAMESPACE.equals(typeName.getNamespace())) {
- try {
- typeImpl = EdmPrimitiveTypeFactory.getInstance(EdmPrimitiveTypeKind.valueOf(typeName.getName()));
- } catch (IllegalArgumentException e) {
- throw new EdmException("Cannot find type with name: " + typeName, e);
- }
- } else {
- typeImpl = edm.getComplexType(typeName);
- if (typeImpl == null) {
- typeImpl = edm.getEntityType(typeName);
- if (typeImpl == null) {
- typeImpl = edm.getEnumType(typeName);
- if (typeImpl == null) {
- typeImpl = edm.getTypeDefinition(typeName);
- if (typeImpl == null) {
- throw new EdmException("Cant find type with name: " + typeName);
- }
- }
- }
- }
+ typeImpl = typeInfo.getType();
+ if (typeImpl == null) {
+ throw new EdmException("Cannot find type with name: " + typeInfo.getFullQualifiedName());
}
}
+
return typeImpl;
}
- @Override
- public abstract Boolean isNullable();
-
- @Override
- public abstract Integer getMaxLength();
-
- @Override
- public abstract Integer getPrecision();
-
- @Override
- public abstract Integer getScale();
-
- @Override
- public abstract boolean isCollection();
-
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmSchema.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmSchema.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmSchema.java
index 6c4184d..6e1356e 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmSchema.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmSchema.java
@@ -22,12 +22,15 @@ import java.util.Collections;
import java.util.List;
import org.apache.olingo.commons.api.edm.EdmAction;
+import org.apache.olingo.commons.api.edm.EdmAnnotation;
+import org.apache.olingo.commons.api.edm.EdmAnnotations;
import org.apache.olingo.commons.api.edm.EdmComplexType;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.commons.api.edm.EdmEnumType;
import org.apache.olingo.commons.api.edm.EdmFunction;
import org.apache.olingo.commons.api.edm.EdmSchema;
+import org.apache.olingo.commons.api.edm.EdmTerm;
import org.apache.olingo.commons.api.edm.EdmTypeDefinition;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
@@ -37,8 +40,6 @@ public abstract class AbstractEdmSchema implements EdmSchema {
private final String alias;
- private List<EdmTypeDefinition> typeDefinitions;
-
private List<EdmEnumType> enumTypes;
private List<EdmEntityType> entityTypes;
@@ -49,6 +50,14 @@ public abstract class AbstractEdmSchema implements EdmSchema {
private List<EdmFunction> functions;
+ private List<EdmTypeDefinition> typeDefinitions;
+
+ private List<EdmTerm> terms;
+
+ private List<EdmAnnotations> annotationGroups;
+
+ private List<EdmAnnotation> annotations;
+
private EdmEntityContainer entityContainer;
public AbstractEdmSchema(String namespace, String alias) {
@@ -58,8 +67,6 @@ public abstract class AbstractEdmSchema implements EdmSchema {
protected abstract EdmEntityContainer createEntityContainer();
- protected abstract List<EdmTypeDefinition> createTypeDefinitions();
-
protected abstract List<EdmEnumType> createEnumTypes();
protected abstract List<EdmEntityType> createEntityTypes();
@@ -70,13 +77,13 @@ public abstract class AbstractEdmSchema implements EdmSchema {
protected abstract List<EdmFunction> createFunctions();
- @Override
- public List<EdmTypeDefinition> getTypeDefinitions() {
- if (typeDefinitions == null) {
- typeDefinitions = createTypeDefinitions();
- }
- return typeDefinitions;
- }
+ protected abstract List<EdmTypeDefinition> createTypeDefinitions();
+
+ protected abstract List<EdmTerm> createTerms();
+
+ protected abstract List<EdmAnnotations> createAnnotationGroups();
+
+ protected abstract List<EdmAnnotation> createAnnotations();
@Override
public List<EdmEnumType> getEnumTypes() {
@@ -119,6 +126,38 @@ public abstract class AbstractEdmSchema implements EdmSchema {
}
@Override
+ public List<EdmTypeDefinition> getTypeDefinitions() {
+ if (typeDefinitions == null) {
+ typeDefinitions = createTypeDefinitions();
+ }
+ return typeDefinitions;
+ }
+
+ @Override
+ public List<EdmTerm> getTerms() {
+ if (terms == null) {
+ terms = createTerms();
+ }
+ return terms;
+ }
+
+ @Override
+ public List<EdmAnnotations> getAnnotationGroups() {
+ if (annotationGroups == null) {
+ annotationGroups = createAnnotationGroups();
+ }
+ return annotationGroups;
+ }
+
+ @Override
+ public List<EdmAnnotation> getAnnotations() {
+ if (annotations == null) {
+ annotations = createAnnotations();
+ }
+ return annotations;
+ }
+
+ @Override
public EdmEntityContainer getEntityContainer() {
if (entityContainer == null) {
entityContainer = createEntityContainer();
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmStructuredType.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmStructuredType.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmStructuredType.java
index af4f2dd..1ee515c 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmStructuredType.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmStructuredType.java
@@ -139,4 +139,14 @@ public abstract class AbstractEdmStructuredType extends EdmTypeImpl implements E
return true;
}
+ @Override
+ public String getAnnotationsTargetPath() {
+ return null;
+ }
+
+ @Override
+ public FullQualifiedName getAnnotationsTargetFQN() {
+ return getFullQualifiedName();
+ }
+
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmTypeDefinition.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmTypeDefinition.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmTypeDefinition.java
index 12b1dd1..51fb015 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmTypeDefinition.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmTypeDefinition.java
@@ -109,4 +109,19 @@ public abstract class AbstractEdmTypeDefinition extends EdmNamedImpl implements
@Override
public abstract Boolean isUnicode();
+ @Override
+ public TargetType getAnnotationsTargetType() {
+ return TargetType.TypeDefinition;
+ }
+
+ @Override
+ public FullQualifiedName getAnnotationsTargetFQN() {
+ return getFullQualifiedName();
+ }
+
+ @Override
+ public String getAnnotationsTargetPath() {
+ return null;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationHelper.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationHelper.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationHelper.java
new file mode 100644
index 0000000..db4ef6f
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationHelper.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.commons.core.edm;
+
+import java.util.List;
+import org.apache.olingo.commons.api.edm.EdmAnnotation;
+
+public interface EdmAnnotationHelper {
+
+ List<EdmAnnotation> getAnnotations();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java
deleted file mode 100644
index 79be011..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.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.commons.core.edm;
-
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmMember;
-
-public class EdmMemberImpl extends EdmNamedImpl implements EdmMember {
-
- private final String value;
-
- public EdmMemberImpl(final Edm edm, final String name, final String value) {
- super(edm, name);
- this.value = value;
- }
-
- @Override
- public String getValue() {
- return value;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmReferentialConstraintImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmReferentialConstraintImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmReferentialConstraintImpl.java
deleted file mode 100644
index ed3f5c3..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmReferentialConstraintImpl.java
+++ /dev/null
@@ -1,43 +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.commons.core.edm;
-
-import org.apache.olingo.commons.api.edm.EdmReferentialConstraint;
-
-public class EdmReferentialConstraintImpl implements EdmReferentialConstraint {
-
- private final String property;
-
- private final String referencedProperty;
-
- public EdmReferentialConstraintImpl(final String property, final String referencedProperty) {
- this.property = property;
- this.referencedProperty = referencedProperty;
- }
-
- @Override
- public String getPropertyName() {
- return property;
- }
-
- @Override
- public String getReferencedPropertyName() {
- return referencedProperty;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
index 37d52dd..5e4f13e 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeInfo.java
@@ -25,8 +25,11 @@ import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.commons.api.edm.EdmEnumType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
+import org.apache.olingo.commons.api.edm.EdmType;
+import org.apache.olingo.commons.api.edm.EdmTypeDefinition;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -73,6 +76,8 @@ public class EdmTypeInfo {
private EdmPrimitiveTypeKind primitiveType;
+ private EdmTypeDefinition typeDefinition;
+
private EdmEnumType enumType;
private EdmComplexType complexType;
@@ -128,11 +133,14 @@ public class EdmTypeInfo {
LOG.debug("{} does not appear to refer to an Edm primitive type", this.fullQualifiedName);
}
if (this.primitiveType == null && this.edm != null) {
- this.enumType = this.edm.getEnumType(this.fullQualifiedName);
- if (this.enumType == null) {
- this.complexType = this.edm.getComplexType(this.fullQualifiedName);
- if (this.complexType == null) {
- this.entityType = this.edm.getEntityType(this.fullQualifiedName);
+ this.typeDefinition = this.edm.getTypeDefinition(this.fullQualifiedName);
+ if (this.typeDefinition == null) {
+ this.enumType = this.edm.getEnumType(this.fullQualifiedName);
+ if (this.enumType == null) {
+ this.complexType = this.edm.getComplexType(this.fullQualifiedName);
+ if (this.complexType == null) {
+ this.entityType = this.edm.getEntityType(this.fullQualifiedName);
+ }
}
}
}
@@ -197,6 +205,14 @@ public class EdmTypeInfo {
return primitiveType;
}
+ public boolean isTypeDefinition() {
+ return this.typeDefinition != null;
+ }
+
+ public EdmTypeDefinition getTypeDefinition() {
+ return this.typeDefinition;
+ }
+
public boolean isEnumType() {
return this.enumType != null;
}
@@ -220,4 +236,18 @@ public class EdmTypeInfo {
public EdmEntityType getEntityType() {
return entityType;
}
+
+ public EdmType getType() {
+ return isPrimitiveType()
+ ? EdmPrimitiveTypeFactory.getInstance(getPrimitiveTypeKind())
+ : isTypeDefinition()
+ ? getTypeDefinition()
+ : isEnumType()
+ ? getEnumType()
+ : isComplexType()
+ ? getComplexType()
+ : isEntityType()
+ ? getEntityType()
+ : null;
+ }
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotatableDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotatableDynamicAnnotationExpression.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotatableDynamicAnnotationExpression.java
new file mode 100644
index 0000000..711c505
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotatableDynamicAnnotationExpression.java
@@ -0,0 +1,35 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.olingo.commons.api.edm.EdmAnnotatable;
+import org.apache.olingo.commons.api.edm.EdmAnnotation;
+
+public abstract class AbstractEdmAnnotatableDynamicAnnotationExpression
+ extends AbstractEdmDynamicAnnotationExpression implements EdmAnnotatable {
+
+ private final List<EdmAnnotation> annotations = new ArrayList<EdmAnnotation>();
+
+ @Override
+ public List<EdmAnnotation> getAnnotations() {
+ return annotations;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotationEspression.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotationEspression.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotationEspression.java
new file mode 100644
index 0000000..a1fda47
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmAnnotationEspression.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmConstantAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+
+public abstract class AbstractEdmAnnotationEspression implements EdmAnnotationExpression {
+
+ @Override
+ public boolean isConstant() {
+ return this instanceof EdmConstantAnnotationExpression;
+ }
+
+ @Override
+ public EdmConstantAnnotationExpression asConstant() {
+ return isConstant() ? (EdmConstantAnnotationExpression) this : null;
+ }
+
+ @Override
+ public boolean isDynamic() {
+ return this instanceof EdmDynamicAnnotationExpression;
+ }
+
+ @Override
+ public EdmDynamicAnnotationExpression asDynamic() {
+ return isDynamic() ? (EdmDynamicAnnotationExpression) this : null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmDynamicAnnotationExpression.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmDynamicAnnotationExpression.java
new file mode 100644
index 0000000..b1ee53d
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmDynamicAnnotationExpression.java
@@ -0,0 +1,291 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnd;
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationPath;
+import org.apache.olingo.commons.api.edm.annotation.EdmApply;
+import org.apache.olingo.commons.api.edm.annotation.EdmCast;
+import org.apache.olingo.commons.api.edm.annotation.EdmCollection;
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmEq;
+import org.apache.olingo.commons.api.edm.annotation.EdmGe;
+import org.apache.olingo.commons.api.edm.annotation.EdmGt;
+import org.apache.olingo.commons.api.edm.annotation.EdmIf;
+import org.apache.olingo.commons.api.edm.annotation.EdmIsOf;
+import org.apache.olingo.commons.api.edm.annotation.EdmLabeledElement;
+import org.apache.olingo.commons.api.edm.annotation.EdmLabeledElementReference;
+import org.apache.olingo.commons.api.edm.annotation.EdmLe;
+import org.apache.olingo.commons.api.edm.annotation.EdmLt;
+import org.apache.olingo.commons.api.edm.annotation.EdmNavigationPropertyPath;
+import org.apache.olingo.commons.api.edm.annotation.EdmNe;
+import org.apache.olingo.commons.api.edm.annotation.EdmNot;
+import org.apache.olingo.commons.api.edm.annotation.EdmNull;
+import org.apache.olingo.commons.api.edm.annotation.EdmOr;
+import org.apache.olingo.commons.api.edm.annotation.EdmPath;
+import org.apache.olingo.commons.api.edm.annotation.EdmPropertyPath;
+import org.apache.olingo.commons.api.edm.annotation.EdmPropertyValue;
+import org.apache.olingo.commons.api.edm.annotation.EdmRecord;
+import org.apache.olingo.commons.api.edm.annotation.EdmUrlRef;
+
+public abstract class AbstractEdmDynamicAnnotationExpression
+ extends AbstractEdmAnnotationEspression implements EdmDynamicAnnotationExpression {
+
+ @Override
+ public boolean isNot() {
+ return this instanceof EdmNot;
+ }
+
+ @Override
+ public EdmNot asNot() {
+ return isNot() ? (EdmNot) this : null;
+
+ }
+
+ @Override
+ public boolean isAnd() {
+ return this instanceof EdmAnd;
+ }
+
+ @Override
+ public EdmAnd asAnd() {
+ return isAnd() ? (EdmAnd) this : null;
+ }
+
+ @Override
+ public boolean isOr() {
+ return this instanceof EdmOr;
+ }
+
+ @Override
+ public EdmOr asOr() {
+ return isOr() ? (EdmOr) this : null;
+ }
+
+ @Override
+ public boolean isEq() {
+ return this instanceof EdmEq;
+ }
+
+ @Override
+ public EdmEq asEq() {
+ return isEq() ? (EdmEq) this : null;
+ }
+
+ @Override
+ public boolean isNe() {
+ return this instanceof EdmNe;
+ }
+
+ @Override
+ public EdmNe asNe() {
+ return isNe() ? (EdmNe) this : null;
+ }
+
+ @Override
+ public boolean isGt() {
+ return this instanceof EdmGt;
+ }
+
+ @Override
+ public EdmGt asGt() {
+ return isGt() ? (EdmGt) this : null;
+ }
+
+ @Override
+ public boolean isGe() {
+ return this instanceof EdmGe;
+ }
+
+ @Override
+ public EdmGe asGe() {
+ return isGe() ? (EdmGe) this : null;
+ }
+
+ @Override
+ public boolean isLt() {
+ return this instanceof EdmLt;
+ }
+
+ @Override
+ public EdmLt asLt() {
+ return isLt() ? (EdmLt) this : null;
+ }
+
+ @Override
+ public boolean isLe() {
+ return this instanceof EdmLe;
+ }
+
+ @Override
+ public EdmLe asLe() {
+ return isLe() ? (EdmLe) this : null;
+ }
+
+ @Override
+ public boolean isAnnotationPath() {
+ return this instanceof EdmAnnotationPath;
+ }
+
+ @Override
+ public EdmAnnotationPath asAnnotationPath() {
+ return isAnnotationPath() ? (EdmAnnotationPath) this : null;
+ }
+
+ @Override
+ public boolean isApply() {
+ return this instanceof EdmApply;
+ }
+
+ @Override
+ public EdmApply asApply() {
+ return isApply() ? (EdmApply) this : null;
+ }
+
+ @Override
+ public boolean isCast() {
+ return this instanceof EdmCast;
+ }
+
+ @Override
+ public EdmCast asCast() {
+ return isCast() ? (EdmCast) this : null;
+ }
+
+ @Override
+ public boolean isCollection() {
+ return this instanceof EdmCollection;
+ }
+
+ @Override
+ public EdmCollection asCollection() {
+ return isCollection() ? (EdmCollection) this : null;
+ }
+
+ @Override
+ public boolean isIf() {
+ return this instanceof EdmIf;
+ }
+
+ @Override
+ public EdmIf asIf() {
+ return isIf() ? (EdmIf) this : null;
+ }
+
+ @Override
+ public boolean isIsOf() {
+ return this instanceof EdmIsOf;
+ }
+
+ @Override
+ public EdmIsOf asIsOf() {
+ return isIsOf() ? (EdmIsOf) this : null;
+ }
+
+ @Override
+ public boolean isLabeledElement() {
+ return this instanceof EdmLabeledElement;
+ }
+
+ @Override
+ public EdmLabeledElement asLabeledElement() {
+ return isLabeledElement() ? (EdmLabeledElement) this : null;
+ }
+
+ @Override
+ public boolean isLabeledElementReference() {
+ return this instanceof EdmLabeledElementReference;
+ }
+
+ @Override
+ public EdmLabeledElementReference asLabeledElementReference() {
+ return isLabeledElementReference() ? (EdmLabeledElementReference) this : null;
+ }
+
+ @Override
+ public boolean isNull() {
+ return this instanceof EdmNull;
+ }
+
+ @Override
+ public EdmNull asNull() {
+ return isNull() ? (EdmNull) this : null;
+ }
+
+ @Override
+ public boolean isNavigationPropertyPath() {
+ return this instanceof EdmNavigationPropertyPath;
+ }
+
+ @Override
+ public EdmNavigationPropertyPath asNavigationPropertyPath() {
+ return isNavigationPropertyPath() ? (EdmNavigationPropertyPath) this : null;
+ }
+
+ @Override
+ public boolean isPath() {
+ return this instanceof EdmPath;
+ }
+
+ @Override
+ public EdmPath asPath() {
+ return isPath() ? (EdmPath) this : null;
+ }
+
+ @Override
+ public boolean isPropertyPath() {
+ return this instanceof EdmPropertyPath;
+ }
+
+ @Override
+ public EdmPropertyPath asPropertyPath() {
+ return isPropertyPath() ? (EdmPropertyPath) this : null;
+ }
+
+ @Override
+ public boolean isPropertyValue() {
+ return this instanceof EdmPropertyValue;
+ }
+
+ @Override
+ public EdmPropertyValue asPropertyValue() {
+ return isPropertyValue() ? (EdmPropertyValue) this : null;
+ }
+
+ @Override
+ public boolean isRecord() {
+ return this instanceof EdmRecord;
+ }
+
+ @Override
+ public EdmRecord asRecord() {
+ return isRecord() ? (EdmRecord) this : null;
+ }
+
+ @Override
+ public boolean isUrlRef() {
+ return this instanceof EdmUrlRef;
+ }
+
+ @Override
+ public EdmUrlRef asUrlRef() {
+ return isUrlRef() ? (EdmUrlRef) this : null;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmElementOrAttributeNotation.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmElementOrAttributeNotation.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmElementOrAttributeNotation.java
new file mode 100644
index 0000000..867055e
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmElementOrAttributeNotation.java
@@ -0,0 +1,35 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+/**
+ * Groups dynamic expressions that may be provided using element notation or attribute notation.
+ */
+public abstract class AbstractEdmElementOrAttributeNotation extends AbstractEdmDynamicAnnotationExpression {
+
+ private final String value;
+
+ public AbstractEdmElementOrAttributeNotation(final String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmTwoParamsOpDynamicAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmTwoParamsOpDynamicAnnotationExpression.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmTwoParamsOpDynamicAnnotationExpression.java
new file mode 100644
index 0000000..59c60fd
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/AbstractEdmTwoParamsOpDynamicAnnotationExpression.java
@@ -0,0 +1,47 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmTwoParamsOpDynamicAnnotationExpression;
+
+public abstract class AbstractEdmTwoParamsOpDynamicAnnotationExpression
+ extends AbstractEdmDynamicAnnotationExpression implements EdmTwoParamsOpDynamicAnnotationExpression {
+
+ private final EdmDynamicAnnotationExpression left;
+
+ private final EdmDynamicAnnotationExpression right;
+
+ public AbstractEdmTwoParamsOpDynamicAnnotationExpression(
+ final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+
+ this.left = left;
+ this.right = right;
+ }
+
+ @Override
+ public EdmDynamicAnnotationExpression getLeftExpression() {
+ return left;
+ }
+
+ @Override
+ public EdmDynamicAnnotationExpression getRightExpression() {
+ return right;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAndImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAndImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAndImpl.java
new file mode 100644
index 0000000..c0fc2db
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAndImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnd;
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+
+public class EdmAndImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmAnd {
+
+ public EdmAndImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAnnotationPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAnnotationPathImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAnnotationPathImpl.java
new file mode 100644
index 0000000..b1283bb
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmAnnotationPathImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationPath;
+
+public class EdmAnnotationPathImpl extends AbstractEdmElementOrAttributeNotation implements EdmAnnotationPath {
+
+ public EdmAnnotationPathImpl(final String value) {
+ super(value);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmApplyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmApplyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmApplyImpl.java
new file mode 100644
index 0000000..36bee4b
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmApplyImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import java.util.List;
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmApply;
+
+public class EdmApplyImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmApply {
+
+ private final String function;
+
+ private final List<EdmAnnotationExpression> parameters;
+
+ public EdmApplyImpl(final String function, final List<EdmAnnotationExpression> parameters) {
+ this.function = function;
+ this.parameters = parameters;
+ }
+
+ @Override
+ public String getFunction() {
+ return function;
+ }
+
+ @Override
+ public List<EdmAnnotationExpression> getParameters() {
+ return parameters;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmCollectionImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmCollectionImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmCollectionImpl.java
new file mode 100644
index 0000000..4508df5
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmCollectionImpl.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import java.util.List;
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmCollection;
+
+public class EdmCollectionImpl extends AbstractEdmDynamicAnnotationExpression implements EdmCollection {
+
+ private final List<EdmAnnotationExpression> items;
+
+ public EdmCollectionImpl(final List<EdmAnnotationExpression> items) {
+ this.items = items;
+ }
+
+ @Override
+ public List<EdmAnnotationExpression> getItems() {
+ return items;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmEqImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmEqImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmEqImpl.java
new file mode 100644
index 0000000..a53243d
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmEqImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmEq;
+
+public class EdmEqImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmEq {
+
+ public EdmEqImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGeImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGeImpl.java
new file mode 100644
index 0000000..e000dbf
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGeImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmGe;
+
+public class EdmGeImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmGe {
+
+ public EdmGeImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGtImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGtImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGtImpl.java
new file mode 100644
index 0000000..96d5c30
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmGtImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmGt;
+
+public class EdmGtImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmGt {
+
+ public EdmGtImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmIfImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmIfImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmIfImpl.java
new file mode 100644
index 0000000..76ff0ae
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmIfImpl.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmIf;
+
+public class EdmIfImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmIf {
+
+ private final EdmAnnotationExpression guard;
+
+ private final EdmAnnotationExpression _then;
+
+ private final EdmAnnotationExpression _else;
+
+ public EdmIfImpl(final EdmAnnotationExpression guard,
+ final EdmAnnotationExpression _then, final EdmAnnotationExpression _else) {
+
+ this.guard = guard;
+ this._then = _then;
+ this._else = _else;
+ }
+
+ @Override
+ public EdmAnnotationExpression getGuard() {
+ return guard;
+ }
+
+ @Override
+ public EdmAnnotationExpression getThen() {
+ return _then;
+ }
+
+ @Override
+ public EdmAnnotationExpression getElse() {
+ return _else;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java
new file mode 100644
index 0000000..0d7ca88
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmLabeledElement;
+
+public class EdmLabeledElementImpl
+ extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmLabeledElement {
+
+ private final String name;
+
+ private final EdmDynamicAnnotationExpression value;
+
+ public EdmLabeledElementImpl(final String name, final EdmDynamicAnnotationExpression value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public EdmDynamicAnnotationExpression getValue() {
+ return value;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java
new file mode 100644
index 0000000..b731e25
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLabeledElementReferenceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmLabeledElementReference;
+
+public class EdmLabeledElementReferenceImpl
+ extends AbstractEdmElementOrAttributeNotation implements EdmLabeledElementReference {
+
+ public EdmLabeledElementReferenceImpl(final String value) {
+ super(value);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java
new file mode 100644
index 0000000..d3fe46f
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLeImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmLe;
+
+public class EdmLeImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmLe {
+
+ public EdmLeImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java
new file mode 100644
index 0000000..5d27877
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmLtImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmLt;
+
+public class EdmLtImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmLt {
+
+ public EdmLtImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java
new file mode 100644
index 0000000..727b963
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNavigationPropertyPathImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmNavigationPropertyPath;
+
+public class EdmNavigationPropertyPathImpl
+ extends AbstractEdmElementOrAttributeNotation implements EdmNavigationPropertyPath {
+
+ public EdmNavigationPropertyPathImpl(final String value) {
+ super(value);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java
new file mode 100644
index 0000000..487768e
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNeImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmNe;
+
+public class EdmNeImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmNe {
+
+ public EdmNeImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java
new file mode 100644
index 0000000..80d3df9
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNotImpl.java
@@ -0,0 +1,37 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmNot;
+
+public class EdmNotImpl extends AbstractEdmDynamicAnnotationExpression implements EdmNot {
+
+ private final EdmDynamicAnnotationExpression expression;
+
+ public EdmNotImpl(final EdmDynamicAnnotationExpression expression) {
+ this.expression = expression;
+ }
+
+ @Override
+ public EdmDynamicAnnotationExpression getExpression() {
+ return expression;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java
new file mode 100644
index 0000000..43e9d41
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmNullImpl.java
@@ -0,0 +1,25 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmNull;
+
+public class EdmNullImpl extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmNull {
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java
new file mode 100644
index 0000000..0d0af23
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmOrImpl.java
@@ -0,0 +1,30 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmOr;
+
+public class EdmOrImpl extends AbstractEdmTwoParamsOpDynamicAnnotationExpression implements EdmOr {
+
+ public EdmOrImpl(final EdmDynamicAnnotationExpression left, final EdmDynamicAnnotationExpression right) {
+ super(left, right);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java
new file mode 100644
index 0000000..f558745
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPathImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmPath;
+
+public class EdmPathImpl extends AbstractEdmElementOrAttributeNotation implements EdmPath {
+
+ public EdmPathImpl(final String value) {
+ super(value);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java
new file mode 100644
index 0000000..4b7ce14
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyPathImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmPropertyPath;
+
+public class EdmPropertyPathImpl extends AbstractEdmElementOrAttributeNotation implements EdmPropertyPath {
+
+ public EdmPropertyPathImpl(final String value) {
+ super(value);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java
new file mode 100644
index 0000000..423bce6
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmPropertyValueImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmPropertyValue;
+
+public class EdmPropertyValueImpl
+ extends AbstractEdmAnnotatableDynamicAnnotationExpression implements EdmPropertyValue {
+
+ private final String property;
+
+ private final EdmAnnotationExpression value;
+
+ public EdmPropertyValueImpl(final String property, final EdmAnnotationExpression value) {
+ this.property = property;
+ this.value = value;
+ }
+
+ @Override
+ public String getProperty() {
+ return property;
+ }
+
+ @Override
+ public EdmAnnotationExpression getValue() {
+ return value;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java
new file mode 100644
index 0000000..497554a
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmUrlRefImpl.java
@@ -0,0 +1,37 @@
+/*
+ * 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.commons.core.edm.annotation;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnnotationExpression;
+import org.apache.olingo.commons.api.edm.annotation.EdmUrlRef;
+
+public class EdmUrlRefImpl extends AbstractEdmDynamicAnnotationExpression implements EdmUrlRef {
+
+ private final EdmAnnotationExpression value;
+
+ public EdmUrlRefImpl(final EdmAnnotationExpression value) {
+ this.value = value;
+ }
+
+ @Override
+ public EdmAnnotationExpression getValue() {
+ return value;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/726fbe52/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java
index 7a61a53..18c3f0a 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/AbstractGeospatialType.java
@@ -36,6 +36,7 @@ import org.apache.olingo.commons.api.edm.geo.MultiPoint;
import org.apache.olingo.commons.api.edm.geo.MultiPolygon;
import org.apache.olingo.commons.api.edm.geo.Point;
import org.apache.olingo.commons.api.edm.geo.Polygon;
+import org.apache.olingo.commons.api.edm.geo.SRID;
public abstract class AbstractGeospatialType<T extends Geospatial> extends SingletonPrimitiveType {
@@ -83,7 +84,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
return matcher;
}
- private Point newPoint(final Integer srid, final String point, final Boolean isNullable,
+ private Point newPoint(final SRID srid, final String point, final Boolean isNullable,
final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode)
throws EdmPrimitiveTypeException {
@@ -106,7 +107,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
final Matcher matcher = getMatcher(PATTERN, value);
- return newPoint(Integer.valueOf(matcher.group(2)), matcher.group(4),
+ return newPoint(SRID.valueOf(matcher.group(2)), matcher.group(4),
isNullable, maxLength, precision, scale, isUnicode);
}
@@ -121,10 +122,10 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
isNullable, maxLength, precision, scale, isUnicode));
}
- return new MultiPoint(dimension, Integer.valueOf(matcher.group(2)), points);
+ return new MultiPoint(dimension, SRID.valueOf(matcher.group(2)), points);
}
- private LineString newLineString(final Integer srid, final String lineString, final Boolean isNullable,
+ private LineString newLineString(final SRID srid, final String lineString, final Boolean isNullable,
final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode)
throws EdmPrimitiveTypeException {
@@ -141,7 +142,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
final Matcher matcher = getMatcher(PATTERN, value);
- return newLineString(Integer.valueOf(matcher.group(2)), matcher.group(4),
+ return newLineString(SRID.valueOf(matcher.group(2)), matcher.group(4),
isNullable, maxLength, precision, scale, isUnicode);
}
@@ -166,10 +167,10 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
lineStrings.add(newLineString(null, lineString, isNullable, maxLength, precision, scale, isUnicode));
}
- return new MultiLineString(this.dimension, Integer.valueOf(matcher.group(2)), lineStrings);
+ return new MultiLineString(this.dimension, SRID.valueOf(matcher.group(2)), lineStrings);
}
- private Polygon newPolygon(final Integer srid, final String polygon, final Boolean isNullable,
+ private Polygon newPolygon(final SRID srid, final String polygon, final Boolean isNullable,
final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode)
throws EdmPrimitiveTypeException {
@@ -192,7 +193,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
final Matcher matcher = getMatcher(PATTERN, value);
- return newPolygon(Integer.valueOf(matcher.group(2)), matcher.group(4),
+ return newPolygon(SRID.valueOf(matcher.group(2)), matcher.group(4),
isNullable, maxLength, precision, scale, isUnicode);
}
@@ -222,7 +223,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
polygons.add(newPolygon(null, polygon, isNullable, maxLength, precision, scale, isUnicode));
}
- return new MultiPolygon(dimension, Integer.valueOf(matcher.group(2)), polygons);
+ return new MultiPolygon(dimension, SRID.valueOf(matcher.group(2)), polygons);
}
protected GeospatialCollection stringToCollection(final String value, final Boolean isNullable,
@@ -234,7 +235,7 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
Geospatial item = null;
switch (Geospatial.Type.valueOf(matcher.group(3).toUpperCase())) {
case POINT:
- item = newPoint(Integer.valueOf(matcher.group(2)), matcher.group(4),
+ item = newPoint(SRID.valueOf(matcher.group(2)), matcher.group(4),
isNullable, maxLength, precision, scale, isUnicode);
break;
@@ -245,11 +246,11 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
isNullable, maxLength, precision, scale, isUnicode));
}
- item = new MultiPoint(dimension, Integer.valueOf(matcher.group(2)), points);
+ item = new MultiPoint(dimension, SRID.valueOf(matcher.group(2)), points);
break;
case LINESTRING:
- item = newLineString(Integer.valueOf(matcher.group(2)), matcher.group(4),
+ item = newLineString(SRID.valueOf(matcher.group(2)), matcher.group(4),
isNullable, maxLength, precision, scale, isUnicode);
break;
@@ -260,11 +261,11 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
isNullable, maxLength, precision, scale, isUnicode));
}
- item = new MultiLineString(this.dimension, Integer.valueOf(matcher.group(2)), lineStrings);
+ item = new MultiLineString(this.dimension, SRID.valueOf(matcher.group(2)), lineStrings);
break;
case POLYGON:
- item = newPolygon(Integer.valueOf(matcher.group(2)), matcher.group(4),
+ item = newPolygon(SRID.valueOf(matcher.group(2)), matcher.group(4),
isNullable, maxLength, precision, scale, isUnicode);
break;
@@ -275,17 +276,17 @@ public abstract class AbstractGeospatialType<T extends Geospatial> extends Singl
isNullable, maxLength, precision, scale, isUnicode));
}
- item = new MultiPolygon(dimension, Integer.valueOf(matcher.group(2)), polygons);
+ item = new MultiPolygon(dimension, SRID.valueOf(matcher.group(2)), polygons);
break;
default:
}
- return new GeospatialCollection(dimension, Integer.valueOf(matcher.group(2)),
+ return new GeospatialCollection(dimension, SRID.valueOf(matcher.group(2)),
Collections.<Geospatial>singletonList(item));
}
- private StringBuilder toStringBuilder(final Integer srid) {
+ private StringBuilder toStringBuilder(final SRID srid) {
return new StringBuilder(dimension.name().toLowerCase()).append('\'').
append("SRID=").append(srid).append(';');
}