You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/03/19 17:26:41 UTC

olingo-odata4 git commit: [OLINGO-575] Some todos and pojogen refactoring

Repository: olingo-odata4
Updated Branches:
  refs/heads/master 4f15c7c72 -> e26346dc3


[OLINGO-575] Some todos and pojogen refactoring


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

Branch: refs/heads/master
Commit: e26346dc31ec477be06fc12c3c901cd5b4e0f13c
Parents: 4f15c7c
Author: Christian Amend <ch...@apache.org>
Authored: Thu Mar 19 17:12:32 2015 +0100
Committer: Christian Amend <ch...@apache.org>
Committed: Thu Mar 19 17:13:18 2015 +0100

----------------------------------------------------------------------
 .../src/main/resources/complexType.vm           | 123 +++++++++++++++-
 .../resources/complexTypeComposableInvoker.vm   |  97 ++++++++++++-
 .../src/main/resources/container.vm             |   8 +-
 .../src/main/resources/v40/complexType.vm       | 141 -------------------
 .../v40/complexTypeComposableInvoker.vm         | 115 ---------------
 .../src/main/resources/v40/container.vm         |  25 ----
 .../server/api/processor/DefaultProcessor.java  |   2 +-
 .../core/uri/queryoption/SearchOptionImpl.java  |   1 -
 .../tecsvc/provider/ComplexTypeProvider.java    |   4 +-
 .../tecsvc/provider/EntityTypeProvider.java     |  10 +-
 .../tecsvc/provider/PropertyProvider.java       |   7 -
 .../olingo/server/core/ODataHandlerTest.java    |   2 +-
 .../core/uri/antlr/TestFullResourcePath.java    |  12 --
 .../core/uri/antlr/TestUriParserImpl.java       |   1 -
 .../core/uri/queryoption/QueryOptionTest.java   |   2 +-
 .../core/uri/testutil/TokenValidator.java       |   1 -
 16 files changed, 235 insertions(+), 316 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/ext/pojogen-maven-plugin/src/main/resources/complexType.vm
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/resources/complexType.vm b/ext/pojogen-maven-plugin/src/main/resources/complexType.vm
index d3ed50d..1cb6c80 100644
--- a/ext/pojogen-maven-plugin/src/main/resources/complexType.vm
+++ b/ext/pojogen-maven-plugin/src/main/resources/complexType.vm
@@ -43,7 +43,128 @@ import org.apache.olingo.commons.api.edm.geo.Point;
 import org.apache.olingo.commons.api.edm.geo.Polygon;
 //CHECKSTYLE:ON (Maven checkstyle)
 
-#parse( "${odataVersion}/complexType.vm" )
+@org.apache.olingo.ext.proxy.api.annotations.Namespace("$namespace")
+@org.apache.olingo.ext.proxy.api.annotations.ComplexType(name = "$complexType.Name",
+        isOpenType = $complexType.isOpenType(),
+        isAbstract = $complexType.Abstract#if($complexType.getBaseType()),
+        baseType = "$complexType.getBaseType().getFullQualifiedName().toString()"#end)
+public interface $utility.capitalize($complexType.Name) 
+    extends #if($complexType.getBaseType())$utility.getJavaType($complexType.getBaseType().getFullQualifiedName().toString())#{else}org.apache.olingo.ext.proxy.api.ComplexType<$utility.capitalize($complexType.Name)>, org.apache.olingo.ext.proxy.api.StructuredQuery<$utility.capitalize($complexType.Name)>#{end}#if( $complexType.isOpenType() ),AbstractOpenType#{end} {
+
+#if( $entityType.getBaseType() )
+  @Override
+  $utility.capitalize($complexType.Name) load();
+#end
+
+#set( $complexProps = [] )
+#set( $contained = [] )
+#foreach($propertyName in $complexType.PropertyNames)
+    #set($property = $complexType.getProperty($propertyName))#*
+
+    *##if($property.Type.FullQualifiedName.toString().equals("Edm.Stream"))#*
+      *##set( $returnType = "org.apache.olingo.ext.proxy.api.EdmStreamValue" )#*
+    *##else#*
+      *##set( $returnType = $utility.getJavaType($property.Type, $property.Collection) )#*
+    *##end
+
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "$property.Name", 
+                type = "$property.Type.getFullQualifiedName().toString()",
+                nullable = $property.Nullable,
+                defaultValue = "#if($property.getDefaultValue())$property.getDefaultValue()#end",
+                maxLenght = #if($property.getMaxLength() && !$property.getMaxLength().equalsIgnoreCase("max"))$property.getMaxLength()#{else}Integer.MAX_VALUE#end,
+                fixedLenght = #if($property.isFixedLength())$property.isFixedLength()#{else}false#end,
+                precision = #if($property.getPrecision())$property.getPrecision()#{else}0#end,
+                scale = #if($property.getScale())$property.getScale()#{else}0#end,
+                unicode = #if($property.isUnicode())$property.isUnicode()#{else}false#end,
+                collation = "#if($property.getCollation())$property.getCollation()#end",
+                srid = "#if($property.getSRID())$property.getSRID()#end")
+    $returnType get$utility.capitalize($property.Name)();
+
+    void set$utility.capitalize($property.Name)($returnType _$utility.uncapitalize($property.Name));
+
+    #if($utility.isComplex($property.Type.FullQualifiedName))#*
+      *##set( $adding = $complexProps.add($property) )
+    #end
+
+#end
+
+#foreach($propertyName in $complexType.NavigationPropertyNames)
+    #set($property = $complexType.getNavigationProperty($propertyName))
+    #set( $type = $utility.getNavigationType($property) )
+    #set( $binding = $utility.getNavigationBindingDetails($complexType, $property) )
+
+    #if($property.containsTarget() && $property.Collection)#*
+      *##set( $contains = $contained.add($property) )
+    #else#*
+      *#@org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "$property.Name", 
+                type = "$type", 
+                targetSchema = "$binding.Schema.Namespace", 
+                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
+                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end")
+    $utility.getJavaType($type, $property.Collection) get$utility.capitalize($property.Name)();
+
+    void set$utility.capitalize($property.Name)($utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
+    #end
+#end
+
+    Annotations annotations();
+
+    interface Annotations #if( $complexType.baseType )
+           extends ${utility.getJavaType($complexType.getBaseType())}.Annotations#end{
+
+#foreach($propertyName in $complexType.PropertyNames)
+    #set($property = $complexType.getProperty($propertyName))
+        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "$property.Name",
+                   type = "$property.Type.FullQualifiedName.toString()")
+        Annotatable get$utility.capitalize($property.Name)Annotations();
+
+#end
+
+#foreach($propertyName in $complexType.NavigationPropertyNames)
+    #set($property = $complexType.getNavigationProperty($propertyName))
+    #set($type = $utility.getNavigationType($property))
+
+        @AnnotationsForNavigationProperty(name = "$property.Name", 
+                  type = "$type")
+        Annotatable get$utility.capitalize($property.Name)Annotations();
+#end
+    }
+
+#foreach($property in $contained)
+  #if( !$entityType.BaseType.getNavigationProperty($property.Name))
+    #set( $pkgname = "${package}.${utility.capitalize($entityType.Name)}.$utility.capitalize($property.Name)" )
+    @NavigationProperty(name = "$property.Name", 
+                type = "$type", 
+                targetSchema = "$binding.Schema.Namespace", 
+                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
+                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end",
+                containsTarget = $property.containsTarget())
+    $pkgname get$utility.capitalize($property.Name)();
+    void set$utility.capitalize($property.Name)($pkgname _$utility.uncapitalize($property.Name));
+
+    #set( $keys = $utility.getEntityKeyType($property) )
+    #if( $keys.size() > 1 )
+      #set( $type = $utility.getEdmType($property).EntityType.Name + "Key" )
+    #elseif( $keys.size() == 1 )
+      #set( $type = $keys.values().iterator().next() )
+    #else
+      #set( $type = "" )
+    #end
+
+    @EntitySet(name = "$property.Name", contained = true)
+    interface $utility.capitalize($property.Name) 
+      extends AbstractEntitySet<$utility.getJavaType($property.Type), $type, $utility.getJavaType($property.Type)Collection> {
+
+    #foreach( $dos in $utility.getDescendantsOrSelf($utility.getEdmType($property)) )
+        #set( $djt = $utility.getJavaType($dos) )
+        #set( $sIdx = $djt.lastIndexOf('.') + 1 )
+        $djt new$djt.substring($sIdx)();
+        ${djt}Collection new$djt.substring($sIdx)Collection();
+    #end
+    }
+
+  #end
+#end
 
 #set( $functions = $utility.getFunctionsBoundTo($complexType.Name, false) )
 #set( $actions = $utility.getActionsBoundTo($complexType.Name, false) )

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/ext/pojogen-maven-plugin/src/main/resources/complexTypeComposableInvoker.vm
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/resources/complexTypeComposableInvoker.vm b/ext/pojogen-maven-plugin/src/main/resources/complexTypeComposableInvoker.vm
index 0678a38..f55d64d 100644
--- a/ext/pojogen-maven-plugin/src/main/resources/complexTypeComposableInvoker.vm
+++ b/ext/pojogen-maven-plugin/src/main/resources/complexTypeComposableInvoker.vm
@@ -43,6 +43,101 @@ import org.apache.olingo.commons.api.edm.geo.Point;
 import org.apache.olingo.commons.api.edm.geo.Polygon;
 //CHECKSTYLE:ON (Maven checkstyle)
 
-#parse( "${odataVersion}/complexTypeComposableInvoker.vm" )
+public interface $utility.capitalize($complexType.Name)ComposableInvoker 
+  extends org.apache.olingo.ext.proxy.api.StructuredComposableInvoker<$utility.capitalize($complexType.Name), ${utility.capitalize($complexType.Name)}.Operations>
+  #{if}( $complexType.isOpenType() ),AbstractOpenType#end {
+
+  @Override
+  $utility.capitalize($complexType.Name)ComposableInvoker select(String... select);
+
+  @Override
+  $utility.capitalize($complexType.Name)ComposableInvoker expand(String... expand);
+
+#set( $complexProps = [] )
+#set( $contained = [] )
+#foreach($propertyName in $complexType.PropertyNames)
+    #set($property = $complexType.getProperty($propertyName))#*
+
+    *##if($property.Type.FullQualifiedName.toString().equals("Edm.Stream"))#*
+      *##set( $returnType = "org.apache.olingo.ext.proxy.api.EdmStreamValue" )#*
+    *##else#*
+      *##set( $returnType = $utility.getJavaType($property.Type, $property.Collection) )#*
+    *##end
+
+    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "$property.Name", 
+                type = "$property.Type.getFullQualifiedName().toString()",
+                nullable = $property.Nullable,
+                defaultValue = "#if($property.getDefaultValue())$property.getDefaultValue()#end",
+                maxLenght = #if($property.getMaxLength() && !$property.getMaxLength().equalsIgnoreCase("max"))$property.getMaxLength()#{else}Integer.MAX_VALUE#end,
+                fixedLenght = #if($property.isFixedLength())$property.isFixedLength()#{else}false#end,
+                precision = #if($property.getPrecision())$property.getPrecision()#{else}0#end,
+                scale = #if($property.getScale())$property.getScale()#{else}0#end,
+                unicode = #if($property.isUnicode())$property.isUnicode()#{else}false#end,
+                collation = "#if($property.getCollation())$property.getCollation()#end",
+                srid = "#if($property.getSRID())$property.getSRID()#end")
+    $returnType get$utility.capitalize($property.Name)();
+
+    void set$utility.capitalize($property.Name)($returnType _$utility.uncapitalize($property.Name));
+
+    #if($utility.isComplex($property.Type.FullQualifiedName))#*
+      *##set( $adding = $complexProps.add($property) )
+    #end
+
+#end
+
+#foreach($propertyName in $complexType.NavigationPropertyNames)
+    #set($property = $complexType.getNavigationProperty($propertyName))
+    #set( $type = $utility.getNavigationType($property) )
+    #set( $binding = $utility.getNavigationBindingDetails($complexType, $property) )
+
+    #if($property.containsTarget() && $property.Collection)#*
+      *##set( $contains = $contained.add($property) )
+    #else#*
+      *#@org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "$property.Name", 
+                type = "$type", 
+                targetSchema = "$binding.Schema.Namespace", 
+                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
+                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end")
+    $utility.getJavaType($type, $property.Collection) get$utility.capitalize($property.Name)();
+
+    void set$utility.capitalize($property.Name)($utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
+    #end
+#end
+
+#foreach($property in $contained)
+  #if( !$entityType.BaseType.getNavigationProperty($property.Name))
+    #set( $pkgname = "${package}.${utility.capitalize($entityType.Name)}.$utility.capitalize($property.Name)" )
+    @NavigationProperty(name = "$property.Name", 
+                type = "$type", 
+                targetSchema = "$binding.Schema.Namespace", 
+                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
+                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end",
+                containsTarget = $property.containsTarget())
+    $pkgname get$utility.capitalize($property.Name)();
+    void set$utility.capitalize($property.Name)($pkgname _$utility.uncapitalize($property.Name));
+
+    #set( $keys = $utility.getEntityKeyType($property) )
+    #if( $keys.size() > 1 )
+      #set( $type = $utility.getEdmType($property).EntityType.Name + "Key" )
+    #elseif( $keys.size() == 1 )
+      #set( $type = $keys.values().iterator().next() )
+    #else
+      #set( $type = "" )
+    #end
+
+    @EntitySet(name = "$property.Name", contained = true)
+    interface $utility.capitalize($property.Name) 
+      extends AbstractEntitySet<$utility.getJavaType($property.Type), $type, $utility.getJavaType($property.Type)Collection> {
+
+    #foreach( $dos in $utility.getDescendantsOrSelf($utility.getEdmType($property)) )
+        #set( $djt = $utility.getJavaType($dos) )
+        #set( $sIdx = $djt.lastIndexOf('.') + 1 )
+        $djt new$djt.substring($sIdx)();
+        ${djt}Collection new$djt.substring($sIdx)Collection();
+    #end
+    }
+
+  #end
+#end
 
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/ext/pojogen-maven-plugin/src/main/resources/container.vm
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/resources/container.vm b/ext/pojogen-maven-plugin/src/main/resources/container.vm
index 2042839..c1a3631 100644
--- a/ext/pojogen-maven-plugin/src/main/resources/container.vm
+++ b/ext/pojogen-maven-plugin/src/main/resources/container.vm
@@ -64,7 +64,13 @@ public interface $utility.capitalize($container.Name) extends PersistenceManager
 
 #end
 
-#parse( "${odataVersion}/container.vm" )
+#foreach($singleton in $container.Singletons)
+    @org.apache.olingo.ext.proxy.api.annotations.Singleton(
+                name = "$singleton.Name",
+                container = "${container.Namespace}.${container.Name}")
+    $utility.getJavaType($singleton.EntityType) get$utility.capitalize($singleton.Name)();
+
+#end
 
   Operations operations();
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm b/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm
deleted file mode 100644
index 1717564..0000000
--- a/ext/pojogen-maven-plugin/src/main/resources/v40/complexType.vm
+++ /dev/null
@@ -1,141 +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.
- *#
-@org.apache.olingo.ext.proxy.api.annotations.Namespace("$namespace")
-@org.apache.olingo.ext.proxy.api.annotations.ComplexType(name = "$complexType.Name",
-        isOpenType = $complexType.isOpenType(),
-        isAbstract = $complexType.Abstract#if($complexType.getBaseType()),
-        baseType = "$complexType.getBaseType().getFullQualifiedName().toString()"#end)
-public interface $utility.capitalize($complexType.Name) 
-    extends #if($complexType.getBaseType())$utility.getJavaType($complexType.getBaseType().getFullQualifiedName().toString())#{else}org.apache.olingo.ext.proxy.api.ComplexType<$utility.capitalize($complexType.Name)>, org.apache.olingo.ext.proxy.api.StructuredQuery<$utility.capitalize($complexType.Name)>#{end}#if( $complexType.isOpenType() ),AbstractOpenType#{end} {
-
-#if( $entityType.getBaseType() )
-  @Override
-  $utility.capitalize($complexType.Name) load();
-#end
-
-#set( $complexProps = [] )
-#set( $contained = [] )
-#foreach($propertyName in $complexType.PropertyNames)
-    #set($property = $complexType.getProperty($propertyName))#*
-
-    *##if($property.Type.FullQualifiedName.toString().equals("Edm.Stream"))#*
-      *##set( $returnType = "org.apache.olingo.ext.proxy.api.EdmStreamValue" )#*
-    *##else#*
-      *##set( $returnType = $utility.getJavaType($property.Type, $property.Collection) )#*
-    *##end
-
-    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "$property.Name", 
-                type = "$property.Type.getFullQualifiedName().toString()",
-                nullable = $property.Nullable,
-                defaultValue = "#if($property.getDefaultValue())$property.getDefaultValue()#end",
-                maxLenght = #if($property.getMaxLength() && !$property.getMaxLength().equalsIgnoreCase("max"))$property.getMaxLength()#{else}Integer.MAX_VALUE#end,
-                fixedLenght = #if($property.isFixedLength())$property.isFixedLength()#{else}false#end,
-                precision = #if($property.getPrecision())$property.getPrecision()#{else}0#end,
-                scale = #if($property.getScale())$property.getScale()#{else}0#end,
-                unicode = #if($property.isUnicode())$property.isUnicode()#{else}false#end,
-                collation = "#if($property.getCollation())$property.getCollation()#end",
-                srid = "#if($property.getSRID())$property.getSRID()#end")
-    $returnType get$utility.capitalize($property.Name)();
-
-    void set$utility.capitalize($property.Name)($returnType _$utility.uncapitalize($property.Name));
-
-    #if($utility.isComplex($property.Type.FullQualifiedName))#*
-      *##set( $adding = $complexProps.add($property) )
-    #end
-
-#end
-
-#foreach($propertyName in $complexType.NavigationPropertyNames)
-    #set($property = $complexType.getNavigationProperty($propertyName))
-    #set( $type = $utility.getNavigationType($property) )
-    #set( $binding = $utility.getNavigationBindingDetails($complexType, $property) )
-
-    #if($property.containsTarget() && $property.Collection)#*
-      *##set( $contains = $contained.add($property) )
-    #else#*
-      *#@org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "$property.Name", 
-                type = "$type", 
-                targetSchema = "$binding.Schema.Namespace", 
-                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
-                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end")
-    $utility.getJavaType($type, $property.Collection) get$utility.capitalize($property.Name)();
-
-    void set$utility.capitalize($property.Name)($utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
-    #end
-#end
-
-    Annotations annotations();
-
-    interface Annotations #if( $complexType.baseType )
-           extends ${utility.getJavaType($complexType.getBaseType())}.Annotations#end{
-
-#foreach($propertyName in $complexType.PropertyNames)
-    #set($property = $complexType.getProperty($propertyName))
-        @org.apache.olingo.ext.proxy.api.annotations.AnnotationsForProperty(name = "$property.Name",
-                   type = "$property.Type.FullQualifiedName.toString()")
-        Annotatable get$utility.capitalize($property.Name)Annotations();
-
-#end
-
-#foreach($propertyName in $complexType.NavigationPropertyNames)
-    #set($property = $complexType.getNavigationProperty($propertyName))
-    #set($type = $utility.getNavigationType($property))
-
-        @AnnotationsForNavigationProperty(name = "$property.Name", 
-                  type = "$type")
-        Annotatable get$utility.capitalize($property.Name)Annotations();
-#end
-    }
-
-#foreach($property in $contained)
-  #if( !$entityType.BaseType.getNavigationProperty($property.Name))
-    #set( $pkgname = "${package}.${utility.capitalize($entityType.Name)}.$utility.capitalize($property.Name)" )
-    @NavigationProperty(name = "$property.Name", 
-                type = "$type", 
-                targetSchema = "$binding.Schema.Namespace", 
-                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
-                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end",
-                containsTarget = $property.containsTarget())
-    $pkgname get$utility.capitalize($property.Name)();
-    void set$utility.capitalize($property.Name)($pkgname _$utility.uncapitalize($property.Name));
-
-    #set( $keys = $utility.getEntityKeyType($property) )
-    #if( $keys.size() > 1 )
-      #set( $type = $utility.getEdmType($property).EntityType.Name + "Key" )
-    #elseif( $keys.size() == 1 )
-      #set( $type = $keys.values().iterator().next() )
-    #else
-      #set( $type = "" )
-    #end
-
-    @EntitySet(name = "$property.Name", contained = true)
-    interface $utility.capitalize($property.Name) 
-      extends AbstractEntitySet<$utility.getJavaType($property.Type), $type, $utility.getJavaType($property.Type)Collection> {
-
-    #foreach( $dos in $utility.getDescendantsOrSelf($utility.getEdmType($property)) )
-        #set( $djt = $utility.getJavaType($dos) )
-        #set( $sIdx = $djt.lastIndexOf('.') + 1 )
-        $djt new$djt.substring($sIdx)();
-        ${djt}Collection new$djt.substring($sIdx)Collection();
-    #end
-    }
-
-  #end
-#end
-

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/ext/pojogen-maven-plugin/src/main/resources/v40/complexTypeComposableInvoker.vm
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/resources/v40/complexTypeComposableInvoker.vm b/ext/pojogen-maven-plugin/src/main/resources/v40/complexTypeComposableInvoker.vm
deleted file mode 100644
index 5467a5a..0000000
--- a/ext/pojogen-maven-plugin/src/main/resources/v40/complexTypeComposableInvoker.vm
+++ /dev/null
@@ -1,115 +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.
- *#
-public interface $utility.capitalize($complexType.Name)ComposableInvoker 
-  extends org.apache.olingo.ext.proxy.api.StructuredComposableInvoker<$utility.capitalize($complexType.Name), ${utility.capitalize($complexType.Name)}.Operations>
-  #{if}( $complexType.isOpenType() ),AbstractOpenType#end {
-
-  @Override
-  $utility.capitalize($complexType.Name)ComposableInvoker select(String... select);
-
-  @Override
-  $utility.capitalize($complexType.Name)ComposableInvoker expand(String... expand);
-
-#set( $complexProps = [] )
-#set( $contained = [] )
-#foreach($propertyName in $complexType.PropertyNames)
-    #set($property = $complexType.getProperty($propertyName))#*
-
-    *##if($property.Type.FullQualifiedName.toString().equals("Edm.Stream"))#*
-      *##set( $returnType = "org.apache.olingo.ext.proxy.api.EdmStreamValue" )#*
-    *##else#*
-      *##set( $returnType = $utility.getJavaType($property.Type, $property.Collection) )#*
-    *##end
-
-    @org.apache.olingo.ext.proxy.api.annotations.Property(name = "$property.Name", 
-                type = "$property.Type.getFullQualifiedName().toString()",
-                nullable = $property.Nullable,
-                defaultValue = "#if($property.getDefaultValue())$property.getDefaultValue()#end",
-                maxLenght = #if($property.getMaxLength() && !$property.getMaxLength().equalsIgnoreCase("max"))$property.getMaxLength()#{else}Integer.MAX_VALUE#end,
-                fixedLenght = #if($property.isFixedLength())$property.isFixedLength()#{else}false#end,
-                precision = #if($property.getPrecision())$property.getPrecision()#{else}0#end,
-                scale = #if($property.getScale())$property.getScale()#{else}0#end,
-                unicode = #if($property.isUnicode())$property.isUnicode()#{else}false#end,
-                collation = "#if($property.getCollation())$property.getCollation()#end",
-                srid = "#if($property.getSRID())$property.getSRID()#end")
-    $returnType get$utility.capitalize($property.Name)();
-
-    void set$utility.capitalize($property.Name)($returnType _$utility.uncapitalize($property.Name));
-
-    #if($utility.isComplex($property.Type.FullQualifiedName))#*
-      *##set( $adding = $complexProps.add($property) )
-    #end
-
-#end
-
-#foreach($propertyName in $complexType.NavigationPropertyNames)
-    #set($property = $complexType.getNavigationProperty($propertyName))
-    #set( $type = $utility.getNavigationType($property) )
-    #set( $binding = $utility.getNavigationBindingDetails($complexType, $property) )
-
-    #if($property.containsTarget() && $property.Collection)#*
-      *##set( $contains = $contained.add($property) )
-    #else#*
-      *#@org.apache.olingo.ext.proxy.api.annotations.NavigationProperty(name = "$property.Name", 
-                type = "$type", 
-                targetSchema = "$binding.Schema.Namespace", 
-                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
-                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end")
-    $utility.getJavaType($type, $property.Collection) get$utility.capitalize($property.Name)();
-
-    void set$utility.capitalize($property.Name)($utility.getJavaType($type, $property.Collection) _$utility.uncapitalize($property.Name));
-    #end
-#end
-
-#foreach($property in $contained)
-  #if( !$entityType.BaseType.getNavigationProperty($property.Name))
-    #set( $pkgname = "${package}.${utility.capitalize($entityType.Name)}.$utility.capitalize($property.Name)" )
-    @NavigationProperty(name = "$property.Name", 
-                type = "$type", 
-                targetSchema = "$binding.Schema.Namespace", 
-                targetContainer = "#if($binding.Container)$binding.Container.Name#end", 
-                targetEntitySet = "#if($binding.EntitySet)$binding.EntitySet.Name#end",
-                containsTarget = $property.containsTarget())
-    $pkgname get$utility.capitalize($property.Name)();
-    void set$utility.capitalize($property.Name)($pkgname _$utility.uncapitalize($property.Name));
-
-    #set( $keys = $utility.getEntityKeyType($property) )
-    #if( $keys.size() > 1 )
-      #set( $type = $utility.getEdmType($property).EntityType.Name + "Key" )
-    #elseif( $keys.size() == 1 )
-      #set( $type = $keys.values().iterator().next() )
-    #else
-      #set( $type = "" )
-    #end
-
-    @EntitySet(name = "$property.Name", contained = true)
-    interface $utility.capitalize($property.Name) 
-      extends AbstractEntitySet<$utility.getJavaType($property.Type), $type, $utility.getJavaType($property.Type)Collection> {
-
-    #foreach( $dos in $utility.getDescendantsOrSelf($utility.getEdmType($property)) )
-        #set( $djt = $utility.getJavaType($dos) )
-        #set( $sIdx = $djt.lastIndexOf('.') + 1 )
-        $djt new$djt.substring($sIdx)();
-        ${djt}Collection new$djt.substring($sIdx)Collection();
-    #end
-    }
-
-  #end
-#end
-

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/ext/pojogen-maven-plugin/src/main/resources/v40/container.vm
----------------------------------------------------------------------
diff --git a/ext/pojogen-maven-plugin/src/main/resources/v40/container.vm b/ext/pojogen-maven-plugin/src/main/resources/v40/container.vm
deleted file mode 100644
index 7527717..0000000
--- a/ext/pojogen-maven-plugin/src/main/resources/v40/container.vm
+++ /dev/null
@@ -1,25 +0,0 @@
-#*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *#
-#foreach($singleton in $container.Singletons)
-    @org.apache.olingo.ext.proxy.api.annotations.Singleton(
-                name = "$singleton.Name",
-                container = "${container.Namespace}.${container.Name}")
-    $utility.getJavaType($singleton.EntityType) get$utility.capitalize($singleton.Name)();
-
-#end

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/DefaultProcessor.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/DefaultProcessor.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/DefaultProcessor.java
index 302959a..f62c6c7 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/DefaultProcessor.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/DefaultProcessor.java
@@ -56,7 +56,7 @@ public class DefaultProcessor implements MetadataProcessor, ServiceDocumentProce
   public void readServiceDocument(final ODataRequest request, final ODataResponse response, final UriInfo uriInfo,
       final ContentType requestedContentType) throws ODataApplicationException, SerializerException {
     ODataSerializer serializer = odata.createSerializer(ODataFormat.fromContentType(requestedContentType));
-    response.setContent(serializer.serviceDocument(serviceMetadata.getEdm(), request.getRawBaseUri()));
+    response.setContent(serializer.serviceDocument(serviceMetadata.getEdm(), null));
     response.setStatusCode(HttpStatusCode.OK.getStatusCode());
     response.setHeader(HttpHeader.CONTENT_TYPE, requestedContentType.toContentTypeString());
   }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/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 130ef27..ec42147 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
@@ -22,7 +22,6 @@ import org.apache.olingo.server.api.uri.queryoption.SearchOption;
 import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind;
 import org.apache.olingo.server.api.uri.queryoption.search.SearchExpression;
 
-// TODO planned: support $search 
 public class SearchOptionImpl extends SystemQueryOptionImpl implements SearchOption {
 
   public SearchOptionImpl() {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
index ad0f182..5e2c556 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
@@ -69,7 +69,7 @@ public class ComplexTypeProvider {
                   PropertyProvider.propertySingle, PropertyProvider.propertyDouble, PropertyProvider.propertyDuration,
                   PropertyProvider.propertyGuid, PropertyProvider.propertyInt16, PropertyProvider.propertyInt32,
                   PropertyProvider.propertyInt64, PropertyProvider.propertySByte, PropertyProvider.propertyTimeOfDay
-                  /* TODO add propertyStream */));
+                  ));
 
     } else if (complexTypeName.equals(nameCTCollAllPrim)) {
       return new ComplexType()
@@ -84,7 +84,7 @@ public class ComplexTypeProvider {
                   PropertyProvider.collPropertyBinary, PropertyProvider.collPropertyDate,
                   PropertyProvider.collPropertyDateTimeOffset, PropertyProvider.collPropertyDuration,
                   PropertyProvider.collPropertyGuid, PropertyProvider.collPropertyTimeOfDay
-                  /* TODO add collectionPropertyStream */));
+                  ));
 
     } else if (complexTypeName.equals(nameCTTwoPrim)) {
       return new ComplexType()

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
index cfcbcdc..7f0381e 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
@@ -92,7 +92,7 @@ public class EntityTypeProvider {
               PropertyProvider.propertySingle, PropertyProvider.propertyDouble, PropertyProvider.propertyDecimal,
               PropertyProvider.propertyBinary, PropertyProvider.propertyDate, PropertyProvider.propertyDateTimeOffset,
               PropertyProvider.propertyDuration, PropertyProvider.propertyGuid, PropertyProvider.propertyTimeOfDay
-              /* TODO add propertyStream */))
+              ))
           .setNavigationProperties(Arrays.asList(PropertyProvider.navPropertyETTwoPrimOne_ETTwoPrim,
               PropertyProvider.collectionNavPropertyETTwoPrimMany_ETTwoPrim));
 
@@ -115,7 +115,7 @@ public class EntityTypeProvider {
                   PropertyProvider.collPropertyDateTimeOffset_NotNullable,
                   PropertyProvider.collPropertyDuration_NotNullable,
                   PropertyProvider.collPropertyGuid, PropertyProvider.collPropertyTimeOfDay
-                  /* TODO add propertyStream */));
+                  ));
 
     } else if (entityTypeName.equals(nameETTwoPrim)) {
       return new EntityType()
@@ -197,7 +197,7 @@ public class EntityTypeProvider {
                   PropertyProvider.propertyDecimal_NotNullable, PropertyProvider.propertyDate_NotNullable,
                   PropertyProvider.propertyDateTimeOffset_NotNullable,
                   PropertyProvider.propertyDuration_NotNullable, PropertyProvider.propertyGuid_NotNullable,
-                  PropertyProvider.propertyTimeOfDay_NotNullable /* TODO add propertyStream */));
+                  PropertyProvider.propertyTimeOfDay_NotNullable));
 
     } else if (entityTypeName.equals(nameETCompAllPrim)) {
       return new EntityType()
@@ -280,7 +280,7 @@ public class EntityTypeProvider {
                   PropertyProvider.propertyBinary_ExplicitNullable, PropertyProvider.propertyDate_ExplicitNullable,
                   PropertyProvider.propertyDateTimeOffset_ExplicitNullable,
                   PropertyProvider.propertyDuration_ExplicitNullable, PropertyProvider.propertyGuid_ExplicitNullable,
-                  PropertyProvider.propertyTimeOfDay_ExplicitNullable /* TODO add propertyStream */,
+                  PropertyProvider.propertyTimeOfDay_ExplicitNullable,
                   PropertyProvider.collPropertyString_ExplicitNullable,
                   PropertyProvider.collPropertyBoolean_ExplicitNullable,
                   PropertyProvider.collPropertyByte_ExplicitNullable,
@@ -296,7 +296,7 @@ public class EntityTypeProvider {
                   PropertyProvider.collPropertyDateTimeOffset_ExplicitNullable,
                   PropertyProvider.collPropertyDuration_ExplicitNullable,
                   PropertyProvider.collPropertyGuid_ExplicitNullable,
-                  PropertyProvider.collPropertyTimeOfDay_ExplicitNullable /* TODO add propertyStream */));
+                  PropertyProvider.collPropertyTimeOfDay_ExplicitNullable));
 
     } else if (entityTypeName.equals(nameETKeyNav)) {
       return new EntityType()

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java
index 43b7a63..5dfa548 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java
@@ -549,13 +549,6 @@ public class PropertyProvider {
           .setType(nameTimeOfDay)
           .setNullable(true);
 
-  /*
-   * TODO add propertyStream
-   * Property propertyStream = new Property()
-   * .setName("PropertyStream")
-   * .setFQNTypeName(EdmStream.getFullQualifiedName());
-   */
-
   // Complex Properties ----------------------------------------------------------------------------------------------
   public static final Property collPropertyComp_CTPrimComp = new Property()
           .setName("CollPropertyComp")

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
index b07f709..5424fda 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
@@ -114,7 +114,7 @@ public class ODataHandlerTest {
     assertNotNull(response.getContent());
     String doc = IOUtils.toString(response.getContent());
 
-    assertThat(doc, containsString("\"@odata.context\" : \"" + BASE_URI + "/$metadata\""));
+    assertThat(doc, containsString("\"@odata.context\" : \"$metadata\""));
     assertThat(doc, containsString("\"value\" :"));
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
index 39d55e7..6019218 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
@@ -924,15 +924,6 @@ public class TestFullResourcePath {
   }
 
   @Test
-  public void runEntityIdError() {
-    // TODO planned: move to validator
-    // testUri.runEx("$entity").isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX);
-    // testUri.runEx("$entity?$idfalse=ESKeyNav(1)").isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX);
-    // testUri.runEx("$entity/olingo.odata.test1.invalidType?$id=ESKeyNav(1)").isExSemantic();
-    // testUri.runEx("$entity/invalid?$id=ESKeyNav(1)").isExSyntax(UriParserSyntaxException.MessageKeys.SYNTAX);
-  }
-
-  @Test
   public void runEsName() throws Exception {
     testUri.run("ESAllPrim")
         .isKind(UriInfoKind.resource).goPath()
@@ -4196,9 +4187,6 @@ public class TestFullResourcePath {
         .isType(EntityTypeProvider.nameETTwoKeyNav, false)
         .n().isPrimitiveProperty("PropertyString", PropertyProvider.nameString, false);
 
-    // TODO planned: lambda does not check if the previous path segment is a collection
-    // testFilter.runOnETKeyNav("NavPropertyETTwoKeyNavOne/any(d:d/PropertyString eq 'SomeString')");
-
     testFilter.runOnETKeyNav("NavPropertyETTwoKeyNavMany/any()")
         .is("<NavPropertyETTwoKeyNavMany/<ANY;>>");
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
index 16c919b..798c5c0 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
@@ -1094,7 +1094,6 @@ public class TestUriParserImpl {
 
   @Test
   public void testGeo() throws UriParserException {
-    // TODO sync
     testFilter.runOnETAllPrim("geo.distance(PropertySByte,PropertySByte)")
         .is("<geo.distance(<PropertySByte>,<PropertySByte>)>")
         .isMethod(MethodKind.GEODISTANCE, 2);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
index bd7e9ee..6f728be 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
@@ -222,7 +222,7 @@ public class QueryOptionTest {
   public void testSearchOptionImpl() {
     SearchOptionImpl option = new SearchOptionImpl();
     assertEquals(SystemQueryOptionKind.SEARCH, option.getKind());
-    // TODO $search is not supported yet
+    // $search is not supported yet
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/e26346dc/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
index 4632eff..3bea5c3 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/TokenValidator.java
@@ -26,7 +26,6 @@ import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-//TODO extend to test also exception which can occure while paring
 public class TokenValidator {
 
   private String input = null;