polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [01/24] zest-java git commit: ZEST-112, Replaced org.apache.zest.functional.Function and org.apache.zest.functional.Function2 with java.util.functional.Function and java.util.functional.BiFunction
Date Wed, 26 Aug 2015 15:45:04 GMT
Repository: zest-java
Updated Branches:
  refs/heads/develop 1c1286a71 -> bd6fbad9f


http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebuggingServiceMixin.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebuggingServiceMixin.java b/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebuggingServiceMixin.java
index 394e79f..80d3e12 100644
--- a/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebuggingServiceMixin.java
+++ b/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebuggingServiceMixin.java
@@ -175,6 +175,6 @@ public class DebuggingServiceMixin
 
     private String getCompositeName( Composite composite )
     {
-        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( composite ).types()).getName();
+        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( composite ).types()).getName();
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/logging/src/main/java/org/apache/zest/library/logging/log/SimpleLogConcern.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/main/java/org/apache/zest/library/logging/log/SimpleLogConcern.java b/libraries/logging/src/main/java/org/apache/zest/library/logging/log/SimpleLogConcern.java
index 7a8a22d..28578ce 100644
--- a/libraries/logging/src/main/java/org/apache/zest/library/logging/log/SimpleLogConcern.java
+++ b/libraries/logging/src/main/java/org/apache/zest/library/logging/log/SimpleLogConcern.java
@@ -39,7 +39,7 @@ public final class SimpleLogConcern
     public SimpleLogConcern( @This Composite composite )
     {
         this.composite = composite;
-        Class<?> type = first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( composite ).types() );
+        Class<?> type = first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( composite ).types() );
         category = type.getName();
     }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LogOnConsoleSideEffect.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LogOnConsoleSideEffect.java b/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LogOnConsoleSideEffect.java
index f809e64..2d83cb8 100644
--- a/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LogOnConsoleSideEffect.java
+++ b/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LogOnConsoleSideEffect.java
@@ -54,7 +54,7 @@ public abstract class LogOnConsoleSideEffect extends SideEffectOf<LoggingService
 
     private String getCompositeName( Composite composite )
     {
-        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( composite ).types()).getName();
+        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( composite ).types()).getName();
     }
 
     public void log( LogType type, Composite composite, String category, String message, Object param1 )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LoggingServiceMixin.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LoggingServiceMixin.java b/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LoggingServiceMixin.java
index e089449..16b6d50 100644
--- a/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LoggingServiceMixin.java
+++ b/libraries/logging/src/main/java/org/apache/zest/library/logging/log/service/LoggingServiceMixin.java
@@ -166,6 +166,6 @@ public abstract class LoggingServiceMixin
 
     private String getCompositeName( Composite composite )
     {
-        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( composite ).types()).getName();
+        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( composite ).types()).getName();
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/logging/src/main/java/org/apache/zest/library/logging/trace/service/TraceServiceMixin.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/main/java/org/apache/zest/library/logging/trace/service/TraceServiceMixin.java b/libraries/logging/src/main/java/org/apache/zest/library/logging/trace/service/TraceServiceMixin.java
index 3d07f6a..77b290d 100644
--- a/libraries/logging/src/main/java/org/apache/zest/library/logging/trace/service/TraceServiceMixin.java
+++ b/libraries/logging/src/main/java/org/apache/zest/library/logging/trace/service/TraceServiceMixin.java
@@ -104,7 +104,7 @@ public class TraceServiceMixin
             EntityComposite entity = (EntityComposite) object;
             String identity = entity.identity().get();
             EntityComposite source = (EntityComposite) uow.get( (Class<?>) first(
-                ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( entity ).types() ), identity );
+                ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( entity ).types() ), identity );
             EntityBuilder<EntityTraceRecordEntity> builder = uow.newEntityBuilder( EntityTraceRecordEntity.class );
             EntityTraceRecordEntity state = builder.instance();
             setStandardStuff( compositeType, method, args, entryTime, durationNano, state, exception );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java b/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
index fc4f3dd..052de1e 100644
--- a/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
+++ b/libraries/logging/src/test/java/org/apache/zest/library/logging/DebuggingTest.java
@@ -18,6 +18,7 @@
 
 package org.apache.zest.library.logging;
 
+import java.util.function.Function;
 import org.junit.Test;
 import org.apache.zest.api.injection.scope.This;
 import org.apache.zest.api.mixin.Mixins;
@@ -27,7 +28,6 @@ import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 import org.apache.zest.io.Outputs;
 import org.apache.zest.io.Transforms;
 import org.apache.zest.library.logging.debug.Debug;
@@ -78,7 +78,7 @@ public class DebuggingTest
             final String[] result = new String[1];
             es.entityStates( module ).transferTo( Transforms.map( new Function<EntityState, EntityState>()
                     {
-                        public EntityState map( EntityState entityState )
+                        public EntityState apply( EntityState entityState )
                         {
                             if( ServiceDebugRecordEntity.class.getName()
                                     .equals( first(entityState.entityDescriptor().types()).getName() ) )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityStateSerializer.java
----------------------------------------------------------------------
diff --git a/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityStateSerializer.java b/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityStateSerializer.java
index 3672276..b960d60 100644
--- a/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityStateSerializer.java
+++ b/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityStateSerializer.java
@@ -168,7 +168,7 @@ public class EntityStateSerializer
         for( PropertyDescriptor persistentProperty : ( (ValueCompositeType) valueType ).properties() )
         {
             Object propertyValue = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF
-                .map( (Composite) value )
+                .apply( (Composite) value )
                 .state()
                 .propertyFor( persistentProperty.accessor() )
                 .get();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityTypeSerializer.java
----------------------------------------------------------------------
diff --git a/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityTypeSerializer.java b/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityTypeSerializer.java
index a333eab..da6a2ef 100644
--- a/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityTypeSerializer.java
+++ b/libraries/rdf/src/main/java/org/apache/zest/library/rdf/entity/EntityTypeSerializer.java
@@ -130,7 +130,7 @@ public class EntityTypeSerializer
             graph.add( associationURI, Rdfs.DOMAIN, entityTypeUri );
             graph.add( associationURI, Rdfs.TYPE, Rdfs.PROPERTY );
 
-            URI associatedURI = values.createURI( Classes.toURI( Classes.RAW_CLASS.map( associationType.type() ) ) );
+            URI associatedURI = values.createURI( Classes.toURI( Classes.RAW_CLASS.apply( associationType.type() ) ) );
             graph.add( associationURI, Rdfs.RANGE, associatedURI );
             graph.add( associationURI, Rdfs.RANGE, XMLSchema.ANYURI );
         }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rdf/src/main/java/org/apache/zest/library/rdf/model/Model2XML.java
----------------------------------------------------------------------
diff --git a/libraries/rdf/src/main/java/org/apache/zest/library/rdf/model/Model2XML.java b/libraries/rdf/src/main/java/org/apache/zest/library/rdf/model/Model2XML.java
index 566dba0..c697919 100644
--- a/libraries/rdf/src/main/java/org/apache/zest/library/rdf/model/Model2XML.java
+++ b/libraries/rdf/src/main/java/org/apache/zest/library/rdf/model/Model2XML.java
@@ -21,6 +21,7 @@ package org.apache.zest.library.rdf.model;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Stack;
+import java.util.function.Function;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import org.apache.zest.api.composite.DependencyDescriptor;
@@ -30,7 +31,6 @@ import org.apache.zest.api.mixin.MixinDescriptor;
 import org.apache.zest.api.structure.ApplicationDescriptor;
 import org.apache.zest.api.structure.LayerDescriptor;
 import org.apache.zest.api.structure.ModuleDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.HierarchicalVisitor;
 import org.w3c.dom.Attr;
 import org.w3c.dom.DOMException;
@@ -63,7 +63,7 @@ public class Model2XML
     }
 
     @Override
-    public Document map( ApplicationDescriptor Application )
+    public Document apply( ApplicationDescriptor Application )
     {
         try
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rdf/src/test/java/org/apache/zest/library/rdf/Model2XMLTest.java
----------------------------------------------------------------------
diff --git a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/Model2XMLTest.java b/libraries/rdf/src/test/java/org/apache/zest/library/rdf/Model2XMLTest.java
index 771a879..74b9403 100644
--- a/libraries/rdf/src/test/java/org/apache/zest/library/rdf/Model2XMLTest.java
+++ b/libraries/rdf/src/test/java/org/apache/zest/library/rdf/Model2XMLTest.java
@@ -67,7 +67,7 @@ public class Model2XMLTest
             }
         } );
 
-        Document document = new Model2XML().map( model );
+        Document document = new Model2XML().apply( model );
 
         TransformerFactory transformerFactory = TransformerFactory.newInstance();
         Transformer transformer = transformerFactory.newTransformer();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/ContextResourceClient.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/ContextResourceClient.java b/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/ContextResourceClient.java
index 59d3302..1b56eaa 100644
--- a/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/ContextResourceClient.java
+++ b/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/ContextResourceClient.java
@@ -77,7 +77,7 @@ public class ContextResourceClient
             @Override
             public HandlerCommand handleResponse( Response response, ContextResourceClient client )
             {
-                final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.map(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
+                final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.apply(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
                 T result = contextResourceFactory.readResponse( response, resultType );
 
                 if (result instanceof Resource)
@@ -100,7 +100,7 @@ public class ContextResourceClient
     public <T> ContextResourceClient onQuery( String relation, final ResultHandler<T> handler
     )
     {
-        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.map(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
+        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.apply(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
 
         queryHandlers.put( relation,  new ResponseHandler()
         {
@@ -123,7 +123,7 @@ public class ContextResourceClient
 
     public <T> ContextResourceClient onCommand( String relation, final ResultHandler<T> handler )
     {
-        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.map(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
+        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.apply(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
 
         commandHandlers.put( relation,  new ResponseHandler()
         {
@@ -146,7 +146,7 @@ public class ContextResourceClient
 
     public <T> ContextResourceClient onProcessingError( String relation, final ResultHandler<T> handler)
     {
-        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.map(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
+        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.apply(( (ParameterizedType) handler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
 
         processingErrorHandlers.put( relation,  new ResponseHandler()
         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/HandlerCommand.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/HandlerCommand.java b/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/HandlerCommand.java
index 56ac798..3a88b75 100644
--- a/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/HandlerCommand.java
+++ b/libraries/rest-client/src/main/java/org/apache/zest/library/rest/client/api/HandlerCommand.java
@@ -86,7 +86,7 @@ public abstract class HandlerCommand
 
     public <T> HandlerCommand onSuccess(final ResultHandler<T> resultHandler)
     {
-        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.map(( (ParameterizedType) resultHandler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
+        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.apply(( (ParameterizedType) resultHandler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
         this.responseHandler = new ResponseHandler()
         {
             @Override
@@ -107,7 +107,7 @@ public abstract class HandlerCommand
 
     public <T> HandlerCommand onProcessingError(final ResultHandler<T> resultHandler)
     {
-        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.map(( (ParameterizedType) resultHandler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
+        final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.apply(( (ParameterizedType) resultHandler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
         this.processingErrorHandler = new ResponseHandler()
         {
             @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/link/LinksUtil.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/link/LinksUtil.java b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/link/LinksUtil.java
index 822362e..4a06d82 100644
--- a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/link/LinksUtil.java
+++ b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/link/LinksUtil.java
@@ -17,7 +17,7 @@
 
 package org.apache.zest.library.rest.common.link;
 
-import org.apache.zest.functional.Function;
+import java.util.function.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.functional.Specification;
 
@@ -90,7 +90,7 @@ public final class LinksUtil
       return new Function<Link, String>()
       {
          @Override
-         public String map(Link link )
+         public String apply(Link link )
          {
             return link.rel().get();
          }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilder.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilder.java b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilder.java
index b984e01..8561e67 100644
--- a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilder.java
+++ b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilder.java
@@ -23,10 +23,10 @@ import java.util.Comparator;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.util.Dates;
 import org.apache.zest.api.value.ValueBuilder;
 import org.apache.zest.api.value.ValueBuilderFactory;
-import org.apache.zest.functional.Function;
 
 import static java.util.Collections.reverseOrder;
 
@@ -112,10 +112,10 @@ public class TableBuilder
             String f = null;
             Function valueFunction = columns.get( column.id().get()).getValueFunction();
             if (!no_values && valueFunction != null)
-               v = valueFunction.map(rowObject);
+               v = valueFunction.apply( rowObject );
             Function formattedFunction = columns.get( column.id().get()).getFormattedFunction();
             if (!no_format && formattedFunction != null)
-               f = (String) formattedFunction.map(rowObject);
+               f = (String) formattedFunction.apply(rowObject);
             else if (v != null)
             {
                if ( column.columnType().get().equals( Table.DATETIME))

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilderFactory.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilderFactory.java b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilderFactory.java
index 926cd7b..be5d1a5 100644
--- a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilderFactory.java
+++ b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableBuilderFactory.java
@@ -19,8 +19,8 @@ package org.apache.zest.library.rest.common.table;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.value.ValueBuilderFactory;
-import org.apache.zest.functional.Function;
 
 /**
  * Factory for setting up TableBuilder instances. Defines available columns, and how they are extracted from objects.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableQuery.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableQuery.java b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableQuery.java
index da0a8a4..081ab49 100644
--- a/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableQuery.java
+++ b/libraries/rest-common/src/main/java/org/apache/zest/library/rest/common/table/TableQuery.java
@@ -157,7 +157,7 @@ public interface TableQuery
       public Table applyTo(Table table)
       {
          ValueBuilder<Table> tableBuilder = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF
-             .map( table ).module().newValueBuilderWithPrototype( table );
+             .apply( table ).module().newValueBuilderWithPrototype( table );
 
 /* TODO Finish label setting
          if (label() != null)

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java b/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
index 7857791..6c8f48f 100644
--- a/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
+++ b/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/freemarker/ValueCompositeTemplateModel.java
@@ -24,12 +24,12 @@ import freemarker.template.TemplateHashModelEx;
 import freemarker.template.TemplateModel;
 import freemarker.template.TemplateModelException;
 import freemarker.template.TemplateScalarModel;
+import java.util.function.Function;
 import org.apache.zest.api.ZestAPI;
 import org.apache.zest.api.property.Property;
 import org.apache.zest.api.property.PropertyDescriptor;
 import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 
 /**
@@ -46,7 +46,7 @@ public class ValueCompositeTemplateModel
     {
         this.composite = composite;
         this.wrapper = wrapper;
-        descriptor = (ValueDescriptor) ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( composite );
+        descriptor = (ValueDescriptor) ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( composite );
     }
 
     @Override
@@ -63,7 +63,7 @@ public class ValueCompositeTemplateModel
         return (TemplateCollectionModel) wrapper.wrap( Iterables.map( new Function<PropertyDescriptor, String>()
         {
             @Override
-            public String map( PropertyDescriptor propertyDescriptor )
+            public String apply( PropertyDescriptor propertyDescriptor )
             {
                 return propertyDescriptor.qualifiedName().name();
             }
@@ -77,7 +77,7 @@ public class ValueCompositeTemplateModel
         return (TemplateCollectionModel) wrapper.wrap( Iterables.map( new Function<Property<?>, Object>()
         {
             @Override
-            public Object map( Property<?> objectProperty )
+            public Object apply( Property<?> objectProperty )
             {
                 try
                 {
@@ -88,7 +88,7 @@ public class ValueCompositeTemplateModel
                     throw new IllegalStateException( e );
                 }
             }
-        }, ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.map( composite ).state().properties() ).iterator() );
+        }, ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.apply( composite ).state().properties() ).iterator() );
     }
 
     @Override
@@ -98,7 +98,7 @@ public class ValueCompositeTemplateModel
         try
         {
             return wrapper.wrap( ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF
-                                     .map( composite )
+                                     .apply( composite )
                                      .state()
                                      .propertyFor( descriptor.state().findPropertyModelByName( key ).accessor() )
                                      .get() );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/requestreader/DefaultRequestReader.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/requestreader/DefaultRequestReader.java b/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/requestreader/DefaultRequestReader.java
index 62dd318..6174483 100644
--- a/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/requestreader/DefaultRequestReader.java
+++ b/libraries/rest-server/src/main/java/org/apache/zest/library/rest/server/restlet/requestreader/DefaultRequestReader.java
@@ -23,6 +23,7 @@ import java.lang.reflect.Method;
 import java.util.Collections;
 import java.util.Date;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.association.AssociationDescriptor;
 import org.apache.zest.api.common.Optional;
 import org.apache.zest.api.constraint.Name;
@@ -38,7 +39,6 @@ import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.api.value.ValueDeserializer;
 import org.apache.zest.api.value.ValueSerialization;
 import org.apache.zest.api.value.ValueSerializationException;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.library.rest.server.spi.RequestReader;
 import org.restlet.Request;
@@ -283,7 +283,7 @@ public class DefaultRequestReader
             new Function<PropertyDescriptor, Object>()
         {
             @Override
-            public Object map( PropertyDescriptor propertyDescriptor )
+            public Object apply( PropertyDescriptor propertyDescriptor )
             {
                 Parameter param = queryAsForm.getFirst( propertyDescriptor.qualifiedName().name() );
 
@@ -314,7 +314,7 @@ public class DefaultRequestReader
             new Function<AssociationDescriptor, EntityReference>()
             {
                 @Override
-                public EntityReference map( AssociationDescriptor associationDescriptor )
+                public EntityReference apply( AssociationDescriptor associationDescriptor )
                 {
                     Parameter param = queryAsForm.getFirst( associationDescriptor.qualifiedName().name() );
 
@@ -336,7 +336,7 @@ public class DefaultRequestReader
             new Function<AssociationDescriptor, Iterable<EntityReference>>()
             {
                 @Override
-                public Iterable<EntityReference> map( AssociationDescriptor associationDescriptor )
+                public Iterable<EntityReference> apply( AssociationDescriptor associationDescriptor )
                 {
                     // TODO
                     return Iterables.empty();
@@ -345,7 +345,7 @@ public class DefaultRequestReader
             new Function<AssociationDescriptor, Map<String, EntityReference>>()
             {
                 @Override
-                public Map<String, EntityReference> map( AssociationDescriptor from )
+                public Map<String, EntityReference> apply( AssociationDescriptor from )
                 {
                     // TODO
                     return Collections.emptyMap();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/restlet/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/restlet/build.gradle b/libraries/restlet/build.gradle
index 2b4a66c..9221ce7 100644
--- a/libraries/restlet/build.gradle
+++ b/libraries/restlet/build.gradle
@@ -28,6 +28,8 @@ dependencies {
   compile project( ":org.apache.zest.core:org.apache.zest.core.spi" )
   compile project( ":org.apache.zest.core:org.apache.zest.core.bootstrap" )
   compile project( ':org.apache.zest.extensions:org.apache.zest.extension.valueserialization-jackson' )
+  compile project( ':org.apache.zest.extensions:org.apache.zest.extension.indexing-rdf' )
+  compile project( ':org.apache.zest.extensions:org.apache.zest.extension.entitystore-file' )
 
   compile libraries.restlet
   compile libraries.servlet_api

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/domain/DomainLayer.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/domain/DomainLayer.java b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/domain/DomainLayer.java
index 0f311c4..fc0ee3d 100644
--- a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/domain/DomainLayer.java
+++ b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/domain/DomainLayer.java
@@ -20,13 +20,13 @@
 
 package org.apache.zest.library.restlet.assembly.domain;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.layered.LayerAssembler;
 import org.apache.zest.bootstrap.layered.LayeredLayerAssembler;
-import org.apache.zest.functional.Function;
 
 public class DomainLayer extends LayeredLayerAssembler
     implements LayerAssembler

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/InfrastructureLayer.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/InfrastructureLayer.java b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/InfrastructureLayer.java
index 7fc3157..c5f9c72 100644
--- a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/InfrastructureLayer.java
+++ b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/InfrastructureLayer.java
@@ -20,6 +20,7 @@
 
 package org.apache.zest.library.restlet.assembly.infrastructue;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.bootstrap.AssemblyException;
@@ -27,7 +28,6 @@ import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.bootstrap.layered.LayerAssembler;
 import org.apache.zest.bootstrap.layered.LayeredLayerAssembler;
-import org.apache.zest.functional.Function;
 import org.apache.zest.library.restlet.assembly.configuration.ConfigurationLayer;
 import org.apache.zest.library.restlet.assembly.configuration.ConfigurationModule;
 import org.apache.zest.library.restlet.assembly.domain.DomainLayer;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/SerializationModule.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/SerializationModule.java b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/SerializationModule.java
index f4f43e4..7384712 100644
--- a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/SerializationModule.java
+++ b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/assembly/infrastructue/SerializationModule.java
@@ -20,6 +20,7 @@
 
 package org.apache.zest.library.restlet.assembly.infrastructue;
 
+import java.util.function.Function;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
@@ -27,7 +28,6 @@ import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.bootstrap.layered.ModuleAssembler;
-import org.apache.zest.functional.Function;
 import org.apache.zest.spi.uuid.UuidIdentityGeneratorService;
 import org.apache.zest.valueserialization.jackson.JacksonValueSerializationAssembler;
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/restlet/src/main/java/org/apache/zest/library/restlet/serialization/FormRepresentation.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/serialization/FormRepresentation.java b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/serialization/FormRepresentation.java
index 9572c63..bb1636b 100644
--- a/libraries/restlet/src/main/java/org/apache/zest/library/restlet/serialization/FormRepresentation.java
+++ b/libraries/restlet/src/main/java/org/apache/zest/library/restlet/serialization/FormRepresentation.java
@@ -22,6 +22,7 @@ package org.apache.zest.library.restlet.serialization;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.function.Function;
 import org.apache.zest.api.association.AssociationStateHolder;
 import org.apache.zest.api.common.Optional;
 import org.apache.zest.api.injection.scope.Structure;
@@ -31,7 +32,6 @@ import org.apache.zest.api.value.ValueBuilder;
 import org.apache.zest.api.value.ValueBuilderFactory;
 import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.spi.ZestSPI;
 import org.restlet.data.Form;
 import org.restlet.data.MediaType;
@@ -85,7 +85,7 @@ public class FormRepresentation<T> extends OutputRepresentation
             new Function<PropertyDescriptor, Object>()
             {
                 @Override
-                public Object map( PropertyDescriptor descriptor )
+                public Object apply( PropertyDescriptor descriptor )
                 {
                     return form.getFirstValue( descriptor.qualifiedName().name() );
                 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/sql-liquibase/src/test/java/org/apache/zest/library/sql/liquibase/LiquibaseServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/sql-liquibase/src/test/java/org/apache/zest/library/sql/liquibase/LiquibaseServiceTest.java b/libraries/sql-liquibase/src/test/java/org/apache/zest/library/sql/liquibase/LiquibaseServiceTest.java
index 5dafe62..e3202de 100644
--- a/libraries/sql-liquibase/src/test/java/org/apache/zest/library/sql/liquibase/LiquibaseServiceTest.java
+++ b/libraries/sql-liquibase/src/test/java/org/apache/zest/library/sql/liquibase/LiquibaseServiceTest.java
@@ -19,6 +19,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.function.Function;
 import javax.sql.DataSource;
 import org.junit.Test;
 import org.apache.zest.api.activation.ActivationEvent;
@@ -33,7 +34,6 @@ import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.bootstrap.SingletonAssembler;
-import org.apache.zest.functional.Function;
 import org.apache.zest.io.Inputs;
 import org.apache.zest.io.Outputs;
 import org.apache.zest.library.sql.assembly.DataSourceAssembler;
@@ -134,7 +134,7 @@ public class LiquibaseServiceTest
         Function<ResultSet, SomeValue> toValue = new Function<ResultSet, SomeValue>()
         {
             @Override
-            public SomeValue map( ResultSet resultSet )
+            public SomeValue apply( ResultSet resultSet )
             {
                 ValueBuilder<SomeValue> builder = assembler.module().newValueBuilder( SomeValue.class );
                 try

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/assembly/Assembler.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/assembly/Assembler.java b/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/assembly/Assembler.java
index 81aeb10..8524ce9 100644
--- a/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/assembly/Assembler.java
+++ b/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/assembly/Assembler.java
@@ -17,6 +17,7 @@
  */
 package org.apache.zest.sample.dcicargo.sample_a.bootstrap.assembly;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueSerialization;
@@ -27,7 +28,6 @@ import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.entitystore.memory.MemoryEntityStoreService;
-import org.apache.zest.functional.Function;
 import org.apache.zest.index.rdf.RdfIndexingEngineService;
 import org.apache.zest.library.rdf.entity.EntityStateSerializer;
 import org.apache.zest.library.rdf.entity.EntityTypeSerializer;
@@ -255,7 +255,7 @@ public class Assembler
             .setMetaInfo( new Function<Application, Module>()
         {
             @Override
-            public Module map( Application application )
+            public Module apply( Application application )
             {
                 return application.findModule( "CONTEXT", "CONTEXT-ContextSupport" );
             }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/infrastructure/conversion/EntityToDTOService.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/infrastructure/conversion/EntityToDTOService.java b/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/infrastructure/conversion/EntityToDTOService.java
index 5316f48..f78fbcf 100644
--- a/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/infrastructure/conversion/EntityToDTOService.java
+++ b/samples/dci-cargo/dcisample_a/src/main/java/org/apache/zest/sample/dcicargo/sample_a/infrastructure/conversion/EntityToDTOService.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.association.AssociationDescriptor;
 import org.apache.zest.api.association.AssociationStateHolder;
 import org.apache.zest.api.association.ManyAssociation;
@@ -38,7 +39,6 @@ import org.apache.zest.api.value.NoSuchValueException;
 import org.apache.zest.api.value.ValueBuilder;
 import org.apache.zest.api.value.ValueBuilderFactory;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.library.conversion.values.Unqualified;
 import org.apache.zest.spi.ZestSPI;
@@ -90,7 +90,7 @@ public interface EntityToDTOService
                 builder = vbf.newValueBuilderWithState( valueType, new Function<PropertyDescriptor, Object>()
                 {
                     @Override
-                    public Object map( PropertyDescriptor descriptor )
+                    public Object apply( PropertyDescriptor descriptor )
                     {
                         try
                         {
@@ -149,7 +149,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, EntityReference>()
                 {
                     @Override
-                    public EntityReference map( AssociationDescriptor associationDescriptor )
+                    public EntityReference apply( AssociationDescriptor associationDescriptor )
                     {
                         return EntityReference.entityReferenceFor(
                             associationState.associationFor( associationDescriptor.accessor() ).get() );
@@ -157,7 +157,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Iterable<EntityReference>>()
                 {
                     @Override
-                    public Iterable<EntityReference> map( AssociationDescriptor associationDescriptor )
+                    public Iterable<EntityReference> apply( AssociationDescriptor associationDescriptor )
                     {
                         ManyAssociation<?> state = associationState.manyAssociationFor( associationDescriptor.accessor() );
                         List<EntityReference> refs = new ArrayList<>( state.count() );
@@ -170,7 +170,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Map<String, EntityReference>>()
                 {
                     @Override
-                    public Map<String, EntityReference> map( AssociationDescriptor from )
+                    public Map<String, EntityReference> apply( AssociationDescriptor from )
                     {
                         // No NamedAssociation support
                         return Collections.emptyMap();
@@ -182,7 +182,7 @@ public interface EntityToDTOService
                 builder = vbf.newValueBuilderWithState( valueType, new Function<PropertyDescriptor, Object>()
                 {
                     @Override
-                    public Object map( PropertyDescriptor descriptor )
+                    public Object apply( PropertyDescriptor descriptor )
                     {
                         try
                         {
@@ -266,7 +266,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, EntityReference>()
                 {
                     @Override
-                    public EntityReference map( AssociationDescriptor descriptor )
+                    public EntityReference apply( AssociationDescriptor descriptor )
                     {
                         AssociationDescriptor associationDescriptor;
                         try
@@ -285,7 +285,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Iterable<EntityReference>>()
                 {
                     @Override
-                    public Iterable<EntityReference> map( AssociationDescriptor descriptor )
+                    public Iterable<EntityReference> apply( AssociationDescriptor descriptor )
                     {
                         AssociationDescriptor associationDescriptor;
                         try
@@ -309,7 +309,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Map<String, EntityReference>>()
                 {
                     @Override
-                    public Map<String, EntityReference> map( AssociationDescriptor from )
+                    public Map<String, EntityReference> apply( AssociationDescriptor from )
                     {
                         // No NamedAssociations support
                         return Collections.emptyMap();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java b/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
index a9f9091..65120c9 100644
--- a/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
+++ b/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
@@ -17,6 +17,7 @@
  */
 package org.apache.zest.sample.dcicargo.sample_a.bootstrap.test;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueSerialization;
@@ -27,7 +28,6 @@ import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.entitystore.memory.MemoryEntityStoreService;
-import org.apache.zest.functional.Function;
 import org.apache.zest.index.rdf.RdfIndexingEngineService;
 import org.apache.zest.library.rdf.entity.EntityStateSerializer;
 import org.apache.zest.library.rdf.entity.EntityTypeSerializer;
@@ -189,7 +189,7 @@ public class TestAssembler
             .setMetaInfo( new Function<Application, Module>()
         {
             @Override
-            public Module map( Application application )
+            public Module apply( Application application )
             {
                 return application.findModule( "CONTEXT", "CONTEXT-ContextSupport" );
             }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/assembly/Assembler.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/assembly/Assembler.java b/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/assembly/Assembler.java
index b187630..ddf6ae0 100644
--- a/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/assembly/Assembler.java
+++ b/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/assembly/Assembler.java
@@ -17,6 +17,7 @@
  */
 package org.apache.zest.sample.dcicargo.sample_b.bootstrap.assembly;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueSerialization;
@@ -27,7 +28,6 @@ import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.entitystore.memory.MemoryEntityStoreService;
-import org.apache.zest.functional.Function;
 import org.apache.zest.index.rdf.RdfIndexingEngineService;
 import org.apache.zest.library.rdf.entity.EntityStateSerializer;
 import org.apache.zest.library.rdf.entity.EntityTypeSerializer;
@@ -255,14 +255,7 @@ public class Assembler
         serializationModule
             .services( OrgJsonValueSerializationService.class )
             .taggedWith( ValueSerialization.Formats.JSON )
-            .setMetaInfo( new Function<Application, Module>()
-        {
-            @Override
-            public Module map( Application application )
-            {
-                return application.findModule( "CONTEXT", "CONTEXT-RoleMap" );
-            }
-        } )
+            .setMetaInfo( (Function<Application, Module>) application -> application.findModule( "CONTEXT", "CONTEXT-RoleMap" ) )
         .visibleIn( application );
 
         ModuleAssembly indexingModule = infrastructureLayer.module( "INFRASTRUCTURE-Indexing" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/infrastructure/conversion/EntityToDTOService.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/infrastructure/conversion/EntityToDTOService.java b/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/infrastructure/conversion/EntityToDTOService.java
index 9d6b166..8747517 100644
--- a/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/infrastructure/conversion/EntityToDTOService.java
+++ b/samples/dci-cargo/dcisample_b/src/main/java/org/apache/zest/sample/dcicargo/sample_b/infrastructure/conversion/EntityToDTOService.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.association.AssociationDescriptor;
 import org.apache.zest.api.association.AssociationStateHolder;
 import org.apache.zest.api.association.ManyAssociation;
@@ -38,7 +39,6 @@ import org.apache.zest.api.value.NoSuchValueException;
 import org.apache.zest.api.value.ValueBuilder;
 import org.apache.zest.api.value.ValueBuilderFactory;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.library.conversion.values.Unqualified;
 import org.apache.zest.spi.ZestSPI;
@@ -90,7 +90,7 @@ public interface EntityToDTOService
                 builder = vbf.newValueBuilderWithState( valueType, new Function<PropertyDescriptor, Object>()
                 {
                     @Override
-                    public Object map( PropertyDescriptor descriptor )
+                    public Object apply( PropertyDescriptor descriptor )
                     {
                         try
                         {
@@ -152,7 +152,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, EntityReference>()
                 {
                     @Override
-                    public EntityReference map( AssociationDescriptor associationDescriptor )
+                    public EntityReference apply( AssociationDescriptor associationDescriptor )
                     {
                         return EntityReference.entityReferenceFor(
                             associationState.associationFor( associationDescriptor.accessor() ).get() );
@@ -160,7 +160,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Iterable<EntityReference>>()
                 {
                     @Override
-                    public Iterable<EntityReference> map( AssociationDescriptor associationDescriptor )
+                    public Iterable<EntityReference> apply( AssociationDescriptor associationDescriptor )
                     {
                         ManyAssociation<?> state = associationState.manyAssociationFor( associationDescriptor.accessor() );
                         List<EntityReference> refs = new ArrayList<>( state.count() );
@@ -173,7 +173,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Map<String, EntityReference>>()
                 {
                     @Override
-                    public Map<String, EntityReference> map( AssociationDescriptor from )
+                    public Map<String, EntityReference> apply( AssociationDescriptor from )
                     {
                         throw new UnsupportedOperationException( "NamedAssociations are not supported." );
                     }
@@ -184,7 +184,7 @@ public interface EntityToDTOService
                 builder = vbf.newValueBuilderWithState( valueType, new Function<PropertyDescriptor, Object>()
                 {
                     @Override
-                    public Object map( PropertyDescriptor descriptor )
+                    public Object apply( PropertyDescriptor descriptor )
                     {
                         try
                         {
@@ -268,7 +268,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, EntityReference>()
                 {
                     @Override
-                    public EntityReference map( AssociationDescriptor descriptor )
+                    public EntityReference apply( AssociationDescriptor descriptor )
                     {
                         AssociationDescriptor associationDescriptor;
                         try
@@ -287,7 +287,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Iterable<EntityReference>>()
                 {
                     @Override
-                    public Iterable<EntityReference> map( AssociationDescriptor descriptor )
+                    public Iterable<EntityReference> apply( AssociationDescriptor descriptor )
                     {
                         AssociationDescriptor associationDescriptor;
                         try
@@ -311,7 +311,7 @@ public interface EntityToDTOService
                 }, new Function<AssociationDescriptor, Map<String, EntityReference>>()
                 {
                     @Override
-                    public Map<String, EntityReference> map( AssociationDescriptor from )
+                    public Map<String, EntityReference> apply( AssociationDescriptor from )
                     {
                         throw new UnsupportedOperationException( "NamedAssociations are not supported." );
                     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java b/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
index 6e59b61..1995a0b 100644
--- a/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
+++ b/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
@@ -17,6 +17,7 @@
  */
 package org.apache.zest.sample.dcicargo.sample_b.bootstrap.test;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueSerialization;
@@ -27,7 +28,6 @@ import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.entitystore.memory.MemoryEntityStoreService;
-import org.apache.zest.functional.Function;
 import org.apache.zest.index.rdf.RdfIndexingEngineService;
 import org.apache.zest.library.rdf.entity.EntityStateSerializer;
 import org.apache.zest.library.rdf.entity.EntityTypeSerializer;
@@ -191,14 +191,7 @@ public class TestAssembler
         serializationModule
             .services( OrgJsonValueSerializationService.class )
             .taggedWith( ValueSerialization.Formats.JSON )
-            .setMetaInfo( new Function<Application, Module>()
-        {
-            @Override
-            public Module map( Application application )
-            {
-                return application.findModule( "CONTEXT", "CONTEXT-RoleMap" );
-            }
-        } )
+            .setMetaInfo( (Function<Application, Module>) application -> application.findModule( "CONTEXT", "CONTEXT-RoleMap" ) )
         .visibleIn( application );
 
         ModuleAssembly indexingModule = infrastructureLayer.module( "INFRASTRUCTURE-Indexing" );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/forum/src/main/java/org/apache/zest/sample/forum/assembler/ForumAssembler.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/zest/sample/forum/assembler/ForumAssembler.java b/samples/forum/src/main/java/org/apache/zest/sample/forum/assembler/ForumAssembler.java
index d78ec23..3b19e63 100644
--- a/samples/forum/src/main/java/org/apache/zest/sample/forum/assembler/ForumAssembler.java
+++ b/samples/forum/src/main/java/org/apache/zest/sample/forum/assembler/ForumAssembler.java
@@ -19,6 +19,7 @@
 package org.apache.zest.sample.forum.assembler;
 
 import java.lang.reflect.Modifier;
+import java.util.function.Function;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.api.entity.EntityComposite;
 import org.apache.zest.api.structure.Application;
@@ -33,7 +34,6 @@ import org.apache.zest.bootstrap.LayerAssembly;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.entitystore.file.assembly.FileEntityStoreAssembler;
 import org.apache.zest.entitystore.memory.MemoryEntityStoreService;
-import org.apache.zest.functional.Function;
 import org.apache.zest.library.fileconfig.FileConfigurationService;
 import org.apache.zest.library.rest.common.ValueAssembler;
 import org.apache.zest.library.rest.server.assembler.RestServerAssembler;
@@ -89,14 +89,7 @@ public class ForumAssembler
             entityStore.services( UuidIdentityGeneratorService.class ).visibleIn( Visibility.application );
             new OrgJsonValueSerializationAssembler().
                 visibleIn( Visibility.application ).
-                withValuesModuleFinder( new Function<Application, Module>()
-            {
-                @Override
-                public Module map( Application app )
-                {
-                    return app.findModule( "REST", "Values" );
-                }
-            } ).
+                withValuesModuleFinder( app -> app.findModule( "REST", "Values" ) ).
                 assemble( entityStore );
         }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/forum/src/main/java/org/apache/zest/sample/forum/context/Context.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/zest/sample/forum/context/Context.java b/samples/forum/src/main/java/org/apache/zest/sample/forum/context/Context.java
index df98475..9fc1e6c 100644
--- a/samples/forum/src/main/java/org/apache/zest/sample/forum/context/Context.java
+++ b/samples/forum/src/main/java/org/apache/zest/sample/forum/context/Context.java
@@ -38,6 +38,6 @@ public class Context
 
     protected <T> T role( Object object, Class<T> roleType )
     {
-        return ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.map( (Composite) object ).newProxy( roleType );
+        return ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.apply( (Composite) object ).newProxy( roleType );
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/forum/src/main/java/org/apache/zest/sample/forum/context/EventsService.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/zest/sample/forum/context/EventsService.java b/samples/forum/src/main/java/org/apache/zest/sample/forum/context/EventsService.java
index 4c65ba2..e232e59 100644
--- a/samples/forum/src/main/java/org/apache/zest/sample/forum/context/EventsService.java
+++ b/samples/forum/src/main/java/org/apache/zest/sample/forum/context/EventsService.java
@@ -20,6 +20,7 @@ package org.apache.zest.sample.forum.context;
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
+import java.util.function.Function;
 import org.apache.zest.api.injection.scope.Structure;
 import org.apache.zest.api.mixin.Mixins;
 import org.apache.zest.api.service.ServiceComposite;
@@ -29,7 +30,6 @@ import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCallback;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.api.value.ValueBuilder;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.library.rest.server.api.ObjectSelection;
 import org.apache.zest.sample.forum.domainevent.DomainEventValue;
@@ -78,7 +78,7 @@ public interface EventsService
             Iterables.addAll( prototype.selection().get(), Iterables.map( new Function<Object, String>()
             {
                 @Override
-                public String map( Object o )
+                public String apply( Object o )
                 {
                     return o.toString();
                 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/forum/src/main/java/org/apache/zest/sample/forum/domainevent/DomainEvent.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/zest/sample/forum/domainevent/DomainEvent.java b/samples/forum/src/main/java/org/apache/zest/sample/forum/domainevent/DomainEvent.java
index eeb86e1..ed347f2 100644
--- a/samples/forum/src/main/java/org/apache/zest/sample/forum/domainevent/DomainEvent.java
+++ b/samples/forum/src/main/java/org/apache/zest/sample/forum/domainevent/DomainEvent.java
@@ -21,6 +21,7 @@ package org.apache.zest.sample.forum.domainevent;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.reflect.Method;
+import java.util.function.Function;
 import org.apache.zest.api.concern.Concerns;
 import org.apache.zest.api.concern.GenericConcern;
 import org.apache.zest.api.injection.scope.Structure;
@@ -30,7 +31,6 @@ import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCallback;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.api.value.ValueBuilder;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.library.rest.server.api.ObjectSelection;
 import org.restlet.Request;
@@ -80,7 +80,7 @@ public @interface DomainEvent
             Iterables.addAll( prototype.selection().get(), Iterables.map( new Function<Object, String>()
             {
                 @Override
-                public String map( Object o )
+                public String apply( Object o )
                 {
                     return o.toString();
                 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/rental/src/main/java/org/apache/zest/sample/rental/web/Page.java
----------------------------------------------------------------------
diff --git a/samples/rental/src/main/java/org/apache/zest/sample/rental/web/Page.java b/samples/rental/src/main/java/org/apache/zest/sample/rental/web/Page.java
index 13baf6d..824b9cc 100644
--- a/samples/rental/src/main/java/org/apache/zest/sample/rental/web/Page.java
+++ b/samples/rental/src/main/java/org/apache/zest/sample/rental/web/Page.java
@@ -90,7 +90,7 @@ public interface Page
             throws RenderException
         {
             Class<? extends Composite> compositeType = (Class<Composite>) first( ZestAPI.FUNCTION_DESCRIPTOR_FOR
-                                                                                     .map( context.page() )
+                                                                                     .apply( context.page() )
                                                                                      .types() );
             try
             {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/rental/src/main/java/org/apache/zest/sample/rental/web/QuikitServlet.java
----------------------------------------------------------------------
diff --git a/samples/rental/src/main/java/org/apache/zest/sample/rental/web/QuikitServlet.java b/samples/rental/src/main/java/org/apache/zest/sample/rental/web/QuikitServlet.java
index f7302a7..4bad67d 100644
--- a/samples/rental/src/main/java/org/apache/zest/sample/rental/web/QuikitServlet.java
+++ b/samples/rental/src/main/java/org/apache/zest/sample/rental/web/QuikitServlet.java
@@ -195,7 +195,7 @@ public class QuikitServlet
         throws ParserConfigurationException, SAXException, IOException, RenderException, TransformerException
     {
         Class<? extends Composite> pageClass = (Class<Composite>) first( ZestAPI.FUNCTION_DESCRIPTOR_FOR
-                                                                             .map( page ).types() );
+                                                                             .apply( page ).types() );
 
         String pageName = pageClass.getSimpleName() + ".html";
         DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/samples/rental/src/main/java/org/apache/zest/sample/rental/web/assembly/StorageModule.java
----------------------------------------------------------------------
diff --git a/samples/rental/src/main/java/org/apache/zest/sample/rental/web/assembly/StorageModule.java b/samples/rental/src/main/java/org/apache/zest/sample/rental/web/assembly/StorageModule.java
index ce7f808..9cfe6d7 100644
--- a/samples/rental/src/main/java/org/apache/zest/sample/rental/web/assembly/StorageModule.java
+++ b/samples/rental/src/main/java/org/apache/zest/sample/rental/web/assembly/StorageModule.java
@@ -17,6 +17,7 @@
  */
 package org.apache.zest.sample.rental.web.assembly;
 
+import java.util.function.Function;
 import org.apache.zest.api.common.Visibility;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
@@ -24,7 +25,6 @@ import org.apache.zest.bootstrap.Assembler;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.entitystore.memory.MemoryEntityStoreService;
-import org.apache.zest.functional.Function;
 import org.apache.zest.spi.uuid.UuidIdentityGeneratorService;
 import org.apache.zest.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 
@@ -40,14 +40,7 @@ public class StorageModule
         module.services( UuidIdentityGeneratorService.class ).visibleIn( Visibility.application );
         new OrgJsonValueSerializationAssembler().
             visibleIn( Visibility.application ).
-            withValuesModuleFinder( new Function<Application, Module>()
-        {
-            @Override
-            public Module map( Application app )
-            {
-                return app.findModule( "DomainLayer", "RentalModule" );
-            }
-        } ).
+            withValuesModuleFinder( app -> app.findModule( "DomainLayer", "RentalModule" ) ).
             assemble( module );
     }
 }


Mime
View raw message