You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2013/11/12 12:30:15 UTC
[2/3] [OLINGO-60] Edm Interfaces and Provider classes
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTyped.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTyped.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTyped.java
new file mode 100644
index 0000000..83df908
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTyped.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.api.edm;
+
+/**
+ * EdmTyped indicates if an EDM element is of a special type and holds the multiplicity of that type.
+ */
+public interface EdmTyped {
+
+ /**
+ * See {@link EdmType} for more information about possible types.
+ * @return {@link EdmType}
+ */
+ EdmType getType();
+
+ boolean isCollection();
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmConcurrencyMode.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmConcurrencyMode.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmConcurrencyMode.java
new file mode 100644
index 0000000..db24d50
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmConcurrencyMode.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.api.edm.constants;
+
+/**
+ * EdmConcurrencyMode can be applied to any primitive Entity Data Model (EDM) type.
+ * <p>Possible values are "None", which is the default, and "Fixed".
+ * Fixed implies that the property should be used for optimistic concurrency checks.
+ */
+public enum EdmConcurrencyMode {
+
+ None, Fixed;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmOnDelete.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmOnDelete.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmOnDelete.java
new file mode 100644
index 0000000..a22aedf
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmOnDelete.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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.api.edm.constants;
+
+public enum EdmOnDelete {
+ Cascade, None, SetNull, SetDefault;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTargetPath.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTargetPath.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTargetPath.java
new file mode 100644
index 0000000..d28f65c
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTargetPath.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.api.edm.constants;
+
+/**
+ * EdmTargetPath specifies the possible default targets for an EDM property which is mapped to an atom element.
+ */
+public class EdmTargetPath {
+
+ public static final String SYNDICATION_AUTHORNAME = "SyndicationAuthorName";
+ public static final String SYNDICATION_AUTHOREMAIL = "SyndicationAuthorEmail";
+ public static final String SYNDICATION_AUTHORURI = "SyndicationAuthorUri";
+ public static final String SYNDICATION_PUBLISHED = "SyndicationPublished";
+ public static final String SYNDICATION_RIGHTS = "SyndicationRights";
+ public static final String SYNDICATION_TITLE = "SyndicationTitle";
+ public static final String SYNDICATION_UPDATED = "SyndicationUpdated";
+ public static final String SYNDICATION_CONTRIBUTORNAME = "SyndicationContributorName";
+ public static final String SYNDICATION_CONTRIBUTOREMAIL = "SyndicationContributorEmail";
+ public static final String SYNDICATION_CONTRIBUTORURI = "SyndicationContributorUri";
+ public static final String SYNDICATION_SOURCE = "SyndicationSource";
+ public static final String SYNDICATION_SUMMARY = "SyndicationSummary";
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTypeKind.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTypeKind.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTypeKind.java
new file mode 100644
index 0000000..c4bcc5c
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/EdmTypeKind.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.api.edm.constants;
+
+/**
+ * EdmTypeKind specifies the type of an EDM element.
+ */
+public enum EdmTypeKind {
+
+ UNDEFINED, PRIMITIVE, ENUM, DEFINITION, COMPLEX, ENTITY, NAVIGATION, ACTION, FUNCTION, SYSTEM;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmEntitySetInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmEntitySetInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmEntitySetInfo.java
new file mode 100644
index 0000000..8754bfd
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmEntitySetInfo.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.helper;
+
+import java.net.URI;
+
+/**
+ * Objects of this class contain information about one entity set inside the EntityDataModel.
+ */
+public interface EdmEntitySetInfo {
+
+ /**
+ * @return the entity container name which contains this entity set.
+ */
+ public String getEntityContainerName();
+
+ /**
+ * @return the entity set name
+ */
+ public String getEntitySetName();
+
+ /**
+ * We use a {@link URI} object here to ensure the right encoding.
+ * If a string representation is needed the toASCIIString() method can be used.
+ * @return the uri to this entity set e.g. "Employees"
+ */
+ public URI getEntitySetUri();
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmFunctionImportInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmFunctionImportInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmFunctionImportInfo.java
new file mode 100644
index 0000000..b92f80c
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmFunctionImportInfo.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.api.edm.helper;
+
+import java.net.URI;
+
+/**
+ * Objects of this class contain information about one function import inside the EntityDataModel.
+ */
+public interface EdmFunctionImportInfo {
+
+ /**
+ * @return the entity container name which contains this function import.
+ */
+ public String getEntityContainerName();
+
+ /**
+ * @return the function import name
+ */
+ public String getFunctionImportName();
+
+ /**
+ * We use a {@link URI} object here to ensure the right encoding.
+ * If a string representation is needed the toASCIIString() method can be used.
+ * @return the uri to this function import
+ */
+ public URI getFunctionImportUri();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmSingletonInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmSingletonInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmSingletonInfo.java
new file mode 100644
index 0000000..61cbaa3
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EdmSingletonInfo.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.api.edm.helper;
+
+import java.net.URI;
+
+/**
+ * Objects of this class contain information about one singleton inside the EntityDataModel.
+ */
+public interface EdmSingletonInfo {
+
+ /**
+ * @return the entity container name which contains this singleton.
+ */
+ public String getEntityContainerName();
+
+ /**
+ * @return the singleton name
+ */
+ public String getSingletonName();
+
+ /**
+ * We use a {@link URI} object here to ensure the right encoding.
+ * If a string representation is needed the toASCIIString() method can be used.
+ * @return the uri to this singleton e.g. "EmployeeOfTheMonth"
+ */
+ public URI getEntitySetUri();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EntityContainerInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EntityContainerInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EntityContainerInfo.java
new file mode 100644
index 0000000..5536f7a
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/EntityContainerInfo.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.helper;
+
+//TODO:Where to put this class?
+public class EntityContainerInfo {
+ // Why full qualified name?
+ private FullQualifiedName containerName;
+ private FullQualifiedName extendsContainer;
+
+ public FullQualifiedName getContainerName() {
+ return containerName;
+ }
+
+ public EntityContainerInfo setContainerName(final FullQualifiedName containerName) {
+ this.containerName = containerName;
+ return this;
+ }
+
+ public FullQualifiedName getExtendsContainer() {
+ return extendsContainer;
+ }
+
+ public EntityContainerInfo setExtendsContainer(final FullQualifiedName extendsContainer) {
+ this.extendsContainer = extendsContainer;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/FullQualifiedName.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/FullQualifiedName.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/FullQualifiedName.java
new file mode 100644
index 0000000..4946ce6
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/FullQualifiedName.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.api.edm.helper;
+
+/**
+ * A full qualified name of any element in the EDM consists of a name and a namespace.
+ */
+public class FullQualifiedName {
+
+ private final String namespace;
+ private final String name;
+ private final String fqn;
+
+ /**
+ * @param namespace
+ * @param name
+ */
+ public FullQualifiedName(final String namespace, final String name) {
+ this.namespace = namespace;
+ this.name = name;
+ fqn = namespace + "." + name;
+ }
+
+ /**
+ * @return namespace
+ */
+ public String getNamespace() {
+ return namespace;
+ }
+
+ /**
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return namespace.name
+ */
+ public String getFullQualifiedNameAsString() {
+ return fqn;
+ }
+
+ @Override
+ public int hashCode() {
+ return toString().hashCode();
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if ((obj == null) || !(obj instanceof FullQualifiedName)) {
+ return false;
+ }
+ final FullQualifiedName other = (FullQualifiedName) obj;
+ return namespace.equals(other.getNamespace()) && name.equals(other.getName());
+ }
+
+ @Override
+ public String toString() {
+ return fqn;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/NamespaceInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/NamespaceInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/NamespaceInfo.java
new file mode 100644
index 0000000..7759ba9
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/helper/NamespaceInfo.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.api.edm.helper;
+
+//TODO:where to put this class?
+public class NamespaceInfo {
+ private String namespace;
+ private String alias;
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public NamespaceInfo setNamespace(final String namespace) {
+ this.namespace = namespace;
+ return this;
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public NamespaceInfo setAlias(final String alias) {
+ this.alias = alias;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/package-info.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/package-info.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/package-info.java
new file mode 100644
index 0000000..5d17cde
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/package-info.java
@@ -0,0 +1,9 @@
+/**
+ * <h1>Entity Data Model API</h1>
+ * <p>The Entity Data Model is described in the OData protocol specification
+ * as well as in the Conceptual Schema Definition for the OData Protocol.
+ * Both can be found at <a href="http://www.odata.org/">http://www.odata.org/</a>.</p>
+ * <p>Many classes and interfaces contain the pragma:" @org.apache.olingo.api.edm.DoNotImplement "
+ * to indicate these classes should only be used and not implemented.</p>
+ */
+package org.apache.olingo.commons.api.edm;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Action.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Action.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Action.java
new file mode 100644
index 0000000..ee0b6a8
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Action.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+import java.util.List;
+
+//TODO: Finish
+public class Action extends Operation {
+ @Override
+ public Action setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ @Override
+ public Action setBound(final boolean isBound) {
+ this.isBound = isBound;
+ return this;
+ }
+
+ @Override
+ public Action setEntitySetPath(final EntitySetPath entitySetPath) {
+ this.entitySetPath = entitySetPath;
+ return this;
+ }
+
+ @Override
+ public Action setParameters(final List<Parameter> parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+
+ @Override
+ public Action setReturnType(final ReturnType returnType) {
+ this.returnType = returnType;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ActionImport.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ActionImport.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ActionImport.java
new file mode 100644
index 0000000..0227047
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ActionImport.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.api.edm.provider;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: Finish
+public class ActionImport extends OperationImport {
+ private FullQualifiedName action;
+
+ public FullQualifiedName getAction() {
+ return action;
+ }
+
+ public ActionImport setAction(final FullQualifiedName action) {
+ this.action = action;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Annotation.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Annotation.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Annotation.java
new file mode 100644
index 0000000..cce8b2c
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Annotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO:finish
+public class Annotation {
+ private FullQualifiedName term;
+ // Target should be a target path
+// private String targetPath;
+ private String qualifier;
+ private Expression expression;
+ private List<Annotation> annotation;
+
+ public FullQualifiedName getTerm() {
+ return term;
+ }
+
+ public Annotation setTerm(final FullQualifiedName term) {
+ this.term = term;
+ return this;
+ }
+
+ public String getQualifier() {
+ return qualifier;
+ }
+
+ public Annotation setQualifier(final String qualifier) {
+ this.qualifier = qualifier;
+ return this;
+ }
+
+ public Expression getExpression() {
+ return expression;
+ }
+
+ public Annotation setExpression(final Expression expression) {
+ this.expression = expression;
+ return this;
+ }
+
+ public List<Annotation> getAnnotation() {
+ return annotation;
+ }
+
+ public Annotation setAnnotation(final List<Annotation> annotation) {
+ this.annotation = annotation;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ComplexType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ComplexType.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ComplexType.java
new file mode 100644
index 0000000..fdf9497
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/ComplexType.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO:finish
+public class ComplexType extends StructuralType {
+//Anything needed here?
+ @Override
+ public ComplexType setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ @Override
+ public ComplexType setOpenType(final boolean isOpenType) {
+ this.isOpenType = isOpenType;
+ return this;
+ }
+
+ @Override
+ public ComplexType setBaseType(final FullQualifiedName baseType) {
+ this.baseType = baseType;
+ return this;
+ }
+
+ @Override
+ public ComplexType setAbstract(final boolean isAbstract) {
+ this.isAbstract = isAbstract;
+ return this;
+ }
+
+ @Override
+ public ComplexType setProperties(final List<Property> properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ @Override
+ public ComplexType setNavigationProperties(final List<NavigationProperty> navigationProperties) {
+ this.navigationProperties = navigationProperties;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProvider.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProvider.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProvider.java
new file mode 100644
index 0000000..8ec687f
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProvider.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.EntityContainerInfo;
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.helper.NamespaceInfo;
+import org.apache.olingo.commons.api.exception.ODataException;
+
+public interface EdmProvider {
+
+ /**
+ * This method should return an {@link EnumType} or <b>null</b> if nothing is found
+ * @param enumTypeName
+ * @return {@link EnumType} for given name
+ * @throws ODataException
+ */
+ public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException;
+
+ /**
+ * This method should return an {@link TypeDefinition} or <b>null</b> if nothing is found
+ * @param typeDefinitionName
+ * @return {@link TypeDefinition} for given name
+ * @throws ODataException
+ */
+ public TypeDefinition getTypeDefinition(final FullQualifiedName typeDefinitionName) throws ODataException;
+
+ /**
+ * This method should return an {@link EntityType} or <b>null</b> if nothing is found
+ * @param entityTypeName
+ * @return {@link EntityType} for the given name
+ * @throws ODataException
+ */
+ public EntityType getEntityType(final FullQualifiedName entityTypeName) throws ODataException;
+
+ /**
+ * This method should return a {@link ComplexType} or <b>null</b> if nothing is found
+ * @param complexTypeName
+ * @return {@link StructuralType} for the given name
+ * @throws ODataException
+ */
+ public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException;
+
+ // Revisit signature
+ /**
+ * This method should return a {@link Action} or <b>null</b> if nothing is found
+ * @param actionName
+ * @param bindingPatameterTypeName may be null if unbound
+ * @param isBindingParameterCollection may be null if unbound
+ * @return {@link Action} for the given name
+ * @throws ODataException
+ */
+ public Action getAction(final FullQualifiedName actionName, final FullQualifiedName bindingPatameterTypeName,
+ final Boolean isBindingParameterCollection) throws ODataException;
+
+ // Revisit Signature
+ /**
+ * This method should return a {@link Function} or <b>null</b> if nothing is found
+ * @param functionName
+ * @param bindingPatameterTypeName may be null if unbound
+ * @param isBindingParameterCollection may be null if unbound
+ * @param parameterNames may be null if unbound
+ * @return {@link Function} for given name
+ * @throws ODataException
+ */
+ public Function getFunction(final FullQualifiedName functionName, final FullQualifiedName bindingPatameterTypeName,
+ final Boolean isBindingParameterCollection, final List<String> parameterNames) throws ODataException;
+
+ public Term getTerm(final FullQualifiedName termName) throws ODataException;
+
+ /**
+ * This method should return an {@link EntitySet} or <b>null</b> if nothing is found
+ * @param entityContainer this EntitySet is contained in
+ * @param entitySetName
+ * @return {@link EntitySet} for the given container and entityset name
+ * @throws ODataException
+ */
+ public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String entitySetName)
+ throws ODataException;
+
+ /**
+ * This method should return an {@link Singleton} or <b>null</b> if nothing is found
+ * @param entityContainer this Singleton is contained in
+ * @param singletonName
+ * @return {@link Singleton} for given container and singleton name
+ * @throws ODataException
+ */
+ public Singleton getSingleton(final FullQualifiedName entityContainer, final String singletonName)
+ throws ODataException;
+
+ /**
+ * This method should return an {@link ActionImport} or <b>null</b> if nothing is found
+ * @param entityContainer this ActionImport is contained in
+ * @param actionImportName
+ * @return {@link ActionImport} for the given container and ActionImport name
+ * @throws ODataException
+ */
+ public ActionImport getActionImport(final FullQualifiedName entityContainer, final String actionImportName)
+ throws ODataException;
+
+ /**
+ * This method should return a {@link FunctionImport} or <b>null</b> if nothing is found
+ * @param entityContainer this FunctionImport is contained in
+ * @param functionImportName
+ * @return {@link FunctionImport} for the given container name and function import name
+ * @throws ODataException
+ */
+ public FunctionImport getFunctionImport(final FullQualifiedName entityContainer, final String functionImportName)
+ throws ODataException;
+
+ /**
+ * This method should return an {@link EntityContainerInfo} or <b>null</b> if nothing is found
+ * @param name (null for default container)
+ * @return {@link EntityContainerInfo} for the given name
+ * @throws ODataException
+ */
+ public EntityContainerInfo getEntityContainerInfo(final FullQualifiedName entityContainerName) throws ODataException;
+
+ /**
+ * This method should return a list of all namespaces
+ * @return List of namespace info
+ * @throws ODataException
+ */
+ public List<NamespaceInfo> getNamespaceInfos() throws ODataException;
+
+ /**
+ * This method should return a collection of all {@link Schema}
+ * @return List<{@link Schema}>
+ * @throws ODataException
+ */
+ public List<Schema> getSchemas() throws ODataException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProviderAdapter.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProviderAdapter.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProviderAdapter.java
new file mode 100644
index 0000000..8b2472a
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EdmProviderAdapter.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.EntityContainerInfo;
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.helper.NamespaceInfo;
+import org.apache.olingo.commons.api.exception.ODataException;
+import org.apache.olingo.commons.api.exception.ODataNotImplementedException;
+
+//TODO: Finish
+/**
+ * Default EDM Provider which is to be extended by the application
+ */
+public abstract class EdmProviderAdapter implements EdmProvider {
+
+ @Override
+ public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public TypeDefinition getTypeDefinition(final FullQualifiedName typeDefinitionName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public EntityType getEntityType(final FullQualifiedName entityTypeName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ // Revisit signature
+ @Override
+ public Action getAction(final FullQualifiedName actionName, final FullQualifiedName bindingPatameterTypeName,
+ final Boolean isBindingParameterCollection) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ // Revisit Signature
+ @Override
+ public Function getFunction(final FullQualifiedName functionName, final FullQualifiedName bindingPatameterTypeName,
+ final Boolean isBindingParameterCollection, final List<String> parameterNames) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public Term getTerm(final FullQualifiedName termName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String name) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public Singleton getSingleton(final FullQualifiedName entityContainer, final String name) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public ActionImport getActionImport(final FullQualifiedName entityContainer, final String name) throws ODataException
+ {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public FunctionImport getFunctionImport(final FullQualifiedName entityContainer, final String name)
+ throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ // There are no other containers
+ @Override
+ public EntityContainerInfo getEntityContainerInfo(final FullQualifiedName entityContainerName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public List<NamespaceInfo> getNamespaceInfos() throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ @Override
+ public List<Schema> getSchemas() throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityContainer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityContainer.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityContainer.java
new file mode 100644
index 0000000..fc4f765
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityContainer.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: finish
+public class EntityContainer {
+
+ private String name;
+ private FullQualifiedName extendsContainer;
+ private List<EntitySet> entitySets;
+ private List<ActionImport> actionImports;
+ private List<FunctionImport> functionImports;
+ private List<Singleton> singletons;
+
+ // Annotations
+
+ public String getName() {
+ return name;
+ }
+
+ public EntityContainer setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public FullQualifiedName getExtendsContainer() {
+ return extendsContainer;
+ }
+
+ public EntityContainer setExtendsContainer(final FullQualifiedName extendsContainer) {
+ this.extendsContainer = extendsContainer;
+ return this;
+ }
+
+ public List<EntitySet> getEntitySets() {
+ return entitySets;
+ }
+
+ public EntityContainer setEntitySets(final List<EntitySet> entitySets) {
+ this.entitySets = entitySets;
+ return this;
+ }
+
+ public List<ActionImport> getActionImports() {
+ return actionImports;
+ }
+
+ public EntityContainer setActionImports(final List<ActionImport> actionImports) {
+ this.actionImports = actionImports;
+ return this;
+ }
+
+ public List<FunctionImport> getFunctionImports() {
+ return functionImports;
+ }
+
+ public EntityContainer setFunctionImports(final List<FunctionImport> functionImports) {
+ this.functionImports = functionImports;
+ return this;
+ }
+
+ public List<Singleton> getSingletons() {
+ return singletons;
+ }
+
+ public EntityContainer setSingletons(final List<Singleton> singletons) {
+ this.singletons = singletons;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java
new file mode 100644
index 0000000..bb4fa68
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySet.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: Finish
+public class EntitySet {
+
+ private String name;
+ private FullQualifiedName entityType;
+ private boolean includeInServiceDocument;
+ private List<NavigationPropertyBinding> navigationPropertyBindings;
+
+ public String getName() {
+ return name;
+ }
+
+ public EntitySet setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public List<NavigationPropertyBinding> getNavigationPropertyBindings() {
+ return navigationPropertyBindings;
+ }
+
+ public EntitySet setNavigationPropertyBindings(final List<NavigationPropertyBinding> navigationPropertyBindings) {
+ this.navigationPropertyBindings = navigationPropertyBindings;
+ return this;
+ }
+
+ public FullQualifiedName getEntityType() {
+ return entityType;
+ }
+
+ public EntitySet setEntityType(final FullQualifiedName entityType) {
+ this.entityType = entityType;
+ return this;
+ }
+
+ public boolean isIncludeInServiceDocument() {
+ return includeInServiceDocument;
+ }
+
+ public EntitySet setIncludeInServiceDocument(final boolean includeInServiceDocument) {
+ this.includeInServiceDocument = includeInServiceDocument;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySetPath.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySetPath.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySetPath.java
new file mode 100644
index 0000000..e489fb5
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntitySetPath.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+//TODO: finish
+//DO we really need this class?
+public class EntitySetPath {
+
+ private String bindingParameter;
+ private String path;
+
+ public String getBindingParameter() {
+ return bindingParameter;
+ }
+
+ public EntitySetPath setBindingParameter(final String bindingParameter) {
+ this.bindingParameter = bindingParameter;
+ return this;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public EntitySetPath setPath(final String path) {
+ this.path = path;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityType.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityType.java
new file mode 100644
index 0000000..8ea2ef4
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EntityType.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: Finish
+public class EntityType extends StructuralType {
+ // Anything except which have to be new?
+ private List<PropertyRef> key;
+ private boolean hasStream;
+
+ public boolean isHasStream() {
+ return hasStream;
+ }
+
+ public EntityType setHasStream(final boolean hasStream) {
+ this.hasStream = hasStream;
+ return this;
+ }
+
+ public List<PropertyRef> getKey() {
+ return key;
+ }
+
+ public EntityType setKey(final List<PropertyRef> key) {
+ this.key = key;
+ return this;
+ }
+
+ @Override
+ public EntityType setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ @Override
+ public EntityType setOpenType(final boolean isOpenType) {
+ this.isOpenType = isOpenType;
+ return this;
+ }
+
+ @Override
+ public EntityType setBaseType(final FullQualifiedName baseType) {
+ this.baseType = baseType;
+ return this;
+ }
+
+ @Override
+ public EntityType setAbstract(final boolean isAbstract) {
+ this.isAbstract = isAbstract;
+ return this;
+ }
+
+ @Override
+ public EntityType setProperties(final List<Property> properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ @Override
+ public EntityType setNavigationProperties(final List<NavigationProperty> navigationProperties) {
+ this.navigationProperties = navigationProperties;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumMember.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumMember.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumMember.java
new file mode 100644
index 0000000..1ff24e9
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumMember.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.api.edm.provider;
+
+//TODO: Finish
+public class EnumMember {
+
+ private String name;
+ private String value;
+
+ // Annotations?
+
+ public String getName() {
+ return name;
+ }
+
+ public EnumMember setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public EnumMember setValue(final String value) {
+ this.value = value;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumType.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumType.java
new file mode 100644
index 0000000..e010c32
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/EnumType.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: Finish
+public class EnumType {
+
+ private String name;
+ private boolean isFlags;
+ // Underlying Type can only be primitve...
+ private FullQualifiedName underlyingType;
+ private List<EnumMember> members;
+
+ // Facets
+ // Annotations?
+
+ public String getName() {
+ return name;
+ }
+
+ public EnumType setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public boolean isFlags() {
+ return isFlags;
+ }
+
+ public EnumType setFlags(final boolean isFlags) {
+ this.isFlags = isFlags;
+ return this;
+ }
+
+ public FullQualifiedName getUnderlyingType() {
+ return underlyingType;
+ }
+
+ public EnumType setUnderlyingType(final FullQualifiedName underlyingType) {
+ this.underlyingType = underlyingType;
+ return this;
+ }
+
+ public List<EnumMember> getMembers() {
+ return members;
+ }
+
+ public EnumType setMembers(final List<EnumMember> members) {
+ this.members = members;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Expression.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Expression.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Expression.java
new file mode 100644
index 0000000..9545432
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Expression.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+//TODO: Expression implementation
+public class Expression {
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Function.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Function.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Function.java
new file mode 100644
index 0000000..8c1a808
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Function.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+import java.util.List;
+
+//TODO: Finish
+public class Function extends Operation {
+
+ private boolean isComposable;
+
+ public boolean isComposable() {
+ return isComposable;
+ }
+
+ public Function setComposable(final boolean isComposable) {
+ this.isComposable = isComposable;
+ return this;
+ }
+
+ @Override
+ public Function setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ @Override
+ public Function setBound(final boolean isBound) {
+ this.isBound = isBound;
+ return this;
+ }
+
+ @Override
+ public Function setEntitySetPath(final EntitySetPath entitySetPath) {
+ this.entitySetPath = entitySetPath;
+ return this;
+ }
+
+ @Override
+ public Function setParameters(final List<Parameter> parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+
+ @Override
+ public Function setReturnType(final ReturnType returnType) {
+ this.returnType = returnType;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/FunctionImport.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/FunctionImport.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/FunctionImport.java
new file mode 100644
index 0000000..ef46ace
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/FunctionImport.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.api.edm.provider;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: Finish
+public class FunctionImport extends OperationImport {
+
+ private FullQualifiedName function;
+ private boolean includeInServiceDocument;
+
+ public FullQualifiedName getFunction() {
+ return function;
+ }
+
+ public FunctionImport setFunction(final FullQualifiedName function) {
+ this.function = function;
+ return this;
+ }
+
+ public boolean isIncludeInServiceDocument() {
+ return includeInServiceDocument;
+ }
+
+ public FunctionImport setIncludeInServiceDocument(final boolean includeInServiceDocument) {
+ this.includeInServiceDocument = includeInServiceDocument;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationProperty.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationProperty.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationProperty.java
new file mode 100644
index 0000000..27471b8
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationProperty.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.constants.EdmOnDelete;
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: finish
+public class NavigationProperty {
+
+ private String name;
+ private FullQualifiedName type;
+ // Is multiplicity even needed?
+ private boolean isCollection;
+
+ // Should we make the partner a path class?
+ private String partner;
+ private boolean containsTarget;
+ private List<ReferentialConstraint> referentialConstraints;
+ // Facets
+ private Boolean nullable;
+ // Refactor this onDelete
+ private EdmOnDelete onDelete;
+
+//Annotations?
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean isCollection() {
+ return isCollection;
+ }
+
+ public NavigationProperty setCollection(final boolean isCollection) {
+ this.isCollection = isCollection;
+ return this;
+ }
+
+ public NavigationProperty setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public FullQualifiedName getType() {
+ return type;
+ }
+
+ public NavigationProperty setType(final FullQualifiedName type) {
+ this.type = type;
+ return this;
+ }
+
+ public String getPartner() {
+ return partner;
+ }
+
+ public NavigationProperty setPartner(final String partner) {
+ this.partner = partner;
+ return this;
+ }
+
+ public boolean isContainsTarget() {
+ return containsTarget;
+ }
+
+ public NavigationProperty setContainsTarget(final boolean containsTarget) {
+ this.containsTarget = containsTarget;
+ return this;
+ }
+
+ public List<ReferentialConstraint> getReferentialConstraints() {
+ return referentialConstraints;
+ }
+
+ public NavigationProperty setReferentialConstraints(final List<ReferentialConstraint> referentialConstraints) {
+ this.referentialConstraints = referentialConstraints;
+ return this;
+ }
+
+ public Boolean getNullable() {
+ return nullable;
+ }
+
+ public NavigationProperty setNullable(final Boolean nullable) {
+ this.nullable = nullable;
+ return this;
+ }
+
+ public EdmOnDelete getOnDelete() {
+ return onDelete;
+ }
+
+ public NavigationProperty setOnDelete(final EdmOnDelete onDelete) {
+ this.onDelete = onDelete;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationPropertyBinding.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationPropertyBinding.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationPropertyBinding.java
new file mode 100644
index 0000000..aefa5e6
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/NavigationPropertyBinding.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.commons.api.edm.provider;
+
+//TODO: finish
+public class NavigationPropertyBinding {
+
+ private String path;
+ // Should this really be an own class?
+ private TargetPath target;
+
+ public String getPath() {
+ return path;
+ }
+
+ public NavigationPropertyBinding setPath(final String path) {
+ this.path = path;
+ return this;
+ }
+
+ public TargetPath getTarget() {
+ return target;
+ }
+
+ public NavigationPropertyBinding setTarget(final TargetPath target) {
+ this.target = target;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Operation.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Operation.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Operation.java
new file mode 100644
index 0000000..356f710
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Operation.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+import java.util.List;
+
+//TODO: finish
+public abstract class Operation {
+
+ protected String name;
+ protected boolean isBound;
+ // Do we need EntitySetPath as a class?
+ protected EntitySetPath entitySetPath;
+ protected List<Parameter> parameters;
+ protected ReturnType returnType;
+
+ // Annotations?
+
+ public String getName() {
+ return name;
+ }
+
+ public Operation setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public boolean isBound() {
+ return isBound;
+ }
+
+ public Operation setBound(final boolean isBound) {
+ this.isBound = isBound;
+ return this;
+ }
+
+ public EntitySetPath getEntitySetPath() {
+ return entitySetPath;
+ }
+
+ public Operation setEntitySetPath(final EntitySetPath entitySetPath) {
+ this.entitySetPath = entitySetPath;
+ return this;
+ }
+
+ public List<Parameter> getParameters() {
+ return parameters;
+ }
+
+ public Operation setParameters(final List<Parameter> parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+
+ public ReturnType getReturnType() {
+ return returnType;
+ }
+
+ public Operation setReturnType(final ReturnType returnType) {
+ this.returnType = returnType;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/OperationImport.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/OperationImport.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/OperationImport.java
new file mode 100644
index 0000000..be4ea20
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/OperationImport.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.api.edm.provider;
+
+//TODO: finish
+public class OperationImport {
+
+ private String name;
+ private TargetPath entitySet;
+
+ // What about the operation which is behind the operation import?
+ // Annotations?
+
+ public String getName() {
+ return name;
+ }
+
+ public OperationImport setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public TargetPath getEntitySet() {
+ return entitySet;
+ }
+
+ public OperationImport setEntitySet(final TargetPath entitySet) {
+ this.entitySet = entitySet;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/33c51e30/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Parameter.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Parameter.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Parameter.java
new file mode 100644
index 0000000..53d6782
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/Parameter.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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.api.edm.provider;
+
+import org.apache.olingo.commons.api.edm.helper.FullQualifiedName;
+
+//TODO: finish
+public class Parameter {
+
+ private String name;
+ private FullQualifiedName type;
+ // Why multiplicity here
+ private boolean isCollection;
+
+ // Facets?
+ private Boolean nullable;
+ private Integer maxLength;
+ private Integer precision;
+ private Integer scale;
+
+ public String getName() {
+ return name;
+ }
+
+ public Parameter setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ public FullQualifiedName getType() {
+ return type;
+ }
+
+ public Parameter setType(final FullQualifiedName type) {
+ this.type = type;
+ return this;
+ }
+
+ public boolean isCollection() {
+ return isCollection;
+ }
+
+ public Parameter setCollection(final boolean isCollection) {
+ this.isCollection = isCollection;
+ return this;
+ }
+
+ public Boolean getNullable() {
+ return nullable;
+ }
+
+ public Parameter setNullable(final Boolean nullable) {
+ this.nullable = nullable;
+ return this;
+ }
+
+ public Integer getMaxLength() {
+ return maxLength;
+ }
+
+ public Parameter setMaxLength(final Integer maxLength) {
+ this.maxLength = maxLength;
+ return this;
+ }
+
+ public Integer getPrecision() {
+ return precision;
+ }
+
+ public Parameter setPrecision(final Integer precision) {
+ this.precision = precision;
+ return this;
+ }
+
+ public Integer getScale() {
+ return scale;
+ }
+
+ public Parameter setScale(final Integer scale) {
+ this.scale = scale;
+ return this;
+ }
+}