olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [14/50] [abbrv] olingo-odata4 git commit: [OLINGO-564] Renamed 'edm.provider.*' classes
Date Thu, 30 Apr 2015 15:02:27 GMT
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java
index e34a28a..660db3f 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/MetadataParser.java
@@ -33,38 +33,38 @@ import javax.xml.stream.events.StartElement;
 import javax.xml.stream.events.XMLEvent;
 
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.provider.Action;
-import org.apache.olingo.commons.api.edm.provider.ActionImport;
-import org.apache.olingo.commons.api.edm.provider.ComplexType;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
-import org.apache.olingo.commons.api.edm.provider.EntityContainer;
-import org.apache.olingo.commons.api.edm.provider.EntitySet;
-import org.apache.olingo.commons.api.edm.provider.EntityType;
-import org.apache.olingo.commons.api.edm.provider.EnumMember;
-import org.apache.olingo.commons.api.edm.provider.EnumType;
-import org.apache.olingo.commons.api.edm.provider.Function;
-import org.apache.olingo.commons.api.edm.provider.FunctionImport;
-import org.apache.olingo.commons.api.edm.provider.NavigationProperty;
-import org.apache.olingo.commons.api.edm.provider.NavigationPropertyBinding;
-import org.apache.olingo.commons.api.edm.provider.OnDelete;
-import org.apache.olingo.commons.api.edm.provider.OnDeleteAction;
-import org.apache.olingo.commons.api.edm.provider.Operation;
-import org.apache.olingo.commons.api.edm.provider.Parameter;
-import org.apache.olingo.commons.api.edm.provider.Property;
-import org.apache.olingo.commons.api.edm.provider.PropertyRef;
-import org.apache.olingo.commons.api.edm.provider.ReferentialConstraint;
-import org.apache.olingo.commons.api.edm.provider.ReturnType;
-import org.apache.olingo.commons.api.edm.provider.Schema;
-import org.apache.olingo.commons.api.edm.provider.Singleton;
-import org.apache.olingo.commons.api.edm.provider.Term;
-import org.apache.olingo.commons.api.edm.provider.TypeDefinition;
+import org.apache.olingo.commons.api.edm.provider.CsdlAction;
+import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntitySet;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEnumMember;
+import org.apache.olingo.commons.api.edm.provider.CsdlEnumType;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunction;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunctionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlNavigationProperty;
+import org.apache.olingo.commons.api.edm.provider.CsdlNavigationPropertyBinding;
+import org.apache.olingo.commons.api.edm.provider.CsdlOnDelete;
+import org.apache.olingo.commons.api.edm.provider.CsdlOnDeleteAction;
+import org.apache.olingo.commons.api.edm.provider.CsdlOperation;
+import org.apache.olingo.commons.api.edm.provider.CsdlParameter;
+import org.apache.olingo.commons.api.edm.provider.CsdlProperty;
+import org.apache.olingo.commons.api.edm.provider.CsdlPropertyRef;
+import org.apache.olingo.commons.api.edm.provider.CsdlReferentialConstraint;
+import org.apache.olingo.commons.api.edm.provider.CsdlReturnType;
+import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
+import org.apache.olingo.commons.api.edm.provider.CsdlSingleton;
+import org.apache.olingo.commons.api.edm.provider.CsdlTerm;
+import org.apache.olingo.commons.api.edm.provider.CsdlTypeDefinition;
 
 /**
  * This class can convert a CSDL document into EDMProvider object
  */
 public class MetadataParser {
 
-  public EdmProvider buildEdmProvider(Reader csdl) throws XMLStreamException {
+  public CsdlEdmProvider buildEdmProvider(Reader csdl) throws XMLStreamException {
     XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
     XMLEventReader reader = xmlInputFactory.createXMLEventReader(csdl);
 
@@ -112,18 +112,18 @@ public class MetadataParser {
   private void readSchema(XMLEventReader reader, StartElement element,
       SchemaBasedEdmProvider provider) throws XMLStreamException {
 
-    Schema schema = new Schema();
-    schema.setComplexTypes(new ArrayList<ComplexType>());
-    schema.setActions(new ArrayList<Action>());
-    schema.setEntityTypes(new ArrayList<EntityType>());
-    schema.setEnumTypes(new ArrayList<EnumType>());
-    schema.setFunctions(new ArrayList<Function>());
-    schema.setTerms(new ArrayList<Term>());
-    schema.setTypeDefinitions(new ArrayList<TypeDefinition>());
+    CsdlSchema schema = new CsdlSchema();
+    schema.setComplexTypes(new ArrayList<CsdlComplexType>());
+    schema.setActions(new ArrayList<CsdlAction>());
+    schema.setEntityTypes(new ArrayList<CsdlEntityType>());
+    schema.setEnumTypes(new ArrayList<CsdlEnumType>());
+    schema.setFunctions(new ArrayList<CsdlFunction>());
+    schema.setTerms(new ArrayList<CsdlTerm>());
+    schema.setTypeDefinitions(new ArrayList<CsdlTypeDefinition>());
 
-    new ElementReader<Schema>() {
+    new ElementReader<CsdlSchema>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, Schema schema, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlSchema schema, String name)
           throws XMLStreamException {
         schema.setNamespace(attr(element, "Namespace"));
         schema.setAlias(attr(element, "Alias"));
@@ -133,10 +133,10 @@ public class MetadataParser {
     provider.addSchema(schema);
   }
 
-  private void readSchemaContents(XMLEventReader reader, Schema schema) throws XMLStreamException {
-    new ElementReader<Schema>() {
+  private void readSchemaContents(XMLEventReader reader, CsdlSchema schema) throws XMLStreamException {
+    new ElementReader<CsdlSchema>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, Schema schema, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlSchema schema, String name)
           throws XMLStreamException {
         if (name.equals("Action")) {
           readAction(reader, element, schema);
@@ -164,11 +164,11 @@ public class MetadataParser {
         "EntityContainer", "EntityType", "EnumType", "Function", "Term", "TypeDefinition");
   }
 
-  private void readAction(XMLEventReader reader, StartElement element, Schema schema)
+  private void readAction(XMLEventReader reader, StartElement element, CsdlSchema schema)
       throws XMLStreamException {
 
-    Action action = new Action();
-    action.setParameters(new ArrayList<Parameter>());
+    CsdlAction action = new CsdlAction();
+    action.setParameters(new ArrayList<CsdlParameter>());
     action.setName(attr(element, "Name"));
     action.setBound(Boolean.parseBoolean(attr(element, "IsBound")));
     String entitySetPath = attr(element, "EntitySetPath");
@@ -196,8 +196,8 @@ public class MetadataParser {
     return false;
   }
 
-  private void readReturnType(StartElement element, Operation operation) {
-    ReturnType returnType = new ReturnType();
+  private void readReturnType(StartElement element, CsdlOperation operation) {
+    CsdlReturnType returnType = new CsdlReturnType();
     returnType.setType(readType(element));
     returnType.setCollection(isCollectionType(element));
     returnType.setNullable(Boolean.parseBoolean(attr(element, "Nullable")));
@@ -221,8 +221,8 @@ public class MetadataParser {
     operation.setReturnType(returnType);
   }
 
-  private void readParameter(StartElement element, Operation operation) {
-    Parameter parameter = new Parameter();
+  private void readParameter(StartElement element, CsdlOperation operation) {
+    CsdlParameter parameter = new CsdlParameter();
     parameter.setName(attr(element, "Name"));
     parameter.setType(readType(element));
     parameter.setCollection(isCollectionType(element));
@@ -247,8 +247,8 @@ public class MetadataParser {
     operation.getParameters().add(parameter);
   }
 
-  private TypeDefinition readTypeDefinition(StartElement element) {
-    TypeDefinition td = new TypeDefinition();
+  private CsdlTypeDefinition readTypeDefinition(StartElement element) {
+    CsdlTypeDefinition td = new CsdlTypeDefinition();
     td.setName(attr(element, "Name"));
     td.setUnderlyingType(new FullQualifiedName(attr(element, "UnderlyingType")));
     td.setUnicode(Boolean.parseBoolean(attr(element, "Unicode")));
@@ -272,8 +272,8 @@ public class MetadataParser {
     return td;
   }
 
-  private Term readTerm(StartElement element) {
-    Term term = new Term();
+  private CsdlTerm readTerm(StartElement element) {
+    CsdlTerm term = new CsdlTerm();
     term.setName(attr(element, "Name"));
     term.setType(attr(element, "Type"));
     if (attr(element, "BaseTerm") != null) {
@@ -305,10 +305,10 @@ public class MetadataParser {
     return term;
   }
 
-  private void readFunction(XMLEventReader reader, StartElement element, Schema schema)
+  private void readFunction(XMLEventReader reader, StartElement element, CsdlSchema schema)
       throws XMLStreamException {
-    Function function = new Function();
-    function.setParameters(new ArrayList<Parameter>());
+    CsdlFunction function = new CsdlFunction();
+    function.setParameters(new ArrayList<CsdlParameter>());
     function.setName(attr(element, "Name"));
     function.setBound(Boolean.parseBoolean(attr(element, "IsBound")));
     function.setComposable(Boolean.parseBoolean(attr(element, "IsComposable")));
@@ -321,11 +321,11 @@ public class MetadataParser {
     schema.getFunctions().add(function);
   }
 
-  private void readOperationParameters(XMLEventReader reader, final Operation operation)
+  private void readOperationParameters(XMLEventReader reader, final CsdlOperation operation)
       throws XMLStreamException {
-    new ElementReader<Operation>() {
+    new ElementReader<CsdlOperation>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, Operation operation, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlOperation operation, String name)
           throws XMLStreamException {
         if (name.equals("Parameter")) {
           readParameter(element, operation);
@@ -336,10 +336,10 @@ public class MetadataParser {
     }.read(reader, null, operation, "Parameter", "ReturnType");
   }
 
-  private void readEnumType(XMLEventReader reader, StartElement element, Schema schema)
+  private void readEnumType(XMLEventReader reader, StartElement element, CsdlSchema schema)
       throws XMLStreamException {
-    EnumType type = new EnumType();
-    type.setMembers(new ArrayList<EnumMember>());
+    CsdlEnumType type = new CsdlEnumType();
+    type.setMembers(new ArrayList<CsdlEnumMember>());
     type.setName(attr(element, "Name"));
     if (attr(element, "UnderlyingType") != null) {
       type.setUnderlyingType(new FullQualifiedName(attr(element, "UnderlyingType")));
@@ -350,13 +350,13 @@ public class MetadataParser {
     schema.getEnumTypes().add(type);
   }
 
-  private void readEnumMembers(XMLEventReader reader, StartElement element, EnumType type)
+  private void readEnumMembers(XMLEventReader reader, StartElement element, CsdlEnumType type)
       throws XMLStreamException {
-    new ElementReader<EnumType>() {
+    new ElementReader<CsdlEnumType>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, EnumType type, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlEnumType type, String name)
           throws XMLStreamException {
-        EnumMember member = new EnumMember();
+        CsdlEnumMember member = new CsdlEnumMember();
         member.setName(attr(element, "Name"));
         member.setValue(attr(element, "Value"));
         type.getMembers().add(member);
@@ -364,12 +364,12 @@ public class MetadataParser {
     }.read(reader, element, type, "Member");
   }
 
-  private void readEntityType(XMLEventReader reader, StartElement element, Schema schema)
+  private void readEntityType(XMLEventReader reader, StartElement element, CsdlSchema schema)
       throws XMLStreamException {
-    EntityType entityType = new EntityType();
-    entityType.setProperties(new ArrayList<Property>());
-    entityType.setNavigationProperties(new ArrayList<NavigationProperty>());
-    entityType.setKey(new ArrayList<PropertyRef>());
+    CsdlEntityType entityType = new CsdlEntityType();
+    entityType.setProperties(new ArrayList<CsdlProperty>());
+    entityType.setNavigationProperties(new ArrayList<CsdlNavigationProperty>());
+    entityType.setKey(new ArrayList<CsdlPropertyRef>());
     entityType.setName(attr(element, "Name"));
     if (attr(element, "BaseType") != null) {
       entityType.setBaseType(new FullQualifiedName(attr(element, "BaseType")));
@@ -381,11 +381,11 @@ public class MetadataParser {
     schema.getEntityTypes().add(entityType);
   }
 
-  private void readEntityProperties(XMLEventReader reader, EntityType entityType)
+  private void readEntityProperties(XMLEventReader reader, CsdlEntityType entityType)
       throws XMLStreamException {
-    new ElementReader<EntityType>() {
+    new ElementReader<CsdlEntityType>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, EntityType entityType, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlEntityType entityType, String name)
           throws XMLStreamException {
         if (name.equals("Property")) {
           entityType.getProperties().add(readProperty(element));
@@ -398,13 +398,13 @@ public class MetadataParser {
     }.read(reader, null, entityType, "Property", "NavigationProperty", "Key");
   }
 
-  private void readKey(XMLEventReader reader, StartElement element, EntityType entityType)
+  private void readKey(XMLEventReader reader, StartElement element, CsdlEntityType entityType)
       throws XMLStreamException {
-    new ElementReader<EntityType>() {
+    new ElementReader<CsdlEntityType>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, EntityType entityType, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlEntityType entityType, String name)
           throws XMLStreamException {
-        PropertyRef ref = new PropertyRef();
+        CsdlPropertyRef ref = new CsdlPropertyRef();
         ref.setName(attr(element, "Name"));
         ref.setAlias(attr(element, "Alias"));
         entityType.getKey().add(ref);
@@ -412,10 +412,10 @@ public class MetadataParser {
     }.read(reader, element, entityType, "PropertyRef");
   }
 
-  private NavigationProperty readNavigationProperty(XMLEventReader reader, StartElement element)
+  private CsdlNavigationProperty readNavigationProperty(XMLEventReader reader, StartElement element)
       throws XMLStreamException {
-    NavigationProperty property = new NavigationProperty();
-    property.setReferentialConstraints(new ArrayList<ReferentialConstraint>());
+    CsdlNavigationProperty property = new CsdlNavigationProperty();
+    property.setReferentialConstraints(new ArrayList<CsdlReferentialConstraint>());
 
     property.setName(attr(element, "Name"));
     property.setType(readType(element));
@@ -424,17 +424,17 @@ public class MetadataParser {
     property.setPartner(attr(element, "Partner"));
     property.setContainsTarget(Boolean.parseBoolean(attr(element, "ContainsTarget")));
 
-    new ElementReader<NavigationProperty>() {
+    new ElementReader<CsdlNavigationProperty>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, NavigationProperty property,
+      void build(XMLEventReader reader, StartElement element, CsdlNavigationProperty property,
           String name) throws XMLStreamException {
         if (name.equals("ReferentialConstraint")) {
-          ReferentialConstraint constraint = new ReferentialConstraint();
+          CsdlReferentialConstraint constraint = new CsdlReferentialConstraint();
           constraint.setProperty(attr(element, "Property"));
           constraint.setReferencedProperty(attr(element, "ReferencedProperty"));
           property.getReferentialConstraints().add(constraint);
         } else if (name.equals("OnDelete")) {
-          property.setOnDelete(new OnDelete().setAction(OnDeleteAction.valueOf(attr(element, "Action"))));
+          property.setOnDelete(new CsdlOnDelete().setAction(CsdlOnDeleteAction.valueOf(attr(element, "Action"))));
         }
       }
     }.read(reader, element, property, "ReferentialConstraint", "OnDelete");
@@ -449,8 +449,8 @@ public class MetadataParser {
     return null;
   }
 
-  private Property readProperty(StartElement element) {
-    Property property = new Property();
+  private CsdlProperty readProperty(StartElement element) {
+    CsdlProperty property = new CsdlProperty();
     property.setName(attr(element, "Name"));
     property.setType(readType(element));
     property.setCollection(isCollectionType(element));
@@ -481,21 +481,21 @@ public class MetadataParser {
     return property;
   }
 
-  private void readEntityContainer(XMLEventReader reader, StartElement element, Schema schema)
+  private void readEntityContainer(XMLEventReader reader, StartElement element, CsdlSchema schema)
       throws XMLStreamException {
-    final EntityContainer container = new EntityContainer();
+    final CsdlEntityContainer container = new CsdlEntityContainer();
     container.setName(attr(element, "Name"));
     if (attr(element, "Extends") != null) {
       container.setExtendsContainer(attr(element, "Extends"));
     }
-    container.setActionImports(new ArrayList<ActionImport>());
-    container.setFunctionImports(new ArrayList<FunctionImport>());
-    container.setEntitySets(new ArrayList<EntitySet>());
-    container.setSingletons(new ArrayList<Singleton>());
+    container.setActionImports(new ArrayList<CsdlActionImport>());
+    container.setFunctionImports(new ArrayList<CsdlFunctionImport>());
+    container.setEntitySets(new ArrayList<CsdlEntitySet>());
+    container.setSingletons(new ArrayList<CsdlSingleton>());
 
-    new ElementReader<Schema>() {
+    new ElementReader<CsdlSchema>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, Schema schema, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlSchema schema, String name)
           throws XMLStreamException {
         if (name.equals("EntitySet")) {
           readEntitySet(reader, element, container);
@@ -508,8 +508,8 @@ public class MetadataParser {
         }
       }
 
-      private void readFunctionImport(StartElement element, EntityContainer container) {
-        FunctionImport functionImport = new FunctionImport();
+      private void readFunctionImport(StartElement element, CsdlEntityContainer container) {
+        CsdlFunctionImport functionImport = new CsdlFunctionImport();
         functionImport.setName(attr(element, "Name"));
         functionImport.setFunction(new FullQualifiedName(attr(element, "Function")));
         functionImport.setIncludeInServiceDocument(Boolean.parseBoolean(attr(element,
@@ -522,8 +522,8 @@ public class MetadataParser {
         container.getFunctionImports().add(functionImport);
       }
 
-      private void readActionImport(StartElement element, EntityContainer container) {
-        ActionImport actionImport = new ActionImport();
+      private void readActionImport(StartElement element, CsdlEntityContainer container) {
+        CsdlActionImport actionImport = new CsdlActionImport();
         actionImport.setName(attr(element, "Name"));
         actionImport.setAction(new FullQualifiedName(attr(element, "Action")));
 
@@ -535,35 +535,35 @@ public class MetadataParser {
       }
 
       private void readSingleton(XMLEventReader reader, StartElement element,
-          EntityContainer container) throws XMLStreamException {
-        Singleton singleton = new Singleton();
-        singleton.setNavigationPropertyBindings(new ArrayList<NavigationPropertyBinding>());
+          CsdlEntityContainer container) throws XMLStreamException {
+        CsdlSingleton singleton = new CsdlSingleton();
+        singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
         singleton.setName(attr(element, "Name"));
         singleton.setType(new FullQualifiedName(attr(element, "Type")));
-        singleton.setNavigationPropertyBindings(new ArrayList<NavigationPropertyBinding>());
+        singleton.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
         readNavigationPropertyBindings(reader, element, singleton.getNavigationPropertyBindings());
         container.getSingletons().add(singleton);
       }
 
       private void readEntitySet(XMLEventReader reader, StartElement element,
-          EntityContainer container) throws XMLStreamException {
-        EntitySet entitySet = new EntitySet();
+          CsdlEntityContainer container) throws XMLStreamException {
+        CsdlEntitySet entitySet = new CsdlEntitySet();
         entitySet.setName(attr(element, "Name"));
         entitySet.setType(new FullQualifiedName(attr(element, "EntityType")));
         entitySet.setIncludeInServiceDocument(Boolean.parseBoolean(attr(element,
             "IncludeInServiceDocument")));
-        entitySet.setNavigationPropertyBindings(new ArrayList<NavigationPropertyBinding>());
+        entitySet.setNavigationPropertyBindings(new ArrayList<CsdlNavigationPropertyBinding>());
         readNavigationPropertyBindings(reader, element, entitySet.getNavigationPropertyBindings());
         container.getEntitySets().add(entitySet);
       }
 
       private void readNavigationPropertyBindings(XMLEventReader reader, StartElement element,
-          List<NavigationPropertyBinding> bindings) throws XMLStreamException {
-        new ElementReader<List<NavigationPropertyBinding>>() {
+          List<CsdlNavigationPropertyBinding> bindings) throws XMLStreamException {
+        new ElementReader<List<CsdlNavigationPropertyBinding>>() {
           @Override
           void build(XMLEventReader reader, StartElement element,
-              List<NavigationPropertyBinding> bindings, String name) throws XMLStreamException {
-            NavigationPropertyBinding binding = new NavigationPropertyBinding();
+              List<CsdlNavigationPropertyBinding> bindings, String name) throws XMLStreamException {
+            CsdlNavigationPropertyBinding binding = new CsdlNavigationPropertyBinding();
             binding.setPath(attr(element, "Path"));
             binding.setTarget(attr(element, "Target"));
             bindings.add(binding);
@@ -576,11 +576,11 @@ public class MetadataParser {
     schema.setEntityContainer(container);
   }
 
-  private void readComplexType(XMLEventReader reader, StartElement element, Schema schema)
+  private void readComplexType(XMLEventReader reader, StartElement element, CsdlSchema schema)
       throws XMLStreamException {
-    ComplexType complexType = new ComplexType();
-    complexType.setProperties(new ArrayList<Property>());
-    complexType.setNavigationProperties(new ArrayList<NavigationProperty>());
+    CsdlComplexType complexType = new CsdlComplexType();
+    complexType.setProperties(new ArrayList<CsdlProperty>());
+    complexType.setNavigationProperties(new ArrayList<CsdlNavigationProperty>());
     complexType.setName(attr(element, "Name"));
     if (attr(element, "BaseType") != null) {
       complexType.setBaseType(new FullQualifiedName(attr(element, "BaseType")));
@@ -592,11 +592,11 @@ public class MetadataParser {
     schema.getComplexTypes().add(complexType);
   }
 
-  private void readProperties(XMLEventReader reader, ComplexType complexType)
+  private void readProperties(XMLEventReader reader, CsdlComplexType complexType)
       throws XMLStreamException {
-    new ElementReader<ComplexType>() {
+    new ElementReader<CsdlComplexType>() {
       @Override
-      void build(XMLEventReader reader, StartElement element, ComplexType complexType, String name)
+      void build(XMLEventReader reader, StartElement element, CsdlComplexType complexType, String name)
           throws XMLStreamException {
         if (name.equals("Property")) {
           complexType.getProperties().add(readProperty(element));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
index cc811c0..a35f3bc 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
@@ -24,34 +24,34 @@ import java.util.List;
 
 import org.apache.olingo.commons.api.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.provider.Action;
-import org.apache.olingo.commons.api.edm.provider.ActionImport;
-import org.apache.olingo.commons.api.edm.provider.AliasInfo;
-import org.apache.olingo.commons.api.edm.provider.Annotatable;
-import org.apache.olingo.commons.api.edm.provider.Annotations;
-import org.apache.olingo.commons.api.edm.provider.ComplexType;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
-import org.apache.olingo.commons.api.edm.provider.EntityContainer;
-import org.apache.olingo.commons.api.edm.provider.EntityContainerInfo;
-import org.apache.olingo.commons.api.edm.provider.EntitySet;
-import org.apache.olingo.commons.api.edm.provider.EntityType;
-import org.apache.olingo.commons.api.edm.provider.EnumType;
-import org.apache.olingo.commons.api.edm.provider.Function;
-import org.apache.olingo.commons.api.edm.provider.FunctionImport;
-import org.apache.olingo.commons.api.edm.provider.Schema;
-import org.apache.olingo.commons.api.edm.provider.Singleton;
-import org.apache.olingo.commons.api.edm.provider.Term;
-import org.apache.olingo.commons.api.edm.provider.TypeDefinition;
+import org.apache.olingo.commons.api.edm.provider.CsdlAction;
+import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlAliasInfo;
+import org.apache.olingo.commons.api.edm.provider.CsdlAnnotatable;
+import org.apache.olingo.commons.api.edm.provider.CsdlAnnotations;
+import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainerInfo;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntitySet;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEnumType;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunction;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunctionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
+import org.apache.olingo.commons.api.edm.provider.CsdlSingleton;
+import org.apache.olingo.commons.api.edm.provider.CsdlTerm;
+import org.apache.olingo.commons.api.edm.provider.CsdlTypeDefinition;
 
-public class SchemaBasedEdmProvider implements EdmProvider {
-  private final List<Schema> edmSchemas = new ArrayList<Schema>();
+public class SchemaBasedEdmProvider implements CsdlEdmProvider {
+  private final List<CsdlSchema> edmSchemas = new ArrayList<CsdlSchema>();
 
-  public void addSchema(Schema schema) {
+  public void addSchema(CsdlSchema schema) {
     this.edmSchemas.add(schema);
   }
 
-  private Schema getSchema(String ns) {
-    for (Schema s : this.edmSchemas) {
+  private CsdlSchema getSchema(String ns) {
+    for (CsdlSchema s : this.edmSchemas) {
       if (s.getNamespace().equals(ns)) {
         return s;
       }
@@ -60,12 +60,12 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public EnumType getEnumType(FullQualifiedName fqn) throws ODataException {
-    Schema schema = getSchema(fqn.getNamespace());
+  public CsdlEnumType getEnumType(FullQualifiedName fqn) throws ODataException {
+    CsdlSchema schema = getSchema(fqn.getNamespace());
     if (schema != null) {
-      List<EnumType> types = schema.getEnumTypes();
+      List<CsdlEnumType> types = schema.getEnumTypes();
       if (types != null) {
-        for (EnumType type : types) {
+        for (CsdlEnumType type : types) {
           if (type.getName().equals(fqn.getName())) {
             return type;
           }
@@ -76,12 +76,12 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public TypeDefinition getTypeDefinition(FullQualifiedName fqn) throws ODataException {
-    Schema schema = getSchema(fqn.getNamespace());
+  public CsdlTypeDefinition getTypeDefinition(FullQualifiedName fqn) throws ODataException {
+    CsdlSchema schema = getSchema(fqn.getNamespace());
     if (schema != null) {
-      List<TypeDefinition> types = schema.getTypeDefinitions();
+      List<CsdlTypeDefinition> types = schema.getTypeDefinitions();
       if (types != null) {
-        for (TypeDefinition type : types) {
+        for (CsdlTypeDefinition type : types) {
           if (type.getName().equals(fqn.getName())) {
             return type;
           }
@@ -92,13 +92,13 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public List<Function> getFunctions(FullQualifiedName fqn) throws ODataException {
-    ArrayList<Function> foundFuncs = new ArrayList<Function>();
-    Schema schema = getSchema(fqn.getNamespace());
+  public List<CsdlFunction> getFunctions(FullQualifiedName fqn) throws ODataException {
+    ArrayList<CsdlFunction> foundFuncs = new ArrayList<CsdlFunction>();
+    CsdlSchema schema = getSchema(fqn.getNamespace());
     if (schema != null) {
-      List<Function> functions = schema.getFunctions();
+      List<CsdlFunction> functions = schema.getFunctions();
       if (functions != null) {
-        for (Function func : functions) {
+        for (CsdlFunction func : functions) {
           if (func.getName().equals(fqn.getName())) {
             foundFuncs.add(func);
           }
@@ -109,12 +109,12 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public Term getTerm(FullQualifiedName fqn) throws ODataException {
-    Schema schema = getSchema(fqn.getNamespace());
+  public CsdlTerm getTerm(FullQualifiedName fqn) throws ODataException {
+    CsdlSchema schema = getSchema(fqn.getNamespace());
     if (schema != null) {
-      List<Term> terms = schema.getTerms();
+      List<CsdlTerm> terms = schema.getTerms();
       if (terms != null) {
-        for (Term term : terms) {
+        for (CsdlTerm term : terms) {
           if (term.getName().equals(fqn.getName())) {
             return term;
           }
@@ -125,12 +125,12 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public EntitySet getEntitySet(FullQualifiedName fqn, String entitySetName) throws ODataException {
-    Schema schema = getSchema(fqn.getFullQualifiedNameAsString());
+  public CsdlEntitySet getEntitySet(FullQualifiedName fqn, String entitySetName) throws ODataException {
+    CsdlSchema schema = getSchema(fqn.getFullQualifiedNameAsString());
     if (schema != null) {
-      EntityContainer ec = schema.getEntityContainer();
+      CsdlEntityContainer ec = schema.getEntityContainer();
       if (ec != null && ec.getEntitySets() != null) {
-        for (EntitySet es : ec.getEntitySets()) {
+        for (CsdlEntitySet es : ec.getEntitySets()) {
           if (es.getName().equals(entitySetName)) {
             return es;
           }
@@ -141,12 +141,12 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public Singleton getSingleton(FullQualifiedName fqn, String singletonName) throws ODataException {
-    Schema schema = getSchema(fqn.getFullQualifiedNameAsString());
+  public CsdlSingleton getSingleton(FullQualifiedName fqn, String singletonName) throws ODataException {
+    CsdlSchema schema = getSchema(fqn.getFullQualifiedNameAsString());
     if (schema != null) {
-      EntityContainer ec = schema.getEntityContainer();
+      CsdlEntityContainer ec = schema.getEntityContainer();
       if (ec != null && ec.getSingletons() != null) {
-        for (Singleton es : ec.getSingletons()) {
+        for (CsdlSingleton es : ec.getSingletons()) {
           if (es.getName().equals(singletonName)) {
             return es;
           }
@@ -157,13 +157,13 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public ActionImport getActionImport(FullQualifiedName fqn, String actionImportName)
+  public CsdlActionImport getActionImport(FullQualifiedName fqn, String actionImportName)
       throws ODataException {
-    Schema schema = getSchema(fqn.getFullQualifiedNameAsString());
+    CsdlSchema schema = getSchema(fqn.getFullQualifiedNameAsString());
     if (schema != null) {
-      EntityContainer ec = schema.getEntityContainer();
+      CsdlEntityContainer ec = schema.getEntityContainer();
       if (ec != null && ec.getActionImports() != null) {
-        for (ActionImport es : ec.getActionImports()) {
+        for (CsdlActionImport es : ec.getActionImports()) {
           if (es.getName().equals(actionImportName)) {
             return es;
           }
@@ -174,13 +174,13 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public FunctionImport getFunctionImport(FullQualifiedName fqn, String functionImportName)
+  public CsdlFunctionImport getFunctionImport(FullQualifiedName fqn, String functionImportName)
       throws ODataException {
-    Schema schema = getSchema(fqn.getFullQualifiedNameAsString());
+    CsdlSchema schema = getSchema(fqn.getFullQualifiedNameAsString());
     if (schema != null) {
-      EntityContainer ec = schema.getEntityContainer();
+      CsdlEntityContainer ec = schema.getEntityContainer();
       if (ec != null && ec.getFunctionImports() != null) {
-        for (FunctionImport es : ec.getFunctionImports()) {
+        for (CsdlFunctionImport es : ec.getFunctionImports()) {
           if (es.getName().equals(functionImportName)) {
             return es;
           }
@@ -191,11 +191,11 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public EntityContainerInfo getEntityContainerInfo(FullQualifiedName fqn) throws ODataException {
-    Schema schema = null;
+  public CsdlEntityContainerInfo getEntityContainerInfo(FullQualifiedName fqn) throws ODataException {
+    CsdlSchema schema = null;
 
     if (fqn == null) {
-      for (Schema s : this.edmSchemas) {
+      for (CsdlSchema s : this.edmSchemas) {
         if (s.getEntityContainer() != null) {
           schema = s;
           break;
@@ -206,9 +206,9 @@ public class SchemaBasedEdmProvider implements EdmProvider {
     }
 
     if (schema != null) {
-      EntityContainer ec = schema.getEntityContainer();
+      CsdlEntityContainer ec = schema.getEntityContainer();
       if (ec != null) {
-        EntityContainerInfo info = new EntityContainerInfo();
+        CsdlEntityContainerInfo info = new CsdlEntityContainerInfo();
         info.setContainerName(new FullQualifiedName(schema.getNamespace()));
         if (schema.getEntityContainer().getExtendsContainer() != null) {
           info.setExtendsContainer(new FullQualifiedName(schema.getEntityContainer().getExtendsContainer()));
@@ -220,9 +220,9 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public List<AliasInfo> getAliasInfos() throws ODataException {
-    Schema schema = null;
-    for (Schema s : this.edmSchemas) {
+  public List<CsdlAliasInfo> getAliasInfos() throws ODataException {
+    CsdlSchema schema = null;
+    for (CsdlSchema s : this.edmSchemas) {
       if (s.getEntityContainer() != null) {
         schema = s;
         break;
@@ -233,17 +233,17 @@ public class SchemaBasedEdmProvider implements EdmProvider {
       schema = this.edmSchemas.get(0);
     }
 
-    AliasInfo ai = new AliasInfo();
+    CsdlAliasInfo ai = new CsdlAliasInfo();
     ai.setAlias(schema.getAlias());
     ai.setNamespace(schema.getNamespace());
     return Arrays.asList(ai);
   }
 
   @Override
-  public EntityContainer getEntityContainer() throws ODataException {
+  public CsdlEntityContainer getEntityContainer() throws ODataException {
     // note that there can be many schemas, but only one needs to contain the
     // entity container in a given metadata document.
-    for (Schema s : this.edmSchemas) {
+    for (CsdlSchema s : this.edmSchemas) {
       if (s.getEntityContainer() != null) {
         return s.getEntityContainer();
       }
@@ -252,16 +252,16 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public List<Schema> getSchemas() throws ODataException {
-    return new ArrayList<Schema>(this.edmSchemas);
+  public List<CsdlSchema> getSchemas() throws ODataException {
+    return new ArrayList<CsdlSchema>(this.edmSchemas);
   }
 
   @Override
-  public EntityType getEntityType(final FullQualifiedName fqn) throws ODataException {
-    Schema schema = getSchema(fqn.getNamespace());
+  public CsdlEntityType getEntityType(final FullQualifiedName fqn) throws ODataException {
+    CsdlSchema schema = getSchema(fqn.getNamespace());
     if (schema != null) {
       if (schema.getEntityTypes() != null) {
-        for (EntityType type : schema.getEntityTypes()) {
+        for (CsdlEntityType type : schema.getEntityTypes()) {
           if (type.getName().equals(fqn.getName())) {
             return type;
           }
@@ -272,11 +272,11 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public ComplexType getComplexType(final FullQualifiedName fqn) throws ODataException {
-    Schema schema = getSchema(fqn.getNamespace());
+  public CsdlComplexType getComplexType(final FullQualifiedName fqn) throws ODataException {
+    CsdlSchema schema = getSchema(fqn.getNamespace());
     if (schema != null) {
       if (schema.getComplexTypes() != null) {
-        for (ComplexType type : schema.getComplexTypes()) {
+        for (CsdlComplexType type : schema.getComplexTypes()) {
           if (type.getName().equals(fqn.getName())) {
             return type;
           }
@@ -287,13 +287,13 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public List<Action> getActions(final FullQualifiedName fqn) throws ODataException {
-    ArrayList<Action> actions = new ArrayList<Action>();
-    Schema schema = getSchema(fqn.getNamespace());
+  public List<CsdlAction> getActions(final FullQualifiedName fqn) throws ODataException {
+    ArrayList<CsdlAction> actions = new ArrayList<CsdlAction>();
+    CsdlSchema schema = getSchema(fqn.getNamespace());
     if (schema != null) {
-      List<Action> types = schema.getActions();
+      List<CsdlAction> types = schema.getActions();
       if (types != null) {
-        for (Action type : types) {
+        for (CsdlAction type : types) {
           if (type.getName().equals(fqn.getName())) {
             actions.add(type);
           }
@@ -304,12 +304,12 @@ public class SchemaBasedEdmProvider implements EdmProvider {
   }
 
   @Override
-  public Annotations getAnnotationsGroup(FullQualifiedName targetName) throws ODataException {
+  public CsdlAnnotations getAnnotationsGroup(FullQualifiedName targetName) throws ODataException {
     return null;
   }
 
   @Override
-  public Annotatable getAnnoatatable(FullQualifiedName annotatedName) throws ODataException {
+  public CsdlAnnotatable getAnnoatatable(FullQualifiedName annotatedName) throws ODataException {
     return null;
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
index 9749a6c..10502ad 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
@@ -29,19 +29,19 @@ import java.util.List;
 
 import org.apache.olingo.commons.api.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.provider.Action;
-import org.apache.olingo.commons.api.edm.provider.ActionImport;
-import org.apache.olingo.commons.api.edm.provider.ComplexType;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
-import org.apache.olingo.commons.api.edm.provider.EntitySet;
-import org.apache.olingo.commons.api.edm.provider.EntityType;
-import org.apache.olingo.commons.api.edm.provider.EnumType;
-import org.apache.olingo.commons.api.edm.provider.Function;
-import org.apache.olingo.commons.api.edm.provider.FunctionImport;
-import org.apache.olingo.commons.api.edm.provider.NavigationPropertyBinding;
-import org.apache.olingo.commons.api.edm.provider.Parameter;
-import org.apache.olingo.commons.api.edm.provider.Property;
-import org.apache.olingo.commons.api.edm.provider.Singleton;
+import org.apache.olingo.commons.api.edm.provider.CsdlAction;
+import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntitySet;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEnumType;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunction;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunctionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlNavigationPropertyBinding;
+import org.apache.olingo.commons.api.edm.provider.CsdlParameter;
+import org.apache.olingo.commons.api.edm.provider.CsdlProperty;
+import org.apache.olingo.commons.api.edm.provider.CsdlSingleton;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -49,7 +49,7 @@ public class MetadataParserTest {
   final String NS = "Microsoft.OData.SampleService.Models.TripPin";
   final FullQualifiedName NSF = new FullQualifiedName(NS);
 
-  EdmProvider provider = null;
+  CsdlEdmProvider provider = null;
 
   @Before
   public void setUp() throws Exception {
@@ -60,7 +60,7 @@ public class MetadataParserTest {
   @Test
   public void testAction() throws ODataException {
     // test action
-    List<Action> actions = provider.getActions(new FullQualifiedName(NS, "ResetDataSource"));
+    List<CsdlAction> actions = provider.getActions(new FullQualifiedName(NS, "ResetDataSource"));
     assertNotNull(actions);
     assertEquals(1, actions.size());
   }
@@ -68,7 +68,7 @@ public class MetadataParserTest {
   @Test
   public void testFunction() throws ODataException {
     // test function
-    List<Function> functions = provider
+    List<CsdlFunction> functions = provider
         .getFunctions(new FullQualifiedName(NS, "GetFavoriteAirline"));
     assertNotNull(functions);
     assertEquals(1, functions.size());
@@ -79,7 +79,7 @@ public class MetadataParserTest {
         "person/Trips/PlanItems/Microsoft.OData.SampleService.Models.TripPin.Flight/Airline",
         functions.get(0).getEntitySetPath());
 
-    List<Parameter> parameters = functions.get(0).getParameters();
+    List<CsdlParameter> parameters = functions.get(0).getParameters();
     assertNotNull(parameters);
     assertEquals(1, parameters.size());
     assertEquals("person", parameters.get(0).getName());
@@ -95,7 +95,7 @@ public class MetadataParserTest {
   @Test
   public void testEnumType() throws ODataException {
     // test enum type
-    EnumType enumType = provider.getEnumType(new FullQualifiedName(NS, "PersonGender"));
+    CsdlEnumType enumType = provider.getEnumType(new FullQualifiedName(NS, "PersonGender"));
     assertNotNull(enumType);
     assertEquals("Male", enumType.getMembers().get(0).getName());
     assertEquals("Female", enumType.getMembers().get(1).getName());
@@ -108,7 +108,7 @@ public class MetadataParserTest {
   @Test
   public void testEntityType() throws ODataException {
     // test Entity Type
-    EntityType et = provider.getEntityType(new FullQualifiedName(NS, "Photo"));
+    CsdlEntityType et = provider.getEntityType(new FullQualifiedName(NS, "Photo"));
     assertNotNull(et);
     assertNotNull(et.getKey());
     assertEquals("Id", et.getKey().get(0).getName());
@@ -122,10 +122,10 @@ public class MetadataParserTest {
   @Test
   public void testComplexType() throws ODataException {
     // Test Complex Type
-    ComplexType ct = provider.getComplexType(new FullQualifiedName(NS, "City"));
+    CsdlComplexType ct = provider.getComplexType(new FullQualifiedName(NS, "City"));
     assertNotNull(ct);
     assertEquals(3, ct.getProperties().size());
-    Property p = ct.getProperties().get(0);
+    CsdlProperty p = ct.getProperties().get(0);
     assertEquals("CountryRegion", p.getName());
     assertEquals("Edm.String", p.getType());
     assertEquals(false, p.isNullable());
@@ -139,11 +139,11 @@ public class MetadataParserTest {
 
   @Test
   public void testEntitySet() throws Exception {
-    EntitySet es = provider.getEntitySet(NSF, "People");
+    CsdlEntitySet es = provider.getEntitySet(NSF, "People");
     assertNotNull(es);
     assertEquals("Microsoft.OData.SampleService.Models.TripPin.Person",es.getType());
 
-    List<NavigationPropertyBinding> bindings = es.getNavigationPropertyBindings();
+    List<CsdlNavigationPropertyBinding> bindings = es.getNavigationPropertyBindings();
     assertNotNull(bindings);
     assertEquals(6, bindings.size());
     assertEquals("Microsoft.OData.SampleService.Models.TripPin.Flight/From", bindings.get(2)
@@ -153,7 +153,7 @@ public class MetadataParserTest {
 
   @Test
   public void testFunctionImport() throws Exception {
-    FunctionImport fi = provider.getFunctionImport(NSF, "GetNearestAirport");
+    CsdlFunctionImport fi = provider.getFunctionImport(NSF, "GetNearestAirport");
     assertNotNull(fi);
     assertEquals("Microsoft.OData.SampleService.Models.TripPin.GetNearestAirport", fi.getFunction());
     assertEquals("Airports", fi.getEntitySet());
@@ -162,7 +162,7 @@ public class MetadataParserTest {
 
   @Test
   public void testActionImport() throws Exception {
-    ActionImport ai = provider.getActionImport(NSF, "ResetDataSource");
+    CsdlActionImport ai = provider.getActionImport(NSF, "ResetDataSource");
     assertNotNull(ai);
     assertEquals("Microsoft.OData.SampleService.Models.TripPin.ResetDataSource", ai.getAction());
     assertNull(ai.getEntitySet());
@@ -170,12 +170,12 @@ public class MetadataParserTest {
 
   @Test
   public void testSingleton() throws Exception {
-    Singleton single = this.provider.getSingleton(NSF, "Me");
+    CsdlSingleton single = this.provider.getSingleton(NSF, "Me");
     assertNotNull(single);
 
     assertEquals("Microsoft.OData.SampleService.Models.TripPin.Person",single.getType());
 
-    List<NavigationPropertyBinding> bindings = single.getNavigationPropertyBindings();
+    List<CsdlNavigationPropertyBinding> bindings = single.getNavigationPropertyBindings();
     assertNotNull(bindings);
     assertEquals(6, bindings.size());
     assertEquals("Microsoft.OData.SampleService.Models.TripPin.Flight/From", bindings.get(2).getPath());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
index 6156c1b..62f91fb 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
@@ -41,7 +41,7 @@ import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpPut;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
 import org.apache.olingo.commons.api.http.HttpMethod;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.ODataHttpHandler;
@@ -70,9 +70,9 @@ public class ServiceDispatcherTest {
 
   public class SampleODataServlet extends HttpServlet {
     private final ServiceHandler handler; // must be stateless
-    private final EdmProvider provider; // must be stateless
+    private final CsdlEdmProvider provider; // must be stateless
 
-    public SampleODataServlet(ServiceHandler handler, EdmProvider provider) {
+    public SampleODataServlet(ServiceHandler handler, CsdlEdmProvider provider) {
       this.handler = handler;
       this.provider = provider;
     }
@@ -92,7 +92,7 @@ public class ServiceDispatcherTest {
   
   public void beforeTest(ServiceHandler serviceHandler) throws Exception {
     MetadataParser parser = new MetadataParser();
-    EdmProvider edmProvider = parser.buildEdmProvider(new FileReader(
+    CsdlEdmProvider edmProvider = parser.buildEdmProvider(new FileReader(
         "src/test/resources/trippin.xml"));
 
     File baseDir = new File(System.getProperty("java.io.tmpdir"));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core-ext/src/test/java/org/apache/olingo/server/example/TripPinServlet.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/example/TripPinServlet.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/example/TripPinServlet.java
index 94295cd..fbc74ef 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/example/TripPinServlet.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/example/TripPinServlet.java
@@ -29,7 +29,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.xml.stream.XMLStreamException;
 
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
 import org.apache.olingo.server.api.OData;
 import org.apache.olingo.server.api.ODataHttpHandler;
 import org.apache.olingo.server.api.ServiceMetadata;
@@ -50,7 +50,7 @@ public class TripPinServlet extends HttpServlet {
   public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
     OData odata = OData4Impl.newInstance();
     MetadataParser parser = new MetadataParser();
-    EdmProvider edmProvider = null;
+    CsdlEdmProvider edmProvider = null;
 
     try {
       edmProvider = parser.buildEdmProvider(new FileReader("src/test/resources/trippin.xml"));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
index 80bed2f..29931a2 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataImpl.java
@@ -22,7 +22,7 @@ import java.util.List;
 
 import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
 import org.apache.olingo.commons.api.format.ODataFormat;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
 import org.apache.olingo.server.api.OData;
@@ -76,7 +76,7 @@ public class ODataImpl extends OData {
   }
 
   @Override
-  public ServiceMetadata createServiceMetadata(EdmProvider edmProvider, List<EdmxReference> references) {
+  public ServiceMetadata createServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references) {
     return new ServiceMetadataImpl(edmProvider, references);
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java
index ad8cbc4..86d6e5a 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ServiceMetadataImpl.java
@@ -20,7 +20,7 @@ package org.apache.olingo.server.core;
 
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
 import org.apache.olingo.commons.core.edm.EdmProviderImpl;
 import org.apache.olingo.server.api.edmx.EdmxReference;
 import org.apache.olingo.server.api.ServiceMetadata;
@@ -36,7 +36,7 @@ public class ServiceMetadataImpl implements ServiceMetadata {
   private final EdmProviderImpl edm;
   private final List<EdmxReference> references = new ArrayList<EdmxReference>();
 
-  public ServiceMetadataImpl(EdmProvider edmProvider, List<EdmxReference> references) {
+  public ServiceMetadataImpl(CsdlEdmProvider edmProvider, List<EdmxReference> references) {
     this.edm = new EdmProviderImpl(edmProvider);
     this.references.addAll(references);
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/AbstractEdmNamedTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/AbstractEdmNamedTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/AbstractEdmNamedTest.java
index efc75b7..14919b7 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/AbstractEdmNamedTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/AbstractEdmNamedTest.java
@@ -20,8 +20,8 @@ package org.apache.olingo.server.core.edm.provider;
 
 import org.apache.olingo.commons.api.edm.EdmAnnotatable;
 import org.apache.olingo.commons.api.edm.EdmNamed;
-import org.apache.olingo.commons.api.edm.provider.Annotatable;
-import org.apache.olingo.commons.api.edm.provider.Annotation;
+import org.apache.olingo.commons.api.edm.provider.CsdlAnnotatable;
+import org.apache.olingo.commons.api.edm.provider.CsdlAnnotation;
 import org.apache.olingo.commons.core.edm.AbstractEdmNamed;
 import org.junit.Test;
 
@@ -48,10 +48,10 @@ public class AbstractEdmNamedTest {
     }
   }
 
-  private class AnnoTester implements Annotatable {
+  private class AnnoTester implements CsdlAnnotatable {
     @Override
-    public List<Annotation> getAnnotations() {
-      Annotation annotation = new Annotation();
+    public List<CsdlAnnotation> getAnnotations() {
+      CsdlAnnotation annotation = new CsdlAnnotation();
       annotation.setTerm("NS.SimpleTerm");
       return Arrays.asList(annotation);
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
index a33fc6e..86bd9f4 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
@@ -37,9 +37,9 @@ import org.apache.olingo.commons.api.edm.EdmParameter;
 import org.apache.olingo.commons.api.edm.EdmSingleton;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
-import org.apache.olingo.commons.api.edm.provider.Action;
-import org.apache.olingo.commons.api.edm.provider.Parameter;
-import org.apache.olingo.commons.api.edm.provider.ReturnType;
+import org.apache.olingo.commons.api.edm.provider.CsdlAction;
+import org.apache.olingo.commons.api.edm.provider.CsdlParameter;
+import org.apache.olingo.commons.api.edm.provider.CsdlReturnType;
 import org.apache.olingo.commons.core.edm.EdmActionImpl;
 import org.apache.olingo.commons.core.edm.EdmProviderImpl;
 import org.junit.Before;
@@ -54,21 +54,21 @@ public class EdmActionImplTest {
   @Before
   public void setup() {
     EdmProviderImpl provider = mock(EdmProviderImpl.class);
-    List<Parameter> parameters = new ArrayList<Parameter>();
-    parameters.add(new Parameter().setName("Id").setType(new FullQualifiedName("namespace", "name")));
+    List<CsdlParameter> parameters = new ArrayList<CsdlParameter>();
+    parameters.add(new CsdlParameter().setName("Id").setType(new FullQualifiedName("namespace", "name")));
     FullQualifiedName action1Name = new FullQualifiedName("namespace", "action1");
-    Action action1 = new Action().setName("action1").setBound(true).setParameters(parameters);
+    CsdlAction action1 = new CsdlAction().setName("action1").setBound(true).setParameters(parameters);
     actionImpl1 = new EdmActionImpl(provider, action1Name, action1);
 
     FullQualifiedName action2Name = new FullQualifiedName("namespace", "action2");
     FullQualifiedName returnTypeName = new FullQualifiedName("Edm", "String");
-    ReturnType returnType = new ReturnType().setType(returnTypeName);
-    Action action2 = new Action().setName("action2").setParameters(parameters).setReturnType(returnType);
+    CsdlReturnType returnType = new CsdlReturnType().setType(returnTypeName);
+    CsdlAction action2 = new CsdlAction().setName("action2").setParameters(parameters).setReturnType(returnType);
     actionImpl2 = new EdmActionImpl(provider, action2Name, action2);
 
     FullQualifiedName action3Name = new FullQualifiedName("namespace", "action3");
-    Action action3 =
-        new Action().setName("action3").setParameters(parameters).setReturnType(returnType).setEntitySetPath(
+    CsdlAction action3 =
+        new CsdlAction().setName("action3").setParameters(parameters).setReturnType(returnType).setEntitySetPath(
             "path/Id");
     actionImpl3 = new EdmActionImpl(provider, action3Name, action3);
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
index a5d098d..02824f4 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
@@ -30,7 +30,7 @@ import org.apache.olingo.commons.api.edm.EdmEntityContainer;
 import org.apache.olingo.commons.api.edm.EdmEntitySet;
 import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.provider.ActionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
 import org.apache.olingo.commons.core.edm.EdmActionImportImpl;
 import org.apache.olingo.commons.core.edm.EdmProviderImpl;
 import org.junit.Before;
@@ -51,8 +51,8 @@ public class EdmActionImportImplTest {
     FullQualifiedName actionFqn = new FullQualifiedName("namespace", "actionName");
     FullQualifiedName entityContainerFqn = new FullQualifiedName("namespace", "containerName");
     String target = entityContainerFqn.getFullQualifiedNameAsString() + "/entitySetName";
-    ActionImport providerActionImport =
-        new ActionImport().setName("actionImportName").setAction(actionFqn).setEntitySet(target);
+    CsdlActionImport providerActionImport =
+        new CsdlActionImport().setName("actionImportName").setAction(actionFqn).setEntitySet(target);
 
     EdmProviderImpl edm = mock(EdmProviderImpl.class);
     container = mock(EdmEntityContainer.class);
@@ -85,7 +85,7 @@ public class EdmActionImportImplTest {
   @Test(expected = EdmException.class)
   public void getReturnedEntitySetNonExistingContainer() {
     String target = "alias.nonexisting/Es";
-    ActionImport providerActionImport = new ActionImport().setName("actionImportName").setEntitySet(target);
+    CsdlActionImport providerActionImport = new CsdlActionImport().setName("actionImportName").setEntitySet(target);
     EdmActionImport actionImport =
         new EdmActionImportImpl(mock(EdmProviderImpl.class), container, providerActionImport);
     actionImport.getReturnedEntitySet();
@@ -94,7 +94,7 @@ public class EdmActionImportImplTest {
   @Test(expected = EdmException.class)
   public void getReturnedEntitySetNonExistingEntitySet() {
     String target = "nonExisting";
-    ActionImport providerActionImport = new ActionImport().setName("actionImportName").setEntitySet(target);
+    CsdlActionImport providerActionImport = new CsdlActionImport().setName("actionImportName").setEntitySet(target);
     EdmProviderImpl edm = mock(EdmProviderImpl.class);
     when(edm.getEntityContainer(null)).thenReturn(container);
     EdmActionImport actionImport = new EdmActionImportImpl(edm, container, providerActionImport);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
index 87a7723..71b8d2b 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
@@ -23,10 +23,10 @@ import org.apache.olingo.commons.api.edm.EdmElement;
 import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.provider.ComplexType;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
-import org.apache.olingo.commons.api.edm.provider.NavigationProperty;
-import org.apache.olingo.commons.api.edm.provider.Property;
+import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlNavigationProperty;
+import org.apache.olingo.commons.api.edm.provider.CsdlProperty;
 import org.apache.olingo.commons.core.edm.EdmComplexTypeImpl;
 import org.apache.olingo.commons.core.edm.EdmProviderImpl;
 import org.junit.Before;
@@ -51,16 +51,16 @@ public class EdmComplexTypeImplTest {
 
   @Before
   public void setupTypes() throws Exception {
-    EdmProvider provider = mock(EdmProvider.class);
+    CsdlEdmProvider provider = mock(CsdlEdmProvider.class);
     EdmProviderImpl edm = new EdmProviderImpl(provider);
 
     FullQualifiedName baseName = new FullQualifiedName("namespace", "BaseTypeName");
-    ComplexType baseComplexType = new ComplexType();
-    List<Property> baseProperties = new ArrayList<Property>();
-    baseProperties.add(new Property().setName("prop1").setType(
+    CsdlComplexType baseComplexType = new CsdlComplexType();
+    List<CsdlProperty> baseProperties = new ArrayList<CsdlProperty>();
+    baseProperties.add(new CsdlProperty().setName("prop1").setType(
         EdmPrimitiveTypeKind.String.getFullQualifiedName()));
-    List<NavigationProperty> baseNavigationProperties = new ArrayList<NavigationProperty>();
-    baseNavigationProperties.add(new NavigationProperty().setName("nav1"));
+    List<CsdlNavigationProperty> baseNavigationProperties = new ArrayList<CsdlNavigationProperty>();
+    baseNavigationProperties.add(new CsdlNavigationProperty().setName("nav1"));
     baseComplexType.setName("BaseTypeName").setAbstract(false).setOpenType(false).setProperties(baseProperties)
         .setNavigationProperties(baseNavigationProperties);
     when(provider.getComplexType(baseName)).thenReturn(baseComplexType);
@@ -68,11 +68,11 @@ public class EdmComplexTypeImplTest {
     baseType = new EdmComplexTypeImpl(edm, baseName, baseComplexType);
 
     FullQualifiedName name = new FullQualifiedName("namespace", "typeName");
-    ComplexType complexType = new ComplexType().setBaseType(baseName);
-    List<Property> properties = new ArrayList<Property>();
-    properties.add(new Property().setName("prop2").setType(EdmPrimitiveTypeKind.String.getFullQualifiedName()));
-    List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
-    navigationProperties.add(new NavigationProperty().setName("nav2"));
+    CsdlComplexType complexType = new CsdlComplexType().setBaseType(baseName);
+    List<CsdlProperty> properties = new ArrayList<CsdlProperty>();
+    properties.add(new CsdlProperty().setName("prop2").setType(EdmPrimitiveTypeKind.String.getFullQualifiedName()));
+    List<CsdlNavigationProperty> navigationProperties = new ArrayList<CsdlNavigationProperty>();
+    navigationProperties.add(new CsdlNavigationProperty().setName("nav2"));
     complexType.setName("BaseTypeName").setAbstract(false).setOpenType(false).setProperties(properties)
         .setNavigationProperties(navigationProperties);
     when(provider.getComplexType(name)).thenReturn(complexType);
@@ -83,7 +83,7 @@ public class EdmComplexTypeImplTest {
   @Test
   public void noPropertiesAndNoNavPropertiesMustNotResultInException() {
     EdmProviderImpl edm = mock(EdmProviderImpl.class);
-    ComplexType complexType = new ComplexType().setName("n");
+    CsdlComplexType complexType = new CsdlComplexType().setName("n");
     new EdmComplexTypeImpl(edm, new FullQualifiedName("n", "n"), complexType);
   }
 
@@ -155,11 +155,11 @@ public class EdmComplexTypeImplTest {
 
   @Test(expected = EdmException.class)
   public void nonExistingBaseType() throws Exception {
-    EdmProvider provider = mock(EdmProvider.class);
+    CsdlEdmProvider provider = mock(CsdlEdmProvider.class);
     EdmProviderImpl edm = new EdmProviderImpl(provider);
     FullQualifiedName typeWithNonexistingBaseTypeName = new FullQualifiedName("namespace", "typeName");
-    ComplexType complexTypeForNonexistingBaseType =
-        new ComplexType().setBaseType(new FullQualifiedName("wrong", "wrong"));
+    CsdlComplexType complexTypeForNonexistingBaseType =
+        new CsdlComplexType().setBaseType(new FullQualifiedName("wrong", "wrong"));
     complexTypeForNonexistingBaseType.setName("typeName");
     when(provider.getComplexType(typeWithNonexistingBaseTypeName)).thenReturn(complexTypeForNonexistingBaseType);
     EdmComplexTypeImpl instance =

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
index 52713a3..471972f 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
@@ -37,14 +37,14 @@ import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.EdmFunctionImport;
 import org.apache.olingo.commons.api.edm.EdmSingleton;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.provider.AbstractEdmProvider;
-import org.apache.olingo.commons.api.edm.provider.ActionImport;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
-import org.apache.olingo.commons.api.edm.provider.EntityContainer;
-import org.apache.olingo.commons.api.edm.provider.EntityContainerInfo;
-import org.apache.olingo.commons.api.edm.provider.EntitySet;
-import org.apache.olingo.commons.api.edm.provider.FunctionImport;
-import org.apache.olingo.commons.api.edm.provider.Singleton;
+import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainerInfo;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntitySet;
+import org.apache.olingo.commons.api.edm.provider.CsdlFunctionImport;
+import org.apache.olingo.commons.api.edm.provider.CsdlSingleton;
 import org.apache.olingo.commons.core.edm.EdmEntityContainerImpl;
 import org.apache.olingo.commons.core.edm.EdmProviderImpl;
 import org.junit.Before;
@@ -56,10 +56,10 @@ public class EdmEntityContainerImplTest {
 
   @Before
   public void setup() {
-    EdmProvider provider = new CustomProvider();
+    CsdlEdmProvider provider = new CustomProvider();
     EdmProviderImpl edm = new EdmProviderImpl(provider);
-    EntityContainerInfo entityContainerInfo =
-        new EntityContainerInfo().setContainerName(new FullQualifiedName("space", "name"));
+    CsdlEntityContainerInfo entityContainerInfo =
+        new CsdlEntityContainerInfo().setContainerName(new FullQualifiedName("space", "name"));
     container = new EdmEntityContainerImpl(edm, provider, entityContainerInfo);
   }
 
@@ -125,15 +125,15 @@ public class EdmEntityContainerImplTest {
 
   @Test
   public void checkEdmExceptionConversion() throws Exception {
-    EdmProvider provider = mock(EdmProvider.class);
+    CsdlEdmProvider provider = mock(CsdlEdmProvider.class);
     FullQualifiedName containerName = new FullQualifiedName("space", "name");
     when(provider.getEntitySet(containerName, null)).thenThrow(new ODataException("msg"));
     when(provider.getSingleton(containerName, null)).thenThrow(new ODataException("msg"));
     when(provider.getFunctionImport(containerName, null)).thenThrow(new ODataException("msg"));
     when(provider.getActionImport(containerName, null)).thenThrow(new ODataException("msg"));
     EdmProviderImpl edm = new EdmProviderImpl(provider);
-    EntityContainerInfo entityContainerInfo =
-        new EntityContainerInfo().setContainerName(containerName);
+    CsdlEntityContainerInfo entityContainerInfo =
+        new CsdlEntityContainerInfo().setContainerName(containerName);
     EdmEntityContainer container = new EdmEntityContainerImpl(edm, provider, entityContainerInfo);
     boolean thrown = false;
     try {
@@ -232,64 +232,65 @@ public class EdmEntityContainerImplTest {
     assertNull(container.getEntitySet(null));
   }
 
-  private class CustomProvider extends AbstractEdmProvider {
+  private class CustomProvider extends CsdlAbstractEdmProvider {
     @Override
-    public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String entitySetName)
+    public CsdlEntitySet getEntitySet(final FullQualifiedName entityContainer, final String entitySetName)
         throws ODataException {
       if (entitySetName != null) {
-        return new EntitySet().setName("entitySetName");
+        return new CsdlEntitySet().setName("entitySetName");
       }
       return null;
     }
 
     @Override
-    public Singleton getSingleton(final FullQualifiedName entityContainer, final String singletonName)
+    public CsdlSingleton getSingleton(final FullQualifiedName entityContainer, final String singletonName)
         throws ODataException {
       if (singletonName != null) {
-        return new Singleton().setName("singletonName");
+        return new CsdlSingleton().setName("singletonName");
       }
       return null;
     }
 
     @Override
-    public ActionImport getActionImport(final FullQualifiedName entityContainer, final String actionImportName)
+    public CsdlActionImport getActionImport(final FullQualifiedName entityContainer, final String actionImportName)
         throws ODataException {
       if (actionImportName != null) {
-        return new ActionImport().setName("actionImportName");
+        return new CsdlActionImport().setName("actionImportName");
       }
       return null;
     }
 
     @Override
-    public FunctionImport getFunctionImport(final FullQualifiedName entityContainer, final String functionImportName)
+    public CsdlFunctionImport getFunctionImport(final FullQualifiedName entityContainer,
+                                                final String functionImportName)
         throws ODataException {
       if (functionImportName != null) {
-        return new FunctionImport().setName("functionImportName");
+        return new CsdlFunctionImport().setName("functionImportName");
       }
       return null;
     }
 
     @Override
-    public EntityContainer getEntityContainer() throws ODataException {
-      EntityContainer container = new EntityContainer();
-      List<EntitySet> entitySets = new ArrayList<EntitySet>();
-      entitySets.add(new EntitySet().setName("entitySetName"));
-      entitySets.add(new EntitySet().setName("entitySetName2"));
+    public CsdlEntityContainer getEntityContainer() throws ODataException {
+      CsdlEntityContainer container = new CsdlEntityContainer();
+      List<CsdlEntitySet> entitySets = new ArrayList<CsdlEntitySet>();
+      entitySets.add(new CsdlEntitySet().setName("entitySetName"));
+      entitySets.add(new CsdlEntitySet().setName("entitySetName2"));
       container.setEntitySets(entitySets);
 
-      List<Singleton> singletons = new ArrayList<Singleton>();
-      singletons.add(new Singleton().setName("singletonName"));
-      singletons.add(new Singleton().setName("singletonName2"));
+      List<CsdlSingleton> singletons = new ArrayList<CsdlSingleton>();
+      singletons.add(new CsdlSingleton().setName("singletonName"));
+      singletons.add(new CsdlSingleton().setName("singletonName2"));
       container.setSingletons(singletons);
 
-      List<ActionImport> actionImports = new ArrayList<ActionImport>();
-      actionImports.add(new ActionImport().setName("actionImportName"));
-      actionImports.add(new ActionImport().setName("actionImportName2"));
+      List<CsdlActionImport> actionImports = new ArrayList<CsdlActionImport>();
+      actionImports.add(new CsdlActionImport().setName("actionImportName"));
+      actionImports.add(new CsdlActionImport().setName("actionImportName2"));
       container.setActionImports(actionImports);
 
-      List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
-      functionImports.add(new FunctionImport().setName("functionImportName"));
-      functionImports.add(new FunctionImport().setName("functionImportName2"));
+      List<CsdlFunctionImport> functionImports = new ArrayList<CsdlFunctionImport>();
+      functionImports.add(new CsdlFunctionImport().setName("functionImportName"));
+      functionImports.add(new CsdlFunctionImport().setName("functionImportName2"));
       container.setFunctionImports(functionImports);
 
       return container;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2318953c/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
index 0071ddd..b80e59d 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
@@ -30,12 +30,12 @@ import org.apache.olingo.commons.api.edm.EdmEntityContainer;
 import org.apache.olingo.commons.api.edm.EdmEntitySet;
 import org.apache.olingo.commons.api.edm.EdmEntityType;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.provider.EdmProvider;
-import org.apache.olingo.commons.api.edm.provider.EntityContainerInfo;
-import org.apache.olingo.commons.api.edm.provider.EntitySet;
-import org.apache.olingo.commons.api.edm.provider.EntityType;
-import org.apache.olingo.commons.api.edm.provider.NavigationPropertyBinding;
-import org.apache.olingo.commons.api.edm.provider.PropertyRef;
+import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainerInfo;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntitySet;
+import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
+import org.apache.olingo.commons.api.edm.provider.CsdlNavigationPropertyBinding;
+import org.apache.olingo.commons.api.edm.provider.CsdlPropertyRef;
 import org.apache.olingo.commons.core.edm.EdmEntityContainerImpl;
 import org.apache.olingo.commons.core.edm.EdmEntitySetImpl;
 import org.apache.olingo.commons.core.edm.EdmProviderImpl;
@@ -45,27 +45,27 @@ public class EdmEntitySetImplTest {
 
   @Test
   public void entitySet() throws Exception {
-    EdmProvider provider = mock(EdmProvider.class);
+    CsdlEdmProvider provider = mock(CsdlEdmProvider.class);
     EdmProviderImpl edm = new EdmProviderImpl(provider);
 
     final FullQualifiedName typeName = new FullQualifiedName("ns", "entityType");
-    final EntityType entityTypeProvider = new EntityType()
+    final CsdlEntityType entityTypeProvider = new CsdlEntityType()
         .setName(typeName.getName())
-        .setKey(Arrays.asList(new PropertyRef().setName("Id")));
+        .setKey(Arrays.asList(new CsdlPropertyRef().setName("Id")));
     when(provider.getEntityType(typeName)).thenReturn(entityTypeProvider);
 
     final FullQualifiedName containerName = new FullQualifiedName("ns", "container");
-    final EntityContainerInfo containerInfo = new EntityContainerInfo().setContainerName(containerName);
+    final CsdlEntityContainerInfo containerInfo = new CsdlEntityContainerInfo().setContainerName(containerName);
     when(provider.getEntityContainerInfo(containerName)).thenReturn(containerInfo);
     final EdmEntityContainer entityContainer = new EdmEntityContainerImpl(edm, provider, containerInfo);
 
     final String entitySetName = "entitySet";
-    final EntitySet entitySetProvider = new EntitySet()
+    final CsdlEntitySet entitySetProvider = new CsdlEntitySet()
         .setName(entitySetName)
         .setType(typeName)
         .setIncludeInServiceDocument(true)
         .setNavigationPropertyBindings(Arrays.asList(
-            new NavigationPropertyBinding().setPath("path")
+            new CsdlNavigationPropertyBinding().setPath("path")
                 .setTarget(containerName.getFullQualifiedNameAsString() + "/" + entitySetName)));
     when(provider.getEntitySet(containerName, entitySetName)).thenReturn(entitySetProvider);
 


Mime
View raw message