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

[43/51] [partial] Refactored project structure

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmFunctionImport.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmFunctionImport.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmFunctionImport.java
deleted file mode 100644
index 62fcaae..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmFunctionImport.java
+++ /dev/null
@@ -1,311 +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.odata2.processor.core.jpa.model;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport.Multiplicity;
-import org.apache.olingo.odata2.api.annotation.edm.FunctionImport.ReturnType;
-import org.apache.olingo.odata2.api.annotation.edm.Parameter;
-import org.apache.olingo.odata2.api.edm.EdmMultiplicity;
-import org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind;
-import org.apache.olingo.odata2.api.edm.provider.ComplexType;
-import org.apache.olingo.odata2.api.edm.provider.EntityType;
-import org.apache.olingo.odata2.api.edm.provider.Facets;
-import org.apache.olingo.odata2.api.edm.provider.FunctionImport;
-import org.apache.olingo.odata2.api.edm.provider.FunctionImportParameter;
-import org.apache.olingo.odata2.api.edm.provider.Mapping;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmFunctionImportView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmMapping;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmSchemaView;
-import org.apache.olingo.odata2.processor.core.jpa.access.model.JPAEdmNameBuilder;
-import org.apache.olingo.odata2.processor.core.jpa.access.model.JPATypeConvertor;
-
-public class JPAEdmFunctionImport extends JPAEdmBaseViewImpl implements JPAEdmFunctionImportView {
-
-  private List<FunctionImport> consistentFunctionImportList = new ArrayList<FunctionImport>();
-  private JPAEdmBuilder builder = null;
-  private JPAEdmSchemaView schemaView;
-
-  public JPAEdmFunctionImport(final JPAEdmSchemaView view) {
-    super(view);
-    schemaView = view;
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmFunctionImportBuilder();
-    }
-    return builder;
-  }
-
-  @Override
-  public List<FunctionImport> getConsistentFunctionImportList() {
-    return consistentFunctionImportList;
-  }
-
-  protected class JPAEdmFunctionImportBuilder implements JPAEdmBuilder {
-
-    private JPAEdmEntityTypeView jpaEdmEntityTypeView = null;
-    private JPAEdmComplexTypeView jpaEdmComplexTypeView = null;
-
-    @Override
-    public void build() throws ODataJPAModelException, ODataJPARuntimeException {
-
-      HashMap<Class<?>, String[]> customOperations = schemaView.getRegisteredOperations();
-
-      jpaEdmEntityTypeView =
-          schemaView.getJPAEdmEntityContainerView().getJPAEdmEntitySetView().getJPAEdmEntityTypeView();
-      jpaEdmComplexTypeView = schemaView.getJPAEdmComplexTypeView();
-
-      if (customOperations != null) {
-
-        for (Class<?> clazz : customOperations.keySet()) {
-
-          String[] operationNames = customOperations.get(clazz);
-          Method[] methods = clazz.getMethods();
-          Method method = null;
-
-          int length = 0;
-          if (operationNames != null) {
-            length = operationNames.length;
-          } else {
-            length = methods.length;
-          }
-
-          boolean found = false;
-          for (int i = 0; i < length; i++) {
-
-            try {
-              if (operationNames != null) {
-                for (Method method2 : methods) {
-                  if (method2.getName().equals(operationNames[i])) {
-                    found = true;
-                    method = method2;
-                    break;
-                  }
-                }
-                if (found == true) {
-                  found = false;
-                } else {
-                  continue;
-                }
-              } else {
-                method = methods[i];
-              }
-
-              FunctionImport functionImport = buildFunctionImport(method);
-              if (functionImport != null) {
-                consistentFunctionImportList.add(functionImport);
-              }
-
-            } catch (SecurityException e) {
-              throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL, e);
-            }
-          }
-        }
-      }
-    }
-
-    private FunctionImport buildFunctionImport(final Method method) throws ODataJPAModelException {
-
-      org.apache.olingo.odata2.api.annotation.edm.FunctionImport annotation =
-          method.getAnnotation(org.apache.olingo.odata2.api.annotation.edm.FunctionImport.class);
-      if (annotation != null && annotation.returnType() != ReturnType.NONE) {
-        FunctionImport functionImport = new FunctionImport();
-
-        if (annotation.name().equals("")) {
-          functionImport.setName(method.getName());
-        } else {
-          functionImport.setName(annotation.name());
-        }
-
-        JPAEdmMapping mapping = new JPAEdmMappingImpl();
-        ((Mapping) mapping).setInternalName(method.getName());
-        mapping.setJPAType(method.getDeclaringClass());
-        functionImport.setMapping((Mapping) mapping);
-
-        functionImport.setHttpMethod(annotation.httpMethod().name().toString());
-
-        buildReturnType(functionImport, method, annotation);
-        buildParameter(functionImport, method);
-
-        return functionImport;
-      }
-      return null;
-    }
-
-    private void buildParameter(final FunctionImport functionImport, final Method method) 
-        throws ODataJPAModelException {
-
-      Annotation[][] annotations = method.getParameterAnnotations();
-      Class<?>[] parameterTypes = method.getParameterTypes();
-      List<FunctionImportParameter> funcImpList = new ArrayList<FunctionImportParameter>();
-      JPAEdmMapping mapping = null;
-      int j = 0;
-      for (Annotation[] annotationArr : annotations) {
-        Class<?> parameterType = parameterTypes[j++];
-
-        for (Annotation element : annotationArr) {
-          if (element instanceof Parameter) {
-            Parameter annotation = (Parameter) element;
-            FunctionImportParameter functionImportParameter = new FunctionImportParameter();
-            if (annotation.name().equals("")) {
-              throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_PARAM_NAME_EXP.addContent(method
-                  .getDeclaringClass().getName(), method.getName()), null);
-            } else {
-              functionImportParameter.setName(annotation.name());
-            }
-
-            functionImportParameter.setType(JPATypeConvertor.convertToEdmSimpleType(parameterType, null));
-            functionImportParameter.setMode(annotation.mode().toString());
-
-            Facets facets = new Facets();
-            if (annotation.facets().maxLength() > 0) {
-              facets.setMaxLength(annotation.facets().maxLength());
-            }
-            if (annotation.facets().nullable() == false) {
-              facets.setNullable(false);
-            } else {
-              facets.setNullable(true);
-            }
-
-            if (annotation.facets().precision() > 0) {
-              facets.setPrecision(annotation.facets().precision());
-            }
-            if (annotation.facets().scale() >= 0) {
-              facets.setScale(annotation.facets().scale());
-            }
-
-            functionImportParameter.setFacets(facets);
-            mapping = new JPAEdmMappingImpl();
-            mapping.setJPAType(parameterType);
-            functionImportParameter.setMapping((Mapping) mapping);
-            funcImpList.add(functionImportParameter);
-          }
-        }
-      }
-      if (!funcImpList.isEmpty()) {
-        functionImport.setParameters(funcImpList);
-      }
-    }
-
-    private void buildReturnType(final FunctionImport functionImport, final Method method,
-        final org.apache.olingo.odata2.api.annotation.edm.FunctionImport annotation) throws ODataJPAModelException {
-      ReturnType returnType = annotation.returnType();
-      Multiplicity multiplicity = null;
-
-      if (returnType != ReturnType.NONE) {
-        org.apache.olingo.odata2.api.edm.provider.ReturnType functionReturnType =
-            new org.apache.olingo.odata2.api.edm.provider.ReturnType();
-        multiplicity = annotation.multiplicity();
-
-        if (multiplicity == Multiplicity.MANY) {
-          functionReturnType.setMultiplicity(EdmMultiplicity.MANY);
-        } else {
-          functionReturnType.setMultiplicity(EdmMultiplicity.ONE);
-        }
-
-        if (returnType == ReturnType.ENTITY_TYPE) {
-          String entitySet = annotation.entitySet();
-          if (entitySet.equals("")) {
-            throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_ENTITYSET_EXP, null);
-          }
-          functionImport.setEntitySet(entitySet);
-        }
-
-        Class<?> methodReturnType = method.getReturnType();
-        if (methodReturnType == null || methodReturnType.getName().equals("void")) {
-          throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_RETURN_TYPE_EXP.addContent(method
-              .getDeclaringClass(), method.getName()), null);
-        }
-        switch (returnType) {
-        case ENTITY_TYPE:
-          EntityType edmEntityType = null;
-          if (multiplicity == Multiplicity.ONE) {
-            edmEntityType = jpaEdmEntityTypeView.searchEdmEntityType(methodReturnType.getSimpleName());
-          } else if (multiplicity == Multiplicity.MANY) {
-            edmEntityType = jpaEdmEntityTypeView.searchEdmEntityType(getReturnTypeSimpleName(method));
-          }
-
-          if (edmEntityType == null) {
-            throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_RETURN_TYPE_ENTITY_NOT_FOUND
-                .addContent(method.getDeclaringClass(), method.getName(), methodReturnType.getSimpleName()), null);
-          }
-          functionReturnType.setTypeName(JPAEdmNameBuilder.build(schemaView, edmEntityType.getName()));
-          break;
-        case SCALAR:
-
-          EdmSimpleTypeKind edmSimpleTypeKind = JPATypeConvertor.convertToEdmSimpleType(methodReturnType, null);
-          functionReturnType.setTypeName(edmSimpleTypeKind.getFullQualifiedName());
-
-          break;
-        case COMPLEX_TYPE:
-          ComplexType complexType = null;
-          if (multiplicity == Multiplicity.ONE) {
-            complexType = jpaEdmComplexTypeView.searchEdmComplexType(methodReturnType.getName());
-          } else if (multiplicity == Multiplicity.MANY) {
-            complexType = jpaEdmComplexTypeView.searchEdmComplexType(getReturnTypeName(method));
-          }
-          if (complexType == null) {
-            throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_RETURN_TYPE_ENTITY_NOT_FOUND
-                .addContent(method.getDeclaringClass(), method.getName(), methodReturnType.getSimpleName()), null);
-          }
-          functionReturnType.setTypeName(JPAEdmNameBuilder.build(schemaView, complexType.getName()));
-          break;
-        default:
-          break;
-        }
-        functionImport.setReturnType(functionReturnType);
-      }
-    }
-
-    private String getReturnTypeName(final Method method) {
-      try {
-        ParameterizedType pt = (ParameterizedType) method.getGenericReturnType();
-        Type t = pt.getActualTypeArguments()[0];
-        return ((Class<?>) t).getName();
-      } catch (ClassCastException e) {
-        return method.getReturnType().getName();
-      }
-    }
-
-    private String getReturnTypeSimpleName(final Method method) {
-      try {
-        ParameterizedType pt = (ParameterizedType) method.getGenericReturnType();
-        Type t = pt.getActualTypeArguments()[0];
-        return ((Class<?>) t).getSimpleName();
-      } catch (ClassCastException e) {
-        return method.getReturnType().getSimpleName();
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmKey.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmKey.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmKey.java
deleted file mode 100644
index 15cd26e..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmKey.java
+++ /dev/null
@@ -1,129 +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.odata2.processor.core.jpa.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.edm.provider.ComplexProperty;
-import org.apache.olingo.odata2.api.edm.provider.ComplexType;
-import org.apache.olingo.odata2.api.edm.provider.Facets;
-import org.apache.olingo.odata2.api.edm.provider.Key;
-import org.apache.olingo.odata2.api.edm.provider.Property;
-import org.apache.olingo.odata2.api.edm.provider.PropertyRef;
-import org.apache.olingo.odata2.api.edm.provider.SimpleProperty;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmKeyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmPropertyView;
-
-public class JPAEdmKey extends JPAEdmBaseViewImpl implements JPAEdmKeyView {
-
-  private JPAEdmPropertyView propertyView;
-  private JPAEdmComplexTypeView complexTypeView = null;
-  private boolean isBuildModeComplexType = false;
-  private Key key;
-
-  public JPAEdmKey(final JPAEdmProperty view) {
-    super(view);
-    propertyView = view;
-  }
-
-  public JPAEdmKey(final JPAEdmComplexTypeView complexTypeView, final JPAEdmPropertyView propertyView) {
-    super(complexTypeView);
-    this.propertyView = propertyView;
-    this.complexTypeView = complexTypeView;
-    isBuildModeComplexType = true;
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmKeyBuider();
-    }
-
-    return builder;
-  }
-
-  @Override
-  public Key getEdmKey() {
-    return key;
-  }
-
-  private class JPAEdmKeyBuider implements JPAEdmBuilder {
-
-    @Override
-    public void build() throws ODataJPAModelException {
-
-      List<PropertyRef> propertyRefList = null;
-      if (key == null) {
-        key = new Key();
-      }
-
-      if (key.getKeys() == null) {
-        propertyRefList = new ArrayList<PropertyRef>();
-        key.setKeys(propertyRefList);
-      } else {
-        propertyRefList = key.getKeys();
-      }
-
-      if (isBuildModeComplexType) {
-        ComplexType complexType =
-            complexTypeView.searchEdmComplexType(propertyView.getJPAAttribute().getJavaType().getName());
-        normalizeComplexKey(complexType, propertyRefList);
-      } else {
-        PropertyRef propertyRef = new PropertyRef();
-        propertyRef.setName(propertyView.getEdmSimpleProperty().getName());
-        Facets facets = (Facets) propertyView.getEdmSimpleProperty().getFacets();
-        if (facets == null) {
-          propertyView.getEdmSimpleProperty().setFacets(new Facets().setNullable(false));
-        } else {
-          facets.setNullable(false);
-        }
-        propertyRefList.add(propertyRef);
-      }
-
-    }
-
-    // TODO think how to stop the recursion if A includes B and B includes A!!!!!!
-    public void normalizeComplexKey(final ComplexType complexType, final List<PropertyRef> propertyRefList) {
-      for (Property property : complexType.getProperties()) {
-        try {
-
-          SimpleProperty simpleProperty = (SimpleProperty) property;
-          Facets facets = (Facets) simpleProperty.getFacets();
-          if (facets == null) {
-            simpleProperty.setFacets(new Facets().setNullable(false));
-          } else {
-            facets.setNullable(false);
-          }
-          PropertyRef propertyRef = new PropertyRef();
-          propertyRef.setName(simpleProperty.getName());
-          propertyRefList.add(propertyRef);
-
-        } catch (ClassCastException e) {
-          ComplexProperty complexProperty = (ComplexProperty) property;
-          normalizeComplexKey(complexTypeView.searchEdmComplexType(complexProperty.getType()), propertyRefList);
-        }
-
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmMappingImpl.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmMappingImpl.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmMappingImpl.java
deleted file mode 100644
index 99d9f5f..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmMappingImpl.java
+++ /dev/null
@@ -1,51 +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.odata2.processor.core.jpa.model;
-
-import org.apache.olingo.odata2.api.edm.provider.Mapping;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmMapping;
-
-public class JPAEdmMappingImpl extends Mapping implements JPAEdmMapping {
-
-  private String columnName = null;
-  private Class<?> type = null;
-
-  @Override
-  public void setJPAColumnName(final String name) {
-    columnName = name;
-
-  }
-
-  @Override
-  public String getJPAColumnName() {
-    return columnName;
-  }
-
-  @Override
-  public void setJPAType(final Class<?> type) {
-    this.type = type;
-
-  }
-
-  @Override
-  public Class<?> getJPAType() {
-    return type;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmModel.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmModel.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmModel.java
deleted file mode 100644
index fac5614..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmModel.java
+++ /dev/null
@@ -1,65 +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.odata2.processor.core.jpa.model;
-
-import javax.persistence.metamodel.Metamodel;
-
-import org.apache.olingo.odata2.processor.api.jpa.ODataJPAContext;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmModelView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmSchemaView;
-
-public class JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView {
-
-  protected JPAEdmSchemaView schemaView;
-
-  public JPAEdmModel(final Metamodel metaModel, final String pUnitName) {
-    super(metaModel, pUnitName);
-  }
-
-  public JPAEdmModel(final ODataJPAContext ctx) {
-    super(ctx);
-  }
-
-  @Override
-  public JPAEdmSchemaView getEdmSchemaView() {
-    return schemaView;
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmModelBuilder();
-    }
-
-    return builder;
-  }
-
-  private class JPAEdmModelBuilder implements JPAEdmBuilder {
-
-    @Override
-    public void build() throws ODataJPAModelException, ODataJPARuntimeException {
-      schemaView = new JPAEdmSchema(JPAEdmModel.this);
-      schemaView.getBuilder().build();
-    }
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmNavigationProperty.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmNavigationProperty.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmNavigationProperty.java
deleted file mode 100644
index 6070b31..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmNavigationProperty.java
+++ /dev/null
@@ -1,98 +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.odata2.processor.core.jpa.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.edm.provider.NavigationProperty;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmNavigationPropertyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmPropertyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmSchemaView;
-import org.apache.olingo.odata2.processor.core.jpa.access.model.JPAEdmNameBuilder;
-
-public class JPAEdmNavigationProperty extends JPAEdmBaseViewImpl implements JPAEdmNavigationPropertyView {
-
-  private JPAEdmAssociationView associationView = null;
-  private NavigationProperty currentNavigationProperty = null;
-  private JPAEdmPropertyView propertyView = null;
-  private List<NavigationProperty> consistentNavigationProperties = null;
-  private int count;
-
-  public JPAEdmNavigationProperty(final JPAEdmAssociationView associationView, final JPAEdmPropertyView propertyView,
-      final int countNumber) {
-    super(associationView);
-    this.associationView = associationView;
-    this.propertyView = propertyView;
-    count = countNumber;
-    if (consistentNavigationProperties == null) {
-      consistentNavigationProperties = new ArrayList<NavigationProperty>();
-    }
-  }
-
-  public JPAEdmNavigationProperty(final JPAEdmSchemaView schemaView) {
-    super(schemaView);
-    consistentNavigationProperties = new ArrayList<NavigationProperty>();
-
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmNavigationPropertyBuilder();
-    }
-
-    return builder;
-  }
-
-  private class JPAEdmNavigationPropertyBuilder implements JPAEdmBuilder {
-
-    @Override
-    public void build() throws ODataJPAModelException {
-
-      currentNavigationProperty = new NavigationProperty();
-      JPAEdmNameBuilder.build(associationView, propertyView, JPAEdmNavigationProperty.this, count);
-      consistentNavigationProperties.add(currentNavigationProperty);
-    }
-
-  }
-
-  @Override
-  public NavigationProperty getEdmNavigationProperty() {
-    return currentNavigationProperty;
-  }
-
-  @Override
-  public List<NavigationProperty> getConsistentEdmNavigationProperties() {
-    return consistentNavigationProperties;
-  }
-
-  @Override
-  public void addJPAEdmNavigationPropertyView(final JPAEdmNavigationPropertyView view) {
-    if (view != null && view.isConsistent()) {
-      currentNavigationProperty = view.getEdmNavigationProperty();
-      consistentNavigationProperties.add(currentNavigationProperty);
-
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmProperty.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmProperty.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmProperty.java
deleted file mode 100644
index 28cc7ce..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmProperty.java
+++ /dev/null
@@ -1,378 +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.odata2.processor.core.jpa.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.persistence.metamodel.Attribute;
-import javax.persistence.metamodel.Attribute.PersistentAttributeType;
-import javax.persistence.metamodel.PluralAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-
-import org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind;
-import org.apache.olingo.odata2.api.edm.FullQualifiedName;
-import org.apache.olingo.odata2.api.edm.provider.ComplexProperty;
-import org.apache.olingo.odata2.api.edm.provider.ComplexType;
-import org.apache.olingo.odata2.api.edm.provider.Property;
-import org.apache.olingo.odata2.api.edm.provider.SimpleProperty;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmMappingModelAccess;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationEndView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexPropertyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmKeyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmNavigationPropertyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmPropertyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmSchemaView;
-import org.apache.olingo.odata2.processor.core.jpa.access.model.JPAEdmNameBuilder;
-import org.apache.olingo.odata2.processor.core.jpa.access.model.JPATypeConvertor;
-
-public class JPAEdmProperty extends JPAEdmBaseViewImpl implements
-    JPAEdmPropertyView, JPAEdmComplexPropertyView {
-
-  private JPAEdmSchemaView schemaView;
-  private JPAEdmEntityTypeView entityTypeView;
-  private JPAEdmComplexTypeView complexTypeView;
-  private JPAEdmNavigationPropertyView navigationPropertyView = null;
-
-  private JPAEdmKeyView keyView;
-  private List<Property> properties;
-  private SimpleProperty currentSimpleProperty = null;
-  private ComplexProperty currentComplexProperty = null;
-  private Attribute<?, ?> currentAttribute;
-  private boolean isBuildModeComplexType;
-  private Map<String, Integer> associationCount;
-
-  public JPAEdmProperty(final JPAEdmSchemaView view) {
-    super(view);
-    schemaView = view;
-    entityTypeView = schemaView.getJPAEdmEntityContainerView()
-        .getJPAEdmEntitySetView().getJPAEdmEntityTypeView();
-    complexTypeView = schemaView.getJPAEdmComplexTypeView();
-    navigationPropertyView = new JPAEdmNavigationProperty(schemaView);
-    isBuildModeComplexType = false;
-    associationCount = new HashMap<String, Integer>();
-  }
-
-  public JPAEdmProperty(final JPAEdmSchemaView schemaView,
-      final JPAEdmComplexTypeView view) {
-    super(view);
-    this.schemaView = schemaView;
-    complexTypeView = view;
-    isBuildModeComplexType = true;
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmPropertyBuilder();
-    }
-
-    return builder;
-  }
-
-  @Override
-  public List<Property> getEdmPropertyList() {
-    return properties;
-  }
-
-  @Override
-  public JPAEdmKeyView getJPAEdmKeyView() {
-    return keyView;
-  }
-
-  @Override
-  public SimpleProperty getEdmSimpleProperty() {
-    return currentSimpleProperty;
-  }
-
-  @Override
-  public Attribute<?, ?> getJPAAttribute() {
-    return currentAttribute;
-  }
-
-  @Override
-  public ComplexProperty getEdmComplexProperty() {
-    return currentComplexProperty;
-  }
-
-  @Override
-  public JPAEdmNavigationPropertyView getJPAEdmNavigationPropertyView() {
-    return navigationPropertyView;
-  }
-
-  private class JPAEdmPropertyBuilder implements JPAEdmBuilder {
-    /*
-     * 
-     * Each call to build method creates a new EDM Property List.
-     * The Property List can be created either by an Entity type or
-     * ComplexType. The flag isBuildModeComplexType tells if the
-     * Properties are built for complex type or for Entity Type.
-     * 
-     * While Building Properties Associations are built. However
-     * the associations thus built does not contain Referential
-     * constraint. Associations thus built only contains
-     * information about Referential constraints. Adding of
-     * referential constraints to Associations is the taken care
-     * by Schema.
-     * 
-     * Building Properties is divided into four parts
-     * A) Building Simple Properties
-     * B) Building Complex Properties
-     * C) Building Associations
-     * D) Building Navigation Properties
-     * 
-     * ************************************************************
-     * Build EDM Schema - STEPS
-     * ************************************************************
-     * A) Building Simple Properties:
-     * 
-     * 1) Fetch JPA Attribute List from
-     * A) Complex Type
-     * B) Entity Type
-     * depending on isBuildModeComplexType.
-     * B) Building Complex Properties
-     * C) Building Associations
-     * D) Building Navigation Properties
-     * 
-     * ************************************************************
-     * Build EDM Schema - STEPS
-     * ************************************************************
-     */
-    @Override
-    public void build() throws ODataJPAModelException, ODataJPARuntimeException {
-
-      JPAEdmBuilder keyViewBuilder = null;
-
-      properties = new ArrayList<Property>();
-
-      List<Attribute<?, ?>> jpaAttributes = null;
-      String currentEntityName = null;
-      String targetEntityName = null;
-      String entityTypeName = null;
-      if (isBuildModeComplexType) {
-        jpaAttributes = sortInAscendingOrder(complexTypeView.getJPAEmbeddableType()
-            .getAttributes());
-        entityTypeName = complexTypeView.getJPAEmbeddableType().getJavaType()
-            .getSimpleName();
-      } else {
-        jpaAttributes = sortInAscendingOrder(entityTypeView.getJPAEntityType()
-            .getAttributes());
-        entityTypeName = entityTypeView.getJPAEntityType().getName();
-      }
-
-      for (Object jpaAttribute : jpaAttributes) {
-        currentAttribute = (Attribute<?, ?>) jpaAttribute;
-
-        // Check for need to Exclude
-        if (isExcluded((JPAEdmPropertyView) JPAEdmProperty.this, entityTypeName, currentAttribute.getName())) {
-          continue;
-        }
-
-        PersistentAttributeType attributeType = currentAttribute
-            .getPersistentAttributeType();
-
-        switch (attributeType) {
-        case BASIC:
-
-          currentSimpleProperty = new SimpleProperty();
-          JPAEdmNameBuilder
-              .build((JPAEdmPropertyView) JPAEdmProperty.this, isBuildModeComplexType);
-
-          EdmSimpleTypeKind simpleTypeKind = JPATypeConvertor
-              .convertToEdmSimpleType(currentAttribute
-                  .getJavaType(), currentAttribute);
-
-          currentSimpleProperty.setType(simpleTypeKind);
-          JPAEdmFacets.setFacets(currentAttribute, currentSimpleProperty);
-
-          properties.add(currentSimpleProperty);
-
-          if (((SingularAttribute<?, ?>) currentAttribute).isId()) {
-            if (keyView == null) {
-              keyView = new JPAEdmKey(JPAEdmProperty.this);
-              keyViewBuilder = keyView.getBuilder();
-            }
-
-            keyViewBuilder.build();
-          }
-
-          break;
-        case EMBEDDED:
-          ComplexType complexType = complexTypeView
-              .searchEdmComplexType(currentAttribute.getJavaType().getName());
-
-          if (complexType == null) {
-            JPAEdmComplexTypeView complexTypeViewLocal = new JPAEdmComplexType(
-                schemaView, currentAttribute);
-            complexTypeViewLocal.getBuilder().build();
-            complexType = complexTypeViewLocal.getEdmComplexType();
-            complexTypeView.addJPAEdmCompleTypeView(complexTypeViewLocal);
-
-          }
-
-          if (isBuildModeComplexType == false
-              && entityTypeView.getJPAEntityType().getIdType()
-                  .getJavaType()
-                  .equals(currentAttribute.getJavaType())) {
-
-            if (keyView == null) {
-              keyView = new JPAEdmKey(complexTypeView,
-                  JPAEdmProperty.this);
-            }
-            keyView.getBuilder().build();
-            complexTypeView.expandEdmComplexType(complexType, properties, currentAttribute.getName());
-          } else {
-            currentComplexProperty = new ComplexProperty();
-            if (isBuildModeComplexType) {
-              JPAEdmNameBuilder
-                  .build((JPAEdmComplexPropertyView) JPAEdmProperty.this,
-                      complexTypeView.getJPAEmbeddableType().getJavaType().getSimpleName());
-            } else {
-              JPAEdmNameBuilder
-                  .build((JPAEdmComplexPropertyView) JPAEdmProperty.this,
-                      JPAEdmProperty.this);
-            }
-            currentComplexProperty.setType(new FullQualifiedName(
-                schemaView.getEdmSchema().getNamespace(),
-                complexType.getName()));
-
-            properties.add(currentComplexProperty);
-            List<String> nonKeyComplexTypes = schemaView.getNonKeyComplexTypeList();
-            if (!nonKeyComplexTypes.contains(currentComplexProperty.getType().getName()))
-            {
-              schemaView.addNonKeyComplexName(currentComplexProperty.getType().getName());
-            }
-          }
-
-          break;
-        case MANY_TO_MANY:
-        case ONE_TO_MANY:
-        case ONE_TO_ONE:
-        case MANY_TO_ONE:
-
-          JPAEdmAssociationEndView associationEndView = new JPAEdmAssociationEnd(entityTypeView, JPAEdmProperty.this);
-          associationEndView.getBuilder().build();
-          JPAEdmAssociationView associationView = schemaView.getJPAEdmAssociationView();
-          if (associationView.searchAssociation(associationEndView) == null) {
-            int count = associationView.getNumberOfAssociationsWithSimilarEndPoints(associationEndView);
-            JPAEdmAssociationView associationViewLocal =
-                new JPAEdmAssociation(associationEndView, entityTypeView, JPAEdmProperty.this, count);
-            associationViewLocal.getBuilder().build();
-            associationView.addJPAEdmAssociationView(associationViewLocal, associationEndView);
-          }
-
-          JPAEdmReferentialConstraintView refConstraintView = new JPAEdmReferentialConstraint(
-              associationView, entityTypeView, JPAEdmProperty.this);
-          refConstraintView.getBuilder().build();
-
-          if (refConstraintView.isExists()) {
-            associationView.addJPAEdmRefConstraintView(refConstraintView);
-          }
-
-          if (navigationPropertyView == null) {
-            navigationPropertyView = new JPAEdmNavigationProperty(schemaView);
-          }
-          currentEntityName = entityTypeView.getJPAEntityType().getName();
-
-          if (currentAttribute.isCollection()) {
-            targetEntityName = ((PluralAttribute<?, ?, ?>) currentAttribute).getElementType().getJavaType()
-                .getSimpleName();
-          } else {
-            targetEntityName = currentAttribute.getJavaType().getSimpleName();
-          }
-          Integer sequenceNumber = associationCount.get(currentEntityName + targetEntityName);
-          if (sequenceNumber == null) {
-            sequenceNumber = new Integer(1);
-          } else {
-            sequenceNumber = new Integer(sequenceNumber.intValue() + 1);
-          }
-          associationCount.put(currentEntityName + targetEntityName, sequenceNumber);
-          JPAEdmNavigationPropertyView localNavigationPropertyView =
-              new JPAEdmNavigationProperty(associationView, JPAEdmProperty.this, sequenceNumber.intValue());
-          localNavigationPropertyView.getBuilder().build();
-          navigationPropertyView.addJPAEdmNavigationPropertyView(localNavigationPropertyView);
-          break;
-        default:
-          break;
-        }
-      }
-
-    }
-
-    @SuppressWarnings("rawtypes")
-    private List<Attribute<?, ?>> sortInAscendingOrder(final Set<?> jpaAttributes) {
-      List<Attribute<?, ?>> jpaAttributeList = new ArrayList<Attribute<?, ?>>();
-      Iterator itr = null;
-      Attribute<?, ?> smallestJpaAttribute;
-      Attribute<?, ?> currentJpaAttribute;
-      while (!jpaAttributes.isEmpty()) {
-        itr = jpaAttributes.iterator();
-        smallestJpaAttribute = (Attribute<?, ?>) itr.next();
-        while (itr.hasNext()) {
-          currentJpaAttribute = (Attribute<?, ?>) itr.next();
-          if (smallestJpaAttribute.getName().compareTo(currentJpaAttribute.getName()) > 0) {
-            smallestJpaAttribute = currentJpaAttribute;
-          }
-        }
-        jpaAttributeList.add(smallestJpaAttribute);
-        jpaAttributes.remove(smallestJpaAttribute);
-      }
-      return jpaAttributeList;
-    }
-  }
-
-  @Override
-  public JPAEdmEntityTypeView getJPAEdmEntityTypeView() {
-    return entityTypeView;
-  }
-
-  @Override
-  public JPAEdmComplexTypeView getJPAEdmComplexTypeView() {
-    return complexTypeView;
-  }
-
-  private boolean isExcluded(final JPAEdmPropertyView jpaEdmPropertyView, final String jpaEntityTypeName,
-      final String jpaAttributeName) {
-    JPAEdmMappingModelAccess mappingModelAccess = jpaEdmPropertyView
-        .getJPAEdmMappingModelAccess();
-    boolean isExcluded = false;
-    if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) {
-      // Exclusion of a simple property in a complex type
-      if (isBuildModeComplexType
-          && mappingModelAccess.checkExclusionOfJPAEmbeddableAttributeType(jpaEntityTypeName, jpaAttributeName)
-          // Exclusion of a simple property of an Entity Type
-          || (!isBuildModeComplexType && mappingModelAccess.checkExclusionOfJPAAttributeType(jpaEntityTypeName,
-              jpaAttributeName))) {
-        isExcluded = true;
-      }
-    }
-    return isExcluded;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraint.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraint.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraint.java
deleted file mode 100644
index 2888a9a..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraint.java
+++ /dev/null
@@ -1,147 +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.odata2.processor.core.jpa.model;
-
-import org.apache.olingo.odata2.api.edm.provider.ReferentialConstraint;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmPropertyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintRoleView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintRoleView.RoleType;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintView;
-
-public class JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView {
-
-  private JPAEdmRefConstraintBuilder builder = null;
-
-  private boolean exists = false;
-  private boolean firstBuild = true;
-
-  private JPAEdmAssociationView associationView;
-  private JPAEdmPropertyView propertyView;
-  private JPAEdmEntityTypeView entityTypeView;
-
-  private ReferentialConstraint referentialConstraint;
-
-  private JPAEdmReferentialConstraintRoleView principalRoleView;
-  private JPAEdmReferentialConstraintRoleView dependentRoleView;
-
-  private String relationShipName;
-
-  public JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView,
-      final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView) {
-    super(associationView);
-    this.associationView = associationView;
-    this.propertyView = propertyView;
-    this.entityTypeView = entityTypeView;
-
-    relationShipName = associationView.getEdmAssociation().getName();
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmRefConstraintBuilder();
-    }
-
-    return builder;
-  }
-
-  @Override
-  public ReferentialConstraint getEdmReferentialConstraint() {
-    return referentialConstraint;
-  }
-
-  @Override
-  public boolean isExists() {
-    return exists;
-  }
-
-  @Override
-  public String getEdmRelationShipName() {
-    return relationShipName;
-  }
-
-  private class JPAEdmRefConstraintBuilder implements JPAEdmBuilder {
-    /*
-     * Check if Ref Constraint was already Built. If Ref constraint was
-     * already built consistently then do not build referential constraint.
-     * 
-     * For Ref Constraint to be consistently built Principal and Dependent
-     * roles must be consistently built. If Principal or Dependent roles are
-     * not consistently built then try building them again.
-     * 
-     * The Principal and Dependent roles could be have been built
-     * inconsistently if the required EDM Entity Types or EDM properties are
-     * yet to be built. In such cases rebuilding these roles would make them
-     * consistent.
-     */
-    @Override
-    public void build() throws ODataJPAModelException, ODataJPARuntimeException {
-
-      if (firstBuild) {
-        firstBuild();
-      } else {
-        if (exists && !firstBuild && principalRoleView.isConsistent() == false) {
-          principalRoleView.getBuilder().build();
-        }
-
-        if (exists && !firstBuild && dependentRoleView.isConsistent() == false) {
-          dependentRoleView.getBuilder().build();
-        }
-      }
-
-      if (principalRoleView.isConsistent()) {
-        referentialConstraint.setPrincipal(principalRoleView.getEdmReferentialConstraintRole());
-      }
-
-      if (dependentRoleView.isConsistent()) {
-        referentialConstraint.setDependent(dependentRoleView.getEdmReferentialConstraintRole());
-      }
-
-      exists = principalRoleView.isExists() & dependentRoleView.isExists();
-
-      isConsistent = principalRoleView.isConsistent() & dependentRoleView.isConsistent();
-
-    }
-
-    private void firstBuild() throws ODataJPAModelException, ODataJPARuntimeException {
-      firstBuild = false;
-      if (principalRoleView == null && dependentRoleView == null) {
-
-        principalRoleView =
-            new JPAEdmReferentialConstraintRole(RoleType.PRINCIPAL, entityTypeView, propertyView, associationView);
-        principalRoleView.getBuilder().build();
-
-        dependentRoleView =
-            new JPAEdmReferentialConstraintRole(RoleType.DEPENDENT, entityTypeView, propertyView, associationView);
-        dependentRoleView.getBuilder().build();
-
-        if (referentialConstraint == null) {
-          referentialConstraint = new ReferentialConstraint();
-        }
-      }
-
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraintRole.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraintRole.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraintRole.java
deleted file mode 100644
index 3761d4b..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmReferentialConstraintRole.java
+++ /dev/null
@@ -1,258 +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.odata2.processor.core.jpa.model;
-
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
-import javax.persistence.metamodel.Attribute;
-
-import org.apache.olingo.odata2.api.edm.provider.Association;
-import org.apache.olingo.odata2.api.edm.provider.AssociationEnd;
-import org.apache.olingo.odata2.api.edm.provider.EntityType;
-import org.apache.olingo.odata2.api.edm.provider.Property;
-import org.apache.olingo.odata2.api.edm.provider.PropertyRef;
-import org.apache.olingo.odata2.api.edm.provider.ReferentialConstraintRole;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmMapping;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmPropertyView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmReferentialConstraintRoleView;
-
-public class JPAEdmReferentialConstraintRole extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintRoleView {
-  /*
-   * Static Buffer
-   */
-  private static Attribute<?, ?> bufferedJPAAttribute = null;
-  private static ArrayList<JoinColumn> bufferedJoinColumns = new ArrayList<JoinColumn>();
-  /*
-   * Static Buffer
-   */
-
-  private boolean firstBuild = true;
-
-  private JPAEdmEntityTypeView entityTypeView;
-  private JPAEdmReferentialConstraintRoleView.RoleType roleType;
-
-  private Attribute<?, ?> jpaAttribute;
-  private ArrayList<String> jpaColumnNames;
-  private Association association;
-
-  private boolean roleExists = false;
-
-  private JPAEdmRefConstraintRoleBuilder builder;
-  private ReferentialConstraintRole currentRole;
-
-  public JPAEdmReferentialConstraintRole(final JPAEdmReferentialConstraintRoleView.RoleType roleType,
-      final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView,
-      final JPAEdmAssociationView associationView) {
-
-    super(entityTypeView);
-    this.entityTypeView = entityTypeView;
-    this.roleType = roleType;
-
-    jpaAttribute = propertyView.getJPAAttribute();
-    association = associationView.getEdmAssociation();
-
-  }
-
-  @Override
-  public boolean isExists() {
-    return roleExists;
-
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmRefConstraintRoleBuilder();
-    }
-
-    return builder;
-  }
-
-  @Override
-  public RoleType getRoleType() {
-    return roleType;
-  }
-
-  @Override
-  public ReferentialConstraintRole getEdmReferentialConstraintRole() {
-    return currentRole;
-  }
-
-  @Override
-  public String getJPAColumnName() {
-    return null;
-  }
-
-  @Override
-  public String getEdmEntityTypeName() {
-    return null;
-  }
-
-  @Override
-  public String getEdmAssociationName() {
-    return null;
-  }
-
-  private class JPAEdmRefConstraintRoleBuilder implements JPAEdmBuilder {
-
-    @Override
-    public void build() throws ODataJPAModelException {
-      if (firstBuild) {
-        firstBuild();
-      } else if (roleExists) {
-        try {
-          buildRole();
-        } catch (SecurityException e) {
-          throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e);
-        } catch (NoSuchFieldException e) {
-          throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e);
-        }
-      }
-
-    }
-
-    private void firstBuild() {
-      firstBuild = false;
-      isConsistent = false;
-
-      extractJoinColumns();
-
-      if (!roleExists) {
-        return;
-      }
-
-      jpaColumnNames = new ArrayList<String>();
-
-      for (JoinColumn joinColumn : bufferedJoinColumns) {
-        if (roleType == RoleType.PRINCIPAL) {
-          jpaColumnNames.add(joinColumn.referencedColumnName());
-        } else if (roleType == RoleType.DEPENDENT) {
-          jpaColumnNames.add(joinColumn.name());
-        }
-      }
-
-    }
-
-    private void buildRole() throws SecurityException, NoSuchFieldException {
-
-      if (currentRole == null) {
-        currentRole = new ReferentialConstraintRole();
-        String jpaAttributeType = null;
-        EntityType edmEntityType = null;
-
-        if (roleType == RoleType.PRINCIPAL) {
-          jpaAttributeType = jpaAttribute.getJavaType().getSimpleName();
-          if (jpaAttributeType.equals("List")) {
-            Type type =
-                ((ParameterizedType) jpaAttribute.getJavaMember().getDeclaringClass().getDeclaredField(
-                    jpaAttribute.getName()).getGenericType()).getActualTypeArguments()[0];
-            int lastIndexOfDot = type.toString().lastIndexOf(".");
-            jpaAttributeType = type.toString().substring(lastIndexOfDot + 1);
-          }
-          edmEntityType = entityTypeView.searchEdmEntityType(jpaAttributeType);
-        } else if (roleType == RoleType.DEPENDENT) {
-          edmEntityType =
-              entityTypeView.searchEdmEntityType(jpaAttribute.getDeclaringType().getJavaType().getSimpleName());
-        }
-
-        List<PropertyRef> propertyRefs = new ArrayList<PropertyRef>();
-        if (edmEntityType != null) {
-          for (String columnName : jpaColumnNames) {
-            for (Property property : edmEntityType.getProperties()) {
-              if (columnName.equals(((JPAEdmMapping) property.getMapping()).getJPAColumnName())) {
-                PropertyRef propertyRef = new PropertyRef();
-                propertyRef.setName(property.getName());
-                propertyRefs.add(propertyRef);
-                break;
-              }
-            }
-          }
-          currentRole.setPropertyRefs(propertyRefs);
-          if (propertyRefs.isEmpty()) {
-            isConsistent = false;
-            return;
-          }
-          AssociationEnd end = association.getEnd1();
-          if (end.getType().getName().equals(edmEntityType.getName())) {
-            currentRole.setRole(end.getRole());
-            isConsistent = true;
-          } else {
-            end = association.getEnd2();
-            if (end.getType().getName().equals(edmEntityType.getName())) {
-              currentRole.setRole(end.getRole());
-              isConsistent = true;
-            }
-          }
-        }
-
-      }
-    }
-
-    private void extractJoinColumns() {
-      /*
-       * Check against Static Buffer whether the join column was already
-       * extracted.
-       */
-      if (!jpaAttribute.equals(bufferedJPAAttribute)) {
-        bufferedJPAAttribute = jpaAttribute;
-        bufferedJoinColumns.clear();
-      } else if (bufferedJoinColumns.isEmpty()) {
-        roleExists = false;
-        return;
-      } else {
-        roleExists = true;
-        return;
-      }
-
-      AnnotatedElement annotatedElement = (AnnotatedElement) jpaAttribute.getJavaMember();
-
-      if (annotatedElement == null) {
-        return;
-      }
-
-      JoinColumn joinColumn = annotatedElement.getAnnotation(JoinColumn.class);
-      if (joinColumn == null) {
-        JoinColumns joinColumns = annotatedElement.getAnnotation(JoinColumns.class);
-
-        if (joinColumns != null) {
-          JoinColumn[] joinColumnArray = joinColumns.value();
-
-          for (JoinColumn element : joinColumnArray) {
-            bufferedJoinColumns.add(element);
-          }
-        } else {
-          return;
-        }
-      } else {
-        bufferedJoinColumns.add(joinColumn);
-      }
-      roleExists = true;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmSchema.java
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmSchema.java b/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmSchema.java
deleted file mode 100644
index b9ded8b..0000000
--- a/jpa-core/src/main/java/org/apache/olingo/odata2/processor/core/jpa/model/JPAEdmSchema.java
+++ /dev/null
@@ -1,216 +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.odata2.processor.core.jpa.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.edm.provider.Association;
-import org.apache.olingo.odata2.api.edm.provider.ComplexType;
-import org.apache.olingo.odata2.api.edm.provider.EntityType;
-import org.apache.olingo.odata2.api.edm.provider.NavigationProperty;
-import org.apache.olingo.odata2.api.edm.provider.Schema;
-import org.apache.olingo.odata2.processor.api.jpa.access.JPAEdmBuilder;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmAssociationView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmComplexTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityContainerView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntitySetView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmEntityTypeView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmModelView;
-import org.apache.olingo.odata2.processor.api.jpa.model.JPAEdmSchemaView;
-import org.apache.olingo.odata2.processor.core.jpa.access.model.JPAEdmNameBuilder;
-
-public class JPAEdmSchema extends JPAEdmBaseViewImpl implements JPAEdmSchemaView {
-
-  private Schema schema;
-  private JPAEdmComplexTypeView complexTypeView;
-  private JPAEdmEntityContainerView entityContainerView;
-  private JPAEdmAssociationView associationView = null;
-  private List<String> nonKeyComplexList = null;
-  private HashMap<Class<?>, String[]> customOperations = null;
-
-  public JPAEdmSchema(final JPAEdmModelView modelView) {
-    super(modelView);
-    if (nonKeyComplexList == null) {
-      nonKeyComplexList = new ArrayList<String>();
-    }
-  }
-
-  @Override
-  public List<String> getNonKeyComplexTypeList() {
-    return nonKeyComplexList;
-  }
-
-  @Override
-  public void addNonKeyComplexName(final String complexTypeName) {
-    nonKeyComplexList.add(complexTypeName);
-  }
-
-  @Override
-  public Schema getEdmSchema() {
-    return schema;
-  }
-
-  @Override
-  public JPAEdmEntityContainerView getJPAEdmEntityContainerView() {
-    return entityContainerView;
-  }
-
-  @Override
-  public JPAEdmComplexTypeView getJPAEdmComplexTypeView() {
-    return complexTypeView;
-  }
-
-  @Override
-  public JPAEdmBuilder getBuilder() {
-    if (builder == null) {
-      builder = new JPAEdmSchemaBuilder();
-    }
-
-    return builder;
-  }
-
-  @Override
-  public void clean() {
-    super.clean();
-    schema = null;
-  }
-
-  private class JPAEdmSchemaBuilder implements JPAEdmBuilder {
-    /*
-     * 
-     * Each call to build method creates a new EDM Schema. The newly created
-     * schema is built with Entity Containers, associations, Complex Types
-     * and Entity Types.
-     * 
-     * ************************************************************ Build
-     * EDM Schema - STEPS
-     * ************************************************************ 1) Build
-     * Name for EDM Schema 2) Build EDM Complex Types from JPA Embeddable
-     * Types 3) Add EDM Complex Types to EDM Schema 4) Build EDM Entity
-     * Container 5) Add EDM Entity Container to EDM Schema 6) Fetch Built
-     * EDM Entity Types from EDM Entity Container 7) Add EDM Entity Types to
-     * EDM Schema 8) Fetch Built EDM Association Sets from EDM Entity
-     * Container 9) Fetch Built EDM Associations from EDM Association Set
-     * 10) Add EDM Association to EDM Schema
-     * ************************************************************ Build
-     * EDM Schema - STEPS
-     * ************************************************************
-     */
-    @Override
-    public void build() throws ODataJPAModelException, ODataJPARuntimeException {
-
-      schema = new Schema();
-      JPAEdmNameBuilder.build(JPAEdmSchema.this);
-
-      associationView = new JPAEdmAssociation(JPAEdmSchema.this);
-
-      complexTypeView = new JPAEdmComplexType(JPAEdmSchema.this);
-      complexTypeView.getBuilder().build();
-
-      if (getJPAEdmExtension() != null) {
-        getJPAEdmExtension().extendWithOperation(JPAEdmSchema.this);
-      }
-
-      entityContainerView = new JPAEdmEntityContainer(JPAEdmSchema.this);
-      entityContainerView.getBuilder().build();
-      schema.setEntityContainers(entityContainerView.getConsistentEdmEntityContainerList());
-
-      JPAEdmEntitySetView entitySetView = entityContainerView.getJPAEdmEntitySetView();
-      if (entitySetView.isConsistent() && entitySetView.getJPAEdmEntityTypeView() != null) {
-        JPAEdmEntityTypeView entityTypeView = entitySetView.getJPAEdmEntityTypeView();
-        if (entityTypeView.isConsistent() && !entityTypeView.getConsistentEdmEntityTypes().isEmpty()) {
-          schema.setEntityTypes(entityTypeView.getConsistentEdmEntityTypes());
-        }
-      }
-      if (complexTypeView.isConsistent()) {
-        List<ComplexType> complexTypes = complexTypeView.getConsistentEdmComplexTypes();
-        List<ComplexType> existingComplexTypes = new ArrayList<ComplexType>();
-        for (ComplexType complexType : complexTypes) {
-          if (complexType != null && nonKeyComplexList.contains(complexType.getName())) {// null check for exclude
-            existingComplexTypes.add(complexType);
-          }
-        }
-        if (!existingComplexTypes.isEmpty()) {
-          schema.setComplexTypes(existingComplexTypes);
-        }
-      }
-
-      List<String> existingAssociationList = new ArrayList<String>();
-      if (associationView.isConsistent() && !associationView.getConsistentEdmAssociationList().isEmpty()) {
-
-        List<Association> consistentAssociationList = associationView.getConsistentEdmAssociationList();
-        schema.setAssociations(consistentAssociationList);
-        for (Association association : consistentAssociationList) {
-          existingAssociationList.add(association.getName());
-        }
-
-      }
-      List<EntityType> entityTypes =
-          entityContainerView.getJPAEdmEntitySetView().getJPAEdmEntityTypeView().getConsistentEdmEntityTypes();
-      List<NavigationProperty> navigationProperties;
-      if (entityTypes != null && !entityTypes.isEmpty()) {
-        for (EntityType entityType : entityTypes) {
-
-          List<NavigationProperty> consistentNavigationProperties = null;
-          navigationProperties = entityType.getNavigationProperties();
-          if (navigationProperties != null) {
-            consistentNavigationProperties = new ArrayList<NavigationProperty>();
-            for (NavigationProperty navigationProperty : navigationProperties) {
-              if (existingAssociationList.contains(navigationProperty.getRelationship().getName())) {
-                consistentNavigationProperties.add(navigationProperty);
-              }
-            }
-            if (consistentNavigationProperties.isEmpty()) {
-              entityType.setNavigationProperties(null);
-            } else {
-              entityType.setNavigationProperties(consistentNavigationProperties);
-            }
-          }
-
-        }
-      }
-
-    }
-
-  }
-
-  @Override
-  public final JPAEdmAssociationView getJPAEdmAssociationView() {
-    return associationView;
-  }
-
-  @Override
-  public void registerOperations(final Class<?> customClass, final String[] methodNames) {
-    if (customOperations == null) {
-      customOperations = new HashMap<Class<?>, String[]>();
-    }
-
-    customOperations.put(customClass, methodNames);
-
-  }
-
-  @Override
-  public HashMap<Class<?>, String[]> getRegisteredOperations() {
-    return customOperations;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/main/resources/jpaprocessor_msg.properties
----------------------------------------------------------------------
diff --git a/jpa-core/src/main/resources/jpaprocessor_msg.properties b/jpa-core/src/main/resources/jpaprocessor_msg.properties
deleted file mode 100644
index 5eb96fb..0000000
--- a/jpa-core/src/main/resources/jpaprocessor_msg.properties
+++ /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.
-#-------------------------------------------------------------------------------
-# Fall Back translations
-#
-
-#JPA EDM Provider Errors
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.GENERAL="OData - JPA Metadata: Internal error [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.INNER_EXCEPTION="%1$s: %2$s.\n"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.INVALID_ENTITY_TYPE="OData - JPA Model Processor: Invalid Entity Type [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.INVALID_COMPLEX_TYPE="OData - JPA Model Processor: Invalid Complex Type [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.INVALID_ASSOCIATION ="OData - JPA Model Processor: Invalid Association [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.INVALID_ENTITYSET="OData - JPA Model Processor: Invalid Entity set [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.INVALID_ENTITYCONTAINER="OData - JPA Model Processor: Invalid Entity Container [%1$s]"
-org.apache.olingo.odata2.processor.jap.exception.ODataJPAModelException.INVALID_ASSOCIATION_SET="OData - JPA Model Processor: Invalid Association Set [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.INVALID_FUNC_IMPORT="OData - JPA Model Processor: Invalid Function Import [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.BUILDER_NULL="OData - JPA Model Processor: JPA Builder not initialized"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.FUNC_ENTITYSET_EXP="OData - JPA Model Processor: Entity Set expected for Function Import with return type as Entity Type with Multiplicity Many"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.FUNC_RETURN_TYPE_EXP="OData - JPA Model Processor: Return type expected. Class: [%1$s], Method: [%2$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.FUNC_RETURN_TYPE_ENTITY_NOT_FOUND="OData - JPA Model Processor: Return type not found. Class: [%1$s], Method: [%2$s], Type: [%3$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.FUNC_PARAM_NAME_EXP="OData - JPA Model Processor: Parameter Name for function import expected. Class: [%1$s]", Method: [%2$s]"
-
-#JPA Type converter Errors
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAModelException.TYPE_NOT_SUPPORTED="OData - JPA Type Converter: Type [%1$s] not supported"
-
-#JPA Runtime Errors
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ENTITY_MANAGER_NOT_INITIALIZED="OData - JPA Service Factory: Java Persistence Entity Manager not initialized"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.GENERAL="OData - JPA Runtime: Internal error [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.INNER_EXCEPTION="%1$s: %2$s.\n"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.JOIN_CLAUSE_EXPECTED="OData - JPA Runtime: Join Clause expected"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.RESOURCE_NOT_FOUND="OData - JPA Runtime: Resource not found"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_ODATA_FILTER_CONDITION="OData - JPA Runtime: Filter condition not correct"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_QUERY_CREATE="OData - JPA Runtime: JPA query syntax is not correct"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_CREATE_REQUEST="OData - JPA Runtime: JPA create request is not correct"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_UPDATE_REQUEST="OData - JPA Runtime: JPA update request is not correct"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_DELETE_REQUEST="OData - JPA Runtime: JPA delete URL is not correct"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_KEY_VALUE="Key parameter value is not correct for [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_PARAM_VALUE="Parameter value is not correct for [%1$s]"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_UNIQUE_CONSTRAINT="Violation of unique constraint"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQL_INTEGRITY_CONSTRAINT="Integrity constraint violation"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.RELATIONSHIP_INVALID="OData - JPA Runtime: Invalid link"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.RESOURCE_X_NOT_FOUND="OData - JPA Runtime: Resource [%1$s] not found"
-
-#JPA Common Errors
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPAException.ODATA_JPACTX_NULL="OData JPA: OData JPA Context cannot be null"
-org.apache.olingo.odata2.processor.api.jpa.exception.ODataJPARuntimeException.ERROR_JPQLCTXBLDR_CREATE="OData JPA: Error creating JPQL Context Builder"

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/jpa-core/src/test/java/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/jpa-core/src/test/java/META-INF/MANIFEST.MF b/jpa-core/src/test/java/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e94951..0000000
--- a/jpa-core/src/test/java/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: 
-