You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by sk...@apache.org on 2014/02/19 14:41:52 UTC
[12/29] [OLINGO-170] Moved provider and implementation to server
module
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Target.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Target.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Target.java
new file mode 100644
index 0000000..1d01992
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Target.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.api.edm.provider;
+
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+
+public class Target {
+
+ private String targetName;
+ private FullQualifiedName entityContainer;
+
+ public String getTargetName() {
+ return targetName;
+ }
+
+ public Target setTargetName(final String targetPathName) {
+ targetName = targetPathName;
+ return this;
+ }
+
+ public FullQualifiedName getEntityContainer() {
+ return entityContainer;
+ }
+
+ public Target setEntityContainer(final FullQualifiedName entityContainer) {
+ this.entityContainer = entityContainer;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Term.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Term.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Term.java
new file mode 100644
index 0000000..c564e17
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/Term.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+
+public class Term {
+ private String name;
+ private FullQualifiedName type;
+ private FullQualifiedName baseTerm;
+ // TODO: AppliesTo is a list of csdl elements => should we put this list inside an enum?
+ private String appliesTo;
+ private boolean isCollection;
+
+ // Facets
+ private String defaultValue;
+ private Boolean nullable;
+ private Integer maxLength;
+ private Integer precision;
+ private Integer scale;
+
+ // Annotation
+ private List<Annotation> annotations;
+
+ public String getName() {
+ return name;
+ }
+
+ public Term setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public FullQualifiedName getType() {
+ return type;
+ }
+
+ public Term setType(final FullQualifiedName type) {
+ this.type = type;
+ return this;
+ }
+
+ public FullQualifiedName getBaseTerm() {
+ return baseTerm;
+ }
+
+ public Term setBaseTerm(final FullQualifiedName baseTerm) {
+ this.baseTerm = baseTerm;
+ return this;
+ }
+
+ public String getAppliesTo() {
+ return appliesTo;
+ }
+
+ public Term setAppliesTo(final String appliesTo) {
+ this.appliesTo = appliesTo;
+ return this;
+ }
+
+ public boolean isCollection() {
+ return isCollection;
+ }
+
+ public Term setCollection(final boolean isCollection) {
+ this.isCollection = isCollection;
+ return this;
+ }
+
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ public Term setDefaultValue(final String defaultValue) {
+ this.defaultValue = defaultValue;
+ return this;
+ }
+
+ public Boolean getNullable() {
+ return nullable;
+ }
+
+ public Term setNullable(final Boolean nullable) {
+ this.nullable = nullable;
+ return this;
+ }
+
+ public Integer getMaxLength() {
+ return maxLength;
+ }
+
+ public Term setMaxLength(final Integer maxLength) {
+ this.maxLength = maxLength;
+ return this;
+ }
+
+ public Integer getPrecision() {
+ return precision;
+ }
+
+ public Term setPrecision(final Integer precision) {
+ this.precision = precision;
+ return this;
+ }
+
+ public Integer getScale() {
+ return scale;
+ }
+
+ public Term setScale(final Integer scale) {
+ this.scale = scale;
+ return this;
+ }
+
+ public List<Annotation> getAnnotations() {
+ return annotations;
+ }
+
+ public Term setAnnotations(final List<Annotation> annotations) {
+ this.annotations = annotations;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/TypeDefinition.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/TypeDefinition.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/TypeDefinition.java
new file mode 100644
index 0000000..5608aef
--- /dev/null
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/edm/provider/TypeDefinition.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.api.edm.provider;
+
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+
+public class TypeDefinition {
+
+ private String name;
+ // TODO: UnderlyingType can only be primitve...
+ private FullQualifiedName underlyingType;
+
+ // Facets
+ private Integer maxLength;
+ private Integer precision;
+ private Integer scale;
+ private Boolean isUnicode;
+
+ // Annotations
+
+ public String getName() {
+ return name;
+ }
+
+ public TypeDefinition setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public FullQualifiedName getUnderlyingType() {
+ return underlyingType;
+ }
+
+ public TypeDefinition setUnderlyingType(final FullQualifiedName underlyingType) {
+ this.underlyingType = underlyingType;
+ return this;
+ }
+
+ public Integer getMaxLength() {
+ return maxLength;
+ }
+
+ public TypeDefinition setMaxLength(final Integer maxLength) {
+ this.maxLength = maxLength;
+ return this;
+ }
+
+ public Integer getPrecision() {
+ return precision;
+ }
+
+ public TypeDefinition setPrecision(final Integer precision) {
+ this.precision = precision;
+ return this;
+ }
+
+ public Integer getScale() {
+ return scale;
+ }
+
+ public TypeDefinition setScale(final Integer scale) {
+ this.scale = scale;
+ return this;
+ }
+
+ public Boolean getIsUnicode() {
+ return isUnicode;
+ }
+
+ public TypeDefinition setIsUnicode(final Boolean isUnicode) {
+ this.isUnicode = isUnicode;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java
index 4d35971..60ef90c 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriInfoMetadata.java
@@ -24,7 +24,7 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.FormatOption;
public interface UriInfoMetadata {
public FormatOption getFormatOption();
-
- public String getFragment() ;
-
+
+ public String getFragment();
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java
index 6815e85..1d6e0cd 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriParameter.java
@@ -29,7 +29,7 @@ public interface UriParameter {
public Expression getExression();
public String getName();
-
+
public String getRefencedProperty();
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java
index 167a1f8..2693a04 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResource.java
@@ -19,10 +19,10 @@
package org.apache.olingo.odata4.server.api.uri;
public interface UriResource {
-
+
UriResourceKind getKind();
@Override
String toString();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java
index bd73fcb..80b8893 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceAction.java
@@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri;
import org.apache.olingo.odata4.commons.api.edm.EdmAction;
import org.apache.olingo.odata4.commons.api.edm.EdmActionImport;
-public interface UriResourceAction extends UriResourcePartTyped {
+public interface UriResourceAction extends UriResourcePartTyped {
EdmAction getAction();
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java
index 43840f3..6f4e837 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceComplexProperty.java
@@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri;
import org.apache.olingo.odata4.commons.api.edm.EdmComplexType;
public interface UriResourceComplexProperty extends UriResourceProperty {
-
+
EdmComplexType getComplexType();
EdmComplexType getComplexTypeFilter();
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java
index 5fe9055..8391d0b 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceIt.java
@@ -22,9 +22,9 @@ import org.apache.olingo.odata4.commons.api.edm.EdmType;
/**
* Class indicating the $it reference. $it may be used within filter to
- * refer to the last EDM object reference in the resource path. Since $it is
- * optional in some cases ( e.g. first member expressions) the {@link #isExplicitIt()}
- * method can be used to check if $it was explicitly noted in the URI
+ * refer to the last EDM object reference in the resource path. Since $it is
+ * optional in some cases ( e.g. first member expressions) the {@link #isExplicitIt()} method can be used to check if
+ * $it was explicitly noted in the URI
*/
public interface UriResourceIt extends UriResourcePartTyped {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java
index 95ba402..a0df760 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceKind.java
@@ -21,5 +21,5 @@ package org.apache.olingo.odata4.server.api.uri;
public enum UriResourceKind {
action, complexProperty, count, entitySet, function, it, lambdaAll, lambdaAny,
- lambdaVariable, navigationProperty, ref, root, primitiveProperty, singleton, startingTypeFilter, value,
+ lambdaVariable, navigationProperty, ref, root, primitiveProperty, singleton, startingTypeFilter, value,
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java
index b28bbb7..12cf0de 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAll.java
@@ -21,10 +21,9 @@ package org.apache.olingo.odata4.server.api.uri;
import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
public interface UriResourceLambdaAll extends UriResourcePartTyped {
-
+
public String getLamdaVariable();
public Expression getExpression();
-
-}
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java
index b7e2bda..3f81b96 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaAny.java
@@ -21,9 +21,9 @@ package org.apache.olingo.odata4.server.api.uri;
import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
public interface UriResourceLambdaAny extends UriResourcePartTyped {
-
+
public String getLamdaVariable();
public Expression getExpression();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java
index 6bc523d..827ada3 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceLambdaRef.java
@@ -18,9 +18,8 @@
******************************************************************************/
package org.apache.olingo.odata4.server.api.uri;
-
public interface UriResourceLambdaRef extends UriResourcePartTyped {
- public String getVariableText();
+ public String getVariableText();
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java
index 50b8485..ef027fd 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceNavigation.java
@@ -32,5 +32,5 @@ public interface UriResourceNavigation extends UriResourcePartTyped {
EdmType getTypeFilterOnCollection();
EdmType getTypeFilterOnEntry();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java
index 0f169b1..3eca597 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourcePartTyped.java
@@ -22,11 +22,11 @@ package org.apache.olingo.odata4.server.api.uri;
import org.apache.olingo.odata4.commons.api.edm.EdmType;
public interface UriResourcePartTyped extends UriResource {
-
+
EdmType getType();
boolean isCollection();
String toString(boolean includeFilters);
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java
index f743f49..d4a4e82 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceProperty.java
@@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri;
import org.apache.olingo.odata4.commons.api.edm.EdmProperty;
public interface UriResourceProperty extends UriResourcePartTyped {
-
+
EdmProperty getProperty();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java
index 82794a7..c5ee55c 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceSingleton.java
@@ -28,5 +28,5 @@ public interface UriResourceSingleton extends UriResourcePartTyped {
EdmEntityType getEntityType();
EdmEntityType getEntityTypeFilter();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java
index a488c3c..1fb51c3 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/UriResourceStartingTypeFilter.java
@@ -25,5 +25,5 @@ public interface UriResourceStartingTypeFilter extends UriResourcePartTyped {
EdmType getTypeFilterOnCollection();
EdmType getTypeFilterOnEntry();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java
index ea1d5ff..afdaa7d 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/AliasQueryOption.java
@@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption;
import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
public interface AliasQueryOption extends QueryOption {
-
+
public Expression getValue();
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java
index 4240f9a..cc14681 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExceptionVisitExpand.java
@@ -20,6 +20,6 @@ package org.apache.olingo.odata4.server.api.uri.queryoption;
public class ExceptionVisitExpand extends Exception {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java
index 216fdd1..40a8e46 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/ExpandOption.java
@@ -21,7 +21,7 @@ package org.apache.olingo.odata4.server.api.uri.queryoption;
import java.util.List;
public interface ExpandOption extends SystemQueryOption {
-
+
List<ExpandItem> getExpandItems();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java
index ed76c5a..bd58ae7 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FilterOption.java
@@ -21,6 +21,6 @@ package org.apache.olingo.odata4.server.api.uri.queryoption;
import org.apache.olingo.odata4.server.api.uri.queryoption.expression.Expression;
public interface FilterOption extends SystemQueryOption {
-
+
Expression getExpression();
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java
index 8e327c0..eaf85c9 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/FormatOption.java
@@ -19,7 +19,7 @@
package org.apache.olingo.odata4.server.api.uri.queryoption;
public interface FormatOption extends SystemQueryOption {
-
+
// TODO Select best representation for format
String getFormat();
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java
index 8369caa..764bd52 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/IdOption.java
@@ -19,7 +19,7 @@
package org.apache.olingo.odata4.server.api.uri.queryoption;
public interface IdOption extends SystemQueryOption {
-
+
String getValue();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java
index 00530dc..cb0066f 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/InlineCountOption.java
@@ -19,7 +19,7 @@
package org.apache.olingo.odata4.server.api.uri.queryoption;
public interface InlineCountOption extends SystemQueryOption {
-
+
boolean getValue();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java
index cb2afb5..0ed1d93 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/QueryOption.java
@@ -23,5 +23,5 @@ public interface QueryOption {
public String getName();
public String getText();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java
index 8a3f970..0355ca1 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SearchOption.java
@@ -23,5 +23,5 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.search.SearchExpressi
public interface SearchOption extends SystemQueryOption {
SearchExpression getSearchExpression();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java
index 75f7566..04cef3e 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/SelectItem.java
@@ -18,7 +18,7 @@
******************************************************************************/
package org.apache.olingo.odata4.server.api.uri.queryoption;
-import org.apache.olingo.odata4.commons.api.edm.provider.FullQualifiedName;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
import org.apache.olingo.odata4.server.api.uri.UriInfoResource;
public interface SelectItem {
@@ -30,5 +30,5 @@ public interface SelectItem {
FullQualifiedName getAllOperationsInSchemaNameSpace();
UriInfoResource getResourceInfo();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java
index ec1ed59..7f1dbf6 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/TopOption.java
@@ -19,7 +19,7 @@
package org.apache.olingo.odata4.server.api.uri.queryoption;
public interface TopOption extends SystemQueryOption {
-
+
String getValue();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java
index 133a2c1..9e48c6a 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/AliasExpression.java
@@ -18,8 +18,8 @@
******************************************************************************/
package org.apache.olingo.odata4.server.api.uri.queryoption.expression;
-public interface AliasExpression extends Expression {
+public interface AliasExpression extends Expression {
public String getParameterName();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java
index 126cb97..25b6a40 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Enumeration.java
@@ -25,6 +25,7 @@ import org.apache.olingo.odata4.commons.api.edm.EdmEnumType;
public interface Enumeration extends Expression {
public List<String> getValues();
+
public EdmEnumType getType();
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java
index e85d2c2..176d3ec 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/ExpressionVisitor.java
@@ -20,9 +20,9 @@ package org.apache.olingo.odata4.server.api.uri.queryoption.expression;
import java.util.List;
+import org.apache.olingo.odata4.commons.api.ODataApplicationException;
import org.apache.olingo.odata4.commons.api.edm.EdmEnumType;
import org.apache.olingo.odata4.commons.api.edm.EdmType;
-import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
import org.apache.olingo.odata4.server.api.uri.UriInfoResource;
public interface ExpressionVisitor<T> {
@@ -35,8 +35,8 @@ public interface ExpressionVisitor<T> {
T visitMethodCall(SupportedMethodCalls methodCall, List<T> parameters)
throws ExceptionVisitExpression, ODataApplicationException;
-
- T visitLambdaExpression(String functionText,String variableText, Expression expression)
+
+ T visitLambdaExpression(String functionText, String variableText, Expression expression)
throws ExceptionVisitExpression, ODataApplicationException;
T visitLiteral(String literal) throws ExceptionVisitExpression, ODataApplicationException;
@@ -50,7 +50,7 @@ public interface ExpressionVisitor<T> {
T visitLambdaReference(String variableText) throws ExceptionVisitExpression, ODataApplicationException;
T visitEnum(EdmEnumType type, List<String> enumValues) throws ExceptionVisitExpression, ODataApplicationException;
-
+
T visitConstant(SupportedConstants kind) throws ExceptionVisitExpression, ODataApplicationException;
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java
index e0d6d19..6670454 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/Member.java
@@ -26,7 +26,7 @@ public interface Member extends Expression {
public UriInfoResource getPath();
public EdmType getType();
-
+
public boolean isCollection();
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java
index 3e7ca77..4a78fd9 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedBinaryOperators.java
@@ -19,8 +19,8 @@
package org.apache.olingo.odata4.server.api.uri.queryoption.expression;
public enum SupportedBinaryOperators {
-
- //enum
+
+ // enum
HAS("has"),
// multiplicative
MUL("mul"), DIV("div"), MOD("mod"),
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java
index 4e7b835..47b6d1d 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedConstants.java
@@ -19,11 +19,11 @@
package org.apache.olingo.odata4.server.api.uri.queryoption.expression;
public enum SupportedConstants {
-
+
TRUE("true"),
FALSE("false"),
NULL("null");
-
+
private String syntax;
private SupportedConstants(final String syntax) {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java
index cf6d628..ee264b5 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/SupportedMethodCalls.java
@@ -46,7 +46,7 @@ public enum SupportedMethodCalls {
public static SupportedMethodCalls get(final String method) {
for (SupportedMethodCalls op : SupportedMethodCalls.values()) {
- if (op.toString().equals(method )) {
+ if (op.toString().equals(method)) {
return op;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java
index c3dc108..61f5813 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/expression/VisitableExression.java
@@ -18,7 +18,7 @@
******************************************************************************/
package org.apache.olingo.odata4.server.api.uri.queryoption.expression;
-import org.apache.olingo.odata4.commons.api.exception.ODataApplicationException;
+import org.apache.olingo.odata4.commons.api.ODataApplicationException;
public interface VisitableExression {
@@ -27,7 +27,7 @@ public interface VisitableExression {
* each expression used as node in an expression tree. The implementations should
* behave as follows:
* <li>Call accept on all sub nodes and store the returned Objects which are of the generic type T
- * <li>Call the appropriate method on the {@link ExpressionVisitor} instance and provide the stored return objects
+ * <li>Call the appropriate method on the {@link ExpressionVisitor} instance and provide the stored return objects
* to that instance
* <li>Return the object which should be passed to the processing algorithm of the parent expression node
* <br>
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java
index 1431f9f..98749b0 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchBinary.java
@@ -25,5 +25,5 @@ public interface SearchBinary extends SearchExpression {
SearchExpression getLeftOperand();
SearchExpression getRightOperand();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java
index 1a8e823..9125b99 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchTerm.java
@@ -19,7 +19,7 @@
package org.apache.olingo.odata4.server.api.uri.queryoption.search;
public interface SearchTerm extends SearchExpression {
-
+
String getSearchTerm();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java
index b2fd9ea..bd5873b 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SearchUnary.java
@@ -19,7 +19,7 @@
package org.apache.olingo.odata4.server.api.uri.queryoption.search;
public interface SearchUnary {
-
+
SearchExpression getOperand();
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java
index cc5c573..19f1ccd 100644
--- a/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java
+++ b/odata4-lib/odata4-server-api/src/main/java/org/apache/olingo/odata4/server/api/uri/queryoption/search/SupportedSearchBinaryOperators.java
@@ -27,7 +27,7 @@ public enum SupportedSearchBinaryOperators {
private SupportedSearchBinaryOperators(final String syntax) {
this.syntax = syntax;
}
-
+
@Override
public String toString() {
return syntax;
@@ -42,5 +42,4 @@ public enum SupportedSearchBinaryOperators {
return null;
}
-
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImpl.java
new file mode 100644
index 0000000..1b6715f
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImpl.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmAction;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind;
+import org.apache.olingo.odata4.server.api.edm.provider.Action;
+
+public class EdmActionImpl extends EdmOperationImpl implements EdmAction {
+
+ public EdmActionImpl(final EdmProviderImpl edm, final FullQualifiedName name, final Action action) {
+ super(edm, name, action, EdmTypeKind.ACTION);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImpl.java
new file mode 100644
index 0000000..5b1ae5d
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmActionImportImpl.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmAction;
+import org.apache.olingo.odata4.commons.api.edm.EdmActionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata4.server.api.edm.provider.ActionImport;
+
+public class EdmActionImportImpl extends EdmOperationImportImpl implements EdmActionImport {
+
+ private final ActionImport actionImport;
+
+ public EdmActionImportImpl(final EdmProviderImpl edm, final String name, final EdmEntityContainer container,
+ final ActionImport actionImport) {
+ super(edm, name, container, actionImport);
+ this.actionImport = actionImport;
+ }
+
+ @Override
+ public EdmAction getAction() {
+ return edm.getAction(actionImport.getAction(), null, null);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmBindingTargetImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmBindingTargetImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmBindingTargetImpl.java
new file mode 100644
index 0000000..bdafd55
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmBindingTargetImpl.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmBindingTarget;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.server.api.edm.provider.BindingTarget;
+import org.apache.olingo.odata4.server.api.edm.provider.NavigationPropertyBinding;
+import org.apache.olingo.odata4.server.api.edm.provider.Target;
+
+public abstract class EdmBindingTargetImpl extends EdmNamedImpl implements EdmBindingTarget {
+
+ private BindingTarget target;
+ private EdmEntityContainer container;
+
+ public EdmBindingTargetImpl(final EdmProviderImpl edm, final EdmEntityContainer container,
+ final BindingTarget target) {
+ super(edm, target.getName());
+ this.container = container;
+ this.target = target;
+ }
+
+ @Override
+ public EdmBindingTarget getRelatedBindingTarget(final String path) {
+ EdmBindingTarget bindingTarget = null;
+ List<NavigationPropertyBinding> navigationPropertyBindings = target.getNavigationPropertyBindings();
+ if (navigationPropertyBindings != null) {
+ for (NavigationPropertyBinding binding : navigationPropertyBindings) {
+ if (binding.getPath().equals(path)) {
+ Target providerTarget = binding.getTarget();
+ EdmEntityContainer entityContainer = edm.getEntityContainer(providerTarget.getEntityContainer());
+ if (entityContainer == null) {
+ throw new EdmException("Cant find entity container with name: " + providerTarget.getEntityContainer());
+ }
+ String targetName = providerTarget.getTargetName();
+ bindingTarget = entityContainer.getEntitySet(targetName);
+ if (bindingTarget == null) {
+ bindingTarget = entityContainer.getSingleton(targetName);
+ if (bindingTarget != null) {
+ break;
+ } else {
+ throw new EdmException("Cant find target with name: " + targetName);
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+
+ return bindingTarget;
+ }
+
+ @Override
+ public EdmEntityContainer getEntityContainer() {
+ return container;
+ }
+
+ @Override
+ public EdmEntityType getEntityType() {
+ EdmEntityType type = edm.getEntityType(target.getType());
+ if (type == null) {
+ throw new EdmException("Can“t find entity type : " + target.getType() + "for entity set: " + target.getName());
+ }
+ return type;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImpl.java
new file mode 100644
index 0000000..f5075e0
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmComplexTypeImpl.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmComplexType;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind;
+import org.apache.olingo.odata4.server.api.edm.provider.ComplexType;
+
+public class EdmComplexTypeImpl extends EdmStructuralTypeImpl implements EdmComplexType {
+
+ public EdmComplexTypeImpl(final EdmProviderImpl edm, final FullQualifiedName name, final ComplexType complexType) {
+ super(edm, name, complexType, EdmTypeKind.COMPLEX);
+ }
+
+ @Override
+ public EdmComplexType getBaseType() {
+ return (EdmComplexType) baseType;
+ }
+
+ @Override
+ protected EdmStructuralType buildBaseType(final FullQualifiedName baseTypeName) {
+ EdmComplexType baseType = null;
+ if (baseTypeName != null) {
+ baseType = edm.getComplexType(baseTypeName);
+ if (baseType == null) {
+ throw new EdmException("Can't find base type with name: " + baseTypeName + " for complex type: " + getName());
+ }
+ }
+ return baseType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmElementImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmElementImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmElementImpl.java
new file mode 100644
index 0000000..7cecac8
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmElementImpl.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmElement;
+
+public abstract class EdmElementImpl extends EdmNamedImpl implements EdmElement {
+
+ public EdmElementImpl(final EdmProviderImpl edm, final String name) {
+ super(edm, name);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImpl.java
new file mode 100644
index 0000000..8908406
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityContainerImpl.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.olingo.odata4.commons.api.ODataException;
+import org.apache.olingo.odata4.commons.api.edm.EdmActionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmSingleton;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.odata4.server.api.edm.provider.ActionImport;
+import org.apache.olingo.odata4.server.api.edm.provider.EdmProvider;
+import org.apache.olingo.odata4.server.api.edm.provider.EntityContainerInfo;
+import org.apache.olingo.odata4.server.api.edm.provider.EntitySet;
+import org.apache.olingo.odata4.server.api.edm.provider.FunctionImport;
+import org.apache.olingo.odata4.server.api.edm.provider.Singleton;
+
+public class EdmEntityContainerImpl extends EdmNamedImpl implements EdmEntityContainer {
+
+ private final FullQualifiedName entityContainerName;
+ private final EdmProvider provider;
+ private final Map<String, EdmSingleton> singletons = new HashMap<String, EdmSingleton>();
+ private final Map<String, EdmEntitySet> entitySets = new HashMap<String, EdmEntitySet>();
+ private final Map<String, EdmActionImport> actionImports = new HashMap<String, EdmActionImport>();
+ private final Map<String, EdmFunctionImport> functionImports = new HashMap<String, EdmFunctionImport>();
+
+ public EdmEntityContainerImpl(final EdmProviderImpl edm, final EdmProvider provider,
+ final EntityContainerInfo entityContainerInfo) {
+ super(edm, entityContainerInfo.getContainerName().getName());
+ this.provider = provider;
+ entityContainerName = entityContainerInfo.getContainerName();
+ }
+
+ @Override
+ public String getNamespace() {
+ return entityContainerName.getNamespace();
+ }
+
+ @Override
+ public EdmSingleton getSingleton(final String singletonName) {
+ EdmSingleton singleton = singletons.get(singletonName);
+ if (singleton == null) {
+ try {
+ Singleton providerSingleton = provider.getSingleton(entityContainerName, singletonName);
+ if (providerSingleton != null) {
+ singleton = new EdmSingletonImpl(edm, this, providerSingleton);
+ if (singleton != null) {
+ singletons.put(singletonName, singleton);
+ }
+ }
+ } catch (ODataException e) {
+ throw new EdmException(e);
+ }
+ }
+ return singleton;
+ }
+
+ @Override
+ public EdmEntitySet getEntitySet(final String entitySetName) {
+ EdmEntitySet entitySet = entitySets.get(entitySetName);
+ if (entitySet == null) {
+ try {
+ EntitySet providerEntitySet = provider.getEntitySet(entityContainerName, entitySetName);
+ if (providerEntitySet != null) {
+ entitySet = new EdmEntitySetImpl(edm, this, providerEntitySet);
+ if (entitySet != null) {
+ entitySets.put(entitySetName, entitySet);
+ }
+ }
+ } catch (ODataException e) {
+ throw new EdmException(e);
+ }
+ }
+ return entitySet;
+ }
+
+ @Override
+ public EdmActionImport getActionImport(final String actionImportName) {
+ EdmActionImport actionImport = actionImports.get(actionImportName);
+ if (actionImport == null) {
+ try {
+ ActionImport providerImport = provider.getActionImport(entityContainerName, actionImportName);
+ if (providerImport != null) {
+ actionImport = new EdmActionImportImpl(edm, actionImportName, this, providerImport);
+ if (actionImport != null) {
+ actionImports.put(actionImportName, actionImport);
+ }
+ }
+ } catch (ODataException e) {
+ throw new EdmException(e);
+ }
+ }
+ return actionImport;
+ }
+
+ @Override
+ public EdmFunctionImport getFunctionImport(final String functionImportName) {
+ EdmFunctionImport functionImport = functionImports.get(functionImportName);
+ if (functionImport == null) {
+ try {
+ FunctionImport providerImport = provider.getFunctionImport(entityContainerName, functionImportName);
+ if (providerImport != null) {
+ functionImport = new EdmFunctionImportImpl(edm, functionImportName, this, providerImport);
+ if (functionImport != null) {
+ functionImports.put(functionImportName, functionImport);
+ }
+ }
+ } catch (ODataException e) {
+ throw new EdmException(e);
+ }
+ }
+ return functionImport;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImpl.java
new file mode 100644
index 0000000..61868d4
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetImpl.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.odata4.server.api.edm.provider.EntitySet;
+
+public class EdmEntitySetImpl extends EdmBindingTargetImpl implements EdmEntitySet {
+
+ public EdmEntitySetImpl(final EdmProviderImpl edm, final EdmEntityContainer container, final EntitySet entitySet) {
+ super(edm, container, entitySet);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImpl.java
new file mode 100644
index 0000000..f4ae851
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntitySetInfoImpl.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import java.net.URI;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEntitySetInfo;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.server.api.edm.provider.EntityContainer;
+import org.apache.olingo.odata4.server.api.edm.provider.EntitySet;
+
+public class EdmEntitySetInfoImpl implements EdmEntitySetInfo {
+
+ private final EntityContainer entityContainer;
+ private final EntitySet set;
+
+ public EdmEntitySetInfoImpl(final EntityContainer entityContainer, final EntitySet set) {
+ this.entityContainer = entityContainer;
+ this.set = set;
+ }
+
+ @Override
+ public String getEntityContainerName() {
+ return entityContainer.getName();
+ }
+
+ @Override
+ public String getEntitySetName() {
+ return set.getName();
+ }
+
+ @Override
+ public URI getEntitySetUri() {
+ throw new EdmException("Not yet implemented");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/e8dccaf0/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImpl.java b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImpl.java
new file mode 100644
index 0000000..55ae006
--- /dev/null
+++ b/odata4-lib/odata4-server-core/src/main/java/org/apache/olingo/odata4/server/core/edm/provider/EdmEntityTypeImpl.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata4.server.core.edm.provider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.commons.api.edm.EdmKeyPropertyRef;
+import org.apache.olingo.odata4.commons.api.edm.EdmStructuralType;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind;
+import org.apache.olingo.odata4.server.api.edm.provider.EntityType;
+import org.apache.olingo.odata4.server.api.edm.provider.PropertyRef;
+
+public class EdmEntityTypeImpl extends EdmStructuralTypeImpl implements EdmEntityType {
+
+ private EntityType entityType;
+ private final List<String> keyPredicateNames = new ArrayList<String>();
+ private final HashMap<String, EdmKeyPropertyRef> keyPropertyRefs = new HashMap<String, EdmKeyPropertyRef>();
+ private final EdmEntityType entityBaseType;
+ private ArrayList<EdmKeyPropertyRef> keyPropertyRefsList;
+
+ public EdmEntityTypeImpl(final EdmProviderImpl edm, final FullQualifiedName name, final EntityType entityType) {
+ super(edm, name, entityType, EdmTypeKind.ENTITY);
+ this.entityType = entityType;
+ if (baseType == null) {
+ entityBaseType = null;
+ List<PropertyRef> key = entityType.getKey();
+ if (key == null && !entityType.isAbstract()) {
+ throw new EdmException("Non-Abstract entity types must define a key.");
+ }
+ if (key != null) {
+ for (PropertyRef ref : key) {
+ EdmKeyPropertyRef edmKeyRef = new EdmKeyPropertyRefImpl(this, ref);
+ if (ref.getAlias() != null) {
+ keyPredicateNames.add(ref.getAlias());
+ keyPropertyRefs.put(ref.getAlias(), edmKeyRef);
+ } else {
+ keyPredicateNames.add(ref.getPropertyName());
+ keyPropertyRefs.put(ref.getPropertyName(), edmKeyRef);
+ }
+ }
+ }
+ } else {
+ entityBaseType = (EdmEntityType) baseType;
+ }
+
+ }
+
+ @Override
+ public boolean hasStream() {
+ return entityType.hasStream();
+ }
+
+ @Override
+ public EdmEntityType getBaseType() {
+ return entityBaseType;
+ }
+
+ @Override
+ public List<String> getKeyPredicateNames() {
+ if (keyPredicateNames.isEmpty() && baseType != null) {
+ return entityBaseType.getKeyPredicateNames();
+ }
+ return keyPredicateNames;
+ }
+
+ @Override
+ public List<EdmKeyPropertyRef> getKeyPropertyRefs() {
+ if (keyPropertyRefsList == null) {
+ keyPropertyRefsList = new ArrayList<EdmKeyPropertyRef>(keyPropertyRefs.values());
+ }
+ if (keyPropertyRefsList.isEmpty() && entityBaseType != null) {
+ return entityBaseType.getKeyPropertyRefs();
+ }
+ return keyPropertyRefsList;
+ }
+
+ @Override
+ public EdmKeyPropertyRef getKeyPropertyRef(final String keyPredicateName) {
+ EdmKeyPropertyRef edmKeyPropertyRef = keyPropertyRefs.get(keyPredicateName);
+ if (edmKeyPropertyRef == null && entityBaseType != null) {
+ return entityBaseType.getKeyPropertyRef(keyPredicateName);
+ }
+ return edmKeyPropertyRef;
+ }
+
+ @Override
+ protected EdmStructuralType buildBaseType(final FullQualifiedName baseTypeName) {
+ EdmEntityType baseType = null;
+ if (baseTypeName != null) {
+ baseType = edm.getEntityType(baseTypeName);
+ if (baseType == null) {
+ throw new EdmException("Cannot find base type with name: " + baseTypeName + " for entity type: " + getName());
+ }
+ }
+ return baseType;
+ }
+
+}