You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by fm...@apache.org on 2013/07/26 13:22:39 UTC
[34/51] [partial] initial commit
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/InlineCount.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/InlineCount.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/InlineCount.java
new file mode 100644
index 0000000..92d858e
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/InlineCount.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.odata2.api.commons;
+
+/**
+ * Inlinecount constants as described in the OData protocol
+ * @author SAP AG
+ */
+public enum InlineCount {
+ ALLPAGES, NONE;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpHeaders.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpHeaders.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpHeaders.java
new file mode 100644
index 0000000..65ea4e2
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpHeaders.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.odata2.api.commons;
+
+/**
+ * HTTP header constants as used in the OData protocol
+ * @author SAP AG
+ */
+public class ODataHttpHeaders {
+
+ public static final String DATASERVICEVERSION = "DataServiceVersion";
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpMethod.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpMethod.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpMethod.java
new file mode 100644
index 0000000..cc283b9
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/ODataHttpMethod.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.odata2.api.commons;
+
+/**
+ * The supported HTTP methods.
+ * @author SAP AG
+ */
+public enum ODataHttpMethod {
+ GET, PUT, POST, DELETE, PATCH, MERGE;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/package-info.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/package-info.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/package-info.java
new file mode 100644
index 0000000..c51b5b4
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/commons/package-info.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * 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.
+ ******************************************************************************/
+/**
+ * The commons package contains constants used in the HTTP and OData protocol.
+ */
+package org.apache.olingo.odata2.api.commons;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/Edm.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/Edm.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/Edm.java
new file mode 100644
index 0000000..65e1e68
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/Edm.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * Entity Data Model (EDM)
+ * <p>Interface representing a Entity Data Model as described in the Conceptual Schema Definition.
+ * @author SAP AG
+ */
+public interface Edm {
+
+ public static final String NAMESPACE_EDM_2008_09 = "http://schemas.microsoft.com/ado/2008/09/edm";
+ public static final String NAMESPACE_APP_2007 = "http://www.w3.org/2007/app";
+ public static final String NAMESPACE_ATOM_2005 = "http://www.w3.org/2005/Atom";
+ public static final String NAMESPACE_D_2007_08 = "http://schemas.microsoft.com/ado/2007/08/dataservices";
+ public static final String NAMESPACE_M_2007_08 = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
+ public static final String NAMESPACE_EDMX_2007_06 = "http://schemas.microsoft.com/ado/2007/06/edmx";
+ public static final String NAMESPACE_REL_2007_08 = "http://schemas.microsoft.com/ado/2007/08/dataservices/related/";
+ public static final String NAMESPACE_REL_ASSOC_2007_08 = "http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/";
+ public static final String NAMESPACE_SCHEME_2007_08 = "http://schemas.microsoft.com/ado/2007/08/dataservices/scheme";
+ public static final String NAMESPACE_XML_1998 = "http://www.w3.org/XML/1998/namespace";
+ public static final String PREFIX_EDM = "edm";
+ public static final String PREFIX_APP = "app";
+ public static final String PREFIX_ATOM = "atom";
+ public static final String PREFIX_D = "d";
+ public static final String PREFIX_M = "m";
+ public static final String PREFIX_XML = "xml";
+ public static final String PREFIX_EDMX = "edmx";
+ public static final String LINK_REL_SELF = "self";
+ public static final String LINK_REL_EDIT_MEDIA = "edit-media";
+ public static final String LINK_REL_EDIT = "edit";
+ public static final String LINK_REL_NEXT = "next";
+ public static final String DELIMITER = ".";
+
+ /**
+ * Get entity container by name
+ * <p>See {@link EdmEntityContainer} for more information.
+ * @param name
+ * @return {@link EdmEntityContainer}
+ * @throws EdmException
+ */
+ EdmEntityContainer getEntityContainer(String name) throws EdmException;
+
+ /**
+ * Get entity type by full qualified name
+ * <p>See {@link EdmEntityType} for more information.
+ * @param namespace
+ * @param name
+ * @return {@link EdmEntityType}
+ * @throws EdmException
+ */
+ EdmEntityType getEntityType(String namespace, String name) throws EdmException;
+
+ /**
+ * Get complex type by full qualified name
+ * <p>See {@link EdmComplexType} for more information.
+ * @param namespace
+ * @param name
+ * @return {@link EdmComplexType}
+ * @throws EdmException
+ */
+ EdmComplexType getComplexType(String namespace, String name) throws EdmException;
+
+ /**
+ * Get association by full qualified name
+ * <p>See {@link EdmAssociation} for more information.
+ * @param namespace
+ * @param name
+ * @return {@link EdmAssociation}
+ * @throws EdmException
+ */
+ EdmAssociation getAssociation(String namespace, String name) throws EdmException;
+
+ /**
+ * Get service metadata
+ * <p>See {@link EdmServiceMetadata} for more information.
+ * @return {@link EdmServiceMetadata}
+ */
+ EdmServiceMetadata getServiceMetadata();
+
+ /**
+ * Get default entity container
+ * <p>See {@link EdmEntityContainer} for more information.
+ * @return {@link EdmEntityContainer}
+ * @throws EdmException
+ */
+ EdmEntityContainer getDefaultEntityContainer() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAction.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAction.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAction.java
new file mode 100644
index 0000000..6bbefda
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAction.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL Action Element
+ * <p>EdmAction can either be Cascade or None. Cascade implies that a delete operation on an entity also should delete the relationship instances.
+ * @author SAP AG
+ */
+public enum EdmAction {
+
+ Cascade, None;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotatable.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotatable.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotatable.java
new file mode 100644
index 0000000..f51289f
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotatable.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmAnnotatable can be applied to CSDL elements as described in the Conceptual Schema Definition Language.
+ * @author SAP AG
+ */
+public interface EdmAnnotatable {
+
+ /**
+ * Get all annotations applied to an EDM element
+ *
+ * @return {@link EdmAnnotations}
+ * @throws EdmException
+ */
+ EdmAnnotations getAnnotations() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationAttribute.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationAttribute.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationAttribute.java
new file mode 100644
index 0000000..8e62e2f
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationAttribute.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * 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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL AnnotationAttribute element.
+ * <p>EdmAnnotationAttribute is a custom XML attribute which can be applied to a CSDL element.
+ * @author SAP AG
+ */
+public interface EdmAnnotationAttribute {
+
+ /**
+ * Get the namespace of the custom attribute
+ *
+ * @return String
+ */
+ String getNamespace();
+
+ /**
+ * Get the prefix of the custom attribute
+ *
+ * @return String
+ */
+ String getPrefix();
+
+ /**
+ * Get the name of the custom attribute
+ *
+ * @return String
+ */
+ String getName();
+
+ /**
+ * Get the text of the custom attribute
+ *
+ * @return String
+ */
+ String getText();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationElement.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationElement.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationElement.java
new file mode 100644
index 0000000..4cb68c0
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotationElement.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.provider.AnnotationAttribute;
+import org.apache.olingo.odata2.api.edm.provider.AnnotationElement;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL AnnotationElement element
+ * <p>EdmAnnotationElement is a custom XML element which can be applied to a CSDL element.
+ * @author SAP AG
+ */
+public interface EdmAnnotationElement {
+
+ /**
+ * Get the namespace of the custom element
+ *
+ * @return String
+ */
+ String getNamespace();
+
+ /**
+ * Get the prefix of the custom element
+ *
+ * @return String
+ */
+ String getPrefix();
+
+ /**
+ * Get the name of the custom element
+ *
+ * @return String
+ */
+ String getName();
+
+ /**
+ * Get the XML data of the custom element
+ *
+ * @return String
+ */
+ String getText();
+
+ /**
+ * Get the child elements of the custom element
+ *
+ * @return child elements of this {@link EdmAnnotationElement}
+ */
+ List<AnnotationElement> getChildElements();
+
+ /**
+ * Get the attributes of this custom element
+ *
+ * @return the attributes of this {@link EdmAnnotationElement}
+ */
+ List<AnnotationAttribute> getAttributes();
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotations.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotations.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotations.java
new file mode 100644
index 0000000..a2c3807
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAnnotations.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+import java.util.List;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmAnnotations holds all annotation attributes and elements for a specific CSDL element.
+ * @author SAP AG
+ */
+public interface EdmAnnotations {
+
+ /**
+ * Get all annotation elements for the CSDL element
+ *
+ * @return List of {@link EdmAnnotationElement}
+ */
+ List<? extends EdmAnnotationElement> getAnnotationElements();
+
+ /**
+ * Get annotation element by full qualified name
+ *
+ * @param name
+ * @param namespace
+ * @return String
+ */
+
+ EdmAnnotationElement getAnnotationElement(String name, String namespace);
+
+ /**
+ * Get all annotation attributes for the CSDL element
+ *
+ * @return List of {@link EdmAnnotationAttribute}
+ */
+ List<? extends EdmAnnotationAttribute> getAnnotationAttributes();
+
+ /**
+ * Get annotation attribute by full qualified name
+ *
+ * @param name
+ * @param namespace
+ * @return String
+ */
+ EdmAnnotationAttribute getAnnotationAttribute(String name, String namespace);
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociation.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociation.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociation.java
new file mode 100644
index 0000000..628feb6
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociation.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL Association element
+ *
+ * <p>EdmAssociation defines the relationship of two entity types.
+ * @author SAP AG
+ */
+public interface EdmAssociation extends EdmType {
+
+ /**
+ * Get the {@link EdmAssociationEnd} by role
+ * @param role
+ * @return {@link EdmAssociationEnd}
+ * @throws EdmException
+ */
+ EdmAssociationEnd getEnd(String role) throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationEnd.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationEnd.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationEnd.java
new file mode 100644
index 0000000..f5b4a78
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationEnd.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL AssociationEnd element
+ *
+ * <p>EdmAssociationEnd defines one side of the relationship of two entity types.
+ * @author SAP AG
+ */
+public interface EdmAssociationEnd {
+
+ /**
+ * @return the role of this {@link EdmAssociationEnd} as a String.
+ */
+ String getRole();
+
+ /**
+ * @return {@link EdmEntityType} this association end points to.
+ * @throws EdmException
+ */
+ EdmEntityType getEntityType() throws EdmException;
+
+ /**
+ * See {@link EdmMultiplicity} for more information about possible multiplicities.
+ * @return {@link EdmMultiplicity}
+ */
+ EdmMultiplicity getMultiplicity();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSet.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSet.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSet.java
new file mode 100644
index 0000000..81e739c
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSet.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL AssociationSet element
+ *
+ * <p>EdmAssociationSet defines the relationship of two entity sets.
+ * @author SAP AG
+ */
+public interface EdmAssociationSet extends EdmNamed {
+
+ /**
+ * Get the association
+ *
+ * @return {@link EdmAssociation}
+ * @throws EdmException
+ */
+ EdmAssociation getAssociation() throws EdmException;
+
+ /**
+ * Get the association set end
+ *
+ * @param role
+ * @return {@link EdmAssociationSetEnd}
+ * @throws EdmException
+ */
+ EdmAssociationSetEnd getEnd(String role) throws EdmException;
+
+ /**
+ * Get the entity container the association set is located in
+ *
+ * @return {@link EdmEntityContainer}
+ * @throws EdmException
+ */
+ EdmEntityContainer getEntityContainer() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSetEnd.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSetEnd.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSetEnd.java
new file mode 100644
index 0000000..40d88cb
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmAssociationSetEnd.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL AssociationSetEnd element
+ *
+ * <p>EdmAssociationSetEnd defines one side of the relationship of two entity sets.
+ * @author SAP AG
+ */
+public interface EdmAssociationSetEnd {
+
+ /**
+ * Get the role name
+ *
+ * @return String
+ */
+ String getRole();
+
+ /**
+ * Get the entity set
+ *
+ * @return {@link EdmEntitySet}
+ * @throws EdmException
+ */
+ EdmEntitySet getEntitySet() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmComplexType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmComplexType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmComplexType.java
new file mode 100644
index 0000000..d51771b
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmComplexType.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.odata2.api.edm;
+
+/**
+ * <p>A CSDL ComplexType element.</p>
+ * <p>EdmComplexType holds a set of related information like {@link EdmSimpleType}
+ * properties and EdmComplexType properties.
+ * @author SAP AG
+ * @org.apache.olingo.odata2.DoNotImplement
+ */
+public interface EdmComplexType extends EdmStructuralType {
+
+ @Override
+ EdmComplexType getBaseType() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmConcurrencyMode.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmConcurrencyMode.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmConcurrencyMode.java
new file mode 100644
index 0000000..779ab26
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmConcurrencyMode.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * 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.
+ * @author SAP AG
+ */
+public enum EdmConcurrencyMode {
+
+ None, Fixed;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmContentKind.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmContentKind.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmContentKind.java
new file mode 100644
index 0000000..b62b6b7
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmContentKind.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmContentType is used for Feed Customization.
+ * <p>It specifies the content type of the value of the property being mapped via a customizable feed mapping.
+ * This value can be "text", "html" or "xhtml".
+ * @author SAP AG
+ */
+public enum EdmContentKind {
+
+ text, html, xhtml;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmCustomizableFeedMappings.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmCustomizableFeedMappings.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmCustomizableFeedMappings.java
new file mode 100644
index 0000000..62133ef
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmCustomizableFeedMappings.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * Customizable Feed property mappings for the AtomPub Format as defined in the OData specification.
+ * @author SAP AG
+ */
+public interface EdmCustomizableFeedMappings {
+
+ /**
+ * Get the information if the property should be kept in the content
+ *
+ * @return <code>true</code> if the property must be kept in the content
+ */
+ public Boolean isFcKeepInContent();
+
+ /**
+ * Get the content kind
+ *
+ * @return {@link EdmContentKind}
+ */
+ public EdmContentKind getFcContentKind();
+
+ /**
+ * Get the XML namespace prefix
+ *
+ * @return String
+ */
+ public String getFcNsPrefix();
+
+ /**
+ * Get the XML namespace URI
+ *
+ * @return String
+ */
+ public String getFcNsUri();
+
+ /**
+ * Get the source path
+ *
+ * @return String
+ */
+ public String getFcSourcePath();
+
+ /**
+ * Get the target path
+ *
+ * @return String
+ */
+ public String getFcTargetPath();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmElement.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmElement.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmElement.java
new file mode 100644
index 0000000..f6a7c37
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmElement.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmElement is the base interface for {@link EdmParameter} and {@link EdmProperty} and provides
+ * the information by which facets further specialize the usage of the type.
+ * @author SAP AG
+ */
+public interface EdmElement extends EdmMappable, EdmTyped {
+
+ /**
+ * Get the facet information for an element
+ *
+ * @return {@link EdmFacets}
+ * @throws EdmException
+ */
+ EdmFacets getFacets() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityContainer.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityContainer.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityContainer.java
new file mode 100644
index 0000000..f2a9a63
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityContainer.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL EntityContainer element
+ *
+ * <p>EdmEntityContainer hold the information of EntitySets, FunctionImports and AssociationSets contained
+ * @author SAP AG
+ */
+public interface EdmEntityContainer extends EdmNamed {
+
+ /**
+ * @return <b>boolean</b> true if this is the default container
+ */
+ boolean isDefaultEntityContainer();
+
+ /**
+ * Get contained EntitySet by name
+ *
+ * @param name
+ * @return {@link EdmEntitySet}
+ * @throws EdmException
+ */
+ EdmEntitySet getEntitySet(String name) throws EdmException;
+
+ /**
+ * Get contained FunctionImport by name
+ *
+ * @param name
+ * @return {@link EdmFunctionImport}
+ * @throws EdmException
+ */
+ EdmFunctionImport getFunctionImport(String name) throws EdmException;
+
+ /**
+ * Get contained AssociationSet by providing the source entity set and the navigation property
+ *
+ * @param sourceEntitySet of type {@link EdmEntitySet}
+ * @param navigationProperty of type {@link EdmNavigationProperty}
+ * @return {@link EdmAssociationSet}
+ * @throws EdmException
+ */
+ EdmAssociationSet getAssociationSet(EdmEntitySet sourceEntitySet, EdmNavigationProperty navigationProperty) throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySet.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySet.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySet.java
new file mode 100644
index 0000000..6cfdc07
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySet.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL EntitySet element
+ * <p>EdmEntitySet is the container for entity type instances as described in the OData protocol.
+ * @author SAP AG
+ */
+public interface EdmEntitySet extends EdmMappable, EdmNamed {
+
+ /**
+ * Get the entity type
+ *
+ * @return {@link EdmEntityType}
+ * @throws EdmException
+ */
+ EdmEntityType getEntityType() throws EdmException;
+
+ /**
+ * Get the related entity set by providing the navigation property
+ *
+ * @param navigationProperty of type {@link EdmNavigationProperty}
+ * @return {@link EdmEntitySet}
+ * @throws EdmException
+ */
+ EdmEntitySet getRelatedEntitySet(EdmNavigationProperty navigationProperty) throws EdmException;
+
+ /**
+ * Get the entity container the entity set is contained in
+ *
+ * @return {@link EdmEntityContainer}
+ * @throws EdmException
+ */
+ EdmEntityContainer getEntityContainer() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySetInfo.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySetInfo.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySetInfo.java
new file mode 100644
index 0000000..8994357
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntitySetInfo.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+import java.net.URI;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * Objects of this class contain information about one entity set inside the EntityDataModel.
+ * @author SAP AG
+ *
+ */
+public interface EdmEntitySetInfo {
+
+ /**
+ * @return the entity container name which contains this entity set.
+ */
+ public String getEntityContainerName();
+
+ /**
+ * @return the entity set name
+ */
+ public String getEntitySetName();
+
+ /**
+ * @return true if this entity set is contained inside the default container
+ */
+ public boolean isDefaultEntityContainer();
+
+ /**
+ * 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-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityType.java
new file mode 100644
index 0000000..d0a0c92
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmEntityType.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.odata2.api.edm;
+
+import java.util.List;
+
+/**
+ * <p>A CSDL EntityType element.</p>
+ * <p>EdmEntityType holds a set of related information like {@link EdmSimpleType}
+ * properties and {@link EdmComplexType} properties and in addition to a
+ * {@link EdmComplexType complex type} it provides information about key properties,
+ * customizable feed mappings and {@link EdmNavigationProperty navigation properties}.
+ * @author SAP AG
+ * @org.apache.olingo.odata2.DoNotImplement
+ */
+public interface EdmEntityType extends EdmStructuralType {
+
+ /**
+ * Gets all key property names.
+ * @return collection of key property names of type List<String>
+ * @throws EdmException
+ */
+ List<String> getKeyPropertyNames() throws EdmException;
+
+ /**
+ * Get all key properties as list of {@link EdmProperty}.
+ * @return collection of key properties of type List<EdmProperty>
+ * @throws EdmException
+ */
+ List<EdmProperty> getKeyProperties() throws EdmException;
+
+ /**
+ * Indicates if the entity type is treated as Media Link Entry
+ * with associated Media Resource.
+ * @return <code>true</code> if the entity type is a Media Link Entry
+ * @throws EdmException
+ */
+ boolean hasStream() throws EdmException;
+
+ @Override
+ EdmEntityType getBaseType() throws EdmException;
+
+ /**
+ * Gets the Customizable Feed Mappings of the entity type.
+ * @return {@link EdmCustomizableFeedMappings}
+ * @throws EdmException
+ */
+ EdmCustomizableFeedMappings getCustomizableFeedMappings() throws EdmException;
+
+ /**
+ * Gets all navigation property names.
+ * @return collection of navigation properties of type List<String>
+ * @throws EdmException
+ */
+ List<String> getNavigationPropertyNames() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmException.java
new file mode 100644
index 0000000..62dceb9
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmException.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+import org.apache.olingo.odata2.api.exception.MessageReference;
+import org.apache.olingo.odata2.api.exception.ODataMessageException;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * An exception for problems regarding the Entity Data Model.
+ * @author SAP AG
+ */
+public class EdmException extends ODataMessageException {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final MessageReference COMMON = createMessageReference(EdmException.class, "COMMON");
+ public static final MessageReference PROVIDERPROBLEM = createMessageReference(EdmException.class, "PROVIDERPROBLEM");
+
+ public EdmException(final MessageReference messageReference) {
+ super(messageReference);
+ }
+
+ public EdmException(final MessageReference messageReference, final Throwable cause) {
+ super(messageReference, cause);
+ }
+
+ public EdmException(final MessageReference messageReference, final String errorCode) {
+ super(messageReference, errorCode);
+ }
+
+ public EdmException(final MessageReference messageReference, final Throwable cause, final String errorCode) {
+ super(messageReference, cause, errorCode);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFacets.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFacets.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFacets.java
new file mode 100644
index 0000000..3421f0c
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFacets.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * <p>A Facet is an element defined in CSDL that provides information
+ * that specializes the usage of a type.</p>
+ * @author SAP AG
+ */
+public interface EdmFacets {
+
+ /**
+ * Get the information if the type in use is nullable
+ *
+ * @return <code>true</code> if the type in use is nullable
+ */
+ Boolean isNullable();
+
+ /**
+ * Get the default value of the type in use
+ *
+ * @return a default value of the type in use as String
+ */
+ String getDefaultValue();
+
+ /**
+ * Get the maximum length of the type in use
+ *
+ * @return the maximum length of the type in use as Integer
+ */
+ Integer getMaxLength();
+
+ /**
+ * Get the information if the type in has a fixed length
+ *
+ * @return <code>true</code> if the type in use has a fixed length
+ */
+ Boolean isFixedLength();
+
+ /**
+ * Get the precision of the type in use
+ *
+ * @return the precision of the type in use as Integer
+ */
+ Integer getPrecision();
+
+ /**
+ * Get the scale of the type in use
+ *
+ * @return the scale of the type in use as Integer
+ */
+ Integer getScale();
+
+ /**
+ * Get the information if UNICODE or ASCII characters are used. Default is UNICODE.
+ *
+ * @return <code>true</code> if UNICODE characters are used
+ */
+ Boolean isUnicode();
+
+ /**
+ * Get the sorting sequence to be used.
+ *
+ * @return the sorting sequence as String
+ */
+ String getCollation();
+
+ /**
+ * Get the information if the value of the type in use should be used for optimistic concurrency checks.
+ *
+ * @return {@link EdmConcurrencyMode}
+ */
+ EdmConcurrencyMode getConcurrencyMode();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFunctionImport.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFunctionImport.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFunctionImport.java
new file mode 100644
index 0000000..e016822
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmFunctionImport.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.odata2.api.edm;
+
+import java.util.Collection;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL FunctionImport element
+ *
+ * EdmFunctionImport can be used model functions which have input parameters, an associated HTTP Method
+ * and a return type which can be of different kinds:
+ *
+ * <li>{@link EdmSimpleType} or a collection of simple types
+ * <li>{@link EdmEntityType} or a collection of entity types
+ * <li>{@link EdmEntitySet}
+ * @author SAP AG
+ */
+public interface EdmFunctionImport extends EdmMappable, EdmNamed {
+
+ /**
+ * Get the parameter by name
+ * @param name
+ * @return {@link EdmParameter}
+ * @throws EdmException
+ */
+ EdmParameter getParameter(String name) throws EdmException;
+
+ /**
+ * Get all parameter names
+ * @return collection of parameter names of type Collection<String>
+ * @throws EdmException
+ */
+ Collection<String> getParameterNames() throws EdmException;
+
+ /**
+ * Get the edm entity set
+ * @return {@link EdmEntitySet}
+ * @throws EdmException
+ */
+ EdmEntitySet getEntitySet() throws EdmException;
+
+ /**
+ * Get the HTTP Method
+ * @return HTTP Method as String
+ * @throws EdmException
+ */
+ String getHttpMethod() throws EdmException;
+
+ /**
+ * @return {@link EdmTyped}
+ * @throws EdmException
+ */
+ EdmTyped getReturnType() throws EdmException;
+
+ /**
+ * Get the entity container the function import is contained in
+ * @return {@link EdmEntityContainer}
+ * @throws EdmException
+ */
+ EdmEntityContainer getEntityContainer() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteral.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteral.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteral.java
new file mode 100644
index 0000000..e7b47d2
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteral.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * <p>Representation of a simple-typed literal</p>
+ * <p>The literal is in default representation. The URI representation differs
+ * from the default representation mainly in the additional presence of type
+ * indicators (prefixes or suffixes, respectively); since the type information
+ * is stored here separately, the default representation is more appropriate.
+ * Should the URI representation be needed, it can be re-created by calling
+ * {@link EdmSimpleType#toUriLiteral}.</p>
+ * @author SAP AG
+ * @see EdmLiteralKind
+ */
+public final class EdmLiteral {
+ private final EdmSimpleType type;
+ private final String literal;
+
+ /**
+ * Creates an {@link EdmLiteral} object out of the simple type and the literal string.
+ * @param type {@link EdmSimpleType} simple type
+ * @param literal String literal in default (<em>not</em> URI) representation
+ */
+ public EdmLiteral(final EdmSimpleType type, final String literal) {
+ this.type = type;
+ this.literal = literal;
+ }
+
+ /**
+ * Gets the simple type of the literal.
+ * @return {@link EdmSimpleType} object
+ */
+ public EdmSimpleType getType() {
+ return type;
+ }
+
+ /**
+ * Gets the literal String.
+ * @return {@link String} literal in default (<em>not</em> URI) representation
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ @Override
+ public String toString() {
+ return "type=" + type + ", literal=" + literal;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralException.java
new file mode 100644
index 0000000..02c4a4e
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralException.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.odata2.api.edm;
+
+import org.apache.olingo.odata2.api.exception.MessageReference;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * Exception for violation of the OData URI construction rules, resulting in a 400 Bad Request response
+ * @author SAP AG
+ */
+public class EdmLiteralException extends EdmException {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final MessageReference NOTEXT = createMessageReference(EdmLiteralException.class, "NOTEXT");
+ public static final MessageReference LITERALFORMAT = createMessageReference(EdmLiteralException.class, "LITERALFORMAT");
+ public static final MessageReference UNKNOWNLITERAL = createMessageReference(EdmLiteralException.class, "UNKNOWNLITERAL");
+
+ public EdmLiteralException(final MessageReference MessageReference) {
+ super(MessageReference);
+ }
+
+ public EdmLiteralException(final MessageReference messageReference, final Throwable cause) {
+ super(messageReference, cause);
+ }
+
+ public EdmLiteralException(final MessageReference MessageReference, final String errorCode) {
+ super(MessageReference, errorCode);
+ }
+
+ public EdmLiteralException(final MessageReference messageReference, final Throwable cause, final String errorCode) {
+ super(messageReference, cause, errorCode);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralKind.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralKind.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralKind.java
new file mode 100644
index 0000000..5002487
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmLiteralKind.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmLiteralKind indicates the format of an EDM literal.
+ * @author SAP AG
+ */
+public enum EdmLiteralKind {
+
+ DEFAULT, URI, JSON;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMappable.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMappable.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMappable.java
new file mode 100644
index 0000000..9755054
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMappable.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmMappable can be applied to CSDL elements to associate additional information.
+ * @author SAP AG
+ */
+public interface EdmMappable {
+
+ /**
+ * Get mapping information applied to an EDM element
+ *
+ * @return {@link EdmMapping}
+ * @throws EdmException
+ */
+ EdmMapping getMapping() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMapping.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMapping.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMapping.java
new file mode 100644
index 0000000..b6eb600
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMapping.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmMapping holds custom mapping information which can be applied to a CSDL element.
+ * @author SAP AG
+ */
+public interface EdmMapping {
+
+ /**
+ * Get the mapping value
+ *
+ * @return mapping name as String
+ */
+ String getInternalName();
+
+ /**
+ * Get the mapping name for mime type lookup
+ *
+ * @return mapping name as String
+ */
+ String getMimeType();
+
+ /**
+ * Get the set object for this mapping
+ *
+ * @return {@link Object} object
+ */
+ Object getObject();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMultiplicity.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMultiplicity.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMultiplicity.java
new file mode 100644
index 0000000..c8ed71a
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmMultiplicity.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * <p>EdmMultiplicity indicates the number of entity type instances
+ * an association end can relate to:
+ * <dl>
+ * <dt>0..1</dt><dd>one or none</dd>
+ * <dt> 1</dt><dd>exactly one</dd>
+ * <dt> *</dt><dd>many</dd>
+ * </dl></p>
+ * @author SAP AG
+ */
+public enum EdmMultiplicity {
+
+ ZERO_TO_ONE("0..1"), MANY("*"), ONE("1");
+
+ private final String literal;
+
+ private EdmMultiplicity(final String literal) {
+ this.literal = literal;
+ }
+
+ /**
+ * Gets the multiplicity for a given name.
+ * @param literal
+ * @return {@link EdmMultiplicity}
+ */
+ public static EdmMultiplicity fromLiteral(final String literal) {
+ for (final EdmMultiplicity edmMultiplicity : EdmMultiplicity.values()) {
+ if (edmMultiplicity.toString().equals(literal)) {
+ return edmMultiplicity;
+ }
+ }
+ throw new IllegalArgumentException("Invalid literal " + literal);
+ }
+
+ /**
+ * Returns the OData literal form of this multiplicity.
+ * @return the OData literal form of this multiplicity
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNamed.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNamed.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNamed.java
new file mode 100644
index 0000000..0b40b42
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNamed.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmName is the base interface for nearly all CSDL constructs.
+ * @author SAP AG
+ */
+public interface EdmNamed {
+
+ /**
+ * @return name as String
+ * @throws EdmException
+ */
+ String getName() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNavigationProperty.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNavigationProperty.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNavigationProperty.java
new file mode 100644
index 0000000..0d757ff
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmNavigationProperty.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL NavigationProperty element
+ *
+ * <p>EdmNavigationProperty allows navigation from one entity type to another via a relationship.
+ * @author SAP AG
+ */
+public interface EdmNavigationProperty extends EdmTyped, EdmMappable {
+
+ /**
+ * Get the relationship of the navigation property
+ *
+ * @return {@link EdmAssociation}
+ * @throws EdmException
+ */
+ EdmAssociation getRelationship() throws EdmException;
+
+ /**
+ * Get the from role of the navigation property
+ *
+ * @return from role as String
+ * @throws EdmException
+ */
+ String getFromRole() throws EdmException;
+
+ /**
+ * Get the to role of the navigation property
+ *
+ * @return to role as String
+ * @throws EdmException
+ */
+ String getToRole() throws EdmException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmParameter.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmParameter.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmParameter.java
new file mode 100644
index 0000000..ba5bca6
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmParameter.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.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * A CSDL FunctionImportParameter element
+ * <p>EdmParameter defines a function import parameter (which is used as input parameter). FunctionImports are described in {@link org.apache.olingo.odata2.api.edm.provider.FunctionImport} or in the OData protocol.
+ * @author SAP AG
+ */
+public interface EdmParameter extends EdmElement {
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmProperty.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmProperty.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmProperty.java
new file mode 100644
index 0000000..1cef8a0
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmProperty.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.odata2.api.edm;
+
+/**
+ * A CSDL Property element
+ * <p>EdmProperty defines a simple type or a complex type.
+ * @org.apache.olingo.odata2.DoNotImplement
+ * @author SAP AG
+ */
+public interface EdmProperty extends EdmElement {
+
+ /**
+ * Get customizable feed mappings for this property
+ *
+ * @return {@link EdmCustomizableFeedMappings}
+ * @throws EdmException
+ */
+ EdmCustomizableFeedMappings getCustomizableFeedMappings() throws EdmException;
+
+ /**
+ * Get the related mime type for the property
+ *
+ * @return mime type as String
+ * @throws EdmException
+ */
+ String getMimeType() throws EdmException;
+
+ /**
+ * Get the info if the property is a simple property
+ *
+ * @return true, if it is a simple property
+ */
+ boolean isSimple();
+}