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:37 UTC
[32/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/edm/provider/EdmProvider.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProvider.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProvider.java
new file mode 100644
index 0000000..63d4c27
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProvider.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.FullQualifiedName;
+import org.apache.olingo.odata2.api.exception.ODataException;
+import org.apache.olingo.odata2.api.exception.ODataNotImplementedException;
+
+/**
+ * Default EDM Provider which is to be extended by the application
+ * @author SAP AG
+ *
+ */
+public abstract class EdmProvider {
+
+ /**
+ * 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 String name) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ /**
+ * This method should return an {@link EntityType} or <b>null</b> if nothing is found
+ * @param edmFQName
+ * @return {@link EntityType} for the given name
+ * @throws ODataException
+ */
+ public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ /**
+ * This method should return a {@link ComplexType} or <b>null</b> if nothing is found
+ * @param edmFQName
+ * @return {@link ComplexType} for the given name
+ * @throws ODataException
+ */
+ public ComplexType getComplexType(final FullQualifiedName edmFQName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ /**
+ * This method should return an {@link Association} or <b>null</b> if nothing is found
+ * @param edmFQName
+ * @return {@link Association} for the given name
+ * @throws ODataException
+ */
+ public Association getAssociation(final FullQualifiedName edmFQName) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ /**
+ * This method should return an {@link EntitySet} or <b>null</b> if nothing is found
+ * @param entityContainer
+ * @param name
+ * @return {@link EntitySet} for the given container name and entity set name
+ * @throws ODataException
+ */
+ public EntitySet getEntitySet(final String entityContainer, final String name) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ /**
+ * This method should return an {@link AssociationSet} or <b>null</b> if nothing is found
+ * @param entityContainer
+ * @param association
+ * @param sourceEntitySetName
+ * @param sourceEntitySetRole
+ * @return {@link AssociationSet} for the given container name, association name, source entity set name and source entity set role
+ * @throws ODataException
+ */
+ public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ /**
+ * This method should return a {@link FunctionImport} or <b>null</b> if nothing is found
+ * @param entityContainer
+ * @param name
+ * @return {@link FunctionImport} for the given container name and function import name
+ * @throws ODataException
+ */
+ public FunctionImport getFunctionImport(final String entityContainer, final String name) throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+
+ /**
+ * This method should return a collection of all {@link Schema} or <b>null</b> if nothing is found
+ * @return List<{@link Schema}>
+ * @throws ODataException
+ */
+ public List<Schema> getSchemas() throws ODataException {
+ throw new ODataNotImplementedException();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderAccessor.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderAccessor.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderAccessor.java
new file mode 100644
index 0000000..0ab6301
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderAccessor.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.provider;
+
+/**
+ * This interface can be used to access the {@link EdmProvider} within an application.
+ * @author SAP AG
+ *
+ */
+public interface EdmProviderAccessor {
+
+ /**
+ * @return {@link EdmProvider} of this service
+ */
+ public EdmProvider getEdmProvider();
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderFactory.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderFactory.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderFactory.java
new file mode 100644
index 0000000..710f27b
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EdmProviderFactory.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.io.InputStream;
+
+import org.apache.olingo.odata2.api.ep.EntityProviderException;
+import org.apache.olingo.odata2.api.rt.RuntimeDelegate;
+
+/**
+ * EDM Provider Factory which can be used to create an edm provider (e.g. from a metadata document)
+ * @author SAP AG
+ *
+ */
+public class EdmProviderFactory {
+
+ /**
+ * Creates and returns an edm provider.
+ * @param metadataXml a metadata xml input stream (means the metadata document)
+ * @param validate true if semantic checks for metadata document input stream shall be done
+ * @return an instance of EdmProvider
+ */
+ public static EdmProvider getEdmProvider(final InputStream metadataXml, final boolean validate) throws EntityProviderException {
+ return RuntimeDelegate.createEdmProvider(metadataXml, validate);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainer.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainer.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainer.java
new file mode 100644
index 0000000..fa18683
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainer.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+/**
+ * Objects of this class represent an entity container including its child elements
+ * @author SAP AG
+ */
+public class EntityContainer extends EntityContainerInfo {
+
+ private List<EntitySet> entitySets;
+ private List<AssociationSet> associationSets;
+ private List<FunctionImport> functionImports;
+ private Documentation documentation;
+
+ /**
+ * @return <b>List</b> of all entity sets of the entity container
+ */
+ public List<EntitySet> getEntitySets() {
+ return entitySets;
+ }
+
+ /**
+ * Sets the entity sets of this {@link EntityContainer}
+ * @param entitySets
+ * @return {@link EntityContainerInfo} for method chaining
+ */
+ public EntityContainer setEntitySets(final List<EntitySet> entitySets) {
+ this.entitySets = entitySets;
+ return this;
+ }
+
+ /**
+ * @return <b>List</b> of all association sets of the entity container
+ */
+ public List<AssociationSet> getAssociationSets() {
+ return associationSets;
+ }
+
+ /**
+ * Sets the association sets of this {@link EntityContainer}
+ * @param associationSets
+ * @return {@link EntityContainerInfo} for method chaining
+ */
+ public EntityContainer setAssociationSets(final List<AssociationSet> associationSets) {
+ this.associationSets = associationSets;
+ return this;
+ }
+
+ /**
+ * @return <b>List</b> of all function imports of the entity container
+ */
+ public List<FunctionImport> getFunctionImports() {
+ return functionImports;
+ }
+
+ /**
+ * Sets the function imports of this {@link EntityContainer}
+ * @param functionImports
+ * @return {@link EntityContainerInfo} for method chaining
+ */
+ public EntityContainer setFunctionImports(final List<FunctionImport> functionImports) {
+ this.functionImports = functionImports;
+ return this;
+ }
+
+ /**
+ * Sets the name of this {@link EntityContainer}
+ * @param name
+ * @return {@link EntityContainer} for method chaining
+ */
+ @Override
+ public EntityContainer setName(final String name) {
+ super.setName(name);
+ return this;
+ }
+
+ /**
+ * Sets the entity container which is the parent of this {@link EntityContainer}
+ * @param extendz
+ * @return {@link EntityContainer} for method chaining
+ */
+ @Override
+ public EntityContainer setExtendz(final String extendz) {
+ super.setExtendz(extendz);
+ return this;
+ }
+
+ /**
+ * Sets if this is the default {@link EntityContainer}
+ * @param isDefaultEntityContainer
+ * @return {@link EntityContainer} for method chaining
+ */
+ @Override
+ public EntityContainer setDefaultEntityContainer(final boolean isDefaultEntityContainer) {
+ super.setDefaultEntityContainer(isDefaultEntityContainer);
+ return this;
+ }
+
+ /**
+ * @return {@link Documentation} documentation
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * Sets the {@link Documentation}
+ * @param documentation
+ * @return {@link EntityContainer} for method chaining
+ */
+ public EntityContainer setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainerInfo.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainerInfo.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainerInfo.java
new file mode 100644
index 0000000..593ba9d
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityContainerInfo.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+/**
+ * Objects of this class represent an entity container
+ * @author SAP AG
+ */
+public class EntityContainerInfo {
+
+ private String name;
+ private String extendz;
+ private boolean isDefaultEntityContainer;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return <b>String</b> name of the container which is extended by this container
+ */
+ public String getExtendz() {
+ return extendz;
+ }
+
+ /**
+ * @return <b>boolean</b> if this container is the default container
+ */
+ public boolean isDefaultEntityContainer() {
+ return isDefaultEntityContainer;
+ }
+
+ /**
+ * Sets the name of this {@link EntityContainerInfo}
+ * @param name
+ * @return {@link EntityContainerInfo} for method chaining
+ */
+ public EntityContainerInfo setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the entity container which is the parent of this {@link EntityContainerInfo}
+ * @param extendz
+ * @return {@link EntityContainerInfo} for method chaining
+ */
+ public EntityContainerInfo setExtendz(final String extendz) {
+ this.extendz = extendz;
+ return this;
+ }
+
+ /**
+ * Sets if this is the default {@link EntityContainerInfo}
+ * @param isDefaultEntityContainer
+ * @return {@link EntityContainerInfo} for method chaining
+ */
+ public EntityContainerInfo setDefaultEntityContainer(final boolean isDefaultEntityContainer) {
+ this.isDefaultEntityContainer = isDefaultEntityContainer;
+ return this;
+ }
+
+ /**
+ * @return collection of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link EntityContainer}
+ * @param annotationAttributes
+ * @return {@link EntityContainer} for method chaining
+ */
+ public EntityContainerInfo setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * @return collection of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link EntityContainer}
+ * @param annotationElements
+ * @return {@link EntityContainer} for method chaining
+ */
+ public EntityContainerInfo setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntitySet.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntitySet.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntitySet.java
new file mode 100644
index 0000000..fe100c9
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntitySet.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.FullQualifiedName;
+
+/**
+ * Objects of this class represent an entity set
+ * @author SAP AG
+ */
+public class EntitySet {
+
+ private String name;
+ private FullQualifiedName entityType;
+ private Mapping mapping;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String> name of this entity set
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return {@link FullQualifiedName} of the entity type of this entity set
+ */
+ public FullQualifiedName getEntityType() {
+ return entityType;
+ }
+
+ /**
+ * @return {@link Mapping} for this type
+ */
+ public Mapping getMapping() {
+ return mapping;
+ }
+
+ /**
+ * @return {@link Documentation} documentation
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * @return collection of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return collection of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the name of this {@link EntitySet}
+ * @param name
+ * @return {@link EntitySet} for method chaining
+ */
+ public EntitySet setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the {@link FullQualifiedName} of the {@link EntityType} of this {@link EntitySet}
+ * @param entityType
+ * @return {@link EntitySet} for method chaining
+ */
+ public EntitySet setEntityType(final FullQualifiedName entityType) {
+ this.entityType = entityType;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Mapping}
+ * @param mapping
+ * @return {@link EntitySet} for method chaining
+ */
+ public EntitySet setMapping(final Mapping mapping) {
+ this.mapping = mapping;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation}
+ * @param documentation
+ * @return {@link EntitySet} for method chaining
+ */
+ public EntitySet setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link EntitySet}
+ * @param annotationAttributes
+ * @return {@link EntitySet} for method chaining
+ */
+ public EntitySet setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link EntitySet}
+ * @param annotationElements
+ * @return {@link EntitySet} for method chaining
+ */
+ public EntitySet setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityType.java
new file mode 100644
index 0000000..fecfe43
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/EntityType.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.FullQualifiedName;
+
+/**
+ * Objects of this class represent an entity type
+ * @author SAP AG
+ */
+public class EntityType extends ComplexType {
+
+ private boolean hasStream;
+ private CustomizableFeedMappings customizableFeedMappings;
+ private Key key;
+ private List<NavigationProperty> navigationProperties;
+
+ /**
+ * @return <b>boolean</b> if this EntityType is a media resource
+ */
+ public boolean isHasStream() {
+ return hasStream;
+ }
+
+ /**
+ * @return {@link CustomizableFeedMappings} of this entity type
+ */
+ public CustomizableFeedMappings getCustomizableFeedMappings() {
+ return customizableFeedMappings;
+ }
+
+ /**
+ * @return {@link Key} of this entity type
+ */
+ public Key getKey() {
+ return key;
+ }
+
+ /**
+ * @return List<{@link NavigationProperty}> of this entity type
+ */
+ public List<NavigationProperty> getNavigationProperties() {
+ return navigationProperties;
+ }
+
+ /**
+ * Sets if this {@link EntityType} is a media resource
+ * @param hasStream
+ * @return {@link EntityType} for method chaining,
+ */
+ public EntityType setHasStream(final boolean hasStream) {
+ this.hasStream = hasStream;
+ return this;
+ }
+
+ /**
+ * Sets the {@link CustomizableFeedMappings} for this {@link EntityType}
+ * @param customizableFeedMappings
+ * @return {@link EntityType} for method chaining
+ */
+ public EntityType setCustomizableFeedMappings(final CustomizableFeedMappings customizableFeedMappings) {
+ this.customizableFeedMappings = customizableFeedMappings;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Key} for this {@link EntityType}
+ * @param key
+ * @return {@link EntityType} for method chaining
+ */
+ public EntityType setKey(final Key key) {
+ this.key = key;
+ return this;
+ }
+
+ /**
+ * Sets the {@link NavigationProperty}s for this {@link EntityType}
+ * @param navigationProperties
+ * @return {@link EntityType} for method chaining
+ */
+ public EntityType setNavigationProperties(final List<NavigationProperty> navigationProperties) {
+ this.navigationProperties = navigationProperties;
+ return this;
+ }
+
+ /**
+ * @param name
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setName(final String name) {
+ super.setName(name);
+ return this;
+ }
+
+ /**
+ * @param baseType
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setBaseType(final FullQualifiedName baseType) {
+ super.setBaseType(baseType);
+ return this;
+ }
+
+ /**
+ * @param isAbstract
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setAbstract(final boolean isAbstract) {
+ super.setAbstract(isAbstract);
+ return this;
+ }
+
+ /**
+ * @param properties
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setProperties(final List<Property> properties) {
+ super.setProperties(properties);
+ return this;
+ }
+
+ /**
+ * @param mapping
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setMapping(final Mapping mapping) {
+ super.setMapping(mapping);
+ return this;
+ }
+
+ /**
+ * @param documentation
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setDocumentation(final Documentation documentation) {
+ super.setDocumentation(documentation);
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link EntityType}
+ * @param annotationAttributes
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ super.setAnnotationAttributes(annotationAttributes);
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link EntityType}
+ * @param annotationElements
+ * @return {@link EntityType} for method chaining
+ */
+ @Override
+ public EntityType setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ super.setAnnotationElements(annotationElements);
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Facets.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Facets.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Facets.java
new file mode 100644
index 0000000..7dbfe2a
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Facets.java
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.EdmConcurrencyMode;
+import org.apache.olingo.odata2.api.edm.EdmFacets;
+
+/**
+ * Objects of this class represent the facets an entity type, property or function import can have
+ * @author SAP AG
+ */
+public class Facets implements EdmFacets {
+
+ /** Specification default is TRUE but we won't set it here because
+ * we want to know if it's set explicitly by an application. */
+ Boolean nullable;
+ String defaultValue;
+ Integer maxLength;
+ Boolean fixedLength;
+ Integer precision;
+ Integer scale;
+ Boolean unicode;
+ String collation;
+ EdmConcurrencyMode concurrencyMode;
+
+ @Override
+ public Boolean isNullable() {
+ return nullable;
+ }
+
+ @Override
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ @Override
+ public Integer getMaxLength() {
+ return maxLength;
+ }
+
+ @Override
+ public Boolean isFixedLength() {
+ return fixedLength;
+ }
+
+ @Override
+ public Integer getPrecision() {
+ return precision;
+ }
+
+ @Override
+ public Integer getScale() {
+ return scale;
+ }
+
+ @Override
+ public Boolean isUnicode() {
+ return unicode;
+ }
+
+ @Override
+ public String getCollation() {
+ return collation;
+ }
+
+ @Override
+ public EdmConcurrencyMode getConcurrencyMode() {
+ return concurrencyMode;
+ }
+
+ /**
+ * Sets if this {@link Facets} is nullable
+ * @param nullable
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setNullable(final Boolean nullable) {
+ this.nullable = nullable;
+ return this;
+ }
+
+ /**
+ * Sets the fixed length of this {@link Facets}
+ * @param fixedLength
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setFixedLength(final Boolean fixedLength) {
+ this.fixedLength = fixedLength;
+ return this;
+ }
+
+ /**
+ * Sets if this {@link Facets} is in Unicode
+ * @param unicode
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setUnicode(final Boolean unicode) {
+ this.unicode = unicode;
+ return this;
+ }
+
+ /**
+ * Sets the default value of this {@link Facets}
+ * @param defaultValue
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setDefaultValue(final String defaultValue) {
+ this.defaultValue = defaultValue;
+ return this;
+ }
+
+ /**
+ * Sets the maximum length of this {@link Facets}
+ * @param maxLength
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setMaxLength(final Integer maxLength) {
+ this.maxLength = maxLength;
+ return this;
+ }
+
+ /**
+ * Sets the precision of this {@link Facets}
+ * @param precision
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setPrecision(final Integer precision) {
+ this.precision = precision;
+ return this;
+ }
+
+ /**
+ * Sets the scale of this {@link Facets}
+ * @param scale
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setScale(final Integer scale) {
+ this.scale = scale;
+ return this;
+ }
+
+ /**
+ * Sets the collation of this {@link Facets}
+ * @param collation
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setCollation(final String collation) {
+ this.collation = collation;
+ return this;
+ }
+
+ /**
+ * Sets the {@link EdmConcurrencyMode} of this {@link Facets}
+ * @param concurrencyMode
+ * @return {@link Facets} for method chaining
+ */
+ public Facets setConcurrencyMode(final EdmConcurrencyMode concurrencyMode) {
+ this.concurrencyMode = concurrencyMode;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ final List<String> values = new ArrayList<String>();
+ if (nullable != null) {
+ values.add("Nullable=" + nullable);
+ }
+ if (defaultValue != null) {
+ values.add("DefaultValue=" + defaultValue);
+ }
+ if (maxLength != null) {
+ values.add("MaxLength=" + maxLength);
+ }
+ if (fixedLength != null) {
+ values.add("FixedLength=" + fixedLength);
+ }
+ if (precision != null) {
+ values.add("Precision=" + precision);
+ }
+ if (scale != null) {
+ values.add("Scale=" + scale);
+ }
+ if (unicode != null) {
+ values.add("Unicode=" + unicode);
+ }
+ if (collation != null) {
+ values.add("Collation=" + collation);
+ }
+ if (concurrencyMode != null) {
+ values.add("ConcurrencyMode=" + concurrencyMode);
+ }
+ return values.toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImport.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImport.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImport.java
new file mode 100644
index 0000000..1cb5460
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImport.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+/**
+ * Objects of this class represent a function import
+ * @author SAP AG
+ */
+public class FunctionImport {
+
+ private String name;
+ private ReturnType returnType;
+ private String entitySet;
+ private String httpMethod;
+ private List<FunctionImportParameter> parameters;
+ private Mapping mapping;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name of this function import
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return {@link ReturnType} of this function import
+ */
+ public ReturnType getReturnType() {
+ return returnType;
+ }
+
+ /**
+ * @return <b>String</b> name of the entity set
+ */
+ public String getEntitySet() {
+ return entitySet;
+ }
+
+ /**
+ * @return <b>String</b> name of the used HTTP method
+ */
+ public String getHttpMethod() {
+ return httpMethod;
+ }
+
+ /**
+ * @return List<{@link FunctionImportParameter}>s of this function import
+ */
+ public List<FunctionImportParameter> getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @return {@link Mapping} for this type
+ */
+ public Mapping getMapping() {
+ return mapping;
+ }
+
+ /**
+ * @return {@link Documentation} documentation
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * @return collection of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return collection of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the name of this {@link FunctionImport}
+ * @param name
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the {@link ReturnType} of this {@link FunctionImport}
+ * @param returnType
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setReturnType(final ReturnType returnType) {
+ this.returnType = returnType;
+ return this;
+ }
+
+ /**
+ * Sets the {@link EntitySet} of this {@link FunctionImport}
+ * @param entitySet
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setEntitySet(final String entitySet) {
+ this.entitySet = entitySet;
+ return this;
+ }
+
+ /**
+ * Sets the HTTP method of this {@link FunctionImport}
+ * @param httpMethod
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setHttpMethod(final String httpMethod) {
+ this.httpMethod = httpMethod;
+ return this;
+ }
+
+ /**
+ * Sets the {@link FunctionImportParameter}s of this {@link FunctionImport}
+ * @param parameters
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setParameters(final List<FunctionImportParameter> parameters) {
+ this.parameters = parameters;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Mapping}
+ * @param mapping
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setMapping(final Mapping mapping) {
+ this.mapping = mapping;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation}
+ * @param documentation
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link FunctionImport}
+ * @param annotationAttributes
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link FunctionImport}
+ * @param annotationElements
+ * @return {@link FunctionImport} for method chaining
+ */
+ public FunctionImport setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImportParameter.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImportParameter.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImportParameter.java
new file mode 100644
index 0000000..eb97504
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/FunctionImportParameter.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.EdmFacets;
+import org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind;
+
+/**
+ * Objects of this class represent function import parameters
+ * @author SAP AG
+ */
+public class FunctionImportParameter {
+
+ private String name;
+ private String mode;
+ private EdmSimpleTypeKind type;
+ private EdmFacets facets;
+ private Mapping mapping;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name of the parameter
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return <b>String</b> mode of this parameter
+ */
+ public String getMode() {
+ return mode;
+ }
+
+ /**
+ * @return {@link EdmSimpleTypeKind} of this parameter
+ */
+ public EdmSimpleTypeKind getType() {
+ return type;
+ }
+
+ /**
+ * @return {@link EdmFacets} of this parameter
+ */
+ public EdmFacets getFacets() {
+ return facets;
+ }
+
+ /**
+ * @return {@link Mapping} of this parameter
+ */
+ public Mapping getMapping() {
+ return mapping;
+ }
+
+ /**
+ * @return {@link Documentation} documentation
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * @return collection of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return collection of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the name of this {@link FunctionImportParameter}
+ * @param name
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the mode of this {@link FunctionImportParameter}
+ * @param mode
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setMode(final String mode) {
+ this.mode = mode;
+ return this;
+ }
+
+ /**
+ * Sets the {@link EdmSimpleTypeKind} of this {@link FunctionImportParameter}
+ * @param type
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setType(final EdmSimpleTypeKind type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Sets the {@link EdmFacets} of this {@link FunctionImportParameter}
+ * @param facets
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setFacets(final EdmFacets facets) {
+ this.facets = facets;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Mapping} of this {@link FunctionImportParameter}
+ * @param mapping
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setMapping(final Mapping mapping) {
+ this.mapping = mapping;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} of this {@link FunctionImportParameter}
+ * @param documentation
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link FunctionImportParameter}
+ * @param annotationAttributes
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link FunctionImportParameter}
+ * @param annotationElements
+ * @return {@link FunctionImportParameter} for method chaining
+ */
+ public FunctionImportParameter setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Key.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Key.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Key.java
new file mode 100644
index 0000000..eeb6bb4
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Key.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+/**
+ * Objects of this class represent a key for an entity type
+ * @author SAP AG
+ */
+public class Key {
+
+ private List<PropertyRef> keys;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return List<{@link PropertyRef}> references to the key properties
+ */
+ public List<PropertyRef> getKeys() {
+ return keys;
+ }
+
+ /**
+ * @return List of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return List of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the {@link Property}s by their {@link PropertyRef} for this {@link Key}
+ * @param keys
+ * @return {@link Key} for method chaining
+ */
+ public Key setKeys(final List<PropertyRef> keys) {
+ this.keys = keys;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationAttribute} for this {@link Key}
+ * @param annotationAttributes
+ * @return {@link Key} for method chaining
+ */
+ public Key setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationElement} for this {@link Key}
+ * @param annotationElements
+ * @return {@link Key} for method chaining
+ */
+ public Key setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Mapping.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Mapping.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Mapping.java
new file mode 100644
index 0000000..a07944a
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Mapping.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.provider;
+
+import org.apache.olingo.odata2.api.edm.EdmMapping;
+
+/**
+ * Object of this class represent the mapping of a value to a MIME type.
+ * @author SAP AG
+ */
+public class Mapping implements EdmMapping {
+
+ private String value;
+ private String mimeType;
+ private Object object;
+
+ @Override
+ public String getInternalName() {
+ return value;
+ }
+
+ @Override
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ @Override
+ public Object getObject() {
+ return object;
+ }
+
+ /**
+ * Sets the value for this {@link Mapping}.
+ * @param value
+ * @return {@link Mapping} for method chaining
+ */
+ public Mapping setInternalName(final String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Sets the mime type for this {@link Mapping}.
+ * @param mimeType
+ * @return {@link Mapping} for method chaining
+ */
+ public Mapping setMimeType(final String mimeType) {
+ this.mimeType = mimeType;
+ return this;
+ }
+
+ /**
+ * Sets an object. This method can be used by a provider to set whatever it wants to associate with this.
+ * @param object
+ * @return {@link Mapping} for method chaining
+ */
+ public Mapping setObject(final Object object) {
+ this.object = object;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/NavigationProperty.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/NavigationProperty.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/NavigationProperty.java
new file mode 100644
index 0000000..894a9c5
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/NavigationProperty.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.FullQualifiedName;
+
+/**
+ * Objects of this Class represent a navigation property
+ * @author SAP AG
+ */
+public class NavigationProperty {
+
+ private String name;
+ private FullQualifiedName relationship;
+ private String fromRole;
+ private String toRole;
+ private Documentation documentation;
+ private Mapping mapping;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name of this navigation property
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return {@link FullQualifiedName} of the relationship
+ */
+ public FullQualifiedName getRelationship() {
+ return relationship;
+ }
+
+ /**
+ * @return <b>String</b> name of the role this navigation is comming from
+ */
+ public String getFromRole() {
+ return fromRole;
+ }
+
+ /**
+ * @return <b>String</b> name of the role this navigation is going to
+ */
+ public String getToRole() {
+ return toRole;
+ }
+
+ /**
+ * @return {@link Mapping} of this navigation property
+ */
+ public Mapping getMapping() {
+ return mapping;
+ }
+
+ /**
+ * @return {@link Documentation} documentation
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * @return List of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return List of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the name of this {@link NavigationProperty}
+ * @param name
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the {@link FullQualifiedName} for the relationship of this {@link NavigationProperty}
+ * @param relationship
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setRelationship(final FullQualifiedName relationship) {
+ this.relationship = relationship;
+ return this;
+ }
+
+ /**
+ * Sets the role this {@link NavigationProperty} is comming from
+ * @param fromRole
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setFromRole(final String fromRole) {
+ this.fromRole = fromRole;
+ return this;
+ }
+
+ /**
+ * Sets the role this {@link NavigationProperty} is going to
+ * @param toRole
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setToRole(final String toRole) {
+ this.toRole = toRole;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Mapping} for this {@link NavigationProperty}
+ * @param mapping
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setMapping(final Mapping mapping) {
+ this.mapping = mapping;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} for this {@link NavigationProperty}
+ * @param documentation
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationAttribute} for this {@link NavigationProperty}
+ * @param annotationAttributes
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationElement} for this {@link NavigationProperty}
+ * @param annotationElements
+ * @return {@link NavigationProperty} for method chaining
+ */
+ public NavigationProperty setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/OnDelete.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/OnDelete.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/OnDelete.java
new file mode 100644
index 0000000..f21a559
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/OnDelete.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.EdmAction;
+
+/**
+ * Objects of this class represent an OnDelete Action
+ * @author SAP AG
+ */
+public class OnDelete {
+
+ private EdmAction action;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return {@link EdmAction} action
+ */
+ public EdmAction getAction() {
+ return action;
+ }
+
+ /**
+ * @return {@link Documentation} documentation
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * @return List of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return List of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the {@link EdmAction} for this {@link OnDelete}
+ * @param action
+ * @return {@link OnDelete} for method chaining
+ */
+ public OnDelete setAction(final EdmAction action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} for this {@link OnDelete}
+ * @param documentation
+ * @return {@link OnDelete} for method chaining
+ */
+ public OnDelete setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationAttribute} for this {@link OnDelete}
+ * @param annotationAttributes
+ * @return {@link OnDelete} for method chaining
+ */
+ public OnDelete setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationElement} for this {@link OnDelete}
+ * @param annotationElements
+ * @return {@link OnDelete} for method chaining
+ */
+ public OnDelete setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Property.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Property.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Property.java
new file mode 100644
index 0000000..ee1dd27
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Property.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+import org.apache.olingo.odata2.api.edm.EdmFacets;
+
+/**
+ * Objects of this class represent a property of an entity type
+ * @author SAP AG
+ */
+public abstract class Property {
+
+ private String name;
+ private EdmFacets facets;
+ private CustomizableFeedMappings customizableFeedMappings;
+ private String mimeType;
+ private Mapping mapping;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name of this property
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return {@link EdmFacets} of this property
+ */
+ public EdmFacets getFacets() {
+ return facets;
+ }
+
+ /**
+ * @return {@link CustomizableFeedMappings} of this property
+ */
+ public CustomizableFeedMappings getCustomizableFeedMappings() {
+ return customizableFeedMappings;
+ }
+
+ /**
+ * @return <b>String</b> mime type of this property
+ */
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * @return {@link Mapping} of this property
+ */
+ public Mapping getMapping() {
+ return mapping;
+ }
+
+ /**
+ * @return {@link Documentation} of this property
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * @return List of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return List of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the name for this {@link Property}
+ * @param name
+ * @return {@link Property} for method chaining
+ */
+ public Property setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Facets} for this {@link Property}
+ * @param facets
+ * @return {@link Property} for method chaining
+ */
+ public Property setFacets(final EdmFacets facets) {
+ this.facets = facets;
+ return this;
+ }
+
+ /**
+ * Sets the {@link CustomizableFeedMappings} for this {@link Property}
+ * @param customizableFeedMappings
+ * @return {@link Property} for method chaining
+ */
+ public Property setCustomizableFeedMappings(final CustomizableFeedMappings customizableFeedMappings) {
+ this.customizableFeedMappings = customizableFeedMappings;
+ return this;
+ }
+
+ /**
+ * Sets the mime type for this {@link Property}
+ * @param mimeType
+ * @return {@link Property} for method chaining
+ */
+ public Property setMimeType(final String mimeType) {
+ this.mimeType = mimeType;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Mapping} for this {@link Property}
+ * @param mapping
+ * @return {@link Property} for method chaining
+ */
+ public Property setMapping(final Mapping mapping) {
+ this.mapping = mapping;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} for this {@link Property}
+ * @param documentation
+ * @return {@link Property} for method chaining
+ */
+ public Property setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationAttribute} for this {@link Property}
+ * @param annotationAttributes
+ * @return {@link Property} for method chaining
+ */
+ public Property setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationElement} for this {@link Property}
+ * @param annotationElements
+ * @return {@link Property} for method chaining
+ */
+ public Property setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/PropertyRef.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/PropertyRef.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/PropertyRef.java
new file mode 100644
index 0000000..6227dd6
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/PropertyRef.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.odata2.api.edm.provider;
+
+import java.util.List;
+
+/**
+ * Objects of this class represent a reference to a property via its name
+ * @author SAP AG
+ *
+ */
+public class PropertyRef {
+
+ private String name;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name of the {@link Property} this {@link PropertyRef} is referencing to
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return List of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return List of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the name of the {@link Property} this {@link PropertyRef} is pointing to
+ * @param name
+ * @return {@link PropertyRef} for method chaining
+ */
+ public PropertyRef setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationAttribute} for this {@link PropertyRef}
+ * @param annotationAttributes
+ * @return {@link PropertyRef} for method chaining
+ */
+ public PropertyRef setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationElement} for this {@link PropertyRef}
+ * @param annotationElements
+ * @return {@link PropertyRef} for method chaining
+ */
+ public PropertyRef setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraint.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraint.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraint.java
new file mode 100644
index 0000000..7bd5baa
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraint.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm.provider;
+
+import java.util.List;
+
+/**
+ * Objects of this Class represent a referential constraint
+ * @author SAP AG
+ */
+public class ReferentialConstraint {
+
+ private ReferentialConstraintRole principal;
+ private ReferentialConstraintRole dependent;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return {@link ReferentialConstraintRole} the principal of this {@link ReferentialConstraint}
+ */
+ public ReferentialConstraintRole getPrincipal() {
+ return principal;
+ }
+
+ /**
+ * @return {@link ReferentialConstraintRole} the dependent of this {@link ReferentialConstraint}
+ */
+ public ReferentialConstraintRole getDependent() {
+ return dependent;
+ }
+
+ /**
+ * @return {@link Documentation} documentation
+ */
+ public Documentation getDocumentation() {
+ return documentation;
+ }
+
+ /**
+ * @return List of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return List of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the principal {@link ReferentialConstraintRole} for this {@link ReferentialConstraint}
+ * @param principal
+ * @return {@link ReferentialConstraint} for method chaining
+ */
+ public ReferentialConstraint setPrincipal(final ReferentialConstraintRole principal) {
+ this.principal = principal;
+ return this;
+ }
+
+ /**
+ * Sets the dependent {@link ReferentialConstraintRole} for this {@link ReferentialConstraint}
+ * @param dependent
+ * @return {@link ReferentialConstraint} for method chaining
+ */
+ public ReferentialConstraint setDependent(final ReferentialConstraintRole dependent) {
+ this.dependent = dependent;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} of this {@link ReferentialConstraint}
+ * @param documentation
+ * @return {@link ReferentialConstraint} for method chaining
+ */
+ public ReferentialConstraint setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationAttribute} for this {@link ReferentialConstraint}
+ * @param annotationAttributes
+ * @return {@link ReferentialConstraint} for method chaining
+ */
+ public ReferentialConstraint setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationElement} for this {@link ReferentialConstraint}
+ * @param annotationElements
+ * @return {@link ReferentialConstraint} for method chaining
+ */
+ public ReferentialConstraint setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraintRole.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraintRole.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraintRole.java
new file mode 100644
index 0000000..cdd7397
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReferentialConstraintRole.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.List;
+
+/**
+ * Objects of this Class represent a referential constraint role
+ * @author SAP AG
+ */
+public class ReferentialConstraintRole {
+
+ private String role;
+ private List<PropertyRef> propertyRefs;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> role of this {@link ReferentialConstraintRole}
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * @return List<{@link PropertyRef}> for this {@link ReferentialConstraintRole}
+ */
+ public List<PropertyRef> getPropertyRefs() {
+ return propertyRefs;
+ }
+
+ /**
+ * @return List of {@link AnnotationAttribute} annotation attributes
+ */
+ public List<AnnotationAttribute> getAnnotationAttributes() {
+ return annotationAttributes;
+ }
+
+ /**
+ * @return List of {@link AnnotationElement} annotation elements
+ */
+ public List<AnnotationElement> getAnnotationElements() {
+ return annotationElements;
+ }
+
+ /**
+ * Sets the role of this {@link ReferentialConstraintRole}
+ * @param role
+ * @return {@link ReferentialConstraintRole} for method chaining
+ */
+ public ReferentialConstraintRole setRole(final String role) {
+ this.role = role;
+ return this;
+ }
+
+ /**
+ * Sets the {@link PropertyRef}s of this {@link ReferentialConstraintRole}
+ * @param propertyRef
+ * @return {@link ReferentialConstraintRole} for method chaining
+ */
+ public ReferentialConstraintRole setPropertyRefs(final List<PropertyRef> propertyRef) {
+ propertyRefs = propertyRef;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationAttribute} for this {@link ReferentialConstraintRole}
+ * @param annotationAttributes
+ * @return {@link ReferentialConstraintRole} for method chaining
+ */
+ public ReferentialConstraintRole setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the List of {@link AnnotationElement} for this {@link ReferentialConstraintRole}
+ * @param annotationElements
+ * @return {@link ReferentialConstraintRole} for method chaining
+ */
+ public ReferentialConstraintRole setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReturnType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReturnType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReturnType.java
new file mode 100644
index 0000000..2b4df05
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ReturnType.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.provider;
+
+import org.apache.olingo.odata2.api.edm.EdmMultiplicity;
+import org.apache.olingo.odata2.api.edm.FullQualifiedName;
+
+/**
+ * Objects of this Class represent a return type of a function import
+ * @author SAP AG
+ */
+public class ReturnType {
+
+ private FullQualifiedName typeName;
+ private EdmMultiplicity multiplicity;
+
+ /**
+ * @return {@link FullQualifiedName} type of this {@link ReturnType}
+ */
+ public FullQualifiedName getTypeName() {
+ return typeName;
+ }
+
+ /**
+ * @return {@link EdmMultiplicity} of this {@link ReturnType}
+ */
+ public EdmMultiplicity getMultiplicity() {
+ return multiplicity;
+ }
+
+ /**
+ * Sets the type of this {@link ReturnType} via the types {@link FullQualifiedName}
+ * @param qualifiedName
+ * @return {@link ReturnType} for method chaining
+ */
+ public ReturnType setTypeName(final FullQualifiedName qualifiedName) {
+ typeName = qualifiedName;
+ return this;
+ }
+
+ /**
+ * Sets the {@link EdmMultiplicity} of this {@link ReturnType}
+ * @param multiplicity
+ * @return {@link ReturnType} for method chaining
+ */
+ public ReturnType setMultiplicity(final EdmMultiplicity multiplicity) {
+ this.multiplicity = multiplicity;
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ if (EdmMultiplicity.MANY == multiplicity) {
+ return "Collection(" + typeName + ")";
+ } else {
+ return typeName.toString();
+ }
+ }
+
+}