You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by tb...@apache.org on 2013/12/20 16:18:04 UTC

[02/12] [OLINGO-83] Refactoring of 'annotation-processor-*' modules

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Building.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Building.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Building.java
deleted file mode 100644
index 5183195..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Building.java
+++ /dev/null
@@ -1,97 +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.ref.annotation.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmKey;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty.Multiplicity;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmType;
-
-/**
- *  
- */
-@EdmEntityType(name = "Building", namespace = ModelSharedConstants.NAMESPACE_1)
-@EdmEntitySet(name = "Buildings")
-public class Building {
-  @EdmKey
-  @EdmProperty(type = EdmType.INT32)
-  private int id;
-  @EdmProperty
-  private String name;
-  @EdmProperty(name = "Image", type = EdmType.BINARY)
-  private byte[] image;
-  @EdmNavigationProperty(name = "nb_Rooms", toType = Room.class,
-      association = "BuildingRooms", toMultiplicity = Multiplicity.MANY)
-  private List<Room> rooms = new ArrayList<Room>();
-
-  public String getId() {
-    return Integer.toString(id);
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setImage(final byte[] byteArray) {
-    image = byteArray;
-  }
-
-  public byte[] getImage() {
-    if (image == null) {
-      return null;
-    } else {
-      return image.clone();
-    }
-  }
-
-  public void addRoom(final Room room) {
-    rooms.add(room);
-  }
-
-  public List<Room> getRooms() {
-    return rooms;
-  }
-
-  @Override
-  public int hashCode() {
-    return id;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    return this == obj
-        || obj != null && getClass() == obj.getClass() && id == ((Building) obj).id;
-  }
-
-  @Override
-  public String toString() {
-    return "{\"Id\":\"" + id + "\",\"Name\":\"" + name + "\",\"Image\":\"" + Arrays.toString(image) + "\"}";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/City.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/City.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/City.java
deleted file mode 100644
index 8ec87b6..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/City.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.ref.annotation.model;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmComplexType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-
-/**
- *  
- */
-@EdmComplexType(name = "c_City", namespace = ModelSharedConstants.NAMESPACE_1)
-public class City {
-
-  @EdmProperty
-  private String postalCode;
-  @EdmProperty
-  private String cityName;
-
-  public City(final String postalCode, final String name) {
-    this.postalCode = postalCode;
-    cityName = name;
-  }
-
-  public void setPostalCode(final String postalCode) {
-    this.postalCode = postalCode;
-  }
-
-  public String getPostalCode() {
-    return postalCode;
-  }
-
-  public void setCityName(final String cityName) {
-    this.cityName = cityName;
-  }
-
-  public String getCityName() {
-    return cityName;
-  }
-
-  @Override
-  public String toString() {
-    return String.format("%s, %s", cityName, postalCode);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Employee.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Employee.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Employee.java
deleted file mode 100644
index 2204ee8..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Employee.java
+++ /dev/null
@@ -1,192 +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.ref.annotation.model;
-
-import java.text.DateFormat;
-import java.util.Calendar;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmFacets;
-import org.apache.olingo.odata2.api.annotation.edm.EdmKey;
-import org.apache.olingo.odata2.api.annotation.edm.EdmMediaResourceContent;
-import org.apache.olingo.odata2.api.annotation.edm.EdmMediaResourceMimeType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmType;
-
-/**
- *  
- */
-@EdmEntityType(name = "Employee", namespace = ModelSharedConstants.NAMESPACE_1)
-@EdmEntitySet(name = "Employees")
-public class Employee {
-  @EdmKey
-  @EdmProperty(name = "EmployeeId", type = EdmType.STRING)
-  private String employeeId;
-  @EdmProperty(name = "EmployeeName")
-  private String employeeName;
-  @EdmProperty
-  private int age;
-  @EdmNavigationProperty(name = "ne_Manager", association = "ManagerEmployees")
-  private Manager manager;
-  @EdmNavigationProperty(name = "ne_Team", association = "TeamEmployees")
-  private Team team;
-  @EdmNavigationProperty(name = "ne_Room")
-  private Room room;
-  @EdmMediaResourceMimeType
-  private String imageType;
-  @EdmMediaResourceContent
-  private byte[] image;
-  @EdmProperty(name = "ImageUrl")
-  private String imageUrl;
-  @EdmProperty(name = "EntryDate", type = EdmType.DATE_TIME,
-      facets = @EdmFacets(nullable = true))
-  private Calendar entryDate;
-  @EdmProperty(name = "Location", facets = @EdmFacets(nullable = false))
-  private Location location;
-
-  public String getId() {
-    return employeeId;
-  }
-
-  public void setEmployeeName(final String employeeName) {
-    this.employeeName = employeeName;
-  }
-
-  public String getEmployeeName() {
-    return employeeName;
-  }
-
-  public void setAge(final int age) {
-    this.age = age;
-  }
-
-  public int getAge() {
-    return age;
-  }
-
-  public void setManager(final Manager manager) {
-    this.manager = manager;
-  }
-
-  public Manager getManager() {
-    return manager;
-  }
-
-  public void setTeam(final Team team) {
-    this.team = team;
-  }
-
-  public Team getTeam() {
-    return team;
-  }
-
-  public void setRoom(final Room room) {
-    this.room = room;
-  }
-
-  public Room getRoom() {
-    return room;
-  }
-
-  public void setImageUri(final String imageUri) {
-    imageUrl = imageUri;
-  }
-
-  public String getImageUri() {
-    return imageUrl;
-  }
-
-  public void setLocation(final Location location) {
-    this.location = location;
-  }
-
-  public Location getLocation() {
-    return location;
-  }
-
-  public void setEntryDate(final Calendar date) {
-    entryDate = date;
-  }
-
-  public Calendar getEntryDate() {
-    return entryDate;
-  }
-
-  public void setImageType(final String imageType) {
-    this.imageType = imageType;
-  }
-
-  public String getImageType() {
-    return imageType;
-  }
-
-  public void setImage(final byte[] image) {
-    this.image = image;
-  }
-
-  public void setImage(final String imageUrl) {
-    image = loadImage(imageUrl);
-  }
-
-  private static byte[] loadImage(final String imageUrl) {
-    return ResourceHelper.loadAsByte(imageUrl);
-  }
-
-  public byte[] getImage() {
-    if (image == null) {
-      return null;
-    }
-    return image.clone();
-  }
-
-  @Override
-  public int hashCode() {
-    if (employeeId == null) {
-      return 0;
-    }
-    return employeeId.hashCode();
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    return this == obj
-        || obj != null && getClass() == obj.getClass() && employeeId == ((Employee) obj).employeeId;
-  }
-
-  @Override
-  public String toString() {
-    return "{\"EmployeeId\":\"" + employeeId + "\","
-        + "\"EmployeeName\":\"" + employeeName + "\","
-        + "\"ManagerId\":" + (manager == null ? "null" : "\"" + manager.getId() + "\"") + ","
-        + "\"RoomId\":" + (room == null ? "null" : "\"" + room.getId() + "\"") + ","
-        + "\"TeamId\":" + (team == null ? "null" : "\"" + team.getId() + "\"") + ","
-        + "\"Location\":"
-        + (location == null ? "null" :
-            "{\"City\":" + (location.getCity() == null ? "null" :
-                "{\"PostalCode\":\"" + location.getCity().getPostalCode() + "\","
-                    + "\"CityName\":\"" + location.getCity().getCityName() + "\"}") + ","
-                + "\"Country\":\"" + location.getCountry() + "\"}") + ","
-        + "\"Age\":" + age + ","
-        + "\"EntryDate\":"
-        + (entryDate == null ? "null" : "\"" + DateFormat.getInstance().format(entryDate.getTime()) + "\"") + ","
-        + "\"ImageUrl\":\"" + imageUrl + "\"}";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Location.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Location.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Location.java
deleted file mode 100644
index 9b0785c..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Location.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.ref.annotation.model;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmComplexType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-
-/**
- *  
- */
-@EdmComplexType(name = "c_Location", namespace = ModelSharedConstants.NAMESPACE_1)
-public class Location {
-  @EdmProperty
-  private String country;
-  @EdmProperty
-  private City city;
-
-  public Location(final String country, final String postalCode, final String cityName) {
-    this.country = country;
-    city = new City(postalCode, cityName);
-  }
-
-  public void setCountry(final String country) {
-    this.country = country;
-  }
-
-  public String getCountry() {
-    return country;
-  }
-
-  public void setCity(final City city) {
-    this.city = city;
-  }
-
-  public City getCity() {
-    return city;
-  }
-
-  @Override
-  public String toString() {
-    return String.format("%s, %s", country, city.toString());
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Manager.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Manager.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Manager.java
deleted file mode 100644
index 57e6d78..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Manager.java
+++ /dev/null
@@ -1,43 +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.ref.annotation.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty.Multiplicity;
-
-/**
- *
- */
-@EdmEntityType(name = "Manager", namespace = ModelSharedConstants.NAMESPACE_1)
-@EdmEntitySet(name = "Managers")
-public class Manager extends Employee {
-
-  @EdmNavigationProperty(name = "nm_Employees", association = "ManagerEmployees",
-      toMultiplicity = Multiplicity.MANY)
-  private List<Employee> employees = new ArrayList<Employee>();
-
-  public List<Employee> getEmployees() {
-    return employees;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ModelSharedConstants.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ModelSharedConstants.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ModelSharedConstants.java
deleted file mode 100644
index ab17fbb..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ModelSharedConstants.java
+++ /dev/null
@@ -1,25 +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.ref.annotation.model;
-
-public interface ModelSharedConstants {
-
-  String NAMESPACE_1 = "RefScenario";
-  String CONTAINER_1 = "Container1";
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Photo.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Photo.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Photo.java
deleted file mode 100644
index b098db5..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Photo.java
+++ /dev/null
@@ -1,128 +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.ref.annotation.model;
-
-import java.util.Arrays;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmKey;
-import org.apache.olingo.odata2.api.annotation.edm.EdmMediaResourceContent;
-import org.apache.olingo.odata2.api.annotation.edm.EdmMediaResourceMimeType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmMediaResourceSource;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmType;
-
-/**
- *  
- */
-@EdmEntityType(name = "Photo", namespace = ModelSharedConstants.NAMESPACE_1)
-@EdmEntitySet(name = "Photos")
-public class Photo {
-  @EdmKey
-  @EdmProperty
-  private String name;
-  @EdmKey
-  @EdmProperty
-  private String type;
-  @EdmProperty
-  @EdmMediaResourceMimeType
-  private String mimeType;
-  @EdmProperty
-  @EdmMediaResourceSource
-  private String imageUrl = "http://localhost/someResource.png";
-  @EdmProperty(type = EdmType.BINARY)
-  @EdmMediaResourceContent
-  private byte[] image = ResourceHelper.generateImage();
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  public String getType() {
-    return type;
-  }
-
-  public void setType(final String type) {
-    this.type = type;
-  }
-
-  public String getImageUri() {
-    return imageUrl;
-  }
-
-  public void setImageUri(final String uri) {
-    imageUrl = uri;
-  }
-
-  public byte[] getImage() {
-    return image.clone();
-  }
-
-  public void setImage(final byte[] image) {
-    this.image = image;
-  }
-
-  public String getImageType() {
-    return mimeType;
-  }
-
-  public void setImageType(final String imageType) {
-    mimeType = imageType;
-  }
-
-  @Override
-  public int hashCode() {
-    int hash = 5;
-    hash = 83 * hash + (name != null ? name.hashCode() : 0);
-    hash = 83 * hash + (type != null ? type.hashCode() : 0);
-    return hash;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == null) {
-      return false;
-    }
-    if (getClass() != obj.getClass()) {
-      return false;
-    }
-    final Photo other = (Photo) obj;
-    if ((name == null) ? (other.name != null) : !name.equals(other.name)) {
-      return false;
-    }
-    if ((type == null) ? (other.type != null) : !type.equals(other.type)) {
-      return false;
-    }
-    return true;
-  }
-
-  @Override
-  public String toString() {
-    return "{\"Name\":\"" + name + "\","
-        + "\"Type\":\"" + type + "\","
-        + "\"ImageUrl\":\"" + imageUrl + "\","
-        + "\"Image\":\"" + Arrays.toString(image) + "\","
-        + "\"MimeType\":\"" + mimeType + "\"";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/RefBase.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/RefBase.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/RefBase.java
deleted file mode 100644
index 6424e0a..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/RefBase.java
+++ /dev/null
@@ -1,78 +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.ref.annotation.model;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmKey;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmType;
-
-/**
- *
- */
-@EdmEntityType(name = "Base", namespace = ModelSharedConstants.NAMESPACE_1)
-public abstract class RefBase {
-  @EdmProperty(name = "Name")
-  protected String name;
-  @EdmProperty(name = "Id", type = EdmType.STRING)
-  @EdmKey
-  protected String id;
-
-  public String getName() {
-    return name;
-  }
-
-  public String getId() {
-    return id;
-  }
-
-  public void setName(final String name) {
-    this.name = name;
-  }
-
-  public void setId(final int id) {
-    this.id = String.valueOf(id);
-  }
-
-  @Override
-  public int hashCode() {
-    if (id == null) {
-      return -1;
-    }
-    return id.hashCode();
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == null) {
-      return false;
-    }
-    if (getClass() != obj.getClass()) {
-      return false;
-    }
-    final RefBase other = (RefBase) obj;
-    if ((name == null) ? (other.name != null) : !name.equals(other.name)) {
-      return false;
-    }
-    if ((id == null) ? (other.id != null) : !id.equals(other.id)) {
-      return false;
-    }
-    return true;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ResourceHelper.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ResourceHelper.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ResourceHelper.java
deleted file mode 100644
index 80da2f3..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/ResourceHelper.java
+++ /dev/null
@@ -1,96 +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.ref.annotation.model;
-
-import java.awt.image.BufferedImage;
-import java.awt.image.WritableRaster;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.imageio.ImageIO;
-
-/**
- *
- */
-public class ResourceHelper {
-
-  public static byte[] loadAsByte(final String resource) {
-    return load(resource, new byte[0]);
-  }
-
-  public static byte[] load(final String resource, final byte[] defaultResult) {
-    InputStream instream = null;
-    try {
-      instream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
-      if (instream == null) {
-        return defaultResult;
-      }
-      ByteArrayOutputStream stream = new ByteArrayOutputStream();
-      int b = 0;
-      while ((b = instream.read()) != -1) {
-        stream.write(b);
-      }
-
-      return stream.toByteArray();
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    } finally {
-      if (instream != null) {
-        try {
-          instream.close();
-        } catch (IOException ex) {}
-      }
-    }
-  }
-
-  public enum Format {
-    BMP, JPEG, PNG, GIF
-  };
-
-  public static byte[] generateImage() {
-    return generateImage(Format.PNG);
-  }
-
-  public static byte[] generateImage(final Format format) {
-    try {
-      int width = 320;
-      int height = 320;
-      BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_BINARY);
-      WritableRaster raster = image.getRaster();
-
-      int mod = format.ordinal() + 2;
-      for (int h = 0; h < height; h++) {
-        for (int w = 0; w < width; w++) {
-          if (((h / 32) + (w / 32)) % mod == 0) {
-            raster.setSample(w, h, 0, 0);
-          } else {
-            raster.setSample(w, h, 0, 1);
-          }
-        }
-      }
-
-      ByteArrayOutputStream out = new ByteArrayOutputStream(1024);
-      ImageIO.write(image, format.name(), out);
-      return out.toByteArray();
-    } catch (IOException ex) {
-      return new byte[0];
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Room.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Room.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Room.java
deleted file mode 100644
index 2d9f48e..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Room.java
+++ /dev/null
@@ -1,88 +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.ref.annotation.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-
-/**
- *
- */
-@EdmEntityType(name = "Room", namespace = ModelSharedConstants.NAMESPACE_1)
-@EdmEntitySet(name = "Rooms")
-public class Room extends RefBase {
-
-  @EdmProperty
-  private Integer seats;
-  @EdmProperty
-  private Integer version;
-  @EdmNavigationProperty(name = "nr_Building", association = "BuildingRooms")
-  private Building building;
-  @EdmNavigationProperty(name = "nr_Employees")
-  private List<Employee> employees = new ArrayList<Employee>();
-
-  public void setSeats(final int seats) {
-    this.seats = seats;
-  }
-
-  public int getSeats() {
-    return seats;
-  }
-
-  public void setVersion(final int version) {
-    this.version = version;
-  }
-
-  public int getVersion() {
-    return version;
-  }
-
-  public void setBuilding(final Building building) {
-    this.building = building;
-  }
-
-  public Building getBuilding() {
-    return building;
-  }
-
-  public List<Employee> getEmployees() {
-    return employees;
-  }
-
-  @Override
-  public int hashCode() {
-    return super.hashCode();
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    return this == obj
-        || obj != null && getClass() == obj.getClass() && id == ((Room) obj).id;
-  }
-
-  @Override
-  public String toString() {
-    return "{\"Id\":\"" + id + "\",\"Name\":\"" + name + "\",\"Seats\":" + seats + ",\"Version\":" + version + "}";
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Team.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Team.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Team.java
deleted file mode 100644
index 4767d29..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/model/Team.java
+++ /dev/null
@@ -1,73 +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.ref.annotation.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntitySet;
-import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty.Multiplicity;
-import org.apache.olingo.odata2.api.annotation.edm.EdmProperty;
-import org.apache.olingo.odata2.api.annotation.edm.EdmType;
-
-/**
-*  
-*/
-@EdmEntityType(name = "Team", namespace = ModelSharedConstants.NAMESPACE_1)
-@EdmEntitySet(name = "Teams")
-public class Team extends RefBase {
-  @EdmProperty(type = EdmType.BOOLEAN)
-  private Boolean isScrumTeam;
-  @EdmNavigationProperty(name = "nt_Employees", association = "TeamEmployees", toMultiplicity = Multiplicity.MANY)
-  private List<Employee> employees = new ArrayList<Employee>();
-
-  public Boolean isScrumTeam() {
-    return isScrumTeam;
-  }
-
-  public void setScrumTeam(final Boolean isScrumTeam) {
-    this.isScrumTeam = isScrumTeam;
-  }
-
-  public void addEmployee(final Employee e) {
-    employees.add(e);
-  }
-
-  public List<Employee> getEmployees() {
-    return employees;
-  }
-
-  @Override
-  public int hashCode() {
-    return super.hashCode();
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    return this == obj
-        || obj != null && getClass() == obj.getClass() && id == ((Team) obj).id;
-  }
-
-  @Override
-  public String toString() {
-    return "{\"Id\":\"" + id + "\",\"Name\":\"" + name + "\",\"IsScrumTeam\":" + isScrumTeam + "}";
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/processor/AnnotationServiceFactory.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/processor/AnnotationServiceFactory.java b/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/processor/AnnotationServiceFactory.java
deleted file mode 100644
index efc0635..0000000
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/java/org/apache/olingo/odata2/ref/annotation/processor/AnnotationServiceFactory.java
+++ /dev/null
@@ -1,215 +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.ref.annotation.processor;
-
-import java.util.Calendar;
-
-import org.apache.olingo.odata2.api.ODataCallback;
-import org.apache.olingo.odata2.api.ODataDebugCallback;
-import org.apache.olingo.odata2.api.ODataService;
-import org.apache.olingo.odata2.api.ODataServiceFactory;
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-import org.apache.olingo.odata2.api.ep.EntityProvider;
-import org.apache.olingo.odata2.api.exception.ODataApplicationException;
-import org.apache.olingo.odata2.api.exception.ODataException;
-import org.apache.olingo.odata2.api.processor.ODataContext;
-import org.apache.olingo.odata2.api.processor.ODataErrorCallback;
-import org.apache.olingo.odata2.api.processor.ODataErrorContext;
-import org.apache.olingo.odata2.api.processor.ODataResponse;
-import org.apache.olingo.odata2.core.annotation.data.AnnotationInMemoryDs;
-import org.apache.olingo.odata2.core.annotation.data.AnnotationValueAccess;
-import org.apache.olingo.odata2.core.annotation.data.DataStore;
-import org.apache.olingo.odata2.core.annotation.edm.AnnotationEdmProvider;
-import org.apache.olingo.odata2.core.annotation.processor.ListsProcessor;
-import org.apache.olingo.odata2.ref.annotation.model.Building;
-import org.apache.olingo.odata2.ref.annotation.model.Employee;
-import org.apache.olingo.odata2.ref.annotation.model.Location;
-import org.apache.olingo.odata2.ref.annotation.model.Manager;
-import org.apache.olingo.odata2.ref.annotation.model.Photo;
-import org.apache.olingo.odata2.ref.annotation.model.ResourceHelper;
-import org.apache.olingo.odata2.ref.annotation.model.Room;
-import org.apache.olingo.odata2.ref.annotation.model.Team;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * ODataServiceFactory implemantion based on ListProcessor
- * in combination with Annotation-Support-Classes for EdmProvider, DataSource and ValueAccess.
- */
-public class AnnotationServiceFactory extends ODataServiceFactory {
-
-  /**
-   * Instance holder for all annotation relevant instances which should be used as singleton
-   * instances within the ODataApplication (ODataService)
-   */
-  private static class AnnotationInstances {
-    final static String MODEL_PACKAGE = "org.apache.olingo.odata2.ref.annotation.model";
-    final static AnnotationEdmProvider EDM_PROVIDER;
-    final static AnnotationInMemoryDs DATA_SOURCE;
-    final static AnnotationValueAccess VALUE_ACCESS;
-
-    static {
-      try {
-        EDM_PROVIDER = new AnnotationEdmProvider(MODEL_PACKAGE);
-        DATA_SOURCE = new AnnotationInMemoryDs(MODEL_PACKAGE);
-        VALUE_ACCESS = new AnnotationValueAccess();
-
-        initializeSampleData(DATA_SOURCE);
-      } catch (ODataApplicationException ex) {
-        throw new RuntimeException("Exception during sample data generation.", ex);
-      } catch (ODataException ex) {
-        throw new RuntimeException("Exception during data source initialization generation.", ex);
-      }
-    }
-  }
-
-  @Override
-  public ODataService createService(final ODataContext context) throws ODataException {
-    // Edm via Annotations and ListProcessor via AnnotationDS with AnnotationsValueAccess
-    return createODataSingleProcessorService(AnnotationInstances.EDM_PROVIDER,
-        new ListsProcessor(AnnotationInstances.DATA_SOURCE, AnnotationInstances.VALUE_ACCESS));
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public <T extends ODataCallback> T getCallback(final Class<? extends ODataCallback> callbackInterface) {
-    return (T) (callbackInterface.isAssignableFrom(ScenarioErrorCallback.class)
-        ? new ScenarioErrorCallback() : callbackInterface.isAssignableFrom(ODataDebugCallback.class)
-            ? new ScenarioDebugCallback() : super.getCallback(callbackInterface));
-  }
-
-  /*
-   * Helper classes and methods
-   */
-
-  /**
-   * 
-   */
-  private final class ScenarioDebugCallback implements ODataDebugCallback {
-
-    @Override
-    public boolean isDebugEnabled() {
-      return true;
-    }
-  }
-
-  private class ScenarioErrorCallback implements ODataErrorCallback {
-
-    private final Logger LOG = LoggerFactory.getLogger(ScenarioErrorCallback.class);
-
-    @Override
-    public ODataResponse handleError(final ODataErrorContext context) throws ODataApplicationException {
-      if (context.getHttpStatus() == HttpStatusCodes.INTERNAL_SERVER_ERROR) {
-        LOG.error("Internal Server Error", context.getException());
-      }
-
-      return EntityProvider.writeErrorDocument(context);
-    }
-
-  }
-
-  private static void initializeSampleData(final AnnotationInMemoryDs dataSource) throws ODataApplicationException {
-    DataStore<Team> teamDs = dataSource.getDataStore(Team.class);
-    teamDs.create(createTeam("Team Alpha", true));
-    teamDs.create(createTeam("Team Beta", false));
-    teamDs.create(createTeam("Team Gamma", false));
-    teamDs.create(createTeam("Team Omega", true));
-    teamDs.create(createTeam("Team Zeta", true));
-
-    DataStore<Building> buildingsDs = dataSource.getDataStore(Building.class);
-    Building redBuilding = createBuilding("Red Building");
-    buildingsDs.create(redBuilding);
-    Building greenBuilding = createBuilding("Green Building");
-    buildingsDs.create(greenBuilding);
-    Building blueBuilding = createBuilding("Blue Building");
-    buildingsDs.create(blueBuilding);
-    Building yellowBuilding = createBuilding("Yellow Building");
-    buildingsDs.create(yellowBuilding);
-
-    DataStore<Photo> photoDs = dataSource.getDataStore(Photo.class);
-    photoDs.create(createPhoto("Small picture", ResourceHelper.Format.GIF));
-    photoDs.create(createPhoto("Medium picture", ResourceHelper.Format.PNG));
-    photoDs.create(createPhoto("Big picture", ResourceHelper.Format.JPEG));
-    photoDs.create(createPhoto("Huge picture", ResourceHelper.Format.BMP));
-
-    DataStore<Room> roomDs = dataSource.getDataStore(Room.class);
-    roomDs.create(createRoom("Tiny red room", 5, 1, redBuilding));
-    roomDs.create(createRoom("Small red room", 20, 1, redBuilding));
-    roomDs.create(createRoom("Small green room", 20, 1, greenBuilding));
-    roomDs.create(createRoom("Big blue room", 40, 1, blueBuilding));
-    roomDs.create(createRoom("Huge blue room", 120, 1, blueBuilding));
-    roomDs.create(createRoom("Huge yellow room", 120, 1, yellowBuilding));
-
-    DataStore<Employee> employeeDataStore = dataSource.getDataStore(Employee.class);
-    employeeDataStore.create(createEmployee("first Employee",
-        new Location("Norge", "8392", "Ä"), 42, null,
-        photoDs.read().iterator().next().getImage(), photoDs.read().iterator().next().getImageType(),
-        "http://localhost/image/first.png",
-        null, teamDs.read().iterator().next(), roomDs.read().iterator().next()));
-  }
-
-  private static Employee createEmployee(final String name,
-      final Location location, final int age, final Calendar date,
-      final byte[] image, final String imageType, final String imageUrl,
-      final Manager manager, final Team team, final Room room) {
-    Employee employee = new Employee();
-    employee.setEmployeeName(name);
-    employee.setLocation(location);
-    employee.setAge(age);
-    employee.setEntryDate(date);
-    employee.setImage(image);
-    employee.setImageType(imageType);
-    employee.setImageUri(imageUrl);
-    employee.setManager(manager);
-    employee.setTeam(team);
-    employee.setRoom(room);
-    return employee;
-  }
-
-  private static Team createTeam(final String teamName, final boolean isScrumTeam) {
-    Team team = new Team();
-    team.setName(teamName);
-    team.setScrumTeam(isScrumTeam);
-    return team;
-  }
-
-  private static Building createBuilding(final String buildingName) {
-    Building b = new Building();
-    b.setName(buildingName);
-    return b;
-  }
-
-  private static Photo createPhoto(final String name, final ResourceHelper.Format format) {
-    Photo p = new Photo();
-    p.setName(name);
-    p.setImageUri("http://localhost/image/" + name);
-    p.setType(format.name());
-    p.setImageType("image/" + format.name().toLowerCase());
-    p.setImage(ResourceHelper.generateImage(format));
-    return p;
-  }
-
-  private static Room createRoom(final String name, final int seats, final int version, final Building building) {
-    Room r = new Room();
-    r.setName(name);
-    r.setSeats(seats);
-    r.setVersion(version);
-    r.setBuilding(building);
-
-    building.addRoom(r);
-
-    return r;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-annotation-processor/annotation-processor-webref/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-webref/src/main/webapp/WEB-INF/web.xml b/odata2-annotation-processor/annotation-processor-webref/src/main/webapp/WEB-INF/web.xml
index ba2b7bb..2e4635e 100644
--- a/odata2-annotation-processor/annotation-processor-webref/src/main/webapp/WEB-INF/web.xml
+++ b/odata2-annotation-processor/annotation-processor-webref/src/main/webapp/WEB-INF/web.xml
@@ -35,7 +35,7 @@
 		</init-param>
 		<init-param>
 			<param-name>org.apache.olingo.odata2.service.factory</param-name>
-			<param-value>org.apache.olingo.odata2.ref.annotation.processor.AnnotationServiceFactory</param-value>
+			<param-value>org.apache.olingo.odata2.annotation.processor.ref.AnnotationRefServiceFactory</param-value>
 		</init-param>
 		<load-on-startup>1</load-on-startup>
 	</servlet>

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/AbstractRefTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/AbstractRefTest.java b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/AbstractRefTest.java
index de5f99e..d316b7f 100644
--- a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/AbstractRefTest.java
+++ b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/AbstractRefTest.java
@@ -35,12 +35,12 @@ import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpPut;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.entity.StringEntity;
+import org.apache.olingo.odata2.annotation.processor.core.ListsProcessor;
+import org.apache.olingo.odata2.annotation.processor.core.datasource.BeanPropertyAccess;
 import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
 import org.apache.olingo.odata2.api.commons.ODataHttpMethod;
 import org.apache.olingo.odata2.api.edm.provider.EdmProvider;
 import org.apache.olingo.odata2.api.processor.ODataSingleProcessor;
-import org.apache.olingo.odata2.core.annotation.data.BeanPropertyAccess;
-import org.apache.olingo.odata2.core.annotation.processor.ListsProcessor;
 import org.apache.olingo.odata2.core.processor.ODataSingleProcessorService;
 import org.apache.olingo.odata2.ref.edm.ScenarioEdmProvider;
 import org.apache.olingo.odata2.ref.model.DataContainer;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/EntryXmlReadOnlyTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/EntryXmlReadOnlyTest.java b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/EntryXmlReadOnlyTest.java
index ab107ac..79cf938 100644
--- a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/EntryXmlReadOnlyTest.java
+++ b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/EntryXmlReadOnlyTest.java
@@ -28,9 +28,9 @@ import java.lang.reflect.Field;
 
 import org.apache.http.HttpHeaders;
 import org.apache.http.HttpResponse;
+import org.apache.olingo.odata2.annotation.processor.core.ListsProcessor;
 import org.apache.olingo.odata2.api.commons.HttpContentType;
 import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-import org.apache.olingo.odata2.core.annotation.processor.ListsProcessor;
 import org.apache.olingo.odata2.ref.model.DataContainer;
 import org.apache.olingo.odata2.ref.model.Photo;
 import org.apache.olingo.odata2.ref.processor.ScenarioDataSource;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/contentnegotiation/AbstractContentNegotiationTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/contentnegotiation/AbstractContentNegotiationTest.java b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/contentnegotiation/AbstractContentNegotiationTest.java
index 688532d..0a19c7f 100644
--- a/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/contentnegotiation/AbstractContentNegotiationTest.java
+++ b/odata2-lib/odata-fit/src/test/java/org/apache/olingo/odata2/fit/ref/contentnegotiation/AbstractContentNegotiationTest.java
@@ -42,6 +42,8 @@ import org.apache.http.client.methods.HttpPut;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.olingo.odata2.annotation.processor.core.ListsProcessor;
+import org.apache.olingo.odata2.annotation.processor.core.datasource.BeanPropertyAccess;
 import org.apache.olingo.odata2.api.ODataService;
 import org.apache.olingo.odata2.api.commons.HttpContentType;
 import org.apache.olingo.odata2.api.commons.HttpHeaders;
@@ -49,8 +51,6 @@ import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
 import org.apache.olingo.odata2.api.edm.provider.EdmProvider;
 import org.apache.olingo.odata2.api.exception.ODataException;
 import org.apache.olingo.odata2.api.processor.ODataSingleProcessor;
-import org.apache.olingo.odata2.core.annotation.data.BeanPropertyAccess;
-import org.apache.olingo.odata2.core.annotation.processor.ListsProcessor;
 import org.apache.olingo.odata2.core.commons.ContentType;
 import org.apache.olingo.odata2.core.processor.ODataSingleProcessorService;
 import org.apache.olingo.odata2.core.uri.UriType;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioDataSource.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioDataSource.java b/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioDataSource.java
index cc70639..bba87b2 100644
--- a/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioDataSource.java
+++ b/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioDataSource.java
@@ -27,8 +27,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.apache.olingo.odata2.annotation.processor.core.datasource.DataSource;
 import org.apache.olingo.odata2.api.commons.HttpContentType;
-import org.apache.olingo.odata2.api.data.DataSource;
 import org.apache.olingo.odata2.api.edm.EdmEntitySet;
 import org.apache.olingo.odata2.api.edm.EdmException;
 import org.apache.olingo.odata2.api.edm.EdmFunctionImport;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioServiceFactory.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioServiceFactory.java b/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioServiceFactory.java
index 08d6e16..f205aa2 100644
--- a/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioServiceFactory.java
+++ b/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ScenarioServiceFactory.java
@@ -18,14 +18,14 @@
  ******************************************************************************/
 package org.apache.olingo.odata2.ref.processor;
 
+import org.apache.olingo.odata2.annotation.processor.core.ListsProcessor;
+import org.apache.olingo.odata2.annotation.processor.core.datasource.BeanPropertyAccess;
 import org.apache.olingo.odata2.api.ODataCallback;
 import org.apache.olingo.odata2.api.ODataDebugCallback;
 import org.apache.olingo.odata2.api.ODataService;
 import org.apache.olingo.odata2.api.ODataServiceFactory;
 import org.apache.olingo.odata2.api.exception.ODataException;
 import org.apache.olingo.odata2.api.processor.ODataContext;
-import org.apache.olingo.odata2.core.annotation.data.BeanPropertyAccess;
-import org.apache.olingo.odata2.core.annotation.processor.ListsProcessor;
 import org.apache.olingo.odata2.ref.edm.ScenarioEdmProvider;
 import org.apache.olingo.odata2.ref.model.DataContainer;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntitySetTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntitySetTest.java b/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntitySetTest.java
index d07473d..0dadc30 100644
--- a/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntitySetTest.java
+++ b/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntitySetTest.java
@@ -30,6 +30,8 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.CharBuffer;
 
+import org.apache.olingo.odata2.annotation.processor.core.ListsProcessor;
+import org.apache.olingo.odata2.annotation.processor.core.datasource.BeanPropertyAccess;
 import org.apache.olingo.odata2.api.edm.EdmEntityContainer;
 import org.apache.olingo.odata2.api.edm.EdmEntitySet;
 import org.apache.olingo.odata2.api.edm.EdmEntityType;
@@ -38,8 +40,6 @@ import org.apache.olingo.odata2.api.processor.ODataContext;
 import org.apache.olingo.odata2.api.processor.ODataResponse;
 import org.apache.olingo.odata2.api.uri.PathInfo;
 import org.apache.olingo.odata2.api.uri.UriInfo;
-import org.apache.olingo.odata2.core.annotation.data.BeanPropertyAccess;
-import org.apache.olingo.odata2.core.annotation.processor.ListsProcessor;
 import org.apache.olingo.odata2.core.commons.ContentType;
 import org.apache.olingo.odata2.ref.model.DataContainer;
 import org.apache.olingo.odata2.ref.processor.ScenarioDataSource;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/3bd59050/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntityTest.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntityTest.java b/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntityTest.java
index be55778..28827d1 100644
--- a/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntityTest.java
+++ b/odata2-lib/odata-ref/src/test/java/org/apache/olingo/odata2/ref/read/EntityTest.java
@@ -31,6 +31,8 @@ import java.nio.CharBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 
+import org.apache.olingo.odata2.annotation.processor.core.ListsProcessor;
+import org.apache.olingo.odata2.annotation.processor.core.datasource.BeanPropertyAccess;
 import org.apache.olingo.odata2.api.edm.EdmEntityContainer;
 import org.apache.olingo.odata2.api.edm.EdmEntitySet;
 import org.apache.olingo.odata2.api.edm.EdmEntityType;
@@ -43,8 +45,6 @@ import org.apache.olingo.odata2.api.processor.ODataResponse;
 import org.apache.olingo.odata2.api.uri.KeyPredicate;
 import org.apache.olingo.odata2.api.uri.PathInfo;
 import org.apache.olingo.odata2.api.uri.UriInfo;
-import org.apache.olingo.odata2.core.annotation.data.BeanPropertyAccess;
-import org.apache.olingo.odata2.core.annotation.processor.ListsProcessor;
 import org.apache.olingo.odata2.core.commons.ContentType;
 import org.apache.olingo.odata2.ref.model.DataContainer;
 import org.apache.olingo.odata2.ref.processor.ScenarioDataSource;