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

[1/5] [OLINGO-168] metadata serialization

Repository: incubator-olingo-odata4
Updated Branches:
  refs/heads/olingo168 [created] 6fdfc458b


http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
index 7702a63..06056e0 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterValidator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterValidator.java
index 9565c38..2ee92f7 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterValidator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterValidator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -444,15 +444,15 @@ public class FilterValidator implements Validator {
 
     return this;
   }
-  
+
   public FilterValidator isMemberStartType(final FullQualifiedName fullName) {
     if (!(curExpression instanceof MemberImpl)) {
       fail("Current expression not a member");
     }
-    
+
     MemberImpl member = (MemberImpl) curExpression;
     EdmType actualType = member.getStartTypeFilter();
-    
+
     FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
     assertEquals(fullName, actualName);
     return this;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParseTreeToText.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParseTreeToText.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParseTreeToText.java
index 4582478..f6a3086 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParseTreeToText.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParseTreeToText.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserValidator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserValidator.java
index b6237e4..3f73b97 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserValidator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserValidator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserWithLogging.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserWithLogging.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserWithLogging.java
index 2e3abf4..524a38a 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserWithLogging.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ParserWithLogging.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ResourceValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ResourceValidator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ResourceValidator.java
index 31392d2..039cebd 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ResourceValidator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ResourceValidator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -54,7 +54,6 @@ import org.apache.olingo.server.core.uri.queryoption.CustomQueryOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.SelectOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.MemberImpl;
 
 public class ResourceValidator implements Validator {
   private Edm edm;
@@ -326,19 +325,21 @@ public class ResourceValidator implements Validator {
   }
 
   // TODO remove
-  /*public ResourceValidator isCollection(final boolean isCollection) {
-    if (!(uriPathInfo instanceof UriResourcePartTyped)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-    UriResourcePartTyped uriPathInfoTyped = (UriResourcePartTyped) uriPathInfo;
-
-    EdmType type = uriPathInfoTyped.getType();
-    if (type == null) {
-      fail("isCollection: type == null");
-    }
-    assertEquals(isCollection, uriPathInfoTyped.isCollection());
-    return this;
-  }*/
+  /*
+   * public ResourceValidator isCollection(final boolean isCollection) {
+   * if (!(uriPathInfo instanceof UriResourcePartTyped)) {
+   * fail("invalid resource kind: " + uriPathInfo.getKind().toString());
+   * }
+   * UriResourcePartTyped uriPathInfoTyped = (UriResourcePartTyped) uriPathInfo;
+   * 
+   * EdmType type = uriPathInfoTyped.getType();
+   * if (type == null) {
+   * fail("isCollection: type == null");
+   * }
+   * assertEquals(isCollection, uriPathInfoTyped.isCollection());
+   * return this;
+   * }
+   */
 
   public ResourceValidator isFilterString(final String expectedFilterTreeAsString) {
 
@@ -367,7 +368,7 @@ public class ResourceValidator implements Validator {
     return this;
 
   }
-  
+
   public ResourceValidator isKeyPredicateAlias(final int index, final String name, final String alias) {
     if (!(uriPathInfo instanceof UriResourceWithKeysImpl)) {
       fail("invalid resource kind: " + uriPathInfo.getKind().toString());
@@ -581,12 +582,12 @@ public class ResourceValidator implements Validator {
     return this;
   }
 
-  public ResourceValidator isSelectStartType(final int index, FullQualifiedName fullName) {
+  public ResourceValidator isSelectStartType(final int index, final FullQualifiedName fullName) {
     SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
     SelectItem item = select.getSelectItems().get(index);
 
     EdmType actualType = item.getStartTypeFilter();
-    
+
     FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
     assertEquals(fullName, actualName);
     return this;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TestErrorLogger.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TestErrorLogger.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TestErrorLogger.java
index ab1fd2d..0153036 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TestErrorLogger.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TestErrorLogger.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
index cc73d11..4a94bb3 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriLexerWithTrace.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriLexerWithTrace.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriLexerWithTrace.java
index da0181d..9005080 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriLexerWithTrace.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriLexerWithTrace.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriValidator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriValidator.java
index 5aa9047..e098f4c 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriValidator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/UriValidator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -138,18 +138,17 @@ public class UriValidator implements Validator {
         .setUriInfoImplPath(uriInfo1);
 
   }
-  
-  public UriValidator isSelectStartType(int index, final FullQualifiedName fullName) {
+
+  public UriValidator isSelectStartType(final int index, final FullQualifiedName fullName) {
     SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
     SelectItem item = select.getSelectItems().get(index);
     EdmType actualType = item.getStartTypeFilter();
-    
+
     FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
     assertEquals(fullName, actualName);
     return this;
- 
-  
-}
+
+  }
 
   // Validation
   public UriValidator isKind(final UriInfoKind kind) {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/Validator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/Validator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/Validator.java
index a5d5cac..caccc78 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/Validator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/Validator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */


[3/5] [OLINGO-168] metadata serialization

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java
index 0ec6644..fa35d2e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CountOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java
index 1197cf2..f5ae251 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/CustomQueryOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java
index 0fa3314..12985ee 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandItemImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -33,7 +33,6 @@ import org.apache.olingo.server.api.uri.queryoption.SelectOption;
 import org.apache.olingo.server.api.uri.queryoption.SkipOption;
 import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind;
 import org.apache.olingo.server.api.uri.queryoption.TopOption;
-import org.apache.olingo.server.core.uri.queryoption.expression.MemberImpl;
 
 public class ExpandItemImpl implements ExpandItem {
   private LevelsExpandOption levelsExpandOption;
@@ -162,15 +161,13 @@ public class ExpandItemImpl implements ExpandItem {
     return this;
   }
 
-  
-  
-  @Override 
+  @Override
   public EdmType getStartTypeFilter() {
-    return this.startTypeFilter;
+    return startTypeFilter;
   }
 
-  public ExpandItemImpl setTypeFilter(EdmType startTypeFilter) {
-     this.startTypeFilter = startTypeFilter;
-     return this;
+  public ExpandItemImpl setTypeFilter(final EdmType startTypeFilter) {
+    this.startTypeFilter = startTypeFilter;
+    return this;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java
index 9a08a37..6cedc15 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/ExpandOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java
index 816db6c..8f0b0be 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FilterOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java
index 7088602..a0baad7 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/FormatOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java
index ddc6d08..f7df825 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/IdOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java
index d02ab00..dc17fdc 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/LevelsOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java
index a6c9cee..aac33f0 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByItemImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java
index 3996c06..a278682 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/OrderByOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java
index c2ba9d4..1239cc6 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java
index add4cc6..130ef27 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SearchOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java
index ac655d6..13d6436 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectItemImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -70,15 +70,15 @@ public class SelectItemImpl implements SelectItem {
   public void addAllOperationsInSchema(final FullQualifiedName addOperationsInSchemaNameSpace) {
     this.addOperationsInSchemaNameSpace = addOperationsInSchemaNameSpace;
   }
-  
-  @Override 
+
+  @Override
   public EdmType getStartTypeFilter() {
-    return this.startTypeFilter;
+    return startTypeFilter;
   }
 
-  public SelectItemImpl setTypeFilter(EdmType startTypeFilter) {
-     this.startTypeFilter = startTypeFilter;
-     return this;
+  public SelectItemImpl setTypeFilter(final EdmType startTypeFilter) {
+    this.startTypeFilter = startTypeFilter;
+    return this;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java
index 5dbe9d3..b7ead9c 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SelectOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java
index 7969410..84549e4 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java
index 6890244..f65115c 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SkipTokenOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java
index 24d1c48..99d94fd 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/SystemQueryOptionImpl.java
@@ -1,25 +1,25 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.olingo.server.core.uri.queryoption;
 
-import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind;
 import org.apache.olingo.server.api.uri.queryoption.SystemQueryOption;
+import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind;
 
 public class SystemQueryOptionImpl extends QueryOptionImpl implements SystemQueryOption {
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java
index 4085a29..aa33120 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/TopOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -21,7 +21,6 @@ package org.apache.olingo.server.core.uri.queryoption;
 import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind;
 import org.apache.olingo.server.api.uri.queryoption.TopOption;
 
-
 public class TopOptionImpl extends SystemQueryOptionImpl implements TopOption {
   private int value;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java
index 03c7a01..0c5770f 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/AliasImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java
index ecd9dfc..e583a53 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/BinaryImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java
index a356fc0..b565973 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/EnumerationImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java
index af04229..f1d3e9e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java
index f1fffe2..f90252d 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LambdaRefImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java
index 022b00b..4d4009a 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/LiteralImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java
index 18fc519..5aba82f 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MemberImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -85,15 +85,15 @@ public class MemberImpl extends ExpressionImpl implements Member, VisitableExres
     }
     return false;
   }
-  
-  @Override 
+
+  @Override
   public EdmType getStartTypeFilter() {
-    return this.startTypeFilter;
+    return startTypeFilter;
   }
 
-  public MemberImpl setTypeFilter(EdmType startTypeFilter) {
-     this.startTypeFilter = startTypeFilter;
-     return this;
+  public MemberImpl setTypeFilter(final EdmType startTypeFilter) {
+    this.startTypeFilter = startTypeFilter;
+    return this;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java
index e06a3d0..0b8be21 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/MethodImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java
index 9e5825f..451cf0a 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/TypeLiteralImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java
index f782bb4..da4f5c6 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/expression/UnaryImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/ServiceDocumentTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/ServiceDocumentTest.java
deleted file mode 100644
index 8d08820..0000000
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/ServiceDocumentTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.server.core;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-import org.apache.olingo.commons.api.edm.EdmEntitySet;
-import org.apache.olingo.commons.api.edm.EdmFunctionImport;
-import org.apache.olingo.commons.api.edm.EdmSingleton;
-import org.apache.olingo.server.api.ODataFormat;
-import org.apache.olingo.server.api.ODataSerializer;
-import org.apache.olingo.server.api.ODataServer;
-import org.apache.olingo.server.core.testutil.StringUtils;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ServiceDocumentTest {
-
-  private Edm edm;
-
-  @Before
-  public void before() {
-
-    EdmEntitySet edmEntitySet1 = mock(EdmEntitySet.class);
-    when(edmEntitySet1.getName()).thenReturn("entitySetName1");
-    when(edmEntitySet1.isIncludeInServiceDocument()).thenReturn(true);
-
-    EdmEntitySet edmEntitySet2 = mock(EdmEntitySet.class);
-    when(edmEntitySet2.getName()).thenReturn("entitySetName2");
-    when(edmEntitySet2.isIncludeInServiceDocument()).thenReturn(true);
-
-    EdmEntitySet edmEntitySet3 = mock(EdmEntitySet.class);
-    when(edmEntitySet3.getName()).thenReturn("entitySetName3");
-    when(edmEntitySet3.isIncludeInServiceDocument()).thenReturn(false);
-
-    List<EdmEntitySet> entitySets = new ArrayList<EdmEntitySet>();
-    entitySets.add(edmEntitySet1);
-    entitySets.add(edmEntitySet2);
-    entitySets.add(edmEntitySet3);
-
-    EdmFunctionImport functionImport1 = mock(EdmFunctionImport.class);
-    when(functionImport1.getName()).thenReturn("functionImport1");
-    when(functionImport1.isIncludeInServiceDocument()).thenReturn(true);
-
-    EdmFunctionImport functionImport2 = mock(EdmFunctionImport.class);
-    when(functionImport2.getName()).thenReturn("functionImport2");
-    when(functionImport2.isIncludeInServiceDocument()).thenReturn(true);
-
-    EdmFunctionImport functionImport3 = mock(EdmFunctionImport.class);
-    when(functionImport3.getName()).thenReturn("functionImport3");
-    when(functionImport3.isIncludeInServiceDocument()).thenReturn(false);
-
-    List<EdmFunctionImport> functionImports = new ArrayList<EdmFunctionImport>();
-    functionImports.add(functionImport1);
-    functionImports.add(functionImport2);
-    functionImports.add(functionImport3);
-
-    EdmSingleton singleton1 = mock(EdmSingleton.class);
-    when(singleton1.getName()).thenReturn("singleton1");
-
-    EdmSingleton singleton2 = mock(EdmSingleton.class);
-    when(singleton2.getName()).thenReturn("singleton2");
-
-    EdmSingleton singleton3 = mock(EdmSingleton.class);
-    when(singleton3.getName()).thenReturn("singleton3");
-
-    List<EdmSingleton> singletons = new ArrayList<EdmSingleton>();
-    singletons.add(singleton1);
-    singletons.add(singleton2);
-    singletons.add(singleton3);
-
-    EdmEntityContainer edmEntityContainer = mock(EdmEntityContainer.class);
-    when(edmEntityContainer.getEntitySets()).thenReturn(entitySets);
-    when(edmEntityContainer.getFunctionImports()).thenReturn(functionImports);
-    when(edmEntityContainer.getSingletons()).thenReturn(singletons);
-
-    edm = mock(Edm.class);
-    when(edm.getEntityContainer(null)).thenReturn(edmEntityContainer);
-  }
-
-  @Test
-  public void writeServiceDocumentJson() throws Exception {
-    String serviceRoot = "http://localhost:8080/odata.svc";
-
-    ODataServer server = ODataServer.newInstance();
-    assertNotNull(server);
-
-    ODataSerializer serializer = server.getSerializer(ODataFormat.JSON);
-    assertNotNull(serializer);
-
-    InputStream result = serializer.serviceDocument(edm, serviceRoot);
-    assertNotNull(result);
-    String jsonString = StringUtils.inputStreamToString(result, true);
-
-    assertTrue(jsonString.contains("entitySetName1"));
-    assertTrue(jsonString.contains("entitySetName2"));
-    assertFalse(jsonString.contains("entitySetName3"));
-
-    assertTrue(jsonString.contains("functionImport1"));
-    assertTrue(jsonString.contains("functionImport2"));
-    assertFalse(jsonString.contains("functionImport3"));
-
-    assertTrue(jsonString.contains("singleton1"));
-    assertTrue(jsonString.contains("singleton2"));
-    assertTrue(jsonString.contains("singleton3"));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
index c51dd79..cb1d8d3 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -41,8 +41,6 @@ import org.apache.olingo.server.api.edm.provider.Action;
 import org.apache.olingo.server.api.edm.provider.EntitySetPath;
 import org.apache.olingo.server.api.edm.provider.Parameter;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
-import org.apache.olingo.server.core.edm.provider.EdmActionImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
index 97be017..f3963f6 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImplTest.java
@@ -32,8 +32,6 @@ import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.Target;
 import org.apache.olingo.server.api.edm.provider.ActionImport;
-import org.apache.olingo.server.core.edm.provider.EdmActionImportImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
index 11e610e..4848e82 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,8 +38,6 @@ import org.apache.olingo.server.api.edm.provider.ComplexType;
 import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.api.edm.provider.NavigationProperty;
 import org.apache.olingo.server.api.edm.provider.Property;
-import org.apache.olingo.server.core.edm.provider.EdmComplexTypeImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
index d813a27..70291e7 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -44,8 +44,6 @@ import org.apache.olingo.server.api.edm.provider.EntityContainerInfo;
 import org.apache.olingo.server.api.edm.provider.EntitySet;
 import org.apache.olingo.server.api.edm.provider.FunctionImport;
 import org.apache.olingo.server.api.edm.provider.Singleton;
-import org.apache.olingo.server.core.edm.provider.EdmEntityContainerImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -61,107 +59,107 @@ public class EdmEntityContainerImplTest {
         new EntityContainerInfo().setContainerName(new FullQualifiedName("space", "name"));
     container = new EdmEntityContainerImpl(edm, provider, entityContainerInfo);
   }
-  
+
   @Test
-  public void getAllEntitySetInitial(){
+  public void getAllEntitySetInitial() {
     List<EdmEntitySet> entitySets = container.getEntitySets();
     assertNotNull(entitySets);
     assertEquals(2, entitySets.size());
   }
-  
+
   @Test
-  public void getAllEntitySetsAfterOneWasAlreadyLoaded(){
+  public void getAllEntitySetsAfterOneWasAlreadyLoaded() {
     EdmEntitySet entitySet = container.getEntitySet("entitySetName");
     List<EdmEntitySet> entitySets = container.getEntitySets();
     assertNotNull(entitySets);
     assertEquals(2, entitySets.size());
     boolean contained = false;
-    for(EdmEntitySet es: entitySets){
-      //Already loaded entity set must be the same 
-      if(es.getName().equals("entitySetName")){
+    for (EdmEntitySet es : entitySets) {
+      // Already loaded entity set must be the same
+      if (es.getName().equals("entitySetName")) {
         assertTrue(entitySet == es);
         contained = true;
       }
     }
-    if(!contained){
+    if (!contained) {
       fail("Should have found entity set in this list.");
     }
   }
-  
+
   @Test
-  public void getAllSingletonsInitial(){
+  public void getAllSingletonsInitial() {
     List<EdmSingleton> singletons = container.getSingletons();
     assertNotNull(singletons);
     assertEquals(2, singletons.size());
   }
-  
+
   @Test
-  public void getAllSingletonsAfterOneWasAlreadyLoaded(){
+  public void getAllSingletonsAfterOneWasAlreadyLoaded() {
     EdmSingleton singleton = container.getSingleton("singletonName");
     List<EdmSingleton> singletons = container.getSingletons();
     assertNotNull(singletons);
     assertEquals(2, singletons.size());
     boolean contained = false;
-    for(EdmSingleton s: singletons){
-      //Already loaded singleton must be the same 
-      if(s.getName().equals("singletonName")){
+    for (EdmSingleton s : singletons) {
+      // Already loaded singleton must be the same
+      if (s.getName().equals("singletonName")) {
         assertTrue(singleton == s);
         contained = true;
       }
     }
-    if(!contained){
+    if (!contained) {
       fail("Should have found singleton in this list.");
     }
   }
-  
+
   @Test
-  public void getAllActionImportsInitial(){
+  public void getAllActionImportsInitial() {
     List<EdmActionImport> actionImports = container.getActionImports();
     assertNotNull(actionImports);
     assertEquals(2, actionImports.size());
   }
-  
+
   @Test
-  public void getAllActionImportsAfterOneWasAlreadyLoaded(){
+  public void getAllActionImportsAfterOneWasAlreadyLoaded() {
     EdmActionImport actionImport = container.getActionImport("actionImportName");
     List<EdmActionImport> actionImports = container.getActionImports();
     assertNotNull(actionImports);
     assertEquals(2, actionImports.size());
     boolean contained = false;
-    for(EdmActionImport ai: actionImports){
-      //Already loaded action import must be the same 
-      if(ai.getName().equals("actionImportName")){
+    for (EdmActionImport ai : actionImports) {
+      // Already loaded action import must be the same
+      if (ai.getName().equals("actionImportName")) {
         assertTrue(actionImport == ai);
         contained = true;
       }
     }
-    if(!contained){
+    if (!contained) {
       fail("Should have found action import in this list.");
     }
   }
-  
+
   @Test
-  public void getAllFunctionImportsInitial(){
+  public void getAllFunctionImportsInitial() {
     List<EdmFunctionImport> functionImports = container.getFunctionImports();
     assertNotNull(functionImports);
     assertEquals(2, functionImports.size());
   }
-  
+
   @Test
-  public void getAllFunctionImportsAfterOneWasAlreadyLoaded(){
+  public void getAllFunctionImportsAfterOneWasAlreadyLoaded() {
     EdmFunctionImport functionImport = container.getFunctionImport("functionImportName");
     List<EdmFunctionImport> functionImports = container.getFunctionImports();
     assertNotNull(functionImports);
     assertEquals(2, functionImports.size());
     boolean contained = false;
-    for(EdmFunctionImport fi: functionImports){
-      //Already loaded function import must be the same 
-      if(fi.getName().equals("functionImportName")){
+    for (EdmFunctionImport fi : functionImports) {
+      // Already loaded function import must be the same
+      if (fi.getName().equals("functionImportName")) {
         assertTrue(functionImport == fi);
         contained = true;
       }
     }
-    if(!contained){
+    if (!contained) {
       fail("Should have found function import in this list.");
     }
   }
@@ -311,30 +309,30 @@ public class EdmEntityContainerImplTest {
       }
       return null;
     }
-    
+
     @Override
     public EntityContainer getEntityContainer() throws ODataException {
       EntityContainer container = new EntityContainer();
       List<EntitySet> entitySets = new ArrayList<EntitySet>();
       entitySets.add(new EntitySet().setName("entitySetName"));
       entitySets.add(new EntitySet().setName("entitySetName2"));
-      container.setEntitySets(entitySets );
-      
+      container.setEntitySets(entitySets);
+
       List<Singleton> singletons = new ArrayList<Singleton>();
       singletons.add(new Singleton().setName("singletonName"));
       singletons.add(new Singleton().setName("singletonName2"));
-      container.setSingletons(singletons );
-      
+      container.setSingletons(singletons);
+
       List<ActionImport> actionImports = new ArrayList<ActionImport>();
       actionImports.add(new ActionImport().setName("actionImportName"));
       actionImports.add(new ActionImport().setName("actionImportName2"));
-      container.setActionImports(actionImports );
-      
+      container.setActionImports(actionImports);
+
       List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
       functionImports.add(new FunctionImport().setName("functionImportName"));
       functionImports.add(new FunctionImport().setName("functionImportName2"));
-      container.setFunctionImports(functionImports );
-      
+      container.setFunctionImports(functionImports);
+
       return container;
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
index 112b60a..4ac6095 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -37,9 +37,6 @@ import org.apache.olingo.server.api.edm.provider.EntitySet;
 import org.apache.olingo.server.api.edm.provider.EntityType;
 import org.apache.olingo.server.api.edm.provider.NavigationPropertyBinding;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
-import org.apache.olingo.server.core.edm.provider.EdmEntityContainerImpl;
-import org.apache.olingo.server.core.edm.provider.EdmEntitySetImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmEntitySetImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
index 6bcc6bd..6a50814 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -43,8 +43,6 @@ import org.apache.olingo.server.api.edm.provider.EntityType;
 import org.apache.olingo.server.api.edm.provider.NavigationProperty;
 import org.apache.olingo.server.api.edm.provider.Property;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
-import org.apache.olingo.server.core.edm.provider.EdmEntityTypeImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEnumTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEnumTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEnumTest.java
index 748bbc2..fe14b1d 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEnumTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEnumTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -34,8 +34,6 @@ import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
 import org.apache.olingo.server.api.edm.provider.EnumMember;
 import org.apache.olingo.server.api.edm.provider.EnumType;
-import org.apache.olingo.server.core.edm.provider.EdmEnumTypeImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmEnumTest extends PrimitiveTypeBaseTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImplTest.java
index b450261..5089847 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -31,8 +31,6 @@ import org.apache.olingo.commons.api.edm.EdmReturnType;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.server.api.edm.provider.Function;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
-import org.apache.olingo.server.core.edm.provider.EdmFunctionImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImportImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImportImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImportImplTest.java
index 4f4b302..cab77e9 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImportImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImportImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,9 +38,6 @@ import org.apache.olingo.server.api.edm.provider.Function;
 import org.apache.olingo.server.api.edm.provider.FunctionImport;
 import org.apache.olingo.server.api.edm.provider.Parameter;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
-import org.apache.olingo.server.core.edm.provider.EdmEntityContainerImpl;
-import org.apache.olingo.server.core.edm.provider.EdmFunctionImportImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmFunctionImportImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImplTest.java
index adc0b30..e2950f3 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -32,7 +32,6 @@ import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.EdmKeyPropertyRef;
 import org.apache.olingo.commons.api.edm.EdmProperty;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
-import org.apache.olingo.server.core.edm.provider.EdmKeyPropertyRefImpl;
 import org.junit.Test;
 
 public class EdmKeyPropertyRefImplTest {


[4/5] [OLINGO-168] metadata serialization

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/utils/CircleStreamBuffer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/utils/CircleStreamBuffer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/utils/CircleStreamBuffer.java
new file mode 100644
index 0000000..3bf8a7a
--- /dev/null
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/utils/CircleStreamBuffer.java
@@ -0,0 +1,327 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.serializer.utils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.util.Queue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+/**
+ * Circular stream buffer to write/read into/from one single buffer.
+ * With support of {@link InputStream} and {@link OutputStream} access to buffered data.
+ * 
+ * 
+ */
+public class CircleStreamBuffer {
+
+  private static final int NEW_BUFFER_RESIZE_FACTOR = 2;
+  private static final int READ_EOF = -1;
+  private static final int DEFAULT_CAPACITY = 8192;
+  private static final int MAX_CAPACITY = DEFAULT_CAPACITY * 32;
+
+  private int currentAllocateCapacity = DEFAULT_CAPACITY;
+
+  private boolean writeMode = true;
+  private boolean writeClosed = false;
+  private boolean readClosed = false;
+
+  private Queue<ByteBuffer> bufferQueue = new LinkedBlockingQueue<ByteBuffer>();
+  private ByteBuffer currentWriteBuffer;
+
+  private InternalInputStream inStream;
+  private InternalOutputStream outStream;
+
+  /**
+   * Creates a {@link CircleStreamBuffer} with default buffer size.
+   */
+  public CircleStreamBuffer() {
+    this(DEFAULT_CAPACITY);
+  }
+
+  /**
+   * Create a {@link CircleStreamBuffer} with given buffer size in bytes.
+   * 
+   * @param bufferSize
+   */
+  public CircleStreamBuffer(final int bufferSize) {
+    currentAllocateCapacity = bufferSize;
+    createNewWriteBuffer();
+    inStream = new InternalInputStream(this);
+    outStream = new InternalOutputStream(this);
+  }
+
+  /**
+   * Get {@link InputStream} for data read access.
+   * 
+   * @return the stream
+   */
+  public InputStream getInputStream() {
+    return inStream;
+  }
+
+  /**
+   * Get {@link OutputStream} for write data.
+   * 
+   * @return the stream
+   */
+  public OutputStream getOutputStream() {
+    return outStream;
+  }
+
+  // #############################################
+  // #
+  // # Common parts
+  // #
+  // #############################################
+
+  /**
+   * Closes the write (input) part of the {@link CircleStreamBuffer}.
+   * After this call the buffer can only be read out.
+   */
+  public void closeWrite() {
+    writeClosed = true;
+  }
+
+  /**
+   * Closes the read (output) part of the {@link CircleStreamBuffer}.
+   * After this call it is possible to write into the buffer (but can never be read out).
+   */
+  public void closeRead() {
+    readClosed = true;
+    // clear references to byte buffers
+    ByteBuffer buffer = bufferQueue.poll();
+    while (buffer != null) {
+      buffer.clear();
+      buffer = bufferQueue.poll();
+    }
+  }
+
+  /**
+   * Closes write and read part (and hence the complete buffer).
+   */
+  public void close() {
+    closeWrite();
+    closeRead();
+  }
+
+  private int remaining() throws IOException {
+    if (writeMode) {
+      return currentWriteBuffer.remaining();
+    } else {
+      ByteBuffer toRead = getReadBuffer();
+      if (toRead == null) {
+        return 0;
+      }
+      return toRead.remaining();
+    }
+  }
+
+  // #############################################
+  // #
+  // # Reading parts
+  // #
+  // #############################################
+
+  private ByteBuffer getReadBuffer() throws IOException {
+    if (readClosed) {
+      throw new IOException("Tried to read from closed stream.");
+    }
+
+    boolean next = false;
+    ByteBuffer tmp = null;
+    if (writeMode) {
+      writeMode = false;
+      next = true;
+    } else {
+      tmp = bufferQueue.peek();
+      if (tmp != null && !tmp.hasRemaining()) {
+        tmp = bufferQueue.poll();
+        next = true;
+      }
+    }
+
+    if (next) {
+      tmp = bufferQueue.peek();
+      if (tmp != null) {
+        tmp.flip();
+      }
+      tmp = getReadBuffer();
+    }
+
+    return tmp;
+  }
+
+  private int read(final byte[] b, final int off, final int len) throws IOException {
+    ByteBuffer readBuffer = getReadBuffer();
+    if (readBuffer == null) {
+      return READ_EOF;
+    }
+
+    int toReadLength = readBuffer.remaining();
+    if (len < toReadLength) {
+      toReadLength = len;
+    }
+    readBuffer.get(b, off, toReadLength);
+    return toReadLength;
+  }
+
+  private int read() throws IOException {
+    ByteBuffer readBuffer = getReadBuffer();
+    if (readBuffer == null) {
+      return READ_EOF;
+    }
+
+    return readBuffer.get();
+  }
+
+  // #############################################
+  // #
+  // # Writing parts
+  // #
+  // #############################################
+
+  private void write(final byte[] data, final int off, final int len) throws IOException {
+    ByteBuffer writeBuffer = getWriteBuffer(len);
+    writeBuffer.put(data, off, len);
+  }
+
+  private ByteBuffer getWriteBuffer(final int size) throws IOException {
+    if (writeClosed) {
+      throw new IOException("Tried to write into closed stream.");
+    }
+
+    if (writeMode) {
+      if (remaining() < size) {
+        createNewWriteBuffer(size);
+      }
+    } else {
+      writeMode = true;
+      createNewWriteBuffer();
+    }
+
+    return currentWriteBuffer;
+  }
+
+  private void write(final int b) throws IOException {
+    ByteBuffer writeBuffer = getWriteBuffer(1);
+    writeBuffer.put((byte) b);
+  }
+
+  private void createNewWriteBuffer() {
+    createNewWriteBuffer(currentAllocateCapacity);
+  }
+
+  /**
+   * Creates a new buffer (per {@link #allocateBuffer(int)}) with the requested capacity as minimum capacity, add the
+   * new allocated
+   * buffer to the {@link #bufferQueue} and set it as {@link #currentWriteBuffer}.
+   * 
+   * @param requestedCapacity minimum capacity for new allocated buffer
+   */
+  private void createNewWriteBuffer(final int requestedCapacity) {
+    ByteBuffer b = allocateBuffer(requestedCapacity);
+    bufferQueue.add(b);
+    currentWriteBuffer = b;
+  }
+
+  /**
+   * 
+   * @param requestedCapacity
+   * @return the buffer
+   */
+  private ByteBuffer allocateBuffer(final int requestedCapacity) {
+    int allocateCapacity = requestedCapacity;
+    if (allocateCapacity < currentAllocateCapacity) {
+      allocateCapacity = currentAllocateCapacity * NEW_BUFFER_RESIZE_FACTOR;
+    }
+    if (allocateCapacity > MAX_CAPACITY) {
+      allocateCapacity = MAX_CAPACITY;
+    }
+    // update current
+    currentAllocateCapacity = allocateCapacity;
+    return ByteBuffer.allocate(allocateCapacity);
+  }
+
+  // #############################################
+  // #
+  // # Inner classes (streams)
+  // #
+  // #############################################
+
+  /**
+   * 
+   */
+  private static class InternalInputStream extends InputStream {
+
+    private final CircleStreamBuffer inBuffer;
+
+    public InternalInputStream(final CircleStreamBuffer csBuffer) {
+      inBuffer = csBuffer;
+    }
+
+    @Override
+    public int available() throws IOException {
+      return inBuffer.remaining();
+    }
+
+    @Override
+    public int read() throws IOException {
+      return inBuffer.read();
+    }
+
+    @Override
+    public int read(final byte[] b, final int off, final int len) throws IOException {
+      return inBuffer.read(b, off, len);
+    }
+
+    @Override
+    public void close() throws IOException {
+      inBuffer.closeRead();
+    }
+  }
+
+  /**
+   * 
+   */
+  private static class InternalOutputStream extends OutputStream {
+    private final CircleStreamBuffer outBuffer;
+
+    public InternalOutputStream(final CircleStreamBuffer csBuffer) {
+      outBuffer = csBuffer;
+    }
+
+    @Override
+    public void write(final int b) throws IOException {
+      outBuffer.write(b);
+    }
+
+    @Override
+    public void write(final byte[] b, final int off, final int len) throws IOException {
+      outBuffer.write(b, off, len);
+    }
+
+    @Override
+    public void close() throws IOException {
+      outBuffer.closeWrite();
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java
new file mode 100644
index 0000000..b7f6015
--- /dev/null
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializer.java
@@ -0,0 +1,414 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.serializer.xml;
+
+import java.util.List;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmAction;
+import org.apache.olingo.commons.api.edm.EdmActionImport;
+import org.apache.olingo.commons.api.edm.EdmComplexType;
+import org.apache.olingo.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.commons.api.edm.EdmEntityType;
+import org.apache.olingo.commons.api.edm.EdmEnumType;
+import org.apache.olingo.commons.api.edm.EdmFunction;
+import org.apache.olingo.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.commons.api.edm.EdmKeyPropertyRef;
+import org.apache.olingo.commons.api.edm.EdmNavigationProperty;
+import org.apache.olingo.commons.api.edm.EdmParameter;
+import org.apache.olingo.commons.api.edm.EdmProperty;
+import org.apache.olingo.commons.api.edm.EdmReturnType;
+import org.apache.olingo.commons.api.edm.EdmSchema;
+import org.apache.olingo.commons.api.edm.EdmSingleton;
+import org.apache.olingo.commons.api.edm.EdmStructuredType;
+import org.apache.olingo.commons.api.edm.EdmType;
+
+public class MetadataDocumentXmlSerializer {
+
+  private final Edm edm;
+
+  private final static String EDMX = "Edmx";
+  private final static String PREFIX_EDMX = "edmx";
+  private final static String NS_EDMX = "http://docs.oasis-open.org/odata/ns/edmx";
+
+  private final static String NS_EDM = "http://docs.oasis-open.org/odata/ns/edm";
+
+  public MetadataDocumentXmlSerializer(final Edm edm) {
+    this.edm = edm;
+  }
+
+  public void writeMetadataDocument(final XMLStreamWriter writer) throws XMLStreamException {
+    writer.writeStartDocument();
+    writer.setPrefix(PREFIX_EDMX, NS_EDMX);
+    writer.setDefaultNamespace(NS_EDMX);
+    writer.writeStartElement(PREFIX_EDMX, EDMX, NS_EDMX);
+    writer.writeAttribute("Version", "4.0");
+    writer.writeNamespace(PREFIX_EDMX, NS_EDMX);
+
+    appendReference(writer);
+    appendDataServices(writer);
+
+    writer.writeEndDocument();
+
+  }
+
+  private void appendDataServices(final XMLStreamWriter writer) throws XMLStreamException {
+    writer.setDefaultNamespace(NS_EDM);
+//    writer.writeStartElement(PREFIX_EDM, "DataServices", NS_EDMX);
+    writer.writeStartElement(NS_EDMX, "DataServices");
+    for (EdmSchema schema : edm.getSchemas()) {
+      appendSchema(writer, schema);
+    }
+    writer.writeEndElement();
+  }
+
+  private void appendSchema(final XMLStreamWriter writer, final EdmSchema schema) throws XMLStreamException {
+    writer.writeStartElement(NS_EDM, "Schema");
+    writer.writeDefaultNamespace(NS_EDM);
+    writer.writeAttribute("Namespace", schema.getNamespace());
+    writer.writeAttribute("Alias", schema.getAlias());
+
+    // EnumTypes
+    appendEnumTypes(writer, schema.getEnumTypes());
+
+    // EntityTypes
+    appendEntityTypes(writer, schema.getEntityTypes());
+
+    // ComplexTypes
+    appendComplexTypes(writer, schema.getComplexTypes());
+
+    // TypeDefinitions
+    // TODO: TypeDefinitions
+
+    // Actions
+    appendActions(writer, schema.getActions());
+
+    // Functions
+    appendFunctions(writer, schema.getFunctions());
+
+    // EntityContainer
+    appendEntityContainer(writer, schema.getEntityContainer());
+
+    writer.writeEndElement();
+  }
+
+  private void appendEntityContainer(final XMLStreamWriter writer, final EdmEntityContainer container)
+      throws XMLStreamException {
+    if (container != null) {
+      writer.writeStartElement("EntityContainer");
+
+      writer.writeAttribute("Name", container.getName());
+      // TODO: extends attribute
+
+      // EntitySets
+      appendEntitySets(writer, container.getEntitySets());
+
+      // Singletons
+      appendSingletons(writer, container.getSingletons());
+
+      // ActionImports
+      appendActionImports(writer, container.getActionImports());
+
+      // FunctionImports
+      appendFunctionImports(writer, container.getFunctionImports(), container.getNamespace());
+
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendFunctionImports(final XMLStreamWriter writer, final List<EdmFunctionImport> functionImports,
+      final String containerNamespace) throws XMLStreamException {
+    for (EdmFunctionImport functionImport : functionImports) {
+      writer.writeStartElement("FunctionImport");
+      writer.writeAttribute("Name", functionImport.getName());
+      writer.writeAttribute("Function", functionImport.getFunctionFqn().getFullQualifiedNameAsString());
+      EdmEntitySet returnedEntitySet = functionImport.getReturnedEntitySet();
+      if (returnedEntitySet != null) {
+        writer.writeAttribute("EntitySet", containerNamespace + "." + returnedEntitySet.getName());
+      }
+      writer.writeAttribute("IncludeInServiceDocument", "" + functionImport.isIncludeInServiceDocument());
+
+      // TODO: Annotations
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendActionImports(final XMLStreamWriter writer, final List<EdmActionImport> actionImports)
+      throws XMLStreamException {
+    for (EdmActionImport actionImport : actionImports) {
+      writer.writeStartElement("ActionImport");
+      writer.writeAttribute("Name", actionImport.getName());
+      writer.writeAttribute("Action", getFullQualifiedName(actionImport.getAction(), false));
+      // TODO: Annotations
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendSingletons(final XMLStreamWriter writer, final List<EdmSingleton> singletons)
+      throws XMLStreamException {
+    // TODO: Merge with entity set method
+    for (EdmSingleton singleton : singletons) {
+      writer.writeStartElement("Singleton");
+      writer.writeAttribute("Name", singleton.getName());
+      writer.writeAttribute("EntityType", getFullQualifiedName(singleton.getEntityType(), false));
+
+      // TODO: NavigationProperty Bindigs at edm api level
+
+      // TODO: Annotations
+      writer.writeEndElement();
+    }
+
+  }
+
+  private void appendEntitySets(final XMLStreamWriter writer, final List<EdmEntitySet> entitySets)
+      throws XMLStreamException {
+    for (EdmEntitySet entitySet : entitySets) {
+      writer.writeStartElement("EntitySet");
+      writer.writeAttribute("Name", entitySet.getName());
+      writer.writeAttribute("EntityType", getFullQualifiedName(entitySet.getEntityType(), false));
+
+      // TODO: NavigationProperty Bindigs at edm api level
+
+      // TODO: Annotations
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendFunctions(final XMLStreamWriter writer, final List<EdmFunction> functions)
+      throws XMLStreamException {
+    for (EdmFunction function : functions) {
+      writer.writeStartElement("Function");
+      writer.writeAttribute("Name", function.getName());
+      writer.writeAttribute("IsBound", "" + function.isBound());
+      writer.writeAttribute("IsComposable", "" + function.isComposable());
+
+      // TODO: move to separate method like for actions
+      for (String parameterName : function.getParameterNames()) {
+        EdmParameter parameter = function.getParameter(parameterName);
+        writer.writeEmptyElement("Parameter");
+        writer.writeAttribute("Name", parameterName);
+        writer.writeAttribute("Type", getFullQualifiedName(parameter.getType(), parameter.isCollection()));
+        // TODO: Parameter facets
+      }
+
+      EdmReturnType returnType = function.getReturnType();
+      if (returnType != null) {
+        writer.writeEmptyElement("ReturnType");
+        writer.writeAttribute("Type", getFullQualifiedName(returnType.getType(), returnType.isCollection()));
+        // TODO: Return type facets
+      }
+
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendActions(final XMLStreamWriter writer, final List<EdmAction> actions) throws XMLStreamException {
+    for (EdmAction action : actions) {
+      writer.writeStartElement("Action");
+      writer.writeAttribute("Name", action.getName());
+      writer.writeAttribute("IsBound", "" + action.isBound());
+
+      for (String parameterName : action.getParameterNames()) {
+        EdmParameter parameter = action.getParameter(parameterName);
+        writer.writeEmptyElement("Parameter");
+        writer.writeAttribute("Name", parameterName);
+        writer.writeAttribute("Type", getFullQualifiedName(parameter.getType(), parameter.isCollection()));
+        // TODO: Parameter facets
+      }
+
+      EdmReturnType returnType = action.getReturnType();
+      if (returnType != null) {
+        writer.writeEmptyElement("ReturnType");
+        writer.writeAttribute("Type", getFullQualifiedName(returnType.getType(), returnType.isCollection()));
+        // TODO: Return type facets
+      }
+
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendComplexTypes(final XMLStreamWriter writer, final List<EdmComplexType> complexTypes)
+      throws XMLStreamException {
+    for (EdmComplexType complexType : complexTypes) {
+      writer.writeStartElement("ComplexType");
+      writer.writeAttribute("Name", complexType.getName());
+
+      if (complexType.getBaseType() != null) {
+        writer.writeAttribute("BaseType", getFullQualifiedName(complexType.getBaseType(), false));
+      }
+
+      appendProperties(writer, complexType);
+
+      appendNavigationProperties(writer, complexType);
+
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendEntityTypes(final XMLStreamWriter writer, final List<EdmEntityType> entityTypes)
+      throws XMLStreamException {
+    for (EdmEntityType entityType : entityTypes) {
+      writer.writeStartElement("EntityType");
+      writer.writeAttribute("Name", entityType.getName());
+
+      if (entityType.hasStream()) {
+        writer.writeAttribute("HasStream", "" + entityType.hasStream());
+      }
+
+      if (entityType.getBaseType() != null) {
+        writer.writeAttribute("BaseType", getFullQualifiedName(entityType.getBaseType(), false));
+      }
+
+      appendKey(writer, entityType);
+
+      appendProperties(writer, entityType);
+
+      appendNavigationProperties(writer, entityType);
+
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendNavigationProperties(final XMLStreamWriter writer, final EdmStructuredType type)
+      throws XMLStreamException {
+    List<String> navigationPropertyNames = type.getNavigationPropertyNames();
+    if (type.getBaseType() != null) {
+      navigationPropertyNames.removeAll(type.getBaseType().getNavigationPropertyNames());
+    }
+    for (String navigationPropertyName : navigationPropertyNames) {
+      EdmNavigationProperty navigationProperty = type.getNavigationProperty(navigationPropertyName);
+
+      writer.writeEmptyElement("NavigationProperty");
+      writer.writeAttribute("Name", navigationPropertyName);
+      writer.writeAttribute("Type", getFullQualifiedName(navigationProperty.getType(), navigationProperty
+          .isCollection()));
+      if (navigationProperty.isNullable() != null) {
+        writer.writeAttribute("Nullable", "" + navigationProperty.isNullable());
+      }
+
+      if (navigationProperty.getPartner() != null) {
+        EdmNavigationProperty partner = navigationProperty.getPartner();
+        writer.writeAttribute("Partner", partner.getName());
+      }
+    }
+  }
+
+  private void appendProperties(final XMLStreamWriter writer, final EdmStructuredType type) throws XMLStreamException {
+    List<String> propertyNames = type.getPropertyNames();
+    if (type.getBaseType() != null) {
+      propertyNames.removeAll(type.getBaseType().getPropertyNames());
+    }
+    for (String propertyName : propertyNames) {
+      EdmProperty property = type.getStructuralProperty(propertyName);
+      writer.writeEmptyElement("Property");
+      writer.writeAttribute("Name", propertyName);
+      writer.writeAttribute("Type", getFullQualifiedName(property.getType(), property.isCollection()));
+
+      // Facets
+      if (property.isNullable() != null) {
+        writer.writeAttribute("Nullable", "" + property.isNullable());
+      }
+
+      if (property.isUnicode() != null) {
+        writer.writeAttribute("Unicode", "" + property.isUnicode());
+      }
+
+      if (property.getDefaultValue() != null) {
+        writer.writeAttribute("DefaultValue", property.getDefaultValue());
+      }
+
+      if (property.getMaxLength() != null) {
+        writer.writeAttribute("MaxLength", "" + property.getMaxLength());
+      }
+
+      if (property.getPrecision() != null) {
+        writer.writeAttribute("Precision", "" + property.getPrecision());
+      }
+
+      if (property.getScale() != null) {
+        writer.writeAttribute("Scale", "" + property.getScale());
+      }
+    }
+  }
+
+  private void appendKey(final XMLStreamWriter writer, final EdmEntityType entityType) throws XMLStreamException {
+    List<EdmKeyPropertyRef> keyPropertyRefs = entityType.getKeyPropertyRefs();
+    if (keyPropertyRefs != null && !keyPropertyRefs.isEmpty()) {
+      writer.writeStartElement("Key");
+      for (EdmKeyPropertyRef keyRef : keyPropertyRefs) {
+        writer.writeEmptyElement("PropertyRef");
+        String keyName = null;
+        if (keyRef.getPath() != null) {
+          keyName = keyRef.getPath() + "/" + keyRef.getKeyPropertyName();
+        } else {
+          keyName = keyRef.getKeyPropertyName();
+        }
+        writer.writeAttribute("Name", keyName);
+
+        if (keyRef.getAlias() != null) {
+          writer.writeAttribute("Alias", keyRef.getAlias());
+        }
+      }
+      writer.writeEndElement();
+    }
+  }
+
+  private void appendEnumTypes(final XMLStreamWriter writer, final List<EdmEnumType> enumTypes)
+      throws XMLStreamException {
+    for (EdmEnumType enumType : enumTypes) {
+      writer.writeStartElement("EnumType");
+      writer.writeAttribute("Name", enumType.getName());
+      writer.writeAttribute("isFlags", "" + enumType.isFlags());
+      writer.writeAttribute("UnderlyingType", getFullQualifiedName(enumType.getUnderlyingType(), false));
+
+      for (String memberName : enumType.getMemberNames()) {
+        writer.writeEmptyElement("Member");
+        writer.writeAttribute("Name", memberName);
+        writer.writeAttribute("Value", enumType.getMember(memberName).getValue());
+      }
+
+      writer.writeEndElement();
+    }
+  }
+
+  private String getFullQualifiedName(final EdmType type, final boolean isCollection) {
+    if (isCollection) {
+      return "Collection(" + type.getNamespace() + "." + type.getName() + ")";
+    } else {
+      return type.getNamespace() + "." + type.getName();
+    }
+  }
+
+  private void appendReference(final XMLStreamWriter writer) throws XMLStreamException {
+    writer.writeStartElement(NS_EDMX, "Reference");
+    // TODO: Where is this value comming from?
+    writer.writeAttribute("Uri", "http://docs.oasis-open.org/odata/odata/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml");
+    writer.writeEmptyElement(NS_EDMX, "Include");
+    // TODO: Where is this value comming from?
+    writer.writeAttribute("Namespace", "Org.OData.Core.V1");
+    // TODO: Where is this value comming from?
+    writer.writeAttribute("Alias", "Core");
+    writer.writeEndElement();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
index a04b55f..eedefce 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -289,8 +289,8 @@ public class UriInfoImpl implements UriInfo {
     return this;
   }
 
-  public void removeResourcePart(int index) {
-    this.pathParts.remove(index);
-    
+  public void removeResourcePart(final int index) {
+    pathParts.remove(index);
+
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriParameterImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriParameterImpl.java
index b267a02..f195dd9 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriParameterImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriParameterImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceActionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceActionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceActionImpl.java
index d14b7df..8196d03 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceActionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceActionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceComplexPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceComplexPropertyImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceComplexPropertyImpl.java
index d912d7a..f7a8502 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceComplexPropertyImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceComplexPropertyImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceCountImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceCountImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceCountImpl.java
index 3e673f3..14f43ec 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceCountImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceCountImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceEntitySetImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceEntitySetImpl.java
index 032b43e..bf6d47b 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceEntitySetImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceEntitySetImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceFunctionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceFunctionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceFunctionImpl.java
index abb8079..6f23d23 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceFunctionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceFunctionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceImpl.java
index e43d30d..9fbcbd0 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceItImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceItImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceItImpl.java
index 94810bd..b28ddf8 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceItImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceItImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAllImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAllImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAllImpl.java
index a5b81af..db30530 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAllImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAllImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAnyImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAnyImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAnyImpl.java
index 65b6a69..bcd5b97 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAnyImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaAnyImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaVarImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaVarImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaVarImpl.java
index 062525a..f71fe04 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaVarImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceLambdaVarImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceNavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceNavigationPropertyImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceNavigationPropertyImpl.java
index a95228c..3da7aef 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceNavigationPropertyImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceNavigationPropertyImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourcePrimitivePropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourcePrimitivePropertyImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourcePrimitivePropertyImpl.java
index 88600b3..d599b9b 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourcePrimitivePropertyImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourcePrimitivePropertyImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRefImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRefImpl.java
index d4abf66..a0cdc3e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRefImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRefImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRootImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRootImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRootImpl.java
index 60df6b9..0db0a01 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRootImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceRootImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceSingletonImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceSingletonImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceSingletonImpl.java
index 5854708..cc9c606 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceSingletonImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceSingletonImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceStartingTypeFilterImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceStartingTypeFilterImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceStartingTypeFilterImpl.java
index 6efe6a3..152f44c 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceStartingTypeFilterImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceStartingTypeFilterImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceTypedImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceTypedImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceTypedImpl.java
index b7029fc..d5f01ea 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceTypedImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceTypedImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceValueImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceValueImpl.java
index d366a90..7611ecb 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceValueImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceValueImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceWithKeysImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceWithKeysImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceWithKeysImpl.java
index f8827fa..22ec7a3 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceWithKeysImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriResourceWithKeysImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
index e6a2256..7d9b0d1 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
@@ -54,7 +54,6 @@ import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.FilterOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.FormatOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.IdOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.LevelsOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.OrderByOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.SelectOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.SkipOptionImpl;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/RawUri.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/RawUri.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/RawUri.java
index b7500a8..42e0a0f 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/RawUri.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/RawUri.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriContext.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriContext.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriContext.java
index 4460760..ebdcbe3 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriContext.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriContext.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -22,10 +22,6 @@ import java.util.Stack;
 
 import org.apache.olingo.commons.api.edm.EdmType;
 import org.apache.olingo.server.core.uri.UriInfoImpl;
-import org.apache.olingo.server.core.uri.antlr.UriParserParser.ExpandPathContext;
-import org.apache.olingo.server.core.uri.antlr.UriParserParser.ExpandPathExtensionContext;
-import org.apache.olingo.server.core.uri.antlr.UriParserParser.SelectItemContext;
-import org.apache.olingo.server.core.uri.antlr.UriParserParser.SelectSegmentContext;
 import org.apache.olingo.server.core.uri.parser.UriParseTreeVisitor.TypeInformation;
 import org.apache.olingo.server.core.uri.queryoption.ExpandItemImpl;
 import org.apache.olingo.server.core.uri.queryoption.SelectItemImpl;
@@ -49,15 +45,24 @@ public class UriContext {
    */
   public Stack<TypeInformation> contextTypes;
   /**
-   * Set within method {@link #visitExpandItem(ExpandPathContext ctx)} and {@link #visitExpandPathExtension(final
+   * Set within method
+   * {@link #visitExpandItem(org.apache.olingo.server.core.uri.antlr.UriParserParser.ExpandPathContext ctx)} and {@link
+   * #visitExpandPathExtension(final
    * ExpandPathExtensionContext ctx)} to allow nodes
-   * deeper in the expand tree at {@link #visitExpandPathExtension(ExpandPathExtensionContext ctx)} appending path
+   * deeper in the expand tree at
+   * {@link #visitExpandPathExtension(
+   * org.apache.olingo.server.core.uri.antlr.UriParserParser.ExpandPathExtensionContext ctx)}
+   * appending path
    * segments to the currently processed {@link ExpandItemImpl}.
    */
   public ExpandItemImpl contextExpandItemPath;
   /**
-   * Set within method {@link #visitSelectItem(SelectItemContext ctx)} to allow nodes
-   * deeper in the expand tree at {@link #visitSelectSegment(SelectSegmentContext ctx)} appending path segments to the
+   * Set within method
+   * {@link #visitSelectItem(org.apache.olingo.server.core.uri.antlr.UriParserParser.SelectItemContext ctx)} to allow
+   * nodes
+   * deeper in the expand tree at
+   * {@link #visitSelectSegment(org.apache.olingo.server.core.uri.antlr.UriParserParser.SelectSegmentContext ctx)}
+   * appending path segments to the
    * currently processed {@link SelectItemImpl}.
    */
   public SelectItemImpl contextSelectItem;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParseTreeVisitor.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParseTreeVisitor.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParseTreeVisitor.java
index b3e5d69..38ddf9a 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParseTreeVisitor.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParseTreeVisitor.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -23,7 +23,6 @@ import java.util.List;
 
 import org.antlr.v4.runtime.misc.ParseCancellationException;
 import org.antlr.v4.runtime.tree.ParseTree;
-import org.antlr.v4.runtime.tree.TerminalNodeImpl;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.edm.EdmAction;
 import org.apache.olingo.commons.api.edm.EdmActionImport;
@@ -70,7 +69,6 @@ import org.apache.olingo.server.core.uri.UriResourceValueImpl;
 import org.apache.olingo.server.core.uri.UriResourceWithKeysImpl;
 import org.apache.olingo.server.core.uri.antlr.UriLexer;
 import org.apache.olingo.server.core.uri.antlr.UriParserBaseVisitor;
-import org.apache.olingo.server.core.uri.antlr.UriParserParser.AliasAndValueContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.AllEOFContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.AllExprContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.AltAddContext;
@@ -128,7 +126,6 @@ import org.apache.olingo.server.core.uri.antlr.UriParserParser.NamespaceContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.NaninfinityContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.NowMethodCallExprContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.NullruleContext;
-import org.apache.olingo.server.core.uri.antlr.UriParserParser.Number_in_jsonContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.OdataIdentifierContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.OrderByContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.OrderByEOFContext;
@@ -157,14 +154,11 @@ import org.apache.olingo.server.core.uri.antlr.UriParserParser.TopContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.TotalOffsetMinutesMethodCallExprContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.TotalsecondsMethodCallExprContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.TrimMethodCallExprContext;
-import org.apache.olingo.server.core.uri.antlr.UriParserParser.UnaryContext;
 import org.apache.olingo.server.core.uri.antlr.UriParserParser.YearMethodCallExprContext;
-import org.apache.olingo.server.core.uri.queryoption.AliasQueryOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.CountOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.ExpandItemImpl;
 import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.FilterOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.FormatOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.LevelsOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.OrderByItemImpl;
 import org.apache.olingo.server.core.uri.queryoption.OrderByOptionImpl;
@@ -208,8 +202,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
       this.isCollection = isCollection;
     }
 
-    public TypeInformation() {
-    }
+    public TypeInformation() {}
   }
 
   public UriContext context = null;
@@ -687,26 +680,26 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
     return ret;
   }
 
-  private EdmType removeUriResourceStartingTypeFilterImpl(UriInfoImpl uriInfoImplpath) {
+  private EdmType removeUriResourceStartingTypeFilterImpl(final UriInfoImpl uriInfoImplpath) {
 
     List<UriResource> segments = uriInfoImplpath.getUriResourceParts();
     if (segments.size() == 0) {
       return null;
     }
-    
+
     UriResource segment = segments.get(0);
     if (segment instanceof UriResourceStartingTypeFilterImpl) {
       UriResourceStartingTypeFilterImpl startingTypeFilter = (UriResourceStartingTypeFilterImpl) segment;
-      
+
       EdmType type = null;
-      if (startingTypeFilter.getTypeFilterOnEntry()!= null) {
-         type =startingTypeFilter.getTypeFilterOnEntry();
-      } else if (startingTypeFilter.getTypeFilterOnCollection()!= null) {
-        type =startingTypeFilter.getTypeFilterOnCollection();
+      if (startingTypeFilter.getTypeFilterOnEntry() != null) {
+        type = startingTypeFilter.getTypeFilterOnEntry();
+      } else if (startingTypeFilter.getTypeFilterOnCollection() != null) {
+        type = startingTypeFilter.getTypeFilterOnCollection();
       } else {
-        type =startingTypeFilter.getType();
+        type = startingTypeFilter.getType();
       }
-      
+
       uriInfoImplpath.removeResourcePart(0);
       return type;
     }
@@ -1141,9 +1134,9 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
 
     super.visitExpandPath(ctx);
 
-    EdmType startType = this.removeUriResourceStartingTypeFilterImpl(context.contextUriInfo);
+    EdmType startType = removeUriResourceStartingTypeFilterImpl(context.contextUriInfo);
     expandItem.setResourcePath(context.contextUriInfo);
-    if ( startType != null) {
+    if (startType != null) {
       expandItem.setTypeFilter(startType);
     }
 
@@ -1308,11 +1301,10 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
 
     if (text.equals("max")) {
       levels.setMax();
-    } else    {
+    } else {
       levels.setValue(Integer.parseInt(text));
     }
     levels.setText(text);
-    
 
     return levels;
 
@@ -1557,7 +1549,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
   }
 
   @Override
-  public Object visitNaninfinity(NaninfinityContext ctx) {
+  public Object visitNaninfinity(final NaninfinityContext ctx) {
     return new LiteralImpl().setType(EdmPrimitiveTypeKind.Decimal.getEdmPrimitiveTypeInstance()).setText(ctx.getText());
   }
 
@@ -1808,8 +1800,8 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
       } else {
         UriInfoImpl uriInfo = (UriInfoImpl) context.contextSelectItem.getResourcePath();
         UriResource last = uriInfo.getLastResourcePart();
-        
-        prevType = getTypeInformation( last).type;
+
+        prevType = getTypeInformation(last).type;
         if (prevType == null) {
           throw wrap(new UriParserSemanticException("prev segement not typed"));
         }
@@ -1840,7 +1832,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
             uriInfo = new UriInfoImpl().setKind(UriInfoKind.resource);
             uriInfo.addResourcePart(simple);
 
-            EdmType startType = this.removeUriResourceStartingTypeFilterImpl(uriInfo);
+            EdmType startType = removeUriResourceStartingTypeFilterImpl(uriInfo);
             if (startType != null) {
               context.contextSelectItem.setTypeFilter(startType);
             }
@@ -1860,7 +1852,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
             uriInfo = new UriInfoImpl().setKind(UriInfoKind.resource);
             uriInfo.addResourcePart(complex);
 
-            EdmType startType = this.removeUriResourceStartingTypeFilterImpl(uriInfo);
+            EdmType startType = removeUriResourceStartingTypeFilterImpl(uriInfo);
             if (startType != null) {
               context.contextSelectItem.setTypeFilter(startType);
             }
@@ -1895,7 +1887,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
               UriInfoImpl uriInfo = new UriInfoImpl().setKind(UriInfoKind.resource);
               uriInfo.addResourcePart(resourcePart);
 
-              EdmType startType = this.removeUriResourceStartingTypeFilterImpl(uriInfo);
+              EdmType startType = removeUriResourceStartingTypeFilterImpl(uriInfo);
               if (startType != null) {
                 context.contextSelectItem.setTypeFilter(startType);
               }
@@ -1914,7 +1906,7 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
               UriInfoImpl uriInfo = new UriInfoImpl().setKind(UriInfoKind.resource);
               uriInfo.addResourcePart(resourcePart);
 
-              EdmType startType = this.removeUriResourceStartingTypeFilterImpl(uriInfo);
+              EdmType startType = removeUriResourceStartingTypeFilterImpl(uriInfo);
               if (startType != null) {
                 context.contextSelectItem.setTypeFilter(startType);
               }
@@ -2096,7 +2088,6 @@ public class UriParseTreeVisitor extends UriParserBaseVisitor<Object> {
         .addParameter((ExpressionImpl) ctx.vE1.accept(this));
   }
 
-
   @Override
   public ExpressionImpl visitYearMethodCallExpr(final YearMethodCallExprContext ctx) {
     return new MethodImpl()

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java
index 6bc7ba9..adb5d01 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserException.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
index c24a194..1dd952b 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSemanticException.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java
index 9ef9abe..da7f62c 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/UriParserSyntaxException.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java
index d61259a..fd971a2 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/queryoption/AliasQueryOptionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */


[5/5] git commit: [OLINGO-168] metadata serialization

Posted by ch...@apache.org.
[OLINGO-168] metadata serialization


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

Branch: refs/heads/olingo168
Commit: 6fdfc458b1a51bcc380b7a843b4f7e1cb37f4c09
Parents: 21aa475
Author: Christian Amend <ch...@apache.org>
Authored: Thu Mar 20 14:13:14 2014 +0100
Committer: Christian Amend <ch...@apache.org>
Committed: Mon Mar 24 13:11:43 2014 +0100

----------------------------------------------------------------------
 .../olingo/commons/api/edm/EdmEnumType.java     |   5 +
 .../commons/core/edm/AbstractEdmEnumType.java   |   5 +
 .../apache/olingo/server/api/ODataFormat.java   |  23 --
 .../olingo/server/api/ODataSerializer.java      |  31 --
 .../apache/olingo/server/api/ODataServer.java   |   2 +
 .../server/api/serializer/ODataFormat.java      |  23 ++
 .../server/api/serializer/ODataSerializer.java  |  33 ++
 .../olingo/server/core/CircleStreamBuffer.java  | 327 ---------------
 .../olingo/server/core/ODataJsonSerializer.java | 147 -------
 .../olingo/server/core/ODataSerializerImpl.java |  38 --
 .../olingo/server/core/ODataServerImpl.java     |  10 +-
 .../server/core/edm/provider/EdmActionImpl.java |  16 +-
 .../core/edm/provider/EdmActionImportImpl.java  |  16 +-
 .../core/edm/provider/EdmBindingTargetImpl.java |  20 +-
 .../core/edm/provider/EdmComplexTypeImpl.java   |  20 +-
 .../edm/provider/EdmEntityContainerImpl.java    |   8 +-
 .../core/edm/provider/EdmEntitySetImpl.java     |  16 +-
 .../core/edm/provider/EdmEntityTypeImpl.java    |  22 +-
 .../core/edm/provider/EdmEnumTypeImpl.java      |  22 +-
 .../core/edm/provider/EdmFunctionImpl.java      |  16 +-
 .../edm/provider/EdmKeyPropertyRefImpl.java     |  16 +-
 .../edm/provider/EdmNavigationPropertyImpl.java |  16 +-
 .../edm/provider/EdmOperationImportImpl.java    |   2 +-
 .../core/edm/provider/EdmParameterImpl.java     |  16 +-
 .../core/edm/provider/EdmPropertyImpl.java      |  16 +-
 .../core/edm/provider/EdmReturnTypeImpl.java    |  16 +-
 .../server/core/edm/provider/EdmSchemaImpl.java |   2 +-
 .../edm/provider/EdmServiceMetadataImpl.java    |  18 +-
 .../core/edm/provider/EdmSingletonImpl.java     |  16 +-
 .../provider/EdmStructuredTypeHelperImpl.java   |  16 +-
 .../core/serializer/ODataJsonSerializer.java    |  87 ++++
 .../core/serializer/ODataXmlSerializerImpl.java |  76 ++++
 .../json/ServiceDocumentJsonSerializer.java     | 103 +++++
 .../serializer/utils/CircleStreamBuffer.java    | 327 +++++++++++++++
 .../xml/MetadataDocumentXmlSerializer.java      | 414 +++++++++++++++++++
 .../olingo/server/core/uri/UriInfoImpl.java     |  22 +-
 .../server/core/uri/UriParameterImpl.java       |  16 +-
 .../server/core/uri/UriResourceActionImpl.java  |  16 +-
 .../uri/UriResourceComplexPropertyImpl.java     |  16 +-
 .../server/core/uri/UriResourceCountImpl.java   |  16 +-
 .../core/uri/UriResourceEntitySetImpl.java      |  16 +-
 .../core/uri/UriResourceFunctionImpl.java       |  16 +-
 .../olingo/server/core/uri/UriResourceImpl.java |  16 +-
 .../server/core/uri/UriResourceItImpl.java      |  16 +-
 .../core/uri/UriResourceLambdaAllImpl.java      |  16 +-
 .../core/uri/UriResourceLambdaAnyImpl.java      |  16 +-
 .../core/uri/UriResourceLambdaVarImpl.java      |  16 +-
 .../uri/UriResourceNavigationPropertyImpl.java  |  16 +-
 .../uri/UriResourcePrimitivePropertyImpl.java   |  16 +-
 .../server/core/uri/UriResourceRefImpl.java     |  16 +-
 .../server/core/uri/UriResourceRootImpl.java    |  16 +-
 .../core/uri/UriResourceSingletonImpl.java      |  16 +-
 .../uri/UriResourceStartingTypeFilterImpl.java  |  16 +-
 .../server/core/uri/UriResourceTypedImpl.java   |  16 +-
 .../server/core/uri/UriResourceValueImpl.java   |  16 +-
 .../core/uri/UriResourceWithKeysImpl.java       |  16 +-
 .../olingo/server/core/uri/parser/Parser.java   |   1 -
 .../olingo/server/core/uri/parser/RawUri.java   |  16 +-
 .../server/core/uri/parser/UriContext.java      |  37 +-
 .../core/uri/parser/UriParseTreeVisitor.java    |  65 ++-
 .../core/uri/parser/UriParserException.java     |  16 +-
 .../uri/parser/UriParserSemanticException.java  |  16 +-
 .../uri/parser/UriParserSyntaxException.java    |  16 +-
 .../uri/queryoption/AliasQueryOptionImpl.java   |  16 +-
 .../core/uri/queryoption/CountOptionImpl.java   |  16 +-
 .../uri/queryoption/CustomQueryOptionImpl.java  |  16 +-
 .../core/uri/queryoption/ExpandItemImpl.java    |  29 +-
 .../core/uri/queryoption/ExpandOptionImpl.java  |  16 +-
 .../core/uri/queryoption/FilterOptionImpl.java  |  16 +-
 .../core/uri/queryoption/FormatOptionImpl.java  |  16 +-
 .../core/uri/queryoption/IdOptionImpl.java      |  16 +-
 .../core/uri/queryoption/LevelsOptionImpl.java  |  16 +-
 .../core/uri/queryoption/OrderByItemImpl.java   |  16 +-
 .../core/uri/queryoption/OrderByOptionImpl.java |  16 +-
 .../core/uri/queryoption/QueryOptionImpl.java   |  16 +-
 .../core/uri/queryoption/SearchOptionImpl.java  |  16 +-
 .../core/uri/queryoption/SelectItemImpl.java    |  28 +-
 .../core/uri/queryoption/SelectOptionImpl.java  |  16 +-
 .../core/uri/queryoption/SkipOptionImpl.java    |  16 +-
 .../uri/queryoption/SkipTokenOptionImpl.java    |  16 +-
 .../uri/queryoption/SystemQueryOptionImpl.java  |  18 +-
 .../core/uri/queryoption/TopOptionImpl.java     |  17 +-
 .../uri/queryoption/expression/AliasImpl.java   |  16 +-
 .../uri/queryoption/expression/BinaryImpl.java  |  16 +-
 .../queryoption/expression/EnumerationImpl.java |  16 +-
 .../queryoption/expression/ExpressionImpl.java  |  16 +-
 .../queryoption/expression/LambdaRefImpl.java   |  16 +-
 .../uri/queryoption/expression/LiteralImpl.java |  16 +-
 .../uri/queryoption/expression/MemberImpl.java  |  28 +-
 .../uri/queryoption/expression/MethodImpl.java  |  16 +-
 .../queryoption/expression/TypeLiteralImpl.java |  16 +-
 .../uri/queryoption/expression/UnaryImpl.java   |  16 +-
 .../olingo/server/core/ServiceDocumentTest.java | 133 ------
 .../core/edm/provider/EdmActionImplTest.java    |  18 +-
 .../edm/provider/EdmActionImportImplTest.java   |   2 -
 .../edm/provider/EdmComplexTypeImplTest.java    |  18 +-
 .../provider/EdmEntityContainerImplTest.java    | 100 +++--
 .../core/edm/provider/EdmEntitySetImplTest.java |  19 +-
 .../edm/provider/EdmEntityTypeImplTest.java     |  18 +-
 .../server/core/edm/provider/EdmEnumTest.java   |  18 +-
 .../core/edm/provider/EdmFunctionImplTest.java  |  18 +-
 .../edm/provider/EdmFunctionImportImplTest.java |  19 +-
 .../edm/provider/EdmKeyPropertyRefImplTest.java |  17 +-
 .../core/edm/provider/EdmMemberImplTest.java    |  20 +-
 .../core/edm/provider/EdmNamedImplTest.java     |  16 +-
 .../provider/EdmNavigationPropertyImplTest.java |  18 +-
 .../core/edm/provider/EdmParameterImplTest.java |  18 +-
 .../core/edm/provider/EdmPropertyImplTest.java  |  18 +-
 .../EdmProviderImplOverloadingTest.java         |  17 +-
 .../core/edm/provider/EdmProviderImplTest.java  |  17 +-
 .../edm/provider/EdmReturnTypeImplTest.java     |  18 +-
 .../core/edm/provider/EdmSchemaImplTest.java    |  33 +-
 .../provider/EdmServiceMetadataImplTest.java    |  17 +-
 .../core/edm/provider/EdmSingletonImplTest.java |  19 +-
 .../edm/provider/EdmTypeDefinitionImplTest.java |  18 +-
 .../core/edm/provider/EdmTypeImplTest.java      |  16 +-
 .../serializer/json/ServiceDocumentTest.java    | 133 ++++++
 .../serializer/xml/MetadataDocumentTest.java    |  58 +++
 .../server/core/testutil/EdmTechProvider.java   | 242 ++++++++++-
 .../core/testutil/EdmTechTestProvider.java      |  16 +-
 .../server/core/testutil/StringUtils.java       |   4 +-
 .../olingo/server/core/uri/RawUriTest.java      |  26 +-
 .../olingo/server/core/uri/UriInfoImplTest.java |  19 +-
 .../server/core/uri/UriResourceImplTest.java    |  41 +-
 .../olingo/server/core/uri/antlr/TestLexer.java |  25 +-
 .../core/uri/antlr/TestUriParserImpl.java       |  26 +-
 .../core/uri/queryoption/QueryOptionTest.java   |  34 +-
 .../queryoption/expression/ExpressionTest.java  |  26 +-
 .../core/uri/testutil/ExpandValidator.java      |  30 +-
 .../core/uri/testutil/FilterTreeToText.java     |  16 +-
 .../core/uri/testutil/FilterValidator.java      |  22 +-
 .../core/uri/testutil/ParseTreeToText.java      |  16 +-
 .../core/uri/testutil/ParserValidator.java      |  16 +-
 .../core/uri/testutil/ParserWithLogging.java    |  16 +-
 .../core/uri/testutil/ResourceValidator.java    |  51 +--
 .../core/uri/testutil/TestErrorLogger.java      |  16 +-
 .../core/uri/testutil/TokenValidator.java       |  16 +-
 .../core/uri/testutil/UriLexerWithTrace.java    |  16 +-
 .../server/core/uri/testutil/UriValidator.java  |  27 +-
 .../server/core/uri/testutil/Validator.java     |  16 +-
 140 files changed, 2594 insertions(+), 1893 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
index cca20d9..dc1806d 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmEnumType.java
@@ -40,4 +40,9 @@ public interface EdmEnumType extends EdmPrimitiveType {
    * @return the {@link EdmPrimitiveType} this {@link EdmEnumType} is based upon
    */
   EdmPrimitiveType getUnderlyingType();
+
+  /**
+   * @return true if flags is set
+   */
+  boolean isFlags();
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmEnumType.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmEnumType.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmEnumType.java
index 8fcf143..d6f4fd3 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmEnumType.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/AbstractEdmEnumType.java
@@ -202,5 +202,10 @@ public abstract class AbstractEdmEnumType extends EdmTypeImpl implements EdmEnum
       throw new EdmPrimitiveTypeException("EdmPrimitiveTypeException.LITERAL_ILLEGAL_CONTENT.addContent(literal)");
     }
   }
+  
+  @Override
+  public boolean isFlags() {
+    return isFlags;
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataFormat.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataFormat.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataFormat.java
deleted file mode 100644
index f3d4bf3..0000000
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataFormat.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.server.api;
-
-public enum ODataFormat {
-  XML, JSON
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataSerializer.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataSerializer.java
deleted file mode 100644
index a6cfe5d..0000000
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataSerializer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.server.api;
-
-import java.io.InputStream;
-
-import org.apache.olingo.commons.api.edm.Edm;
-
-public interface ODataSerializer {
-
-  InputStream metadata(Edm edm);
-
-  InputStream serviceDocument(Edm edm, String serviceRoot);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServer.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServer.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServer.java
index 83d20fa..7fce30b 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServer.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServer.java
@@ -19,6 +19,8 @@
 package org.apache.olingo.server.api;
 
 import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.server.api.serializer.ODataFormat;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
 
 
 public abstract class ODataServer {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataFormat.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataFormat.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataFormat.java
new file mode 100644
index 0000000..51425d8
--- /dev/null
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataFormat.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.api.serializer;
+
+public enum ODataFormat {
+  XML, JSON
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataSerializer.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataSerializer.java
new file mode 100644
index 0000000..e8a97d7
--- /dev/null
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/ODataSerializer.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.api.serializer;
+
+import java.io.InputStream;
+
+import org.apache.olingo.commons.api.edm.Edm;
+
+public interface ODataSerializer {
+  
+  public static final String DEFAULT_CHARSET = "UTF-8";
+
+  InputStream serviceDocument(Edm edm, String serviceRoot);
+  
+  InputStream metadataDocument(Edm edm);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/CircleStreamBuffer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/CircleStreamBuffer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/CircleStreamBuffer.java
deleted file mode 100644
index 6784f87..0000000
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/CircleStreamBuffer.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.server.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.util.Queue;
-import java.util.concurrent.LinkedBlockingQueue;
-
-/**
- * Circular stream buffer to write/read into/from one single buffer.
- * With support of {@link InputStream} and {@link OutputStream} access to buffered data.
- * 
- * 
- */
-public class CircleStreamBuffer {
-
-  private static final int NEW_BUFFER_RESIZE_FACTOR = 2;
-  private static final int READ_EOF = -1;
-  private static final int DEFAULT_CAPACITY = 8192;
-  private static final int MAX_CAPACITY = DEFAULT_CAPACITY * 32;
-
-  private int currentAllocateCapacity = DEFAULT_CAPACITY;
-
-  private boolean writeMode = true;
-  private boolean writeClosed = false;
-  private boolean readClosed = false;
-
-  private Queue<ByteBuffer> bufferQueue = new LinkedBlockingQueue<ByteBuffer>();
-  private ByteBuffer currentWriteBuffer;
-
-  private InternalInputStream inStream;
-  private InternalOutputStream outStream;
-
-  /**
-   * Creates a {@link CircleStreamBuffer} with default buffer size.
-   */
-  public CircleStreamBuffer() {
-    this(DEFAULT_CAPACITY);
-  }
-
-  /**
-   * Create a {@link CircleStreamBuffer} with given buffer size in bytes.
-   * 
-   * @param bufferSize
-   */
-  public CircleStreamBuffer(final int bufferSize) {
-    currentAllocateCapacity = bufferSize;
-    createNewWriteBuffer();
-    inStream = new InternalInputStream(this);
-    outStream = new InternalOutputStream(this);
-  }
-
-  /**
-   * Get {@link InputStream} for data read access.
-   * 
-   * @return the stream
-   */
-  public InputStream getInputStream() {
-    return inStream;
-  }
-
-  /**
-   * Get {@link OutputStream} for write data.
-   * 
-   * @return the stream
-   */
-  public OutputStream getOutputStream() {
-    return outStream;
-  }
-
-  // #############################################
-  // #
-  // # Common parts
-  // #
-  // #############################################
-
-  /**
-   * Closes the write (input) part of the {@link CircleStreamBuffer}.
-   * After this call the buffer can only be read out.
-   */
-  public void closeWrite() {
-    writeClosed = true;
-  }
-
-  /**
-   * Closes the read (output) part of the {@link CircleStreamBuffer}.
-   * After this call it is possible to write into the buffer (but can never be read out).
-   */
-  public void closeRead() {
-    readClosed = true;
-    // clear references to byte buffers
-    ByteBuffer buffer = bufferQueue.poll();
-    while (buffer != null) {
-      buffer.clear();
-      buffer = bufferQueue.poll();
-    }
-  }
-
-  /**
-   * Closes write and read part (and hence the complete buffer).
-   */
-  public void close() {
-    closeWrite();
-    closeRead();
-  }
-
-  private int remaining() throws IOException {
-    if (writeMode) {
-      return currentWriteBuffer.remaining();
-    } else {
-      ByteBuffer toRead = getReadBuffer();
-      if (toRead == null) {
-        return 0;
-      }
-      return toRead.remaining();
-    }
-  }
-
-  // #############################################
-  // #
-  // # Reading parts
-  // #
-  // #############################################
-
-  private ByteBuffer getReadBuffer() throws IOException {
-    if (readClosed) {
-      throw new IOException("Tried to read from closed stream.");
-    }
-
-    boolean next = false;
-    ByteBuffer tmp = null;
-    if (writeMode) {
-      writeMode = false;
-      next = true;
-    } else {
-      tmp = bufferQueue.peek();
-      if (tmp != null && !tmp.hasRemaining()) {
-        tmp = bufferQueue.poll();
-        next = true;
-      }
-    }
-
-    if (next) {
-      tmp = bufferQueue.peek();
-      if (tmp != null) {
-        tmp.flip();
-      }
-      tmp = getReadBuffer();
-    }
-
-    return tmp;
-  }
-
-  private int read(final byte[] b, final int off, final int len) throws IOException {
-    ByteBuffer readBuffer = getReadBuffer();
-    if (readBuffer == null) {
-      return READ_EOF;
-    }
-
-    int toReadLength = readBuffer.remaining();
-    if (len < toReadLength) {
-      toReadLength = len;
-    }
-    readBuffer.get(b, off, toReadLength);
-    return toReadLength;
-  }
-
-  private int read() throws IOException {
-    ByteBuffer readBuffer = getReadBuffer();
-    if (readBuffer == null) {
-      return READ_EOF;
-    }
-
-    return readBuffer.get();
-  }
-
-  // #############################################
-  // #
-  // # Writing parts
-  // #
-  // #############################################
-
-  private void write(final byte[] data, final int off, final int len) throws IOException {
-    ByteBuffer writeBuffer = getWriteBuffer(len);
-    writeBuffer.put(data, off, len);
-  }
-
-  private ByteBuffer getWriteBuffer(final int size) throws IOException {
-    if (writeClosed) {
-      throw new IOException("Tried to write into closed stream.");
-    }
-
-    if (writeMode) {
-      if (remaining() < size) {
-        createNewWriteBuffer(size);
-      }
-    } else {
-      writeMode = true;
-      createNewWriteBuffer();
-    }
-
-    return currentWriteBuffer;
-  }
-
-  private void write(final int b) throws IOException {
-    ByteBuffer writeBuffer = getWriteBuffer(1);
-    writeBuffer.put((byte) b);
-  }
-
-  private void createNewWriteBuffer() {
-    createNewWriteBuffer(currentAllocateCapacity);
-  }
-
-  /**
-   * Creates a new buffer (per {@link #allocateBuffer(int)}) with the requested capacity as minimum capacity, add the
-   * new allocated
-   * buffer to the {@link #bufferQueue} and set it as {@link #currentWriteBuffer}.
-   * 
-   * @param requestedCapacity minimum capacity for new allocated buffer
-   */
-  private void createNewWriteBuffer(final int requestedCapacity) {
-    ByteBuffer b = allocateBuffer(requestedCapacity);
-    bufferQueue.add(b);
-    currentWriteBuffer = b;
-  }
-
-  /**
-   * 
-   * @param requestedCapacity
-   * @return the buffer
-   */
-  private ByteBuffer allocateBuffer(final int requestedCapacity) {
-    int allocateCapacity = requestedCapacity;
-    if (allocateCapacity < currentAllocateCapacity) {
-      allocateCapacity = currentAllocateCapacity * NEW_BUFFER_RESIZE_FACTOR;
-    }
-    if (allocateCapacity > MAX_CAPACITY) {
-      allocateCapacity = MAX_CAPACITY;
-    }
-    // update current
-    currentAllocateCapacity = allocateCapacity;
-    return ByteBuffer.allocate(allocateCapacity);
-  }
-
-  // #############################################
-  // #
-  // # Inner classes (streams)
-  // #
-  // #############################################
-
-  /**
-   * 
-   */
-  private static class InternalInputStream extends InputStream {
-
-    private final CircleStreamBuffer inBuffer;
-
-    public InternalInputStream(final CircleStreamBuffer csBuffer) {
-      inBuffer = csBuffer;
-    }
-
-    @Override
-    public int available() throws IOException {
-      return inBuffer.remaining();
-    }
-
-    @Override
-    public int read() throws IOException {
-      return inBuffer.read();
-    }
-
-    @Override
-    public int read(final byte[] b, final int off, final int len) throws IOException {
-      return inBuffer.read(b, off, len);
-    }
-
-    @Override
-    public void close() throws IOException {
-      inBuffer.closeRead();
-    }
-  }
-
-  /**
-   * 
-   */
-  private static class InternalOutputStream extends OutputStream {
-    private final CircleStreamBuffer outBuffer;
-
-    public InternalOutputStream(final CircleStreamBuffer csBuffer) {
-      outBuffer = csBuffer;
-    }
-
-    @Override
-    public void write(final int b) throws IOException {
-      outBuffer.write(b);
-    }
-
-    @Override
-    public void write(final byte[] b, final int off, final int len) throws IOException {
-      outBuffer.write(b, off, len);
-    }
-
-    @Override
-    public void close() throws IOException {
-      outBuffer.closeWrite();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataJsonSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataJsonSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataJsonSerializer.java
deleted file mode 100644
index 57a0d84..0000000
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataJsonSerializer.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.server.core;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-
-import org.apache.olingo.commons.api.ODataRuntimeException;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-import org.apache.olingo.commons.api.edm.EdmEntitySet;
-import org.apache.olingo.commons.api.edm.EdmFunctionImport;
-import org.apache.olingo.commons.api.edm.EdmSingleton;
-import org.apache.olingo.server.api.ODataSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.core.JsonFactory;
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
-
-public class ODataJsonSerializer implements ODataSerializer {
-
-  private static final Logger log = LoggerFactory.getLogger(ODataJsonSerializer.class);
-
-  private static final String DEFAULT_CHARSET = "UTF-8";
-
-  public static final String ODATA_CONTEXT = "@odata.context";
-  public static final String METADATA = "$metadata";
-  public static final String VALUE = "value";
-  public static final String NAME = "name";
-  public static final String URL = "url";
-  public static final String KIND = "kind";
-
-  public static final String FUNCTION_IMPORT = "FunctionImport";
-  public static final String SINGLETON = "Singleton";
-  public static final String SERVICE_DOCUMENT = "ServiceDocument";
-
-  @Override
-  public InputStream metadata(Edm edm) {
-    throw new ODataRuntimeException("Metadata in JSON format not supported!");
-  }
-
-  @Override
-  public InputStream serviceDocument(Edm edm, String serviceRoot) {
-    CircleStreamBuffer buffer;
-    BufferedWriter writer;
-    JsonFactory factory;
-    JsonGenerator gen = null;
-
-    try {
-      buffer = new CircleStreamBuffer();
-      writer = new BufferedWriter(new OutputStreamWriter(buffer.getOutputStream(), DEFAULT_CHARSET));
-      factory = new JsonFactory();
-      gen = factory.createGenerator(writer);
-
-      gen.setPrettyPrinter(new DefaultPrettyPrinter());
-
-      gen.writeStartObject();
-
-      Object metadataUri = serviceRoot + "/" + METADATA;
-      gen.writeObjectField(ODATA_CONTEXT, metadataUri);
-      gen.writeArrayFieldStart(VALUE);
-
-      writeEntitySets(gen, edm);
-      writeFunctionImports(gen, edm);
-      writeSingletons(gen, edm);
-
-      gen.close();
-
-//      writer.flush();
-//      buffer.closeWrite();
-
-      return buffer.getInputStream();
-
-    } catch (Exception e) {
-      log.error(e.getMessage(), e);
-      throw new ODataRuntimeException(e);
-    } finally {
-      if (gen != null) {
-        try {
-          gen.close();
-        } catch (IOException e) {
-          throw new ODataRuntimeException(e);
-        }
-      }
-    }
-  }
-
-  private void writeEntitySets(JsonGenerator gen, Edm edm) throws JsonGenerationException, IOException {
-    EdmEntityContainer container = edm.getEntityContainer(null);
-
-    for (EdmEntitySet edmEntitySet : container.getEntitySets()) {
-      if (edmEntitySet.isIncludeInServiceDocument()) {
-        gen.writeStartObject();
-        gen.writeObjectField(NAME, edmEntitySet.getName());
-        gen.writeObjectField(URL, edmEntitySet.getName());
-        gen.writeEndObject();
-      }
-    }
-  }
-
-  private void writeFunctionImports(JsonGenerator gen, Edm edm) throws JsonGenerationException, IOException {
-    EdmEntityContainer container = edm.getEntityContainer(null);
-
-    for (EdmFunctionImport edmFunctionImport : container.getFunctionImports()) {
-      if (edmFunctionImport.isIncludeInServiceDocument()) {
-        gen.writeStartObject();
-        gen.writeObjectField(NAME, edmFunctionImport.getName());
-        gen.writeObjectField(URL, edmFunctionImport.getName());
-        gen.writeObjectField(KIND, FUNCTION_IMPORT);
-        gen.writeEndObject();
-      }
-    }
-  }
-
-  private void writeSingletons(JsonGenerator gen, Edm edm) throws JsonGenerationException, IOException {
-    EdmEntityContainer container = edm.getEntityContainer(null);
-
-    for (EdmSingleton edmSingleton : container.getSingletons()) {
-      gen.writeStartObject();
-      gen.writeObjectField(NAME, edmSingleton.getName());
-      gen.writeObjectField(URL, edmSingleton.getName());
-      gen.writeObjectField(KIND, SINGLETON);
-      gen.writeEndObject();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataSerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataSerializerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataSerializerImpl.java
deleted file mode 100644
index 3950e0c..0000000
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataSerializerImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.server.core;
-
-import java.io.InputStream;
-
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.server.api.ODataSerializer;
-
-public class ODataSerializerImpl implements ODataSerializer {
-
-  @Override
-  public InputStream metadata(Edm edm) {
-       return null;
-  }
-
-  @Override
-  public InputStream serviceDocument(Edm edm, String serviceRoot) {
-    return null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataServerImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataServerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataServerImpl.java
index a634b2e..7beb90d 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataServerImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataServerImpl.java
@@ -19,21 +19,23 @@
 package org.apache.olingo.server.core;
 
 import org.apache.olingo.commons.api.ODataRuntimeException;
-import org.apache.olingo.server.api.ODataFormat;
-import org.apache.olingo.server.api.ODataSerializer;
 import org.apache.olingo.server.api.ODataServer;
+import org.apache.olingo.server.api.serializer.ODataFormat;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
+import org.apache.olingo.server.core.serializer.ODataJsonSerializer;
+import org.apache.olingo.server.core.serializer.ODataXmlSerializerImpl;
 
 public class ODataServerImpl extends ODataServer {
 
   @Override
-  public ODataSerializer getSerializer(ODataFormat format) {
+  public ODataSerializer getSerializer(final ODataFormat format) {
     ODataSerializer serializer;
     switch (format) {
     case JSON:
       serializer = new ODataJsonSerializer();
       break;
     case XML:
-      serializer = new ODataSerializerImpl();
+      serializer = new ODataXmlSerializerImpl();
       break;
     default:
       throw new ODataRuntimeException("Unsupported format: " + format);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImpl.java
index 511890b..e96e165 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImpl.java
index 991d348..36eabb3 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmActionImportImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmBindingTargetImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmBindingTargetImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmBindingTargetImpl.java
index 9cbfa68..c1aacb1 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmBindingTargetImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmBindingTargetImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -46,8 +46,8 @@ public abstract class EdmBindingTargetImpl extends AbstractEdmBindingTarget {
     final List<NavigationPropertyBinding> navigationPropertyBindings = target.getNavigationPropertyBindings();
     if (navigationPropertyBindings != null) {
       boolean found = false;
-      for (final Iterator<NavigationPropertyBinding> itor = navigationPropertyBindings.iterator();
-              itor.hasNext() && !found;) {
+      for (final Iterator<NavigationPropertyBinding> itor = navigationPropertyBindings.iterator(); itor.hasNext()
+          && !found;) {
 
         final NavigationPropertyBinding binding = itor.next();
         if (binding.getPath().equals(path)) {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImpl.java
index 281bb6f..c818c58 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmComplexTypeImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -33,7 +33,7 @@ public class EdmComplexTypeImpl extends AbstractEdmComplexType {
   private final EdmStructuredTypeHelper helper;
 
   public static EdmComplexTypeImpl getInstance(
-          final Edm edm, final FullQualifiedName name, final ComplexType complexType) {
+      final Edm edm, final FullQualifiedName name, final ComplexType complexType) {
 
     final EdmComplexTypeImpl instance = new EdmComplexTypeImpl(edm, name, complexType);
     instance.baseType = instance.buildBaseType(complexType.getBaseType());
@@ -43,7 +43,7 @@ public class EdmComplexTypeImpl extends AbstractEdmComplexType {
 
   private EdmComplexTypeImpl(final Edm edm, final FullQualifiedName name, final ComplexType complexType) {
     super(edm, name, complexType.getBaseType());
-    this.helper = new EdmStructuredTypeHelperImpl(edm, complexType);
+    helper = new EdmStructuredTypeHelperImpl(edm, complexType);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImpl.java
index 4199e08..7c81980 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImpl.java
@@ -49,11 +49,11 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
     this.provider = provider;
   }
 
-  public EdmEntityContainerImpl(Edm edm, EdmProvider provider, FullQualifiedName containerFQN,
-      EntityContainer entityContainer) {
+  public EdmEntityContainerImpl(final Edm edm, final EdmProvider provider, final FullQualifiedName containerFQN,
+      final EntityContainer entityContainer) {
     super(edm, containerFQN);
     this.provider = provider;
-    this.container = entityContainer;
+    container = entityContainer;
   }
 
   @Override
@@ -186,7 +186,7 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
         container = provider.getEntityContainer();
         if (container == null) {
           // TODO: Should we throw an exception here?
-          container = new EntityContainer().setName(this.getName());
+          container = new EntityContainer().setName(getName());
         }
       } catch (ODataException e) {
         throw new EdmException(e);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImpl.java
index 492095b..6805117 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntitySetImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImpl.java
index 8bb8c2d..774af98 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEntityTypeImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,14 +38,14 @@ public class EdmEntityTypeImpl extends AbstractEdmEntityType {
   private final EdmStructuredTypeHelper helper;
 
   public static EdmEntityTypeImpl getInstance(final Edm edm, final FullQualifiedName name,
-          final EntityType entityType) {
+      final EntityType entityType) {
 
     final EdmEntityTypeImpl instance = new EdmEntityTypeImpl(edm, name, entityType);
     instance.baseType = instance.buildBaseType(entityType.getBaseType());
 
     if (instance.baseType == null) {
       instance.entityBaseType = null;
-      
+
       final List<PropertyRef> key = entityType.getKey();
       if (key != null) {
         final List<EdmKeyPropertyRef> edmKey = new ArrayList<EdmKeyPropertyRef>();
@@ -64,7 +64,7 @@ public class EdmEntityTypeImpl extends AbstractEdmEntityType {
   private EdmEntityTypeImpl(final Edm edm, final FullQualifiedName name, final EntityType entityType) {
     super(edm, name, entityType.getBaseType(), entityType.hasStream());
 
-    this.helper = new EdmStructuredTypeHelperImpl(edm, entityType);
+    helper = new EdmStructuredTypeHelperImpl(edm, entityType);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEnumTypeImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEnumTypeImpl.java
index faceb0e..f5fa71f 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEnumTypeImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmEnumTypeImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -39,10 +39,10 @@ public class EdmEnumTypeImpl extends AbstractEdmEnumType implements EdmEnumType
     super(edm, enumName, enumType.isFlags());
 
     if (enumType.getUnderlyingType() == null) {
-      this.underlyingType = EdmPrimitiveTypeKind.Int32.getEdmPrimitiveTypeInstance();
+      underlyingType = EdmPrimitiveTypeKind.Int32.getEdmPrimitiveTypeInstance();
     } else {
-      this.underlyingType = EdmPrimitiveTypeKind.valueOf(
-              enumType.getUnderlyingType().getName()).getEdmPrimitiveTypeInstance();
+      underlyingType = EdmPrimitiveTypeKind.valueOf(
+          enumType.getUnderlyingType().getName()).getEdmPrimitiveTypeInstance();
       // TODO: Should we validate that the underlying type is of byte, sbyte, in16, int32 or int64?
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImpl.java
index c03bbea..f23e0a8 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmFunctionImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImpl.java
index 3b7cc0f..0660ac0 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmKeyPropertyRefImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImpl.java
index 58c0258..7f570da 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmOperationImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmOperationImportImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmOperationImportImpl.java
index f2badd7..afb6d96 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmOperationImportImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmOperationImportImpl.java
@@ -25,7 +25,7 @@ import org.apache.olingo.server.api.edm.provider.OperationImport;
 
 public abstract class EdmOperationImportImpl extends AbstractEdmOperationImport {
 
-  public EdmOperationImportImpl(final Edm edm, final EdmEntityContainer container, 
+  public EdmOperationImportImpl(final Edm edm, final EdmEntityContainer container,
       final OperationImport operationImport) {
     super(edm, container, operationImport.getName(), operationImport.getEntitySet());
   }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmParameterImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmParameterImpl.java
index d47b870..ce46b9e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmParameterImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmParameterImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImpl.java
index 20cafdf..2fb4944 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImpl.java
index 37ad8bd..c810ba7 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImpl.java
index af98a41..34d34b4 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImpl.java
@@ -46,7 +46,7 @@ public class EdmSchemaImpl extends AbstractEdmSchemaImpl {
   private final Edm edm;
   private final EdmProvider provider;
 
-  public EdmSchemaImpl(Edm edm, EdmProvider provider, Schema schema) {
+  public EdmSchemaImpl(final Edm edm, final EdmProvider provider, final Schema schema) {
     super(schema.getNamespace(), schema.getAlias());
     this.edm = edm;
     this.provider = provider;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImpl.java
index 42ed8ee..ed6c799 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -175,7 +175,7 @@ public class EdmServiceMetadataImpl implements EdmServiceMetadata {
             if (functionImports != null) {
               for (FunctionImport functionImport : functionImports) {
                 functionImportInfos.add(
-                        new EdmFunctionImportInfoImpl(entityContainer.getName(), functionImport.getName()));
+                    new EdmFunctionImportInfoImpl(entityContainer.getName(), functionImport.getName()));
               }
             }
           }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImpl.java
index 3ad9d13..6f9bb78 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmStructuredTypeHelperImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmStructuredTypeHelperImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmStructuredTypeHelperImpl.java
index d2ded33..cc12769 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmStructuredTypeHelperImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/edm/provider/EdmStructuredTypeHelperImpl.java
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -64,7 +64,7 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper {
       if (structuredType.getNavigationProperties() != null) {
         for (NavigationProperty navigationProperty : structuredType.getNavigationProperties()) {
           navigationProperties.put(navigationProperty.getName(),
-                  new EdmNavigationPropertyImpl(edm, navigationProperty));
+              new EdmNavigationPropertyImpl(edm, navigationProperty));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataJsonSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataJsonSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataJsonSerializer.java
new file mode 100644
index 0000000..333d5b7
--- /dev/null
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataJsonSerializer.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.serializer;
+
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+
+import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
+import org.apache.olingo.server.core.serializer.json.ServiceDocumentJsonSerializer;
+import org.apache.olingo.server.core.serializer.utils.CircleStreamBuffer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
+
+public class ODataJsonSerializer implements ODataSerializer {
+
+  private static final Logger log = LoggerFactory.getLogger(ODataJsonSerializer.class);
+
+  @Override
+  public InputStream serviceDocument(final Edm edm, final String serviceRoot) {
+    CircleStreamBuffer buffer;
+    BufferedWriter writer;
+    JsonFactory factory;
+    JsonGenerator gen = null;
+
+    // TODO: move stream initialization into separate method
+    try {
+      buffer = new CircleStreamBuffer();
+      writer = new BufferedWriter(new OutputStreamWriter(buffer.getOutputStream(), DEFAULT_CHARSET));
+      factory = new JsonFactory();
+
+      gen = factory.createGenerator(writer);
+      gen.setPrettyPrinter(new DefaultPrettyPrinter());
+
+      ServiceDocumentJsonSerializer serializer = new ServiceDocumentJsonSerializer(edm, serviceRoot);
+      serializer.writeServiceDocument(gen);
+
+      gen.close();
+
+      // TODO: Check correct stream handling
+      // writer.flush();
+      // buffer.closeWrite();
+
+      return buffer.getInputStream();
+
+    } catch (Exception e) {
+      log.error(e.getMessage(), e);
+      throw new ODataRuntimeException(e);
+    } finally {
+      if (gen != null) {
+        try {
+          gen.close();
+        } catch (IOException e) {
+          throw new ODataRuntimeException(e);
+        }
+      }
+    }
+  }
+
+  @Override
+  public InputStream metadataDocument(final Edm edm) {
+    throw new ODataRuntimeException("Metadata in JSON format not supported!");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataXmlSerializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataXmlSerializerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataXmlSerializerImpl.java
new file mode 100644
index 0000000..4790446
--- /dev/null
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ODataXmlSerializerImpl.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.serializer;
+
+import java.io.BufferedWriter;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
+import org.apache.olingo.server.core.serializer.utils.CircleStreamBuffer;
+import org.apache.olingo.server.core.serializer.xml.MetadataDocumentXmlSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ODataXmlSerializerImpl implements ODataSerializer {
+
+  private static final Logger log = LoggerFactory.getLogger(ODataXmlSerializerImpl.class);
+
+  @Override
+  public InputStream serviceDocument(final Edm edm, final String serviceRoot) {
+    throw new ODataRuntimeException("Service Document not implemented for XML format");
+  }
+
+  @Override
+  public InputStream metadataDocument(final Edm edm) {
+    CircleStreamBuffer buffer;
+    BufferedWriter writer;
+    XMLStreamWriter xmlStreamWriter = null;
+
+    // TODO: move stream initialization into separate method
+    try {
+      buffer = new CircleStreamBuffer();
+      writer = new BufferedWriter(new OutputStreamWriter(buffer.getOutputStream(), DEFAULT_CHARSET));
+      xmlStreamWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
+      MetadataDocumentXmlSerializer serializer = new MetadataDocumentXmlSerializer(edm);
+      serializer.writeMetadataDocument(xmlStreamWriter);
+      xmlStreamWriter.close();
+
+      return buffer.getInputStream();
+    } catch (Exception e) {
+      log.error(e.getMessage(), e);
+      throw new ODataRuntimeException(e);
+    } finally {
+      if (xmlStreamWriter != null) {
+        try {
+          xmlStreamWriter.close();
+        } catch (XMLStreamException e) {
+          throw new ODataRuntimeException(e);
+        }
+      }
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentJsonSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentJsonSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentJsonSerializer.java
new file mode 100644
index 0000000..00d853d
--- /dev/null
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentJsonSerializer.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.serializer.json;
+
+import java.io.IOException;
+
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.commons.api.edm.EdmSingleton;
+
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonGenerator;
+
+public class ServiceDocumentJsonSerializer {
+  public static final String ODATA_CONTEXT = "@odata.context";
+  public static final String METADATA = "$metadata";
+  public static final String VALUE = "value";
+  public static final String NAME = "name";
+  public static final String URL = "url";
+  public static final String KIND = "kind";
+
+  public static final String FUNCTION_IMPORT = "FunctionImport";
+  public static final String SINGLETON = "Singleton";
+  public static final String SERVICE_DOCUMENT = "ServiceDocument";
+
+  private final Edm edm;
+  private final String serviceRoot;
+
+  public ServiceDocumentJsonSerializer(final Edm edm, final String serviceRoot) {
+    this.edm = edm;
+    this.serviceRoot = serviceRoot;
+  }
+
+  public void writeServiceDocument(final JsonGenerator gen) throws JsonGenerationException, IOException {
+    gen.writeStartObject();
+
+    Object metadataUri = serviceRoot + "/" + METADATA;
+    gen.writeObjectField(ODATA_CONTEXT, metadataUri);
+    gen.writeArrayFieldStart(VALUE);
+
+    writeEntitySets(gen, edm);
+    writeFunctionImports(gen, edm);
+    writeSingletons(gen, edm);
+  }
+
+  private void writeEntitySets(final JsonGenerator gen, final Edm edm) throws JsonGenerationException, IOException {
+    EdmEntityContainer container = edm.getEntityContainer(null);
+
+    for (EdmEntitySet edmEntitySet : container.getEntitySets()) {
+      if (edmEntitySet.isIncludeInServiceDocument()) {
+        gen.writeStartObject();
+        gen.writeObjectField(NAME, edmEntitySet.getName());
+        gen.writeObjectField(URL, edmEntitySet.getName());
+        gen.writeEndObject();
+      }
+    }
+  }
+
+  private void writeFunctionImports(final JsonGenerator gen, final Edm edm) throws JsonGenerationException, 
+  IOException {
+    EdmEntityContainer container = edm.getEntityContainer(null);
+
+    for (EdmFunctionImport edmFunctionImport : container.getFunctionImports()) {
+      if (edmFunctionImport.isIncludeInServiceDocument()) {
+        gen.writeStartObject();
+        gen.writeObjectField(NAME, edmFunctionImport.getName());
+        gen.writeObjectField(URL, edmFunctionImport.getName());
+        gen.writeObjectField(KIND, FUNCTION_IMPORT);
+        gen.writeEndObject();
+      }
+    }
+  }
+
+  private void writeSingletons(final JsonGenerator gen, final Edm edm) throws JsonGenerationException, IOException {
+    EdmEntityContainer container = edm.getEntityContainer(null);
+
+    for (EdmSingleton edmSingleton : container.getSingletons()) {
+      gen.writeStartObject();
+      gen.writeObjectField(NAME, edmSingleton.getName());
+      gen.writeObjectField(URL, edmSingleton.getName());
+      gen.writeObjectField(KIND, SINGLETON);
+      gen.writeEndObject();
+    }
+  }
+}


[2/5] [OLINGO-168] metadata serialization

Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
index 8653edf..f0383f6 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
@@ -1,30 +1,28 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.olingo.server.core.edm.provider;
 
-import org.apache.olingo.commons.core.edm.EdmMemberImpl;
-
 import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.mock;
 
+import org.apache.olingo.commons.core.edm.EdmMemberImpl;
 import org.apache.olingo.server.api.edm.provider.EnumMember;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmMemberImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
index 164264e..946d660 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
index 30c83e9..dd3a8b5 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -40,8 +40,6 @@ import org.apache.olingo.server.api.edm.provider.EntityType;
 import org.apache.olingo.server.api.edm.provider.NavigationProperty;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
 import org.apache.olingo.server.api.edm.provider.ReferentialConstraint;
-import org.apache.olingo.server.core.edm.provider.EdmNavigationPropertyImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmNavigationPropertyImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
index d446145..b1fcd62 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -36,8 +36,6 @@ import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.api.edm.provider.EnumType;
 import org.apache.olingo.server.api.edm.provider.Parameter;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmParameterImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmParameterImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
index fca16d8..678b87c 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,8 +38,6 @@ import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.api.edm.provider.EnumType;
 import org.apache.olingo.server.api.edm.provider.Property;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmPropertyImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmPropertyImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
index 7a7b43d..1ac09ce 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -39,7 +39,6 @@ import org.apache.olingo.server.api.edm.provider.Action;
 import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.api.edm.provider.Function;
 import org.apache.olingo.server.api.edm.provider.Parameter;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
index 4f5ed85..66a3f99 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -47,7 +47,6 @@ import org.apache.olingo.server.api.edm.provider.EntityType;
 import org.apache.olingo.server.api.edm.provider.EnumType;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
index 5cb9a67..3aecc7b 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -35,8 +35,6 @@ import org.apache.olingo.commons.api.edm.EdmTypeDefinition;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
-import org.apache.olingo.server.core.edm.provider.EdmReturnTypeImpl;
 import org.junit.Test;
 
 public class EdmReturnTypeImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
index 2342eae..f227796 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
@@ -73,7 +73,7 @@ public class EdmSchemaImplTest {
     schema = edm.getSchemas().get(0);
 
   }
-  
+
   @Test
   public void initialSchemaTest() {
     EdmProvider provider = mock(EdmProvider.class);
@@ -85,26 +85,26 @@ public class EdmSchemaImplTest {
   public void emptySchemaTest() throws Exception {
     ArrayList<Schema> schemas = new ArrayList<Schema>();
     Schema providerSchema = new Schema();
-    schemas.add(providerSchema );
+    schemas.add(providerSchema);
     EdmProvider provider = mock(EdmProvider.class);
     when(provider.getSchemas()).thenReturn(schemas);
     edm = new EdmProviderImpl(provider);
     edm.getSchemas();
   }
-  
+
   @Test
   public void basicGetters() {
     assertEquals("namespace", schema.getNamespace());
     assertEquals("alias", schema.getAlias());
   }
-  
+
   @Test
-  public void getTypeDefinitions(){
+  public void getTypeDefinitions() {
     List<EdmTypeDefinition> typeDefinitions = schema.getTypeDefinitions();
     assertNotNull(typeDefinitions);
     assertEquals(2, typeDefinitions.size());
-    
-    for(EdmTypeDefinition def : typeDefinitions){
+
+    for (EdmTypeDefinition def : typeDefinitions) {
       assertTrue(def == edm.getTypeDefinition(new FullQualifiedName("namespace", def.getName())));
     }
   }
@@ -197,70 +197,84 @@ public class EdmSchemaImplTest {
     for (EdmFunctionImport obj : functionImports) {
       assertNotNull(obj.getFunctionFqn());
     }
-    
+
     assertTrue(container == edm.getEntityContainer(new FullQualifiedName(schema.getNamespace(), container.getName())));
     assertTrue(container == edm.getEntityContainer(null));
   }
 
   private class LocalProvider extends EdmProvider {
 
+    @Override
     public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public TypeDefinition getTypeDefinition(final FullQualifiedName typeDefinitionName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public EntityType getEntityType(final FullQualifiedName entityTypeName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<Action> getActions(final FullQualifiedName actionName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<Function> getFunctions(final FullQualifiedName functionName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public Term getTerm(final FullQualifiedName termName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String entitySetName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public Singleton getSingleton(final FullQualifiedName entityContainer, final String singletonName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public ActionImport getActionImport(final FullQualifiedName entityContainer, final String actionImportName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public FunctionImport getFunctionImport(final FullQualifiedName entityContainer, final String functionImportName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public EntityContainerInfo getEntityContainerInfo(final FullQualifiedName entityContainerName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<AliasInfo> getAliasInfos() throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<Schema> getSchemas() throws ODataException {
       Schema providerSchema = new Schema();
       providerSchema.setNamespace("namespace");
@@ -300,7 +314,7 @@ public class EdmSchemaImplTest {
       typeDefinitions.add(new TypeDefinition().setName("typeDefinition1"));
       typeDefinitions.add(new TypeDefinition().setName("typeDefinition2"));
       providerSchema.setTypeDefinitions(typeDefinitions);
-      
+
       List<EnumType> enumTypes = new ArrayList<EnumType>();
       enumTypes.add(new EnumType().setName("enumType1"));
       enumTypes.add(new EnumType().setName("enumType2"));
@@ -330,6 +344,7 @@ public class EdmSchemaImplTest {
       return schemas;
     }
 
+    @Override
     public EntityContainer getEntityContainer() throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
index 431c458..16bc0fb 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -39,7 +39,6 @@ import org.apache.olingo.server.api.edm.provider.EntitySet;
 import org.apache.olingo.server.api.edm.provider.FunctionImport;
 import org.apache.olingo.server.api.edm.provider.Schema;
 import org.apache.olingo.server.api.edm.provider.Singleton;
-import org.apache.olingo.server.core.edm.provider.EdmServiceMetadataImpl;
 import org.junit.Test;
 
 public class EdmServiceMetadataImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
index ab13215..10717d5 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,9 +38,6 @@ import org.apache.olingo.server.api.edm.provider.EntityType;
 import org.apache.olingo.server.api.edm.provider.NavigationPropertyBinding;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
 import org.apache.olingo.server.api.edm.provider.Singleton;
-import org.apache.olingo.server.core.edm.provider.EdmEntityContainerImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
-import org.apache.olingo.server.core.edm.provider.EdmSingletonImpl;
 import org.junit.Test;
 
 public class EdmSingletonImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
index 9b57bdb..322a044 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -29,8 +29,6 @@ import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
-import org.apache.olingo.server.core.edm.provider.EdmTypeDefinitionImpl;
 import org.junit.Test;
 
 public class EdmTypeDefinitionImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
index d932b1e..3da16bd 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java
new file mode 100644
index 0000000..4bf5a99
--- /dev/null
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.serializer.json;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.commons.api.edm.EdmSingleton;
+import org.apache.olingo.server.api.ODataServer;
+import org.apache.olingo.server.api.serializer.ODataFormat;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
+import org.apache.olingo.server.core.testutil.StringUtils;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ServiceDocumentTest {
+
+  private Edm edm;
+
+  @Before
+  public void before() {
+
+    EdmEntitySet edmEntitySet1 = mock(EdmEntitySet.class);
+    when(edmEntitySet1.getName()).thenReturn("entitySetName1");
+    when(edmEntitySet1.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmEntitySet edmEntitySet2 = mock(EdmEntitySet.class);
+    when(edmEntitySet2.getName()).thenReturn("entitySetName2");
+    when(edmEntitySet2.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmEntitySet edmEntitySet3 = mock(EdmEntitySet.class);
+    when(edmEntitySet3.getName()).thenReturn("entitySetName3");
+    when(edmEntitySet3.isIncludeInServiceDocument()).thenReturn(false);
+
+    List<EdmEntitySet> entitySets = new ArrayList<EdmEntitySet>();
+    entitySets.add(edmEntitySet1);
+    entitySets.add(edmEntitySet2);
+    entitySets.add(edmEntitySet3);
+
+    EdmFunctionImport functionImport1 = mock(EdmFunctionImport.class);
+    when(functionImport1.getName()).thenReturn("functionImport1");
+    when(functionImport1.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmFunctionImport functionImport2 = mock(EdmFunctionImport.class);
+    when(functionImport2.getName()).thenReturn("functionImport2");
+    when(functionImport2.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmFunctionImport functionImport3 = mock(EdmFunctionImport.class);
+    when(functionImport3.getName()).thenReturn("functionImport3");
+    when(functionImport3.isIncludeInServiceDocument()).thenReturn(false);
+
+    List<EdmFunctionImport> functionImports = new ArrayList<EdmFunctionImport>();
+    functionImports.add(functionImport1);
+    functionImports.add(functionImport2);
+    functionImports.add(functionImport3);
+
+    EdmSingleton singleton1 = mock(EdmSingleton.class);
+    when(singleton1.getName()).thenReturn("singleton1");
+
+    EdmSingleton singleton2 = mock(EdmSingleton.class);
+    when(singleton2.getName()).thenReturn("singleton2");
+
+    EdmSingleton singleton3 = mock(EdmSingleton.class);
+    when(singleton3.getName()).thenReturn("singleton3");
+
+    List<EdmSingleton> singletons = new ArrayList<EdmSingleton>();
+    singletons.add(singleton1);
+    singletons.add(singleton2);
+    singletons.add(singleton3);
+
+    EdmEntityContainer edmEntityContainer = mock(EdmEntityContainer.class);
+    when(edmEntityContainer.getEntitySets()).thenReturn(entitySets);
+    when(edmEntityContainer.getFunctionImports()).thenReturn(functionImports);
+    when(edmEntityContainer.getSingletons()).thenReturn(singletons);
+
+    edm = mock(Edm.class);
+    when(edm.getEntityContainer(null)).thenReturn(edmEntityContainer);
+  }
+
+  @Test
+  public void writeServiceDocumentJson() throws Exception {
+    String serviceRoot = "http://localhost:8080/odata.svc";
+
+    ODataServer server = ODataServer.newInstance();
+    assertNotNull(server);
+
+    ODataSerializer serializer = server.getSerializer(ODataFormat.JSON);
+    assertNotNull(serializer);
+
+    InputStream result = serializer.serviceDocument(edm, serviceRoot);
+    assertNotNull(result);
+    String jsonString = StringUtils.inputStreamToString(result, true);
+
+    assertTrue(jsonString.contains("entitySetName1"));
+    assertTrue(jsonString.contains("entitySetName2"));
+    assertFalse(jsonString.contains("entitySetName3"));
+
+    assertTrue(jsonString.contains("functionImport1"));
+    assertTrue(jsonString.contains("functionImport2"));
+    assertFalse(jsonString.contains("functionImport3"));
+
+    assertTrue(jsonString.contains("singleton1"));
+    assertTrue(jsonString.contains("singleton2"));
+    assertTrue(jsonString.contains("singleton3"));
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
new file mode 100644
index 0000000..0a8cd0e
--- /dev/null
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.server.core.serializer.xml;
+
+import static org.mockito.Mockito.mock;
+
+import java.io.InputStream;
+
+import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.server.api.ODataServer;
+import org.apache.olingo.server.api.serializer.ODataFormat;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
+import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
+import org.apache.olingo.server.core.testutil.EdmTechProvider;
+import org.apache.olingo.server.core.testutil.StringUtils;
+import org.junit.Test;
+
+public class MetadataDocumentTest {
+
+  @Test(expected = ODataRuntimeException.class)
+  public void metadataOnJsonResultsInException() {
+    ODataSerializer serializer = ODataServer.newInstance().getSerializer(ODataFormat.JSON);
+    serializer.metadataDocument(mock(Edm.class));
+  }
+
+  @Test
+  public void writeMetadataWithMockedEdm() {
+    ODataSerializer serializer = ODataServer.newInstance().getSerializer(ODataFormat.XML);
+    Edm edm = mock(Edm.class);
+    serializer.metadataDocument(edm);
+  }
+
+  @Test
+  public void writeMetadataWithTechnicalScenario() {
+    ODataSerializer serializer = ODataServer.newInstance().getSerializer(ODataFormat.XML);
+    EdmProviderImpl edm = new EdmProviderImpl(new EdmTechProvider());
+    InputStream metadata = serializer.metadataDocument(edm);
+    System.out.println(StringUtils.inputStreamToString(metadata, true));
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
index 741ca3c..bbfd107 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -31,6 +31,7 @@ import org.apache.olingo.server.api.edm.provider.ActionImport;
 import org.apache.olingo.server.api.edm.provider.AliasInfo;
 import org.apache.olingo.server.api.edm.provider.ComplexType;
 import org.apache.olingo.server.api.edm.provider.EdmProvider;
+import org.apache.olingo.server.api.edm.provider.EntityContainer;
 import org.apache.olingo.server.api.edm.provider.EntityContainerInfo;
 import org.apache.olingo.server.api.edm.provider.EntitySet;
 import org.apache.olingo.server.api.edm.provider.EntityType;
@@ -45,6 +46,7 @@ import org.apache.olingo.server.api.edm.provider.Property;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
 import org.apache.olingo.server.api.edm.provider.ReferentialConstraint;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
+import org.apache.olingo.server.api.edm.provider.Schema;
 import org.apache.olingo.server.api.edm.provider.Singleton;
 
 public class EdmTechProvider extends EdmProvider {
@@ -463,7 +465,8 @@ public class EdmTechProvider extends EdmProvider {
 
   Property propertyInt16_NotNullable = new Property()
       .setName("PropertyInt16")
-      .setType(nameInt16);
+      .setType(nameInt16)
+      .setNullable(false);
   Property propertyInt32 = new Property()
       .setName("PropertyInt32")
       .setType(nameInt32);
@@ -497,6 +500,212 @@ public class EdmTechProvider extends EdmProvider {
       .setType(nameTimeOfDay);
 
   @Override
+  public EntityContainer getEntityContainer() throws ODataException {
+    // TODO Auto-generated method stub
+    return super.getEntityContainer();
+  }
+
+  @Override
+  public List<Schema> getSchemas() throws ODataException {
+    List<Schema> schemas = new ArrayList<Schema>();
+    Schema schema = new Schema();
+    schema.setNamespace("com.sap.odata.test1");
+    schema.setAlias("Namespace1_Alias");
+    schemas.add(schema);
+    // EnumTypes
+    List<EnumType> enumTypes = new ArrayList<EnumType>();
+    schema.setEnumTypes(enumTypes);
+    enumTypes.add(getEnumType(nameENString));
+    // EntityTypes
+    List<EntityType> entityTypes = new ArrayList<EntityType>();
+    schema.setEntityTypes(entityTypes);
+    entityTypes.add(getEntityType(nameETAllPrim));
+    entityTypes.add(getEntityType(nameETCollAllPrim));
+    entityTypes.add(getEntityType(nameETTwoPrim));
+    entityTypes.add(getEntityType(nameETMixPrimCollComp));
+    entityTypes.add(getEntityType(nameETTwoKeyTwoPrim));
+    entityTypes.add(getEntityType(nameETBase));
+    entityTypes.add(getEntityType(nameETTwoBase));
+    entityTypes.add(getEntityType(nameETAllKey));
+    entityTypes.add(getEntityType(nameETCompAllPrim));
+    entityTypes.add(getEntityType(nameETCompCollAllPrim));
+    entityTypes.add(getEntityType(nameETCompComp));
+    entityTypes.add(getEntityType(nameETCompCollComp));
+    entityTypes.add(getEntityType(nameETMedia));
+    entityTypes.add(getEntityType(nameETFourKeyAlias));
+    entityTypes.add(getEntityType(nameETServerSidePaging));
+    entityTypes.add(getEntityType(nameETAllNullable));
+    entityTypes.add(getEntityType(nameETKeyNav));
+    entityTypes.add(getEntityType(nameETTwoKeyNav));
+    entityTypes.add(getEntityType(nameETBaseTwoKeyNav));
+    entityTypes.add(getEntityType(nameETTwoBaseTwoKeyNav));
+    entityTypes.add(getEntityType(nameETCompMixPrimCollComp));
+    entityTypes.add(getEntityType(nameETKeyPrimNav));
+
+    // ComplexTypes
+    List<ComplexType> complexType = new ArrayList<ComplexType>();
+    schema.setComplexTypes(complexType);
+    complexType.add(getComplexType(nameCTPrim));
+    complexType.add(getComplexType(nameCTAllPrim));
+    complexType.add(getComplexType(nameCTCollAllPrim));
+    complexType.add(getComplexType(nameCTTwoPrim));
+    complexType.add(getComplexType(nameCTMixPrimCollComp));
+    complexType.add(getComplexType(nameCTBase));
+    complexType.add(getComplexType(nameCTTwoBase));
+    complexType.add(getComplexType(nameCTCompComp));
+    complexType.add(getComplexType(nameCTCompCollComp));
+    complexType.add(getComplexType(nameCTPrimComp));
+    complexType.add(getComplexType(nameCTNavFiveProp));
+    complexType.add(getComplexType(nameCTPrimEnum));
+    complexType.add(getComplexType(nameCTBasePrimCompNav));
+    complexType.add(getComplexType(nameCTTwoBasePrimCompNav));
+    complexType.add(getComplexType(nameCTCompNav));
+
+    // TypeDefinitions
+
+    // Actions
+    List<Action> actions = new ArrayList<Action>();
+    schema.setActions(actions);
+    actions.addAll(getActions(nameUARTPrimParam));
+    actions.addAll(getActions(nameUARTPrimCollParam));
+    actions.addAll(getActions(nameUARTCompParam));
+    actions.addAll(getActions(nameUARTCompCollParam));
+    actions.addAll(getActions(nameUARTETParam));
+    actions.addAll(getActions(nameUARTETCollAllPrimParam));
+    actions.addAll(getActions(nameBAETTwoKeyNavRTETTwoKeyNav));
+    actions.addAll(getActions(nameBAESAllPrimRTETAllPrim));
+    actions.addAll(getActions(nameBAESTwoKeyNavRTESTwoKeyNav));
+    actions.addAll(getActions(nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav));
+    actions.addAll(getActions(nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav));
+
+    // Functions
+    List<Function> functions = new ArrayList<Function>();
+    schema.setFunctions(functions);
+
+    functions.addAll(getFunctions(nameUFNRTInt16));
+    functions.addAll(getFunctions(nameUFCRTETKeyNav));
+    functions.addAll(getFunctions(nameUFCRTETTwoKeyNavParam));
+    functions.addAll(getFunctions(nameUFCRTETTwoKeyNavParamCTTwoPrim));
+    functions.addAll(getFunctions(nameUFCRTStringTwoParam));
+    functions.addAll(getFunctions(nameUFCRTESTwoKeyNavParam));
+    // TODO: check why it exists twice
+    functions.addAll(getFunctions(nameUFCRTString));
+    functions.addAll(getFunctions(nameUFCRTCollStringTwoParam));
+    functions.addAll(getFunctions(nameUFCRTCollString));
+    functions.addAll(getFunctions(nameUFCRTCTAllPrimTwoParam));
+    functions.addAll(getFunctions(nameUFCRTCTTwoPrimParam));
+    functions.addAll(getFunctions(nameUFCRTCollCTTwoPrimParam));
+    functions.addAll(getFunctions(nameUFCRTCTTwoPrim));
+    functions.addAll(getFunctions(nameUFCRTCollCTTwoPrim));
+    functions.addAll(getFunctions(nameUFCRTETMedia));
+    functions.addAll(getFunctions(nameUFNRTESMixPrimCollCompTwoParam));
+    functions.addAll(getFunctions(nameUFCRTETAllPrimTwoParam));
+    functions.addAll(getFunctions(nameUFCRTESMixPrimCollCompTwoParam));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCStringRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETBaseTwoKeyNavRTETTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCESBaseTwoKeyNavRTESBaseTwoKey));
+    functions.addAll(getFunctions(nameBFCESAllPrimRTCTAllPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTCTTwoPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTCollCTTwoPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTString));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTCollString));
+    functions.addAll(getFunctions(nameBFCETTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETBaseTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCSINavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETBaseTwoKeyNavRTESBaseTwoKey));
+    functions.addAll(getFunctions(nameBFCCollStringRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTESBaseTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCollCTPrimCompRTESAllPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCESKeyNavRTETKeyNav));
+    functions.addAll(getFunctions(nameBFCETKeyNavRTETKeyNav));
+    functions.addAll(getFunctions(nameBFESTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETTwoKeyNavRTETTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETTwoKeyNavRTCTTwoPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTStringParam));
+    functions.addAll(getFunctions(nameBFCESKeyNavRTETKeyNavParam));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTETTwoKeyNavParam));
+    functions.addAll(getFunctions(nameBAETTwoKeyNavRTETTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTESTwoKeyNavParam));
+
+    // EntityContainer
+    EntityContainer container = new EntityContainer();
+    schema.setEntityContainer(container);
+    container.setName(nameContainer.getName());
+
+    // EntitySets
+    List<EntitySet> entitySets = new ArrayList<EntitySet>();
+    container.setEntitySets(entitySets);
+    entitySets.add(getEntitySet(nameContainer, "ESAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESCollAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESMixPrimCollComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESBase"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoBase"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoKeyTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESBaseTwoKeyTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoBaseTwoKeyTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESAllKey"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompCollAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompCollComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESMedia"));
+    entitySets.add(getEntitySet(nameContainer, "ESKeyTwoKeyComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESInvisible"));
+    entitySets.add(getEntitySet(nameContainer, "ESServerSidePaging"));
+    entitySets.add(getEntitySet(nameContainer, "ESAllNullable"));
+    entitySets.add(getEntitySet(nameContainer, "ESKeyNav"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoKeyNav"));
+    entitySets.add(getEntitySet(nameContainer, "ESBaseTwoKeyNav"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompMixPrimCollComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESFourKeyAlias"));
+
+    // Singletons
+    List<Singleton> singletons = new ArrayList<Singleton>();
+    container.setSingletons(singletons);
+    singletons.add(getSingleton(nameContainer, "SI"));
+    singletons.add(getSingleton(nameContainer, "SINav"));
+    singletons.add(getSingleton(nameContainer, "SIMedia"));
+
+    // ActionImports
+    List<ActionImport> actionImports = new ArrayList<ActionImport>();
+    container.setActionImports(actionImports);
+    actionImports.add(getActionImport(nameContainer, "AIRTPrimParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTPrimCollParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTCompParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTCompCollParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTETParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTETCollAllPrimParam"));
+
+    // FunctionImports
+    List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
+    container.setFunctionImports(functionImports);
+    functionImports.add(getFunctionImport(nameContainer, "FINRTInt16"));
+    functionImports.add(getFunctionImport(nameContainer, "FINInvisibleRTInt16"));
+    functionImports.add(getFunctionImport(nameContainer, "FINInvisible2RTInt16"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTETKeyNav"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTETTwoKeyNavParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTStringTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollStringTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCTAllPrimTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTESMixPrimCollCompTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FINRTESMixPrimCollCompTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollCTTwoPrim"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTETMedia"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCTTwoPrimParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCTTwoPrim"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollString"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTString"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTESTwoKeyNavParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollCTTwoPrimParam"));
+
+    return schemas;
+  }
+
+  @Override
   public ActionImport getActionImport(final FullQualifiedName entityContainer, final String name) throws ODataException
   {
     if (entityContainer.equals(nameContainer)) {
@@ -876,34 +1085,42 @@ public class EdmTechProvider extends EdmProvider {
         return new EntitySet()
             .setName("ESKeyTwoKeyComp")
             .setType(nameETKeyTwoKeyComp);
+
       } else if (name.equals("ESInvisible")) {
         return new EntitySet()
             .setName("ESInvisible")
             .setType(nameETAllPrim);
+
       } else if (name.equals("ESServerSidePaging")) {
         return new EntitySet()
             .setName("ESServerSidePaging")
             .setType(nameETServerSidePaging);
+
       } else if (name.equals("ESAllNullable")) {
         return new EntitySet()
             .setName("ESAllNullable")
             .setType(nameETAllNullable);
+
       } else if (name.equals("ESKeyNav")) {
         return new EntitySet()
             .setName("ESKeyNav")
             .setType(nameETKeyNav);
+
       } else if (name.equals("ESTwoKeyNav")) {
         return new EntitySet()
             .setName("ESTwoKeyNav")
             .setType(nameETTwoKeyNav);
+
       } else if (name.equals("ESBaseTwoKeyNav")) {
         return new EntitySet()
             .setName("ESBaseTwoKeyNav")
             .setType(nameETBaseTwoKeyNav);
+
       } else if (name.equals("ESCompMixPrimCollComp")) {
         return new EntitySet()
             .setName("ESCompMixPrimCollComp")
             .setType(nameETCompMixPrimCollComp);
+
       } else if (name.equals("ESFourKeyAlias")) {
         return new EntitySet()
             .setName("ESFourKeyAlias")
@@ -1203,6 +1420,13 @@ public class EdmTechProvider extends EdmProvider {
                   .setPropertyName("PropertyComplexComplex/PropertyComplex/PropertyString")
                   .setAlias("KeyAlias3")))
           .setProperties(Arrays.asList(propertyGuid, propertyComplex_CTTwoPrim, propertyComplexComplex_CTCompComp));
+    } else if (entityTypeName.equals(nameETCompMixPrimCollComp)) {
+      return new EntityType()
+          .setName("ETCompMixPrimCollComp")
+          .setKey(Arrays.asList(
+              new PropertyRef()
+                  .setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(propertyInt16_NotNullable, propertyMixedPrimCollComp_CTMixPrimCollComp));
     }
 
     return null;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
index 96afc8e..3672799 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
index b7d8e2c..8cabcf1 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
@@ -25,7 +25,7 @@ import java.io.InputStreamReader;
 import java.nio.charset.Charset;
 
 public class StringUtils {
-  
+
   public static String inputStreamToString(final InputStream in, final boolean preserveLineBreaks) {
     try {
       final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, Charset.forName("UTF-8")));
@@ -48,5 +48,5 @@ public class StringUtils {
       throw new RuntimeException(e);
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
index f100eef..f54ad57 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -122,21 +122,19 @@ public class RawUriTest {
 
     rawUri = runRawParser("nonServiceSegment/entitySet", 1);
     checkPath(rawUri, "nonServiceSegment/entitySet", Arrays.asList("entitySet"));
-    
+
     rawUri = runRawParser("http://test.org/a?abc=xx+yz", 0);
   }
 
-  
-    @Test
-    public void testSplitt() {
+  @Test
+  public void testSplitt() {
     UriDecoder.splitt("", '/');
     UriDecoder.splitt("/", '/');
     UriDecoder.splitt("a", '/');
     UriDecoder.splitt("a/", '/');
     UriDecoder.splitt("/a", '/');
     UriDecoder.splitt("a/a", '/');
-    }
-   
+  }
 
   private void checkPath(final RawUri rawUri, final String path, final List<String> list) {
     assertEquals(path, rawUri.path);

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
index 728d187..4474e07 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,9 +38,6 @@ import org.apache.olingo.server.api.uri.queryoption.CustomQueryOption;
 import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.server.core.uri.UriInfoImpl;
-import org.apache.olingo.server.core.uri.UriResourceActionImpl;
-import org.apache.olingo.server.core.uri.UriResourceEntitySetImpl;
 import org.apache.olingo.server.core.uri.queryoption.CountOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.CustomQueryOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
index d03345e..0eb88e0 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -42,25 +42,6 @@ import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.server.core.edm.provider.EdmSingletonImpl;
 import org.apache.olingo.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.server.core.uri.UriParameterImpl;
-import org.apache.olingo.server.core.uri.UriResourceActionImpl;
-import org.apache.olingo.server.core.uri.UriResourceComplexPropertyImpl;
-import org.apache.olingo.server.core.uri.UriResourceCountImpl;
-import org.apache.olingo.server.core.uri.UriResourceEntitySetImpl;
-import org.apache.olingo.server.core.uri.UriResourceFunctionImpl;
-import org.apache.olingo.server.core.uri.UriResourceItImpl;
-import org.apache.olingo.server.core.uri.UriResourceLambdaAllImpl;
-import org.apache.olingo.server.core.uri.UriResourceLambdaAnyImpl;
-import org.apache.olingo.server.core.uri.UriResourceLambdaVarImpl;
-import org.apache.olingo.server.core.uri.UriResourceNavigationPropertyImpl;
-import org.apache.olingo.server.core.uri.UriResourcePrimitivePropertyImpl;
-import org.apache.olingo.server.core.uri.UriResourceRefImpl;
-import org.apache.olingo.server.core.uri.UriResourceRootImpl;
-import org.apache.olingo.server.core.uri.UriResourceSingletonImpl;
-import org.apache.olingo.server.core.uri.UriResourceStartingTypeFilterImpl;
-import org.apache.olingo.server.core.uri.UriResourceTypedImpl;
-import org.apache.olingo.server.core.uri.UriResourceValueImpl;
-import org.apache.olingo.server.core.uri.UriResourceWithKeysImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.LiteralImpl;
 import org.junit.Test;
@@ -219,12 +200,11 @@ public class UriResourceImplTest {
         .getFunction(new ArrayList<String>());
     assertNotNull(function);
     impl.setFunction(function);
-    
 
     assertEquals(function, impl.getFunction());
     assertEquals("UFNRTInt16", impl.toString());
     assertEquals(function.getReturnType().getType(), impl.getType());
-    assertEquals(false,impl.isParameterListFilled());
+    assertEquals(false, impl.isParameterListFilled());
 
     // function import
     impl = new UriResourceFunctionImpl();
@@ -247,7 +227,7 @@ public class UriResourceImplTest {
     assertEquals(false, impl.isCollection());
 
     assertEquals(parameter, impl.getParameters().get(0));
-    assertEquals(true,impl.isParameterListFilled());
+    assertEquals(true, impl.isParameterListFilled());
   }
 
   @Test
@@ -498,7 +478,6 @@ public class UriResourceImplTest {
     assertEquals(true, impl.isCollection());
   }
 
-  
   @Test
   public void testUriResourceStartingTypeFilterImpl() {
     UriResourceStartingTypeFilterImpl impl = new UriResourceStartingTypeFilterImpl();

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
index 7a510a1..e8aa9ce 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
@@ -1,25 +1,24 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 package org.apache.olingo.server.core.uri.antlr;
 
 import org.antlr.v4.runtime.Lexer;
-import org.apache.olingo.server.core.uri.antlr.UriLexer;
 import org.apache.olingo.server.core.uri.testutil.TokenValidator;
 import org.junit.Test;
 
@@ -72,17 +71,17 @@ public class TestLexer {
     test.run("$top=1").isAllText("$top=1").isType(UriLexer.TOP);
     test.run("$top=2").isAllText("$top=2").isType(UriLexer.TOP);
     test.run("$top=123").isAllText("$top=123").isType(UriLexer.TOP);
-    
+
     test.run("$levels=1").isAllText("$levels=1").isType(UriLexer.LEVELS);
     test.run("$levels=2").isAllText("$levels=2").isType(UriLexer.LEVELS);
     test.run("$levels=123").isAllText("$levels=123").isType(UriLexer.LEVELS);
     test.run("$levels=max").isAllText("$levels=max").isType(UriLexer.LEVELS);
-    
+
     test.run("$format=atom").isAllText("$format=atom").isType(UriLexer.FORMAT);
     test.run("$format=json").isAllText("$format=json").isType(UriLexer.FORMAT);
     test.run("$format=xml").isAllText("$format=xml").isType(UriLexer.FORMAT);
     test.run("$format=abc/def").isAllText("$format=abc/def").isType(UriLexer.FORMAT);
-    
+
     test.run("$id=123").isAllText("$id=123").isType(UriLexer.ID);
     test.run("$id=ABC").isAllText("$id=ABC").isType(UriLexer.ID);
 
@@ -120,7 +119,6 @@ public class TestLexer {
 
   }
 
-
   // ;------------------------------------------------------------------------------
   // ; 7. Literal Data Values
   // ;------------------------------------------------------------------------------
@@ -226,7 +224,6 @@ public class TestLexer {
 
   }
 
-  
   @Test
   public void testDelims() {
     String reserved = "/";

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
index fd4173f..64ac50e 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -200,7 +200,7 @@ public class TestUriParserImpl {
     testRes.run("ESAllPrim/$count")
         .at(0)
         .isUriPathInfoKind(UriResourceKind.entitySet)
-        .isType(EdmTechProvider.nameETAllPrim,true)
+        .isType(EdmTechProvider.nameETAllPrim, true)
         .at(1)
         .isUriPathInfoKind(UriResourceKind.count);
 
@@ -504,7 +504,7 @@ public class TestUriParserImpl {
     testRes.run("ESTwoPrim/com.sap.odata.test1.ETBase")
         .at(0)
         .isEntitySet("ESTwoPrim")
-        .isType(EdmTechProvider.nameETTwoPrim,true)
+        .isType(EdmTechProvider.nameETTwoPrim, true)
         .isTypeFilterOnCollection(EdmTechProvider.nameETBase)
         .isTypeFilterOnEntry(null);
 
@@ -517,9 +517,9 @@ public class TestUriParserImpl {
         .isTypeFilterOnCollection(EdmTechProvider.nameETBase)
         .isTypeFilterOnEntry(null)
         .at(0)
-        .isType(EdmTechProvider.nameETTwoPrim,false)
+        .isType(EdmTechProvider.nameETTwoPrim, false)
         .isKeyPredicate(0, "PropertyInt16", "1");
-        
+
     // filter before key predicate; property of sub type
     testRes.run("ESTwoPrim/com.sap.odata.test1.ETBase(PropertyInt16=1)/AdditionalPropertyString_5")
         .at(0)
@@ -538,7 +538,7 @@ public class TestUriParserImpl {
         .at(0)
         .isEntitySet("ESTwoPrim")
         .isUriPathInfoKind(UriResourceKind.entitySet)
-        .isType(EdmTechProvider.nameETTwoPrim,false)
+        .isType(EdmTechProvider.nameETTwoPrim, false)
         .isTypeFilterOnCollection(null)
         .isTypeFilterOnEntry(EdmTechProvider.nameETBase)
         .isKeyPredicate(0, "PropertyInt16", "1");

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
index 84217df..cce237e 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -30,24 +30,6 @@ import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind;
 import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
 import org.apache.olingo.server.core.uri.UriInfoImpl;
-import org.apache.olingo.server.core.uri.queryoption.AliasQueryOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.CountOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.ExpandItemImpl;
-import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.FilterOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.FormatOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.IdOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.LevelsOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.OrderByItemImpl;
-import org.apache.olingo.server.core.uri.queryoption.OrderByOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.QueryOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SearchOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SelectItemImpl;
-import org.apache.olingo.server.core.uri.queryoption.SelectOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SkipOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SkipTokenOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SystemQueryOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.TopOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.AliasImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.LiteralImpl;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
index 8eedce6..161a0fd 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -41,16 +41,6 @@ import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
 import org.apache.olingo.server.core.uri.UriInfoImpl;
 import org.apache.olingo.server.core.uri.UriResourceActionImpl;
 import org.apache.olingo.server.core.uri.UriResourceFunctionImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.AliasImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.BinaryImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.EnumerationImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.LambdaRefImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.LiteralImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.MemberImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.MethodImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.TypeLiteralImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.UnaryImpl;
 import org.apache.olingo.server.core.uri.testutil.FilterTreeToText;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
index 21df8bb..98cbce6 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -35,7 +35,6 @@ import org.apache.olingo.server.core.uri.queryoption.FilterOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.OrderByOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.QueryOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.SelectOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.MemberImpl;
 
 public class ExpandValidator implements Validator {
   private Edm edm;
@@ -220,13 +219,12 @@ public class ExpandValidator implements Validator {
   }
 
   public ExpandValidator isExpandStartType(final FullQualifiedName fullName) {
-      EdmType actualType = expandItem.getStartTypeFilter();
-      
-      FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
-      assertEquals(fullName, actualName);
-      return this;
-   
-    
+    EdmType actualType = expandItem.getStartTypeFilter();
+
+    FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
+    assertEquals(fullName, actualName);
+    return this;
+
   }
 
 }