You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/10/12 14:02:24 UTC

[2/2] olingo-odata4 git commit: [OLINGO-768] Delete getTarget method at EdmAnnotations interface

[OLINGO-768] Delete getTarget method at EdmAnnotations interface

The method never worked. Also the design dod not allow to return all
possible target types. For example an entity type as target results in
returning the EdmEntityType object but for functions we would have to
return a list of functions. If needed we can implement another method
later.


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/d9d33abe
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/d9d33abe
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/d9d33abe

Branch: refs/heads/olingo786
Commit: d9d33abe85677595da425486093a998b1dd9c619
Parents: 1ac59b2
Author: Christian Amend <ch...@sap.com>
Authored: Mon Oct 12 13:59:56 2015 +0200
Committer: Christian Amend <ch...@sap.com>
Committed: Mon Oct 12 13:59:56 2015 +0200

----------------------------------------------------------------------
 .../olingo/fit/base/MetadataTestITCase.java     |  5 +-
 .../apache/olingo/client/core/MetadataTest.java |  8 +-
 .../olingo/commons/api/edm/EdmAnnotations.java  |  5 -
 .../commons/api/edm/EdmAnnotationsTarget.java   | 60 ------------
 .../commons/api/edm/EdmBindingTarget.java       |  2 +-
 .../commons/api/edm/EdmEntityContainer.java     |  2 +-
 .../olingo/commons/api/edm/EdmEnumType.java     |  2 +-
 .../olingo/commons/api/edm/EdmMember.java       |  2 +-
 .../commons/api/edm/EdmNavigationProperty.java  |  2 +-
 .../commons/api/edm/EdmOperationImport.java     |  2 +-
 .../olingo/commons/api/edm/EdmProperty.java     |  2 +-
 .../commons/api/edm/EdmStructuredType.java      |  2 +-
 .../apache/olingo/commons/api/edm/EdmTerm.java  |  4 +-
 .../commons/api/edm/EdmTypeDefinition.java      |  2 +-
 .../olingo/commons/api/edm/TargetType.java      | 97 ++++++++++++++++++++
 .../olingo/server/api/edmx/EdmxReference.java   | 93 +++++++++++++++++++
 .../server/api/edmx/EdmxReferenceInclude.java   | 61 ++++++++++++
 .../edmx/EdmxReferenceIncludeAnnotation.java    | 94 +++++++++++++++++++
 .../olingo/server/api/edmx/package-info.java    | 26 ++++++
 .../commons/core/edm/EdmActionImportImpl.java   |  5 -
 .../commons/core/edm/EdmAnnotationsImpl.java    | 82 +----------------
 .../commons/core/edm/EdmComplexTypeImpl.java    |  5 -
 .../core/edm/EdmEntityContainerImpl.java        |  5 -
 .../commons/core/edm/EdmEntitySetImpl.java      |  5 -
 .../commons/core/edm/EdmEntityTypeImpl.java     |  5 -
 .../commons/core/edm/EdmEnumTypeImpl.java       |  5 -
 .../commons/core/edm/EdmFunctionImportImpl.java |  5 -
 .../olingo/commons/core/edm/EdmMemberImpl.java  |  5 -
 .../core/edm/EdmNavigationPropertyImpl.java     |  5 -
 .../commons/core/edm/EdmPropertyImpl.java       |  5 -
 .../commons/core/edm/EdmSingletonImpl.java      |  5 -
 .../olingo/commons/core/edm/EdmTermImpl.java    | 30 +++---
 .../commons/core/edm/EdmTypeDefinitionImpl.java |  5 -
 .../edm/provider/EdmAnnotationsImplTest.java    | 68 ++++++++++++++
 .../core/edm/provider/EdmTermImplTest.java      |  8 +-
 .../olingo/server/api/edmx/EdmxReference.java   | 93 -------------------
 .../server/api/edmx/EdmxReferenceInclude.java   | 61 ------------
 .../edmx/EdmxReferenceIncludeAnnotation.java    | 94 -------------------
 .../olingo/server/api/edmx/package-info.java    | 26 ------
 .../server/tecsvc/provider/EdmTechProvider.java |  1 -
 40 files changed, 478 insertions(+), 516 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/fit/src/test/java/org/apache/olingo/fit/base/MetadataTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/base/MetadataTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/base/MetadataTestITCase.java
index e393e20..efcc41a 100644
--- a/fit/src/test/java/org/apache/olingo/fit/base/MetadataTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/base/MetadataTestITCase.java
@@ -35,6 +35,7 @@ import org.apache.olingo.commons.api.edm.EdmSchema;
 import org.apache.olingo.commons.api.edm.EdmTerm;
 import org.apache.olingo.commons.api.edm.EdmTypeDefinition;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.TargetType;
 import org.apache.olingo.commons.api.edm.annotation.EdmRecord;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmBoolean;
 import org.junit.Test;
@@ -115,8 +116,8 @@ public class MetadataTestITCase extends AbstractTestITCase {
 
     final EdmTerm isLanguageDependent = edm.getTerm(new FullQualifiedName("Core.IsLanguageDependent"));
     assertNotNull(isLanguageDependent);
-    assertTrue(isLanguageDependent.getAppliesTo().contains("Property"));
-    assertTrue(isLanguageDependent.getAppliesTo().contains("Term"));
+    assertTrue(isLanguageDependent.getAppliesTo().contains(TargetType.Property));
+    assertTrue(isLanguageDependent.getAppliesTo().contains(TargetType.Term));
     assertEquals(edm.getTypeDefinition(new FullQualifiedName("Core.Tag")), isLanguageDependent.getType());
     assertEquals(EdmBoolean.getInstance(), ((EdmTypeDefinition) isLanguageDependent.getType()).getUnderlyingType());
     assertNotNull(isLanguageDependent.getAnnotation(descriptionTerm, null));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
index 41e885c..740ba7f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
@@ -33,7 +33,6 @@ import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmAnnotation;
 import org.apache.olingo.commons.api.edm.EdmAnnotations;
-import org.apache.olingo.commons.api.edm.EdmAnnotationsTarget;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
 import org.apache.olingo.commons.api.edm.EdmEntityContainer;
 import org.apache.olingo.commons.api.edm.EdmEntitySet;
@@ -164,9 +163,10 @@ public class MetadataTest extends AbstractTest {
 
     final EdmAnnotations annotationGroup = schema.getAnnotationGroups().get(2);
     assertNotNull(annotationGroup);
-    final EdmAnnotationsTarget annotationsTarget = annotationGroup.getTarget();
-    assertNotNull(annotationsTarget);
-    assertTrue(EdmAnnotationsTarget.TargetType.Property == annotationsTarget.getAnnotationsTargetType());
+//TODO; Once there is a working getTarget method comment back in    
+//    final EdmAnnotationsTarget annotationsTarget = annotationGroup.getTarget();
+//    assertNotNull(annotationsTarget);
+//    assertTrue(EdmAnnotationsTarget.TargetType.Property == annotationsTarget.getAnnotationsTargetType());
     assertEquals("ODataDemo.Product/Name", annotationGroup.getTargetPath());
 
     final EdmAnnotation annotation = annotationGroup.getAnnotations().get(0);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotations.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotations.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotations.java
index f105c58..0101ef5 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotations.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotations.java
@@ -25,11 +25,6 @@ package org.apache.olingo.commons.api.edm;
 public interface EdmAnnotations extends EdmAnnotatable{
 
   /**
-   * @return a model element in the entity model to which this annotations is targeted
-   */
-  EdmAnnotationsTarget getTarget();
-
-  /**
    * @return a string allowing annotation authors a means of conditionally applying an annotation
    */
   String getQualifier();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotationsTarget.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotationsTarget.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotationsTarget.java
deleted file mode 100644
index 3994336..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmAnnotationsTarget.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api.edm;
-
-/**
- * Interface for CSDL elements thar can be evaluated as <tt>target</tt> for <tt>edm:Annotations</tt>.
- *
- * @see EdmAnnotations
- */
-public interface EdmAnnotationsTarget {
-
-  enum TargetType {
-
-    ActionImport(EdmActionImport.class),
-    ComplexType(EdmComplexType.class),
-    EntityContainer(EdmEntityContainer.class),
-    EntitySet(EdmEntitySet.class),
-    EntityType(EdmEntityType.class),
-    EnumType(EdmEnumType.class),
-    FunctionImport(EdmFunctionImport.class),
-    Member(EdmMember.class),
-    NavigationProperty(EdmNavigationProperty.class),
-    Property(EdmProperty.class),
-    Singleton(EdmSingleton.class),
-    Term(EdmTerm.class),
-    TypeDefinition(EdmTypeDefinition.class);
-
-    private final Class<?> edmClass;
-
-    TargetType(final Class<?> edmClass) {
-      this.edmClass = edmClass;
-    }
-
-    public Class<?> getEdmClass() {
-      return edmClass;
-    }
-
-  }
-
-  /**
-   * @return {@link TargetType} of this target
-   */
-  TargetType getAnnotationsTargetType();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmBindingTarget.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmBindingTarget.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmBindingTarget.java
index eaf11dd..4f4d145 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmBindingTarget.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmBindingTarget.java
@@ -24,7 +24,7 @@ import java.util.List;
  * Entity Sets or Singletons can be bound to each other using a navigation property binding so an
  * {@link EdmBindingTarget} can either be an {@link EdmEntitySet} or an {@link EdmSingleton}.
  */
-public interface EdmBindingTarget extends EdmNamed, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmBindingTarget extends EdmNamed, EdmAnnotatable {
 
   /**
    * Returns the target for a given path.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEntityContainer.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEntityContainer.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEntityContainer.java
index 7c69341..f84b9ed 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEntityContainer.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEntityContainer.java
@@ -26,7 +26,7 @@ import java.util.List;
  * <br/>
  * EdmEntityContainer hold the information of EntitySets, Singletons, ActionImports and FunctionImports contained
  */
-public interface EdmEntityContainer extends EdmNamed, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmEntityContainer extends EdmNamed, EdmAnnotatable {
 
   /**
    * @return namespace of this entity container

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
index 79461b7..ecc4ba4 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
@@ -23,7 +23,7 @@ import java.util.List;
 /**
  * An EdmEnumType represents a set of related values.
  */
-public interface EdmEnumType extends EdmPrimitiveType, EdmAnnotationsTarget {
+public interface EdmEnumType extends EdmPrimitiveType {
 
   /**
    * Get member according to given name

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmMember.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmMember.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmMember.java
index 099df99..19303bc 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmMember.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmMember.java
@@ -21,7 +21,7 @@ package org.apache.olingo.commons.api.edm;
 /**
  * An {@link EdmEnumType} member element.
  */
-public interface EdmMember extends EdmNamed, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmMember extends EdmNamed, EdmAnnotatable {
 
   /**
    * @return value of this member as string

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java
index 34ddab6..593f985 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmNavigationProperty.java
@@ -25,7 +25,7 @@ import java.util.List;
  * <br/>
  * EdmNavigationProperty allows navigation from one entity type to another via a relationship.
  */
-public interface EdmNavigationProperty extends EdmElement, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmNavigationProperty extends EdmElement, EdmAnnotatable {
 
   @Override
   EdmEntityType getType();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmOperationImport.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmOperationImport.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmOperationImport.java
index 72bfa10..c76a2c5 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmOperationImport.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmOperationImport.java
@@ -21,7 +21,7 @@ package org.apache.olingo.commons.api.edm;
 /**
  * An EdmOperationImport can be an EdmActionImport or an EdmFunctionImport.
  */
-public interface EdmOperationImport extends EdmNamed, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmOperationImport extends EdmNamed, EdmAnnotatable {
 
   /**
    * @return {@link FullQualifiedName} of this OperationImport

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmProperty.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmProperty.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmProperty.java
index aba2b4b..a351e48 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmProperty.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmProperty.java
@@ -25,7 +25,7 @@ import org.apache.olingo.commons.api.edm.geo.SRID;
  * <br/>
  * EdmProperty defines a simple type or a complex type.
  */
-public interface EdmProperty extends EdmElement, EdmMappable, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmProperty extends EdmElement, EdmMappable, EdmAnnotatable {
 
   /**
    * Gets the related MIME type for the property.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmStructuredType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmStructuredType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmStructuredType.java
index 2b0f419..3558530 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmStructuredType.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmStructuredType.java
@@ -25,7 +25,7 @@ import java.util.List;
  *
  * Complex types and entity types are described in the Conceptual Schema Definition of the OData protocol.
  */
-public interface EdmStructuredType extends EdmType, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmStructuredType extends EdmType, EdmAnnotatable {
 
   /**
    * Get property by name

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTerm.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTerm.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTerm.java
index 85a0140..049ec1a 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTerm.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTerm.java
@@ -25,7 +25,7 @@ import org.apache.olingo.commons.api.edm.geo.SRID;
 /**
  * An {@link EdmTerm} defines a term in a vocabulary.
  */
-public interface EdmTerm extends EdmNamed, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmTerm extends EdmNamed, EdmAnnotatable {
 
   /**
    * @return type of value returned by the expression contained in an annotation using this term
@@ -49,7 +49,7 @@ public interface EdmTerm extends EdmNamed, EdmAnnotationsTarget, EdmAnnotatable
    * @return list of CSDL element that this term can be applied to; if no value is supplied, the term is not restricted
    * in its application.
    */
-  List<String> getAppliesTo();
+  List<TargetType> getAppliesTo();
 
   /**
    * @return true if nullable

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTypeDefinition.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTypeDefinition.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTypeDefinition.java
index e152eba..7b8ff02 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTypeDefinition.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmTypeDefinition.java
@@ -25,7 +25,7 @@ import org.apache.olingo.commons.api.edm.geo.SRID;
  * <br/>
  * For more information on primitive types refer to {@link EdmPrimitiveType}.
  */
-public interface EdmTypeDefinition extends EdmPrimitiveType, EdmAnnotationsTarget, EdmAnnotatable {
+public interface EdmTypeDefinition extends EdmPrimitiveType, EdmAnnotatable {
 
   /**
    * @return {@link EdmPrimitiveType} this type definition is based upon

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/TargetType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/TargetType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/TargetType.java
new file mode 100644
index 0000000..479dfdb
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/TargetType.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.commons.api.edm;
+
+import org.apache.olingo.commons.api.edm.annotation.EdmAnd;
+import org.apache.olingo.commons.api.edm.annotation.EdmApply;
+import org.apache.olingo.commons.api.edm.annotation.EdmCast;
+import org.apache.olingo.commons.api.edm.annotation.EdmEq;
+import org.apache.olingo.commons.api.edm.annotation.EdmGe;
+import org.apache.olingo.commons.api.edm.annotation.EdmGt;
+import org.apache.olingo.commons.api.edm.annotation.EdmIf;
+import org.apache.olingo.commons.api.edm.annotation.EdmIsOf;
+import org.apache.olingo.commons.api.edm.annotation.EdmLabeledElement;
+import org.apache.olingo.commons.api.edm.annotation.EdmLe;
+import org.apache.olingo.commons.api.edm.annotation.EdmLt;
+import org.apache.olingo.commons.api.edm.annotation.EdmNe;
+import org.apache.olingo.commons.api.edm.annotation.EdmNot;
+import org.apache.olingo.commons.api.edm.annotation.EdmNull;
+import org.apache.olingo.commons.api.edm.annotation.EdmOr;
+import org.apache.olingo.commons.api.edm.annotation.EdmPropertyValue;
+import org.apache.olingo.commons.api.edm.annotation.EdmRecord;
+import org.apache.olingo.commons.api.edm.annotation.EdmUrlRef;
+import org.apache.olingo.commons.api.edm.constants.EdmOnDelete;
+import org.apache.olingo.server.api.edmx.EdmxReference;
+
+public enum TargetType {
+
+  // CSDL Types
+  Action(EdmAction.class),
+  ActionImport(EdmActionImport.class),
+  Annotation(EdmAnnotation.class),
+  Apply(EdmApply.class),
+  Cast(EdmCast.class),
+  ComplexType(EdmComplexType.class),
+  EntityContainer(EdmEntityContainer.class),
+  EntitySet(EdmEntitySet.class),
+  EntityType(EdmEntityType.class),
+  EnumType(EdmEnumType.class),
+  Function(EdmFunction.class),
+  FunctionImport(EdmFunctionImport.class),
+  If(EdmIf.class),
+  IsOf(EdmIsOf.class),
+  LabeledElement(EdmLabeledElement.class),
+  Member(EdmMember.class),
+  NavigationProperty(EdmNavigationProperty.class),
+  Null(EdmNull.class),
+  OnDelete(EdmOnDelete.class),
+  Property(EdmProperty.class),
+  PropertyValue(EdmPropertyValue.class),
+  Record(EdmRecord.class),
+  ReferentialConstraint(EdmReferentialConstraint.class),
+  ReturnType(EdmReturnType.class),
+  Schema(EdmSchema.class),
+  Singleton(EdmSingleton.class),
+  Term(EdmTerm.class),
+  TypeDefinition(EdmTypeDefinition.class),
+  URLRef(EdmUrlRef.class),
+  Reference(EdmxReference.class),
+  // Logical Operators
+  And(EdmAnd.class),
+  Or(EdmOr.class),
+  Not(EdmNot.class),
+  // ComparisonOperators
+  Eq(EdmEq.class),
+  Ne(EdmNe.class),
+  Gt(EdmGt.class),
+  Ge(EdmGe.class),
+  Lt(EdmLt.class),
+  Le(EdmLe.class);
+
+  private final Class<?> edmClass;
+
+  TargetType(final Class<?> edmClass) {
+    this.edmClass = edmClass;
+  }
+
+  public Class<?> getEdmClass() {
+    return edmClass;
+  }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java
new file mode 100644
index 0000000..38d17fe
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java
@@ -0,0 +1,93 @@
+/*
+ * 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.server.api.edmx;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * POJO for Edmx Reference.
+ */
+public class EdmxReference {
+
+  private final URI uri;
+  private final List<EdmxReferenceInclude> edmxIncludes;
+  private final List<EdmxReferenceIncludeAnnotation> edmxIncludeAnnotations;
+
+  /**
+   * Create reference with given uri
+   *
+   * @param uri of reference
+   */
+  public EdmxReference(final URI uri) {
+    this.uri = uri;
+    edmxIncludes = new ArrayList<EdmxReferenceInclude>();
+    edmxIncludeAnnotations = new ArrayList<EdmxReferenceIncludeAnnotation>();
+  }
+
+  /**
+   * Get URI for the reference
+   * @return uri for the reference
+   */
+  public URI getUri() {
+    return uri;
+  }
+
+  /**
+   * edmx:Include elements that specify the schemas to include from the target document
+   *
+   * @return list of {@link EdmxReferenceInclude} in reference or null if none specified
+   */
+  public List<EdmxReferenceInclude> getIncludes() {
+    return Collections.unmodifiableList(edmxIncludes);
+  }
+
+  /**
+   * Add include element to current list.
+   *
+   * @param include to be added
+   * @return this EdmxReference object
+   */
+  public EdmxReference addInclude(final EdmxReferenceInclude include) {
+    edmxIncludes.add(include);
+    return this;
+  }
+
+  /**
+   * edmx:IncludeAnnotations elements that specify the annotations to include from the target document.
+   *
+   * @return List of {@link EdmxReferenceIncludeAnnotation} or null if none specified
+   */
+  public List<EdmxReferenceIncludeAnnotation> getIncludeAnnotations() {
+    return Collections.unmodifiableList(edmxIncludeAnnotations);
+  }
+
+  /**
+   * Add include annotation element to current list.
+   *
+   * @param includeAnnotation to be added
+   * @return this EdmxReference object
+   */
+  public EdmxReference addIncludeAnnotation(final EdmxReferenceIncludeAnnotation includeAnnotation) {
+    edmxIncludeAnnotations.add(includeAnnotation);
+    return this;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java
new file mode 100644
index 0000000..acd6d8c
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java
@@ -0,0 +1,61 @@
+/*
+ * 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.server.api.edmx;
+
+/**
+ * edmx:Include elements that specify the schemas to include from the target document.
+ */
+public class EdmxReferenceInclude {
+  private final String namespace;
+  private final String alias;
+
+  /**
+   * Create include with given namespace and alias.
+   *
+   * @param namespace of include
+   * @param alias of include
+   */
+  public EdmxReferenceInclude(final String namespace, final String alias) {
+    this.namespace = namespace;
+    this.alias = alias;
+  }
+
+  /**
+   * Create include with given namespace and empty (<code>NULL</code>) alias.
+   *
+   * @param namespace of include
+   */
+  public EdmxReferenceInclude(final String namespace) {
+    this(namespace, null);
+  }
+
+  /**
+   * @return Namespace of the include
+   */
+  public String getNamespace() {
+    return namespace;
+  }
+
+  /**
+   * @return alias of the include if one defined; null otherwise
+   */
+  public String getAlias() {
+    return alias;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.java b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.java
new file mode 100644
index 0000000..4139c4a
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.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.server.api.edmx;
+
+/**
+ * POJO for Edmx Reference Include Annotation.
+ */
+public class EdmxReferenceIncludeAnnotation {
+  private final String termNamespace;
+  private String qualifier;
+  private String targetNamespace;
+
+  /**
+   * Create include annotation with given termNamespace and empty qualifier and targetNamespace.
+   *
+   * @param termNamespace of include annotation
+   */
+  public EdmxReferenceIncludeAnnotation(final String termNamespace) {
+    this(termNamespace, null, null);
+  }
+
+  /**
+   * Create include annotation with given termNamespace, qualifier and targetNamespace.
+   *
+   * @param termNamespace of include annotation
+   * @param qualifier of include annotation
+   * @param targetNamespace of include annotation
+   */
+  public EdmxReferenceIncludeAnnotation(final String termNamespace, final String qualifier,
+      final String targetNamespace) {
+    this.termNamespace = termNamespace;
+    this.qualifier = qualifier;
+    this.targetNamespace = targetNamespace;
+  }
+
+  /**
+   * @return TermNamespace of the include annotation
+   */
+  public String getTermNamespace() {
+    return termNamespace;
+  }
+
+  /**
+   * @return Qualifier if one defined; null otherwise
+   */
+  public String getQualifier() {
+    return qualifier;
+  }
+
+  /**
+   * Set qualifier for this include annotation.
+   *
+   * @param qualifier for include annotation
+   * @return this include annotation
+   */
+  public EdmxReferenceIncludeAnnotation setQualifier(final String qualifier) {
+    this.qualifier = qualifier;
+    return this;
+  }
+
+  /**
+   * @return targetNamespace if defined; null otherwise
+   */
+  public String getTargetNamespace() {
+    return targetNamespace;
+  }
+
+  /**
+   * Set target namespace for this include annotation.
+   *
+   * @param targetNamespace for include annotation
+   * @return this include annotation
+   */
+  public EdmxReferenceIncludeAnnotation setTargetNamespace(final String targetNamespace) {
+    this.targetNamespace = targetNamespace;
+    return this;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java
new file mode 100644
index 0000000..243d894
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+/**
+ * Olingo Server API - Edmx
+ * <p>
+ * The edmx package is used to condense all about the Olingo OData EDMX handling.
+ *
+ */
+package org.apache.olingo.server.api.edmx;
+

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmActionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmActionImportImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmActionImportImpl.java
index dff574f..7fb3ecd 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmActionImportImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmActionImportImpl.java
@@ -38,9 +38,4 @@ public class EdmActionImportImpl extends AbstractEdmOperationImport implements E
   public EdmAction getUnboundAction() {
     return edm.getUnboundAction(actionImport.getActionFQN());
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.ActionImport;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationsImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationsImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationsImpl.java
index 9f983f8..84f2839 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationsImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmAnnotationsImpl.java
@@ -6,9 +6,9 @@
  * 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
@@ -18,97 +18,19 @@
  */
 package org.apache.olingo.commons.core.edm;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAnnotations;
-import org.apache.olingo.commons.api.edm.EdmAnnotationsTarget;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-import org.apache.olingo.commons.api.edm.EdmStructuredType;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.provider.CsdlAnnotations;
 
 public class EdmAnnotationsImpl extends AbstractEdmAnnotatable implements EdmAnnotations {
 
-  private final Edm edm;
   private final CsdlAnnotations annotationGroup;
-  private EdmAnnotationsTarget target;
 
   public EdmAnnotationsImpl(final Edm edm, final CsdlAnnotations annotationGroup) {
     super(edm, annotationGroup);
-    this.edm = edm;
     this.annotationGroup = annotationGroup;
   }
 
-  private EdmAnnotationsTarget getTarget(final EdmStructuredType structured, final String path) {
-    EdmAnnotationsTarget _target = null;
-    if (structured != null) {
-      _target = path == null
-          ? structured
-              : structured.getStructuralProperty(path);
-      if (_target == null) {
-        _target = structured.getNavigationProperty(path);
-      }
-    }
-    return _target;
-  }
-
-  private EdmAnnotationsTarget getTarget(final EdmEnumType enumType, final String path) {
-    EdmAnnotationsTarget _target = null;
-    if (enumType != null) {
-      _target = path == null
-          ? enumType
-              : enumType.getMember(path);
-    }
-    return _target;
-  }
-
-  @Override
-  public EdmAnnotationsTarget getTarget() {
-    if (target == null) {
-      final String[] splitted = StringUtils.split(annotationGroup.getTarget(), '/');
-      final FullQualifiedName base = new FullQualifiedName(splitted[0]);
-      final String path = splitted.length > 1 ? splitted[1] : null;
-
-      final EdmEntityContainer baseEntityContainer = edm.getEntityContainer();
-
-      EdmAnnotationsTarget localTarget = baseEntityContainer == null ? null
-          : baseEntityContainer.getActionImport(path);
-      if (localTarget == null) {
-        localTarget = getTarget(edm.getComplexType(base), path);
-        if (localTarget == null) {
-          if (baseEntityContainer != null && baseEntityContainer.getFullQualifiedName().equals(base)) {
-            localTarget = baseEntityContainer;
-          }
-          if (localTarget == null) {
-            localTarget = baseEntityContainer == null ? null : baseEntityContainer.getEntitySet(path);
-            if (localTarget == null) {
-              localTarget = getTarget(edm.getEntityType(base), path);
-              if (localTarget == null) {
-                localTarget = getTarget(edm.getEnumType(base), path);
-                if (localTarget == null) {
-                  localTarget = baseEntityContainer == null ? null : baseEntityContainer.getFunctionImport(path);
-                  if (localTarget == null) {
-                    localTarget = baseEntityContainer == null ? null : baseEntityContainer.getSingleton(path);
-                    if (localTarget == null) {
-                      localTarget = edm.getTerm(base);
-                      if (localTarget == null) {
-                        localTarget = edm.getTypeDefinition(base);
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-      target = localTarget;
-    }
-
-    return target;
-  }
-
   @Override
   public String getQualifier() {
     return annotationGroup.getQualifier();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmComplexTypeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmComplexTypeImpl.java
index 08993eb..ce2f922 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmComplexTypeImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmComplexTypeImpl.java
@@ -57,9 +57,4 @@ public class EdmComplexTypeImpl extends AbstractEdmStructuredType implements Edm
       baseType = buildBaseType(baseTypeName);
     }
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.ComplexType;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
index ee2993c..1ff83fe 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
@@ -309,9 +309,4 @@ public class EdmEntityContainerImpl extends AbstractEdmNamed implements EdmEntit
       }
     }
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.EntityContainer;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntitySetImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntitySetImpl.java
index b080637..0ba3ae1 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntitySetImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntitySetImpl.java
@@ -36,9 +36,4 @@ public class EdmEntitySetImpl extends AbstractEdmBindingTarget implements EdmEnt
   public boolean isIncludeInServiceDocument() {
     return entitySet.isIncludeInServiceDocument();
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.EntitySet;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityTypeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityTypeImpl.java
index a1a8cbd..6d60afb 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityTypeImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityTypeImpl.java
@@ -138,9 +138,4 @@ public class EdmEntityTypeImpl extends AbstractEdmStructuredType implements EdmE
   public boolean hasStream() {
     return hasStream;
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.EntityType;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEnumTypeImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEnumTypeImpl.java
index 21a70a2..d3dac72 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEnumTypeImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEnumTypeImpl.java
@@ -250,11 +250,6 @@ public class EdmEnumTypeImpl extends EdmTypeImpl implements EdmEnumType {
   public boolean isFlags() {
     return enumType.isFlags();
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.EnumType;
-  }
   
   @Override
   public int hashCode() {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmFunctionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmFunctionImportImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmFunctionImportImpl.java
index 30ce314..574c2f8 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmFunctionImportImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmFunctionImportImpl.java
@@ -56,9 +56,4 @@ public class EdmFunctionImportImpl extends AbstractEdmOperationImport implements
   public boolean isIncludeInServiceDocument() {
     return functionImport.isIncludeInServiceDocument();
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.FunctionImport;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java
index adf9507..b504340 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmMemberImpl.java
@@ -32,11 +32,6 @@ public class EdmMemberImpl extends AbstractEdmNamed implements EdmMember {
   }
 
   @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.Member;
-  }
-
-  @Override
   public String getValue() {
     return member.getValue();
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
index 380bd3b..73b918b 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
@@ -120,9 +120,4 @@ public class EdmNavigationPropertyImpl extends AbstractEdmNamed implements EdmEl
     }
     return Collections.unmodifiableList(referentialConstraints);
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.NavigationProperty;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
index 9ab0ffc..830741b 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
@@ -103,11 +103,6 @@ public class EdmPropertyImpl extends AbstractEdmNamed implements EdmProperty, Ed
   }
 
   @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.Property;
-  }
-
-  @Override
   public boolean isPrimitive() {
     return typeInfo.isPrimitiveType();
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmSingletonImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmSingletonImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmSingletonImpl.java
index 20b86bf..ad14d30 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmSingletonImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmSingletonImpl.java
@@ -28,9 +28,4 @@ public class EdmSingletonImpl extends AbstractEdmBindingTarget implements EdmSin
   public EdmSingletonImpl(final Edm edm, final EdmEntityContainer container, final CsdlSingleton singleton) {
     super(edm, container, singleton);
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.Singleton;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTermImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTermImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTermImpl.java
index 8945e30..8a7603c 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTermImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTermImpl.java
@@ -19,6 +19,7 @@
 package org.apache.olingo.commons.core.edm;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import org.apache.olingo.commons.api.edm.Edm;
@@ -26,6 +27,7 @@ import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.EdmTerm;
 import org.apache.olingo.commons.api.edm.EdmType;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.TargetType;
 import org.apache.olingo.commons.api.edm.geo.SRID;
 import org.apache.olingo.commons.api.edm.provider.CsdlTerm;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
@@ -37,7 +39,7 @@ public class EdmTermImpl extends AbstractEdmNamed implements EdmTerm {
   private final EdmTypeInfo typeInfo;
   private EdmType termType;
   private EdmTerm baseTerm;
-  private List<String> appliesTo;
+  private List<TargetType> appliesTo;
 
   public EdmTermImpl(final Edm edm, final String namespace, final CsdlTerm term) {
     super(edm, term.getName(), term);
@@ -59,14 +61,14 @@ public class EdmTermImpl extends AbstractEdmNamed implements EdmTerm {
           ? EdmPrimitiveTypeFactory.getInstance(typeInfo.getPrimitiveTypeKind())
           : typeInfo.isTypeDefinition()
               ? typeInfo.getTypeDefinition()
-                  : typeInfo.isEnumType()
+              : typeInfo.isEnumType()
                   ? typeInfo.getEnumType()
                   : typeInfo.isComplexType()
                       ? typeInfo.getComplexType()
                       : null;
-                      if (termType == null) {
-                        throw new EdmException("Cannot find type with name: " + typeInfo.getFullQualifiedName());
-                      }
+      if (termType == null) {
+        throw new EdmException("Cannot find type with name: " + typeInfo.getFullQualifiedName());
+      }
     }
 
     return termType;
@@ -81,10 +83,17 @@ public class EdmTermImpl extends AbstractEdmNamed implements EdmTerm {
   }
 
   @Override
-  public List<String> getAppliesTo() {
+  public List<TargetType> getAppliesTo() {
     if (appliesTo == null) {
-      appliesTo = new ArrayList<String>();
-      appliesTo.addAll(term.getAppliesTo());
+      ArrayList<TargetType> localAppliesTo = new ArrayList<TargetType>();
+      for (String apply : term.getAppliesTo()) {
+        try {
+          localAppliesTo.add(TargetType.valueOf(apply));
+        } catch (IllegalArgumentException e) {
+          throw new EdmException("Invalid AppliesTo value: " + apply, e);
+        }
+      }
+      appliesTo = Collections.unmodifiableList(localAppliesTo);
     }
     return appliesTo;
   }
@@ -118,9 +127,4 @@ public class EdmTermImpl extends AbstractEdmNamed implements EdmTerm {
   public String getDefaultValue() {
     return term.getDefaultValue();
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.Term;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeDefinitionImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeDefinitionImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeDefinitionImpl.java
index d97c2ca..a275e34 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeDefinitionImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmTypeDefinitionImpl.java
@@ -144,9 +144,4 @@ public class EdmTypeDefinitionImpl extends AbstractEdmNamed implements EdmTypeDe
   public String fromUriLiteral(final String literal) throws EdmPrimitiveTypeException {
     return getUnderlyingType().fromUriLiteral(literal);
   }
-
-  @Override
-  public TargetType getAnnotationsTargetType() {
-    return TargetType.TypeDefinition;
-  }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmAnnotationsImplTest.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmAnnotationsImplTest.java b/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmAnnotationsImplTest.java
new file mode 100644
index 0000000..7017ff7
--- /dev/null
+++ b/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmAnnotationsImplTest.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.edm.provider;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmAnnotations;
+import org.apache.olingo.commons.api.edm.provider.CsdlAnnotations;
+import org.apache.olingo.commons.core.edm.EdmAnnotationsImpl;
+import org.junit.Before;
+import org.junit.Test;
+
+public class EdmAnnotationsImplTest {
+
+  private Edm edm;
+
+  @Before
+  public void setupEdm() {
+    edm = mock(Edm.class);
+  }
+
+  @Test
+  public void initialAnnotationGroup() {
+    CsdlAnnotations csdlAnnotationGroup = new CsdlAnnotations();
+    EdmAnnotations annotationGroup = new EdmAnnotationsImpl(edm, csdlAnnotationGroup);
+
+    assertNotNull(annotationGroup.getAnnotations());
+    assertTrue(annotationGroup.getAnnotations().isEmpty());
+
+    assertNull(annotationGroup.getQualifier());
+    assertNull(annotationGroup.getTargetPath());
+  }
+
+  @Test
+  public void annotationGroupWithQualifierAndPathButNonValidTarget() {
+    CsdlAnnotations csdlAnnotationGroup = new CsdlAnnotations();
+    csdlAnnotationGroup.setQualifier("qualifier");
+    csdlAnnotationGroup.setTarget("invalid.invalid");
+    EdmAnnotations annotationGroup = new EdmAnnotationsImpl(edm, csdlAnnotationGroup);
+
+    assertNotNull(annotationGroup.getAnnotations());
+    assertTrue(annotationGroup.getAnnotations().isEmpty());
+
+    assertEquals("qualifier", annotationGroup.getQualifier());
+    assertEquals("invalid.invalid", annotationGroup.getTargetPath());
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTermImplTest.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTermImplTest.java b/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTermImplTest.java
index 7ab7248..c5919b4 100644
--- a/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTermImplTest.java
+++ b/lib/commons-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTermImplTest.java
@@ -29,10 +29,10 @@ import static org.mockito.Mockito.when;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.olingo.commons.api.edm.EdmAnnotationsTarget.TargetType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
 import org.apache.olingo.commons.api.edm.EdmTerm;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.TargetType;
 import org.apache.olingo.commons.api.edm.provider.CsdlAnnotation;
 import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
 import org.apache.olingo.commons.api.edm.provider.CsdlTerm;
@@ -93,8 +93,6 @@ public class EdmTermImplTest {
     EdmPrimitiveType type = (EdmPrimitiveType) initialTerm.getType();
     assertEquals(type.getName(), "String");
     
-    assertEquals(TargetType.Term, initialTerm.getAnnotationsTargetType());
-    
     //initial facets
     assertTrue(initialTerm.isNullable());
     assertNull(initialTerm.getDefaultValue());
@@ -114,13 +112,11 @@ public class EdmTermImplTest {
     assertFalse(derivedTerm.getAnnotations().isEmpty());
     assertEquals(1, derivedTerm.getAnnotations().size());
     assertFalse(derivedTerm.getAppliesTo().isEmpty());
-    assertEquals("Property", derivedTerm.getAppliesTo().get(0));
+    assertEquals(TargetType.Property, derivedTerm.getAppliesTo().get(0));
 
     EdmPrimitiveType type = (EdmPrimitiveType) derivedTerm.getType();
     assertEquals(type.getName(), "String");
     
-    assertEquals(TargetType.Term, derivedTerm.getAnnotationsTargetType());
-    
     //set facets
     assertFalse(derivedTerm.isNullable());
     assertEquals("abc", derivedTerm.getDefaultValue());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java
deleted file mode 100644
index 38d17fe..0000000
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReference.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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.server.api.edmx;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * POJO for Edmx Reference.
- */
-public class EdmxReference {
-
-  private final URI uri;
-  private final List<EdmxReferenceInclude> edmxIncludes;
-  private final List<EdmxReferenceIncludeAnnotation> edmxIncludeAnnotations;
-
-  /**
-   * Create reference with given uri
-   *
-   * @param uri of reference
-   */
-  public EdmxReference(final URI uri) {
-    this.uri = uri;
-    edmxIncludes = new ArrayList<EdmxReferenceInclude>();
-    edmxIncludeAnnotations = new ArrayList<EdmxReferenceIncludeAnnotation>();
-  }
-
-  /**
-   * Get URI for the reference
-   * @return uri for the reference
-   */
-  public URI getUri() {
-    return uri;
-  }
-
-  /**
-   * edmx:Include elements that specify the schemas to include from the target document
-   *
-   * @return list of {@link EdmxReferenceInclude} in reference or null if none specified
-   */
-  public List<EdmxReferenceInclude> getIncludes() {
-    return Collections.unmodifiableList(edmxIncludes);
-  }
-
-  /**
-   * Add include element to current list.
-   *
-   * @param include to be added
-   * @return this EdmxReference object
-   */
-  public EdmxReference addInclude(final EdmxReferenceInclude include) {
-    edmxIncludes.add(include);
-    return this;
-  }
-
-  /**
-   * edmx:IncludeAnnotations elements that specify the annotations to include from the target document.
-   *
-   * @return List of {@link EdmxReferenceIncludeAnnotation} or null if none specified
-   */
-  public List<EdmxReferenceIncludeAnnotation> getIncludeAnnotations() {
-    return Collections.unmodifiableList(edmxIncludeAnnotations);
-  }
-
-  /**
-   * Add include annotation element to current list.
-   *
-   * @param includeAnnotation to be added
-   * @return this EdmxReference object
-   */
-  public EdmxReference addIncludeAnnotation(final EdmxReferenceIncludeAnnotation includeAnnotation) {
-    edmxIncludeAnnotations.add(includeAnnotation);
-    return this;
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java
deleted file mode 100644
index acd6d8c..0000000
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceInclude.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.server.api.edmx;
-
-/**
- * edmx:Include elements that specify the schemas to include from the target document.
- */
-public class EdmxReferenceInclude {
-  private final String namespace;
-  private final String alias;
-
-  /**
-   * Create include with given namespace and alias.
-   *
-   * @param namespace of include
-   * @param alias of include
-   */
-  public EdmxReferenceInclude(final String namespace, final String alias) {
-    this.namespace = namespace;
-    this.alias = alias;
-  }
-
-  /**
-   * Create include with given namespace and empty (<code>NULL</code>) alias.
-   *
-   * @param namespace of include
-   */
-  public EdmxReferenceInclude(final String namespace) {
-    this(namespace, null);
-  }
-
-  /**
-   * @return Namespace of the include
-   */
-  public String getNamespace() {
-    return namespace;
-  }
-
-  /**
-   * @return alias of the include if one defined; null otherwise
-   */
-  public String getAlias() {
-    return alias;
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.java
deleted file mode 100644
index 4139c4a..0000000
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/EdmxReferenceIncludeAnnotation.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.server.api.edmx;
-
-/**
- * POJO for Edmx Reference Include Annotation.
- */
-public class EdmxReferenceIncludeAnnotation {
-  private final String termNamespace;
-  private String qualifier;
-  private String targetNamespace;
-
-  /**
-   * Create include annotation with given termNamespace and empty qualifier and targetNamespace.
-   *
-   * @param termNamespace of include annotation
-   */
-  public EdmxReferenceIncludeAnnotation(final String termNamespace) {
-    this(termNamespace, null, null);
-  }
-
-  /**
-   * Create include annotation with given termNamespace, qualifier and targetNamespace.
-   *
-   * @param termNamespace of include annotation
-   * @param qualifier of include annotation
-   * @param targetNamespace of include annotation
-   */
-  public EdmxReferenceIncludeAnnotation(final String termNamespace, final String qualifier,
-      final String targetNamespace) {
-    this.termNamespace = termNamespace;
-    this.qualifier = qualifier;
-    this.targetNamespace = targetNamespace;
-  }
-
-  /**
-   * @return TermNamespace of the include annotation
-   */
-  public String getTermNamespace() {
-    return termNamespace;
-  }
-
-  /**
-   * @return Qualifier if one defined; null otherwise
-   */
-  public String getQualifier() {
-    return qualifier;
-  }
-
-  /**
-   * Set qualifier for this include annotation.
-   *
-   * @param qualifier for include annotation
-   * @return this include annotation
-   */
-  public EdmxReferenceIncludeAnnotation setQualifier(final String qualifier) {
-    this.qualifier = qualifier;
-    return this;
-  }
-
-  /**
-   * @return targetNamespace if defined; null otherwise
-   */
-  public String getTargetNamespace() {
-    return targetNamespace;
-  }
-
-  /**
-   * Set target namespace for this include annotation.
-   *
-   * @param targetNamespace for include annotation
-   * @return this include annotation
-   */
-  public EdmxReferenceIncludeAnnotation setTargetNamespace(final String targetNamespace) {
-    this.targetNamespace = targetNamespace;
-    return this;
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java
deleted file mode 100644
index 243d894..0000000
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/edmx/package-info.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-/**
- * Olingo Server API - Edmx
- * <p>
- * The edmx package is used to condense all about the Olingo OData EDMX handling.
- *
- */
-package org.apache.olingo.server.api.edmx;
-

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d9d33abe/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
index 1e964a9..a1d845a 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
@@ -19,7 +19,6 @@
 package org.apache.olingo.server.tecsvc.provider;
 
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.olingo.commons.api.edm.FullQualifiedName;