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:38 UTC
[33/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/EdmServiceMetadata.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmServiceMetadata.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmServiceMetadata.java
new file mode 100644
index 0000000..3a14fc6
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmServiceMetadata.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 java.io.InputStream;
+import java.util.List;
+
+import org.apache.olingo.odata2.api.exception.ODataException;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * This interface gives access to the metadata of a service, the calculated Data Service Version and an info list of all entity sets inside this EntityDataModel.
+ * @author SAP AG
+ *
+ */
+public interface EdmServiceMetadata {
+
+ /**
+ * @return {@link InputStream} containing the metadata document
+ * @throws ODataException
+ */
+ InputStream getMetadata() throws ODataException;
+
+ /**
+ * @return <b>String</b> data service version of this service
+ * @throws ODataException
+ */
+ String getDataServiceVersion() throws ODataException;
+
+ /**
+ * @return a list of {@link EdmEntitySetInfo} objects of all entity sets in this data model
+ * @throws ODataException
+ */
+ List<EdmEntitySetInfo> getEntitySetInfos() throws ODataException;;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleType.java
new file mode 100644
index 0000000..2b2f26a
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleType.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * 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>EdmSimpleType is a primitive type as defined in the Entity Data Model (EDM).</p>
+ * <p>There are methods to convert EDM simple types from and to Java objects, respectively.
+ * The following Java types are supported:
+ * <table frame="hsides" rules="groups">
+ * <thead>
+ * <tr><th>EDM simple type</th><th>Java types</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><td>Binary</td><td>byte[], {@link Byte}[]</td></tr>
+ * <tr><td>Boolean</td><td>{@link Boolean}</td></tr>
+ * <tr><td>Byte</td><td>{@link Short}, {@link Byte}, {@link Integer}, {@link Long}</td></tr>
+ * <tr><td>DateTime</td><td>{@link java.util.Calendar}, {@link java.util.Date}, {@link Long}</td></tr>
+ * <tr><td>DateTimeOffset</td><td>{@link java.util.Calendar}, {@link java.util.Date}, {@link Long}</td></tr>
+ * <tr><td>Decimal</td><td>{@link java.math.BigDecimal}, {@link java.math.BigInteger}, {@link Double}, {@link Float}, {@link Byte}, {@link Short}, {@link Integer}, {@link Long}</td></tr>
+ * <tr><td>Double</td><td>{@link Double}, {@link Float}, {@link java.math.BigDecimal}, {@link Byte}, {@link Short}, {@link Integer}, {@link Long}</td></tr>
+ * <tr><td>Guid</td><td>{@link java.util.UUID}</td></tr>
+ * <tr><td>Int16</td><td>{@link Short}, {@link Byte}, {@link Integer}, {@link Long}</td></tr>
+ * <tr><td>Int32</td><td>{@link Integer}, {@link Byte}, {@link Short}, {@link Long}</td></tr>
+ * <tr><td>Int64</td><td>{@link Long}, {@link Byte}, {@link Short}, {@link Integer}, {@link java.math.BigInteger}</td></tr>
+ * <tr><td>SByte</td><td>{@link Byte}, {@link Short}, {@link Integer}, {@link Long}</td></tr>
+ * <tr><td>Single</td><td>{@link Float}, {@link Double}, {@link java.math.BigDecimal}, {@link Byte}, {@link Short}, {@link Integer}, {@link Long}</td></tr>
+ * <tr><td>String</td><td>{@link String}</td></tr>
+ * <tr><td>Time</td><td>{@link java.util.Calendar}, {@link java.util.Date}, {@link Long}</td></tr>
+ * </tbody>
+ * </table></p>
+ * <p>The first Java type is the default type for the respective EDM simple type.</p>
+ * <p>For all EDM simple types, the {@link EdmFacets facet} <code>Nullable</code> is
+ * taken into account.
+ * For <code>Binary</code>, <code>MaxLength</code> is also applicable.
+ * For <code>String</code>, the facets <code>MaxLength</code> and <code>Unicode</code>
+ * are also considered.
+ * The EDM simple types <code>DateTime</code>, <code>DateTimeOffset</code>, and
+ * <code>Time</code> can have a <code>Precision</code> facet.
+ * <code>Decimal</code> can have the facets <code>Precision</code> and <code>Scale</code>.</p>
+ * <p>
+ * <table frame="box" rules="all">
+ * <thead>
+ * <tr><th>EDM simple type</th><th>Parsing details</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><td><b>DateTimeOffset</b></td>
+ * <td>
+ * When an time string is parsed to an according <code>EdmDateTimeOffset</code> object it is assumed that this time string represents the local time with a timezone set.
+ * <br/>
+ * As an example, when the following time string <code>"2012-02-29T15:33:00-04:00"</code> is parsed it is assumed that we have the local time ("15:33:00") which is in a timezone with an offset from UTC of "-04:00".
+ * Hence the result is a calendar object within the local time (which is "15:33:00") and the according timezone offset ("-04:00") which then results in the UTC time of "19:33:00+00:00" ("15:33:00" - "-04:00" -> "19:33:00 UTC").
+ * <br/>
+ * As further explanation about our date time handling I reference to the following ISO specification: ISO 8601 - http://en.wikipedia.org/wiki/ISO_8601 and the copied section:
+ * Time_offsets_from_UTC - http://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC
+ * <blockquote>>
+ * The following times all refer to the same moment: "18:30Z", "22:30+04:00", and "15:00-03:30". Nautical time zone letters are not used with the exception of Z.
+ * To calculate UTC time one has to subtract the offset from the local time, e.g. for "15:00-03:30" do 15:00 - (-03:30) to get 18:30 UTC.
+ * </blockquote>
+ * <em>The behavior of our ABAP OData Library and Microsoft examples is the same as described above.</em>
+ * </td>
+ * </tr>
+ * </tbody>
+ * </table></p>
+ * </p>
+ * @author SAP AG
+ * @org.apache.olingo.odata2.DoNotImplement
+ */
+public interface EdmSimpleType extends EdmType {
+
+ public static final String EDM_NAMESPACE = "Edm";
+ public static final String SYSTEM_NAMESPACE = "System";
+
+ /**
+ * Checks type compatibility.
+ *
+ * @param simpleType the {@link EdmSimpleType} to be tested for compatibility
+ * @return <code>true</code> if the provided type is compatible to this type
+ */
+ public boolean isCompatible(EdmSimpleType simpleType);
+
+ /**
+ * Returns the default Java type for this EDM simple type as described in
+ * the documentation of {@link EdmSimpleType}.
+ * @return the default Java type
+ */
+ public Class<?> getDefaultType();
+
+ /**
+ * Validates literal value.
+ *
+ * @param value the literal value
+ * @param literalKind the kind of literal representation of value
+ * @param facets additional constraints for parsing (optional)
+ * @return <code>true</code> if the validation is successful
+ * @see EdmLiteralKind
+ * @see EdmFacets
+ */
+ public boolean validate(String value, EdmLiteralKind literalKind, EdmFacets facets);
+
+ /**
+ * Converts literal representation of value to system data type.
+ *
+ * @param value the literal representation of value
+ * @param literalKind the kind of literal representation of value
+ * @param facets additional constraints for parsing (optional)
+ * @param returnType the class of the returned value; it must be one of the
+ * list in the documentation of {@link EdmSimpleType}
+ * @return the value as an instance of the class the parameter <code>returnType</code> indicates
+ * @see EdmLiteralKind
+ * @see EdmFacets
+ */
+ public <T> T valueOfString(String value, EdmLiteralKind literalKind, EdmFacets facets, Class<T> returnType) throws EdmSimpleTypeException;
+
+ /**
+ * <p>Converts system data type to literal representation of value.</p>
+ * <p>Returns <code>null</code> if value is <code>null</code>
+ * and the facets allow the <code>null</code> value.</p>
+ *
+ * @param value the Java value as Object; its type must be one of the list
+ * in the documentation of {@link EdmSimpleType}
+ * @param literalKind the requested kind of literal representation
+ * @param facets additional constraints for formatting (optional)
+ * @return literal representation as String
+ * @see EdmLiteralKind
+ * @see EdmFacets
+ */
+ public String valueToString(Object value, EdmLiteralKind literalKind, EdmFacets facets) throws EdmSimpleTypeException;
+
+ /**
+ * Converts default literal representation to URI literal representation.
+ *
+ * @param literal the literal in default representation
+ * @return URI literal representation as String
+ */
+ public String toUriLiteral(String literal) throws EdmSimpleTypeException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeException.java
new file mode 100644
index 0000000..2813616
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeException.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 org.apache.olingo.odata2.api.exception.MessageReference;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * Exception for parsing errors with {@link EdmSimpleType}s
+ * @author SAP AG
+ */
+public class EdmSimpleTypeException extends EdmException {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final MessageReference COMMON = createMessageReference(EdmSimpleTypeException.class, "COMMON");
+
+ public static final MessageReference LITERAL_KIND_MISSING = createMessageReference(EdmSimpleTypeException.class, "LITERAL_KIND_MISSING");
+ public static final MessageReference LITERAL_KIND_NOT_SUPPORTED = createMessageReference(EdmSimpleTypeException.class, "LITERAL_KIND_NOT_SUPPORTED");
+
+ public static final MessageReference LITERAL_NULL_NOT_ALLOWED = createMessageReference(EdmSimpleTypeException.class, "LITERAL_NULL_NOT_ALLOWED");
+ public static final MessageReference LITERAL_ILLEGAL_CONTENT = createMessageReference(EdmSimpleTypeException.class, "LITERAL_ILLEGAL_CONTENT");
+ public static final MessageReference LITERAL_FACETS_NOT_MATCHED = createMessageReference(EdmSimpleTypeException.class, "LITERAL_FACETS_NOT_MATCHED");
+ public static final MessageReference LITERAL_UNCONVERTIBLE_TO_VALUE_TYPE = createMessageReference(EdmSimpleTypeException.class, "LITERAL_UNCONVERTIBLE_TO_VALUE_TYPE");
+
+ public static final MessageReference VALUE_TYPE_NOT_SUPPORTED = createMessageReference(EdmSimpleTypeException.class, "VALUE_TYPE_NOT_SUPPORTED");
+ public static final MessageReference VALUE_NULL_NOT_ALLOWED = createMessageReference(EdmSimpleTypeException.class, "VALUE_NULL_NOT_ALLOWED");
+ public static final MessageReference VALUE_ILLEGAL_CONTENT = createMessageReference(EdmSimpleTypeException.class, "VALUE_ILLEGAL_CONTENT");
+ public static final MessageReference VALUE_FACETS_NOT_MATCHED = createMessageReference(EdmSimpleTypeException.class, "VALUE_FACETS_NOT_MATCHED");
+
+ public EdmSimpleTypeException(final MessageReference messageReference) {
+ super(messageReference);
+ }
+
+ public EdmSimpleTypeException(final MessageReference messageReference, final Throwable cause) {
+ super(messageReference, cause);
+ }
+
+ public EdmSimpleTypeException(final MessageReference messageReference, final String errorCode) {
+ super(messageReference, errorCode);
+ }
+
+ public EdmSimpleTypeException(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/EdmSimpleTypeFacade.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeFacade.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeFacade.java
new file mode 100644
index 0000000..ee67fc8
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeFacade.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
+ * This facade is used as a hook into the core implementation.
+ * @author SAP AG
+ */
+public interface EdmSimpleTypeFacade {
+
+ /**
+ * IMPORTANT: Use {@link EdmSimpleTypeKind} parseUriLiteral for the implementation.
+ * <p>This method definition is used only inside the core of this library.
+ * @param uriLiteral
+ * @return the parsed literal
+ * @throws EdmLiteralException
+ */
+ public EdmLiteral parseUriLiteral(final String uriLiteral) throws EdmLiteralException;
+
+ /**
+ * IMPORTANT: Use {@link EdmSimpleTypeKind#getEdmSimpleTypeInstance()} for the application development.
+ *
+ * <p>This method definition is used only inside the core of this library.</p>
+ *
+ * @param typeKind for which an instance is requested
+ * @return an instance of the corresponding {@link EdmSimpleType} to given {@link EdmSimpleTypeKind}
+ */
+ public EdmSimpleType getEdmSimpleTypeInstance(final EdmSimpleTypeKind typeKind);
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeKind.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeKind.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeKind.java
new file mode 100644
index 0000000..07936f1
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmSimpleTypeKind.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * 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.rt.RuntimeDelegate;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmSimpleTypeKind holds all EdmSimpleTypes defined as primitive type in the Entity Data Model (EDM).
+ * @author SAP AG
+ */
+public enum EdmSimpleTypeKind {
+
+ Binary, Boolean, Byte, DateTime, DateTimeOffset, Decimal, Double, Guid, Int16, Int32, Int64, SByte, Single, String, Time, Null;
+
+ /**
+ * Returns the {@link FullQualifiedName} for this SimpleTypeKind.
+ * @return {@link FullQualifiedName}
+ */
+ public FullQualifiedName getFullQualifiedName() {
+ return new FullQualifiedName(EdmSimpleType.EDM_NAMESPACE, toString());
+ }
+
+ /**
+ * Returns an instance for this {@link EdmSimpleTypeKind} in the form of {@link EdmSimpleType}.
+ * @return {@link EdmSimpleType} instance
+ */
+ public EdmSimpleType getEdmSimpleTypeInstance() {
+ return SimpleTypeFacadeHolder.instance.getEdmSimpleTypeInstance(this);
+ }
+
+ /**
+ * <p>Parses a URI literal and determines its EDM simple type on the way.</p>
+ * <p>If the literal is <code>null</code> or consists of the literal string
+ * "null", the EDM simple type <code>Null</code> is returned.</p>
+ * <p>The URI literal syntax of EDM simple types allows two ways of determining
+ * the type:
+ * <ul>
+ * <li>The literal has an explicit type indicator (prefix or suffix).</li>
+ * <li>The value is of a type compatible to all other possible types, e.g., "256"
+ * could be of type <code>Int16</code> or <code>Int32</code> but all possible
+ * values of <code>Int16</code> are also legal values of <code>Int32</code>
+ * so callers could promote it to <code>Int32</code> in all cases where they
+ * deem it necessary.<br/>
+ * For a given literal, always the narrowest possible type is chosen.</li>
+ * </ul></p>
+ * <p>There are two cases where it is not possible to choose unambiguously
+ * a compatible type:
+ * <ul>
+ * <li><code>0</code> or <code>1</code> could be a number but also a boolean value;
+ * therefore, the internal (system) type <code>Bit</code> is used for these values.</li>
+ * <li>Integer values between <code>0</code> and <code>127</code> (inclusive) could
+ * be of type <code>SByte</code> or <code>Byte</code> both of which are not compatible
+ * to the other; therefore, the internal (system) type <code>Uint7</code> is used
+ * for these values.</li>
+ * </ul></p>
+ * @param uriLiteral the literal
+ * @return an instance of {@link EdmLiteral}, containing the literal
+ * in default String representation and the EDM simple type
+ * @throws EdmLiteralException if the literal is malformed
+ */
+ public static EdmLiteral parseUriLiteral(final String uriLiteral) throws EdmLiteralException {
+ return SimpleTypeFacadeHolder.instance.parseUriLiteral(uriLiteral);
+ }
+
+ /**
+ * Cached access to {@link EdmSimpleTypeFacade} which is used i.a. for {@link EdmSimpleType} instance creation
+ * or parsing of {@link EdmLiteral}s.
+ */
+ private static class SimpleTypeFacadeHolder {
+ static final EdmSimpleTypeFacade instance = RuntimeDelegate.getSimpleTypeFacade();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmStructuralType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmStructuralType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmStructuralType.java
new file mode 100644
index 0000000..8859a20
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmStructuralType.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;
+
+import java.util.List;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmStructuralType is the base for a complex type or an entity type.
+ * <p>Complex types and entity types are described in the Conceptual Schema Definition of the OData protocol.
+ * @author SAP AG
+ */
+public interface EdmStructuralType extends EdmMappable, EdmType {
+
+ /**
+ * Get property by name
+ * @param name
+ * @return simple or complex property as {@link EdmTyped}
+ * @throws EdmException
+ */
+ EdmTyped getProperty(String name) throws EdmException;
+
+ /**
+ * Get all property names
+ *
+ * @return property names as type List<String>
+ * @throws EdmException
+ */
+ List<String> getPropertyNames() throws EdmException;
+
+ /**
+ * Base types are described in the OData protocol specification.
+ *
+ * @return {@link EdmStructuralType}
+ * @throws EdmException
+ */
+ EdmStructuralType 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/EdmTargetPath.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTargetPath.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTargetPath.java
new file mode 100644
index 0000000..037f4ef
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTargetPath.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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
+ * EdmTargetPath specifies the possible default targets for an EDM property which is mapped to an atom element.
+ * @author SAP AG
+ */
+public class EdmTargetPath {
+
+ public static final String SYNDICATION_AUTHORNAME = "SyndicationAuthorName";
+ public static final String SYNDICATION_AUTHOREMAIL = "SyndicationAuthorEmail";
+ public static final String SYNDICATION_AUTHORURI = "SyndicationAuthorUri";
+ public static final String SYNDICATION_PUBLISHED = "SyndicationPublished";
+ public static final String SYNDICATION_RIGHTS = "SyndicationRights";
+ public static final String SYNDICATION_TITLE = "SyndicationTitle";
+ public static final String SYNDICATION_UPDATED = "SyndicationUpdated";
+ public static final String SYNDICATION_CONTRIBUTORNAME = "SyndicationContributorName";
+ public static final String SYNDICATION_CONTRIBUTOREMAIL = "SyndicationContributorEmail";
+ public static final String SYNDICATION_CONTRIBUTORURI = "SyndicationContributorUri";
+ public static final String SYNDICATION_SOURCE = "SyndicationSource";
+ public static final String SYNDICATION_SUMMARY = "SyndicationSummary";
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmType.java
new file mode 100644
index 0000000..6292c32
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmType.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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
+ * EdmType holds the namespace of a given type and its type as {@link EdmTypeKind}.
+ * @author SAP AG
+ */
+public interface EdmType extends EdmNamed {
+
+ /**
+ * Namespace of this {@link EdmType}
+ * @return namespace as String
+ * @throws EdmException
+ */
+ String getNamespace() throws EdmException;
+
+ /**
+ * @return {@link EdmTypeKind} of this {@link EdmType}
+ */
+ EdmTypeKind getKind();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTypeKind.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTypeKind.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTypeKind.java
new file mode 100644
index 0000000..d9dadd9
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTypeKind.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
+ * EdmTypeKind specifies the type of an EDM element.
+ * @author SAP AG
+ */
+public enum EdmTypeKind {
+
+ UNDEFINED, SIMPLE, COMPLEX, ENTITY, NAVIGATION, ASSOCIATION, SYSTEM;
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTyped.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTyped.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTyped.java
new file mode 100644
index 0000000..f238814
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/EdmTyped.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package org.apache.olingo.odata2.api.edm;
+
+/**
+ * @org.apache.olingo.odata2.DoNotImplement
+ * EdmTyped indicates if an EDM element is of a special type and holds the multiplicity of that type.
+ * @author SAP AG
+ */
+public interface EdmTyped extends EdmNamed {
+
+ /**
+ * See {@link EdmType} for more information about possible types.
+ *
+ * @return {@link EdmType}
+ * @throws EdmException
+ */
+ EdmType getType() throws EdmException;
+
+ /**
+ * See {@link EdmMultiplicity} for more information about possible multiplicities.
+ *
+ * @return {@link EdmMultiplicity}
+ * @throws EdmException
+ */
+ EdmMultiplicity getMultiplicity() 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/FullQualifiedName.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/FullQualifiedName.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/FullQualifiedName.java
new file mode 100644
index 0000000..4da0008
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/FullQualifiedName.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * 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 full qualified name of any element in the EDM consists of a name and a namespace.
+ * @author SAP AG
+ */
+public class FullQualifiedName {
+
+ private final String namespace;
+ private final String name;
+
+ /**
+ * @param namespace
+ * @param name
+ */
+ public FullQualifiedName(final String namespace, final String name) {
+ this.namespace = namespace;
+ this.name = name;
+ }
+
+ /**
+ * @return namespace
+ */
+ public String getNamespace() {
+ return namespace;
+ }
+
+ /**
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public int hashCode() {
+ return toString().hashCode();
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if ((obj == null) || !(obj instanceof FullQualifiedName)) {
+ return false;
+ }
+ final FullQualifiedName other = (FullQualifiedName) obj;
+ return namespace.equals(other.getNamespace()) && name.equals(other.getName());
+ }
+
+ @Override
+ public String toString() {
+ return namespace + Edm.DELIMITER + name;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/ff2b0a0e/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/package-info.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/package-info.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/package-info.java
new file mode 100644
index 0000000..de1be11
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/package-info.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.
+ ******************************************************************************/
+/**
+ * <h1>Entity Data Model API</h1>
+ * <p>The Entity Data Model is described in the OData protocol specification
+ * as well as in the Conceptual Schema Definition for the OData Protocol.
+ * Both can be found at <a href="http://www.odata.org/">http://www.odata.org/</a>.</p>
+ * <p>Many classes and interfaces contain the pragma:" @org.apache.olingo.odata2.DoNotImplement "
+ * to indicate these classes should only be used and not implemented.</p>
+ */
+package org.apache.olingo.odata2.api.edm;
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/AnnotationAttribute.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AnnotationAttribute.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AnnotationAttribute.java
new file mode 100644
index 0000000..cafce69
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AnnotationAttribute.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.EdmAnnotationAttribute;
+
+/**
+ * Objects of this class represent an annotation attribute
+ * @author SAP AG
+ */
+public class AnnotationAttribute implements EdmAnnotationAttribute {
+
+ private String namespace;
+ private String prefix;
+ private String name;
+ private String text;
+
+ @Override
+ public String getNamespace() {
+ return namespace;
+ }
+
+ @Override
+ public String getPrefix() {
+ return prefix;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * Sets the namespace for this {@link AnnotationAttribute}.
+ * @param namespace
+ * @return {@link AnnotationAttribute} for method chaining
+ */
+ public AnnotationAttribute setNamespace(final String namespace) {
+ this.namespace = namespace;
+ return this;
+ }
+
+ /**
+ * Sets the prefix for this {@link AnnotationAttribute}.
+ * @param prefix
+ * @return {@link AnnotationAttribute} for method chaining
+ */
+ public AnnotationAttribute setPrefix(final String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ /**
+ * Sets the name for this {@link AnnotationAttribute}.
+ * @param name
+ * @return {@link AnnotationAttribute} for method chaining
+ */
+ public AnnotationAttribute setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the text for this {@link AnnotationAttribute}.
+ * @param text
+ * @return {@link AnnotationAttribute} for method chaining
+ */
+ public AnnotationAttribute setText(final String text) {
+ this.text = text;
+ 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/AnnotationElement.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AnnotationElement.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AnnotationElement.java
new file mode 100644
index 0000000..203ffca
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AnnotationElement.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * 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.EdmAnnotationElement;
+
+/**
+ * Objects of this class represent an annotation element.
+ * @author SAP AG
+ */
+public class AnnotationElement implements EdmAnnotationElement {
+
+ private String namespace;
+ private String prefix;
+ private String name;
+ private String text;
+ private List<AnnotationElement> childElements;
+ private List<AnnotationAttribute> attributes;
+
+ @Override
+ public String getNamespace() {
+ return namespace;
+ }
+
+ @Override
+ public String getPrefix() {
+ return prefix;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getText() {
+ return text;
+ }
+
+ @Override
+ public List<AnnotationElement> getChildElements() {
+ return childElements;
+ }
+
+ @Override
+ public List<AnnotationAttribute> getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Sets the attributes for this {@link AnnotationElement}.
+ * @param attributes
+ * @return {@link AnnotationElement} for method chaining
+ */
+ public AnnotationElement setAttributes(final List<AnnotationAttribute> attributes) {
+ this.attributes = attributes;
+ return this;
+ }
+
+ /**
+ * Sets the child elements for this {@link AnnotationElement}.
+ * Does not set child elements and characterData for one element.
+ * @param childElements
+ * @return {@link AnnotationElement} for method chaining
+ */
+ public AnnotationElement setChildElements(final List<AnnotationElement> childElements) {
+ this.childElements = childElements;
+ return this;
+ }
+
+ /**
+ * Sets the namespace for this {@link AnnotationElement}.
+ * @param namespace
+ * @return {@link AnnotationElement} for method chaining
+ */
+ public AnnotationElement setNamespace(final String namespace) {
+ this.namespace = namespace;
+ return this;
+ }
+
+ /**
+ * Sets the prefix for this {@link AnnotationElement}.
+ * @param prefix
+ * @return {@link AnnotationElement} for method chaining
+ */
+ public AnnotationElement setPrefix(final String prefix) {
+ this.prefix = prefix;
+ return this;
+ }
+
+ /**
+ * Sets the name for this {@link AnnotationElement}.
+ * @param name
+ * @return {@link AnnotationElement} for method chaining
+ */
+ public AnnotationElement setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the text for this {@link AnnotationElement} which will be displayed inside the tags.
+ * Must NOT be set if child elements are set!
+ * @param text
+ * @return {@link AnnotationElement} for method chaining
+ */
+ public AnnotationElement setText(final String text) {
+ this.text = text;
+ 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/Association.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Association.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Association.java
new file mode 100644
index 0000000..1781d73
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Association.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * 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 association
+ * @author SAP AG
+ */
+public class Association {
+
+ private String name;
+ private AssociationEnd end1;
+ private AssociationEnd end2;
+ private ReferentialConstraint referentialConstraint;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return {@link AssociationEnd} end2
+ */
+ public AssociationEnd getEnd1() {
+ return end1;
+ }
+
+ /**
+ * @return {@link AssociationEnd} end2
+ */
+ public AssociationEnd getEnd2() {
+ return end2;
+ }
+
+ /**
+ * @return {@link ReferentialConstraint} referentialConstraint
+ */
+ public ReferentialConstraint getReferentialConstraint() {
+ return referentialConstraint;
+ }
+
+ /**
+ * @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 for this {@link Association}
+ * @param name
+ * @return {@link Association} for method chaining
+ */
+ public Association setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the first {@link AssociationEnd} for this {@link Association}
+ * @param end1
+ * @return {@link Association} for method chaining
+ */
+ public Association setEnd1(final AssociationEnd end1) {
+ this.end1 = end1;
+ return this;
+ }
+
+ /**
+ * Sets the second {@link AssociationEnd} for this {@link Association}
+ * @param end2
+ * @return {@link Association} for method chaining
+ */
+ public Association setEnd2(final AssociationEnd end2) {
+ this.end2 = end2;
+ return this;
+ }
+
+ /**
+ * Sets the {@link ReferentialConstraint} for this {@link Association}
+ * @param referentialConstraint
+ * @return {@link Association} for method chaining
+ */
+ public Association setReferentialConstraint(final ReferentialConstraint referentialConstraint) {
+ this.referentialConstraint = referentialConstraint;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} for this {@link Association}
+ * @param documentation
+ * @return {@link Association} for method chaining
+ */
+ public Association setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link Association}
+ * @param annotationAttributes
+ * @return {@link Association} for method chaining
+ */
+ public Association setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link Association}
+ * @param annotationElements
+ * @return {@link Association} for method chaining
+ */
+ public Association 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/AssociationEnd.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationEnd.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationEnd.java
new file mode 100644
index 0000000..5ebccc1
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationEnd.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * 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.EdmMultiplicity;
+import org.apache.olingo.odata2.api.edm.FullQualifiedName;
+
+/**
+ * Objects of this class represent an association end
+ * @author SAP AG
+ */
+public class AssociationEnd {
+
+ private FullQualifiedName type;
+ private String role;
+ private EdmMultiplicity multiplicity;
+ private OnDelete onDelete;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return {@link FullQualifiedName} full qualified name (namespace and name)
+ */
+ public FullQualifiedName getType() {
+ return type;
+ }
+
+ /**
+ * @return <b>String</b> role
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * @return {@link EdmMultiplicity} multiplicity of this end
+ */
+ public EdmMultiplicity getMultiplicity() {
+ return multiplicity;
+ }
+
+ /**
+ * @return {@link OnDelete} on delete
+ */
+ public OnDelete getOnDelete() {
+ return onDelete;
+ }
+
+ /**
+ * @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 {@link FullQualifiedName} for this {@link AssociationEnd}
+ * @param type
+ * @return {@link AssociationEnd} for method chaining
+ */
+ public AssociationEnd setType(final FullQualifiedName type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Sets the role for this {@link AssociationEnd}
+ * @param role
+ * @return {@link AssociationEnd} for method chaining
+ */
+ public AssociationEnd setRole(final String role) {
+ this.role = role;
+ return this;
+ }
+
+ /**
+ * Sets the {@link EdmMultiplicity} for this {@link AssociationEnd}
+ * @param multiplicity
+ * @return {@link AssociationEnd} for method chaining
+ */
+ public AssociationEnd setMultiplicity(final EdmMultiplicity multiplicity) {
+ this.multiplicity = multiplicity;
+ return this;
+ }
+
+ /**
+ * Sets {@link OnDelete} for this {@link AssociationEnd}
+ * @param onDelete
+ * @return {@link AssociationEnd} for method chaining
+ */
+ public AssociationEnd setOnDelete(final OnDelete onDelete) {
+ this.onDelete = onDelete;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} for this {@link AssociationEnd}
+ * @param documentation
+ * @return {@link AssociationEnd} for method chaining
+ */
+ public AssociationEnd setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link AssociationEnd}
+ * @param annotationAttributes
+ * @return {@link AssociationEnd} for method chaining
+ */
+ public AssociationEnd setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link AssociationEnd}
+ * @param annotationElements
+ * @return {@link AssociationEnd} for method chaining
+ */
+ public AssociationEnd 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/AssociationSet.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationSet.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationSet.java
new file mode 100644
index 0000000..f093afa
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationSet.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * 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 association set
+ * @author SAP AG
+ */
+public class AssociationSet {
+
+ private String name;
+ private FullQualifiedName association;
+ private AssociationSetEnd end1;
+ private AssociationSetEnd end2;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return {@link FullQualifiedName} Association of this {@link AssociationSet} (namespace and name)
+ */
+ public FullQualifiedName getAssociation() {
+ return association;
+ }
+
+ /**
+ * @return {@link AssociationEnd} end1
+ */
+ public AssociationSetEnd getEnd1() {
+ return end1;
+ }
+
+ /**
+ * @return {@link AssociationEnd} end2
+ */
+ public AssociationSetEnd getEnd2() {
+ return end2;
+ }
+
+ /**
+ * @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 for this {@link AssociationSet}
+ * @param name
+ * @return {@link AssociationSet} for method chaining
+ */
+ public AssociationSet setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the {@link FullQualifiedName} association for this {@link AssociationSet}
+ * @param association
+ * @return {@link AssociationSet} for method chaining
+ */
+ public AssociationSet setAssociation(final FullQualifiedName association) {
+ this.association = association;
+ return this;
+ }
+
+ /**
+ * Sets the first {@link AssociationSetEnd} for this {@link AssociationSet}
+ * @param end1
+ * @return {@link AssociationSet} for method chaining
+ */
+ public AssociationSet setEnd1(final AssociationSetEnd end1) {
+ this.end1 = end1;
+ return this;
+ }
+
+ /**
+ * Sets the second {@link AssociationSetEnd} for this {@link AssociationSet}
+ * @param end2
+ * @return {@link AssociationSet} for method chaining
+ */
+ public AssociationSet setEnd2(final AssociationSetEnd end2) {
+ this.end2 = end2;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} for this {@link AssociationSet}
+ * @param documentation
+ * @return {@link AssociationSet} for method chaining
+ */
+ public AssociationSet setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link AssociationSet}
+ * @param annotationAttributes
+ * @return {@link AssociationSet} for method chaining
+ */
+ public AssociationSet setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link AssociationSet}
+ * @param annotationElements
+ * @return {@link AssociationSet} for method chaining
+ */
+ public AssociationSet 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/AssociationSetEnd.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationSetEnd.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationSetEnd.java
new file mode 100644
index 0000000..0f6ac55
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/AssociationSetEnd.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 an association set end
+ * @author SAP AG
+ */
+public class AssociationSetEnd {
+
+ private String role;
+ private String entitySet;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> role
+ */
+ public String getRole() {
+ return role;
+ }
+
+ /**
+ * @return <b>String</b> name of the target entity set
+ */
+ public String getEntitySet() {
+ return entitySet;
+ }
+
+ /**
+ * @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 role of this {@link AssociationSetEnd}
+ * @param role
+ * @return {@link AssociationSetEnd} for method chaining
+ */
+ public AssociationSetEnd setRole(final String role) {
+ this.role = role;
+ return this;
+ }
+
+ /**
+ * Sets the target entity set of this {@link AssociationSetEnd}
+ * @param entitySet
+ * @return {@link AssociationSetEnd} for method chaining
+ */
+ public AssociationSetEnd setEntitySet(final String entitySet) {
+ this.entitySet = entitySet;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation} of this {@link AssociationSetEnd}
+ * @param documentation
+ * @return {@link AssociationSetEnd} for method chaining
+ */
+ public AssociationSetEnd setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link AssociationSetEnd}
+ * @param annotationAttributes
+ * @return {@link AssociationSetEnd} for method chaining
+ */
+ public AssociationSetEnd setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link AssociationSetEnd}
+ * @param annotationElements
+ * @return {@link AssociationSetEnd} for method chaining
+ */
+ public AssociationSetEnd 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/ComplexProperty.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ComplexProperty.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ComplexProperty.java
new file mode 100644
index 0000000..53f0b19
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ComplexProperty.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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.FullQualifiedName;
+
+/**
+ * Objects of this class represent a complex property.
+ * @author SAP AG
+ */
+public class ComplexProperty extends Property {
+
+ private FullQualifiedName type;
+
+ /**
+ * @return {@link FullQualifiedName} of this property
+ */
+ public FullQualifiedName getType() {
+ return type;
+ }
+
+ /**
+ * Sets the {@link FullQualifiedName} for this {@link Property}
+ * @param type
+ * @return {@link Property} for method chaining
+ */
+ public ComplexProperty setType(final FullQualifiedName type) {
+ this.type = type;
+ return this;
+ }
+
+ @Override
+ public ComplexProperty setName(final String name) {
+ super.setName(name);
+ return this;
+ }
+
+ @Override
+ public ComplexProperty setFacets(final EdmFacets facets) {
+ super.setFacets(facets);
+ return this;
+ }
+
+ @Override
+ public ComplexProperty setCustomizableFeedMappings(final CustomizableFeedMappings customizableFeedMappings) {
+ super.setCustomizableFeedMappings(customizableFeedMappings);
+ return this;
+ }
+
+ @Override
+ public ComplexProperty setMimeType(final String mimeType) {
+ super.setMimeType(mimeType);
+ return this;
+ }
+
+ @Override
+ public ComplexProperty setMapping(final Mapping mapping) {
+ super.setMapping(mapping);
+ return this;
+ }
+
+ @Override
+ public ComplexProperty setDocumentation(final Documentation documentation) {
+ super.setDocumentation(documentation);
+ return this;
+ }
+
+ @Override
+ public ComplexProperty setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ super.setAnnotationAttributes(annotationAttributes);
+ return this;
+ }
+
+ @Override
+ public ComplexProperty 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/ComplexType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ComplexType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ComplexType.java
new file mode 100644
index 0000000..6de4162
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/ComplexType.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 complex type
+ * @author SAP AG
+ */
+public class ComplexType {
+
+ private String name;
+ private FullQualifiedName baseType;
+ private boolean isAbstract;
+ private List<Property> properties;
+ private Mapping mapping;
+ private Documentation documentation;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return {@link FullQualifiedName} of the base type of this type (namespace and name)
+ */
+ public FullQualifiedName getBaseType() {
+ return baseType;
+ }
+
+ /**
+ * @return <b>boolean</b> if this type is abstract
+ */
+ public boolean isAbstract() {
+ return isAbstract;
+ }
+
+ /**
+ * @return List<{@link Property}> of all properties for this type
+ */
+ public List<Property> getProperties() {
+ return properties;
+ }
+
+ /**
+ * @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
+ * @param name
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType setName(final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Sets the {@link FullQualifiedName} of the base type
+ * @param baseType
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType setBaseType(final FullQualifiedName baseType) {
+ this.baseType = baseType;
+ return this;
+ }
+
+ /**
+ * Sets if it is abstract
+ * @param isAbstract
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType setAbstract(final boolean isAbstract) {
+ this.isAbstract = isAbstract;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Property}s
+ * @param properties
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType setProperties(final List<Property> properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Mapping}
+ * @param mapping
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType setMapping(final Mapping mapping) {
+ this.mapping = mapping;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Documentation}
+ * @param documentation
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType setDocumentation(final Documentation documentation) {
+ this.documentation = documentation;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link ComplexType}
+ * @param annotationAttributes
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link ComplexType}
+ * @param annotationElements
+ * @return {@link ComplexType} for method chaining
+ */
+ public ComplexType 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/CustomizableFeedMappings.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/CustomizableFeedMappings.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/CustomizableFeedMappings.java
new file mode 100644
index 0000000..8f6d04e
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/CustomizableFeedMappings.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * 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.EdmContentKind;
+import org.apache.olingo.odata2.api.edm.EdmCustomizableFeedMappings;
+
+/**
+ * Objects of this class represent customizable feed mappings.
+ * @author SAP AG
+ */
+public class CustomizableFeedMappings implements EdmCustomizableFeedMappings {
+
+ private Boolean fcKeepInContent;
+ private EdmContentKind fcContentKind;
+ private String fcNsPrefix;
+ private String fcNsUri;
+ private String fcSourcePath;
+ private String fcTargetPath;
+
+ @Override
+ public Boolean isFcKeepInContent() {
+ return fcKeepInContent;
+ }
+
+ @Override
+ public EdmContentKind getFcContentKind() {
+ return fcContentKind;
+ }
+
+ @Override
+ public String getFcNsPrefix() {
+ return fcNsPrefix;
+ }
+
+ @Override
+ public String getFcNsUri() {
+ return fcNsUri;
+ }
+
+ @Override
+ public String getFcSourcePath() {
+ return fcSourcePath;
+ }
+
+ @Override
+ public String getFcTargetPath() {
+ return fcTargetPath;
+ }
+
+ /**
+ * @return <b>boolean</b>
+ */
+ public Boolean getFcKeepInContent() {
+ return fcKeepInContent;
+ }
+
+ /**
+ * Sets if this is kept in content.
+ * @param fcKeepInContent
+ * @return {@link CustomizableFeedMappings} for method chaining
+ */
+ public CustomizableFeedMappings setFcKeepInContent(final Boolean fcKeepInContent) {
+ this.fcKeepInContent = fcKeepInContent;
+ return this;
+ }
+
+ /**
+ * Sets the {@link EdmContentKind}.
+ * @param fcContentKind
+ * @return {@link CustomizableFeedMappings} for method chaining
+ */
+ public CustomizableFeedMappings setFcContentKind(final EdmContentKind fcContentKind) {
+ this.fcContentKind = fcContentKind;
+ return this;
+ }
+
+ /**
+ * Sets the prefix.
+ * @param fcNsPrefix
+ * @return {@link CustomizableFeedMappings} for method chaining
+ */
+ public CustomizableFeedMappings setFcNsPrefix(final String fcNsPrefix) {
+ this.fcNsPrefix = fcNsPrefix;
+ return this;
+ }
+
+ /**
+ * Sets the Uri.
+ * @param fcNsUri
+ * @return {@link CustomizableFeedMappings} for method chaining
+ */
+ public CustomizableFeedMappings setFcNsUri(final String fcNsUri) {
+ this.fcNsUri = fcNsUri;
+ return this;
+ }
+
+ /**
+ * Sets the source path.
+ * @param fcSourcePath
+ * @return {@link CustomizableFeedMappings} for method chaining
+ */
+ public CustomizableFeedMappings setFcSourcePath(final String fcSourcePath) {
+ this.fcSourcePath = fcSourcePath;
+ return this;
+ }
+
+ /**
+ * <p>Sets the target path.</p>
+ * <p>For standard Atom elements, constants are available in
+ * {@link org.apache.olingo.odata2.api.edm.EdmTargetPath EdmTargetPath}.</p>
+ * @param fcTargetPath
+ * @return {@link CustomizableFeedMappings} for method chaining
+ */
+ public CustomizableFeedMappings setFcTargetPath(final String fcTargetPath) {
+ this.fcTargetPath = fcTargetPath;
+ 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/DataServices.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/DataServices.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/DataServices.java
new file mode 100644
index 0000000..908dac6
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/DataServices.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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 the data service. They contain all schemas of the EDM as well as the dataServiceVersion
+ * @author SAP AG
+ */
+public class DataServices {
+
+ private List<Schema> schemas;
+ private String dataServiceVersion;
+
+ /**
+ * Sets the schemas for this {@link DataServices}
+ * @param schemas
+ * @return {@link DataServices} for method chaining
+ */
+ public DataServices setSchemas(final List<Schema> schemas) {
+ this.schemas = schemas;
+ return this;
+ }
+
+ /**
+ * Sets the data service version for this {@link DataServices}
+ * @param dataServiceVersion
+ * @return {@link DataServices} for method chaining
+ */
+ public DataServices setDataServiceVersion(final String dataServiceVersion) {
+ this.dataServiceVersion = dataServiceVersion;
+ return this;
+ }
+
+ /**
+ * @return List<{@link Schema}>
+ */
+ public List<Schema> getSchemas() {
+ return schemas;
+ }
+
+ /**
+ * @return <b>String</b> data service version
+ */
+ public String getDataServiceVersion() {
+ return dataServiceVersion;
+ }
+}
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/Documentation.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Documentation.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Documentation.java
new file mode 100644
index 0000000..36da190
--- /dev/null
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/edm/provider/Documentation.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 documentation
+ * @author SAP AG
+ */
+public class Documentation {
+
+ private String summary;
+ private String longDescription;
+ private List<AnnotationAttribute> annotationAttributes;
+ private List<AnnotationElement> annotationElements;
+
+ /**
+ * @return <b>String</b> summary
+ */
+ public String getSummary() {
+ return summary;
+ }
+
+ /**
+ * @return <b>String</b> the long description
+ */
+ public String getLongDescription() {
+ return longDescription;
+ }
+
+ /**
+ * @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 summary for this {@link Documentation}
+ * @param summary
+ * @return {@link Documentation} for method chaining
+ */
+ public Documentation setSummary(final String summary) {
+ this.summary = summary;
+ return this;
+ }
+
+ /**
+ * Sets the long description for this {@link Documentation}
+ * @param longDescription
+ * @return {@link Documentation} for method chaining
+ */
+ public Documentation setLongDescription(final String longDescription) {
+ this.longDescription = longDescription;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationAttribute} for this {@link Documentation}
+ * @param annotationAttributes
+ * @return {@link Documentation} for method chaining
+ */
+ public Documentation setAnnotationAttributes(final List<AnnotationAttribute> annotationAttributes) {
+ this.annotationAttributes = annotationAttributes;
+ return this;
+ }
+
+ /**
+ * Sets the collection of {@link AnnotationElement} for this {@link Documentation}
+ * @param annotationElements
+ * @return {@link Documentation} for method chaining
+ */
+ public Documentation setAnnotationElements(final List<AnnotationElement> annotationElements) {
+ this.annotationElements = annotationElements;
+ return this;
+ }
+}