Author: rwesten
Date: Fri Jan 27 14:41:59 2012
New Revision: 1236699

URL: http://svn.apache.org/viewvc?rev=1236699&view=rev
Log:
STANBOL-431: Added ListChain implementation; Added support for ep:ExecutionPlan 
to the ExecutionPlanHelper; All Chains now create ExecutionPlans with the root 
resource of type ep:ExecutionPlan linking to all ep:ExecutionNodes

Added:
    incubator/stanbol/trunk/enhancer/chain/list/   (with props)
    incubator/stanbol/trunk/enhancer/chain/list/pom.xml   (with props)
    incubator/stanbol/trunk/enhancer/chain/list/src/
    incubator/stanbol/trunk/enhancer/chain/list/src/main/
    incubator/stanbol/trunk/enhancer/chain/list/src/main/java/
    incubator/stanbol/trunk/enhancer/chain/list/src/main/java/org/
    incubator/stanbol/trunk/enhancer/chain/list/src/main/java/org/apache/
    
incubator/stanbol/trunk/enhancer/chain/list/src/main/java/org/apache/stanbol/
    
incubator/stanbol/trunk/enhancer/chain/list/src/main/java/org/apache/stanbol/enhancer/
    
incubator/stanbol/trunk/enhancer/chain/list/src/main/java/org/apache/stanbol/enhancer/chain/
    
incubator/stanbol/trunk/enhancer/chain/list/src/main/java/org/apache/stanbol/enhancer/chain/list/
    
incubator/stanbol/trunk/enhancer/chain/list/src/main/java/org/apache/stanbol/enhancer/chain/list/impl/
    incubator/stanbol/trunk/enhancer/chain/list/src/main/resources/
    incubator/stanbol/trunk/enhancer/chain/list/src/main/resources/OSGI-INF/
    
incubator/stanbol/trunk/enhancer/chain/list/src/main/resources/OSGI-INF/metatype/
    incubator/stanbol/trunk/enhancer/chain/list/src/test/
    incubator/stanbol/trunk/enhancer/chain/list/src/test/java/
    incubator/stanbol/trunk/enhancer/chain/list/src/test/java/org/
    incubator/stanbol/trunk/enhancer/chain/list/src/test/java/org/apache/
    
incubator/stanbol/trunk/enhancer/chain/list/src/test/java/org/apache/stanbol/
    
incubator/stanbol/trunk/enhancer/chain/list/src/test/java/org/apache/stanbol/enhancer/
    
incubator/stanbol/trunk/enhancer/chain/list/src/test/java/org/apache/stanbol/enhancer/chain/
Modified:
    incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml
    
incubator/stanbol/trunk/enhancer/chain/allactive/src/main/java/org/apache/stanbol/enhancer/chain/allactive/impl/AllActiveEnginesChain.java
    
incubator/stanbol/trunk/enhancer/chain/graph/src/main/java/org/apache/stanbol/enhancer/chain/graph/impl/GraphChain.java
    
incubator/stanbol/trunk/enhancer/chain/weighted/src/main/java/org/apache/stanbol/enhancer/chain/weighted/impl/WeightedChain.java
    
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ConfigUtils.java
    
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ExecutionPlanHelper.java
    
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/SingleEngineChain.java
    
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/rdf/ExecutionPlan.java
    incubator/stanbol/trunk/enhancer/pom.xml
    incubator/stanbol/trunk/pom.xml

Modified: incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml 
(original)
+++ incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml Fri 
Jan 27 14:41:59 2012
@@ -64,7 +64,13 @@
             <groupId>org.apache.stanbol</groupId>
             <artifactId>org.apache.stanbol.enhancer.chain.weighted</artifactId>
             <version>0.9.0-incubating-SNAPSHOT</version>
-        </bundle>    </startLevel>
+        </bundle>
+        <bundle>
+            <groupId>org.apache.stanbol</groupId>
+            <artifactId>org.apache.stanbol.enhancer.chain.list</artifactId>
+            <version>0.9.0-incubating-SNAPSHOT</version>
+        </bundle>
+    </startLevel>
        <!-- Web Fragment -->
        <startLevel level="21">
                <bundle>

Modified: 
incubator/stanbol/trunk/enhancer/chain/allactive/src/main/java/org/apache/stanbol/enhancer/chain/allactive/impl/AllActiveEnginesChain.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/chain/allactive/src/main/java/org/apache/stanbol/enhancer/chain/allactive/impl/AllActiveEnginesChain.java?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/chain/allactive/src/main/java/org/apache/stanbol/enhancer/chain/allactive/impl/AllActiveEnginesChain.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/chain/allactive/src/main/java/org/apache/stanbol/enhancer/chain/allactive/impl/AllActiveEnginesChain.java
 Fri Jan 27 14:41:59 2012
@@ -26,8 +26,6 @@ import java.util.List;
 import java.util.Set;
 
 import org.apache.clerezza.rdf.core.Graph;
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.stanbol.enhancer.servicesapi.Chain;
 import org.apache.stanbol.enhancer.servicesapi.ChainException;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -37,7 +35,6 @@ import org.apache.stanbol.enhancer.servi
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
-import org.osgi.service.component.ComponentContext;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
 /**
@@ -169,7 +166,8 @@ public class AllActiveEnginesChain imple
             }
         }
         Set<String> emptySet = Collections.emptySet();
-        executionPlan = calculateExecutionPlan(activeEngines, 
+        executionPlan = calculateExecutionPlan(
+            getName(),activeEngines, 
             emptySet,//this Chain does not support optional engines
             emptySet); //only active meaning that no engines are missing
         engineNames = Collections.unmodifiableSet(activeEngineNames);

Modified: 
incubator/stanbol/trunk/enhancer/chain/graph/src/main/java/org/apache/stanbol/enhancer/chain/graph/impl/GraphChain.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/chain/graph/src/main/java/org/apache/stanbol/enhancer/chain/graph/impl/GraphChain.java?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/chain/graph/src/main/java/org/apache/stanbol/enhancer/chain/graph/impl/GraphChain.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/chain/graph/src/main/java/org/apache/stanbol/enhancer/chain/graph/impl/GraphChain.java
 Fri Jan 27 14:41:59 2012
@@ -22,6 +22,7 @@ import static org.apache.stanbol.enhance
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ConfigUtils.getValue;
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ConfigUtils.guessRdfFormat;
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ConfigUtils.parseConfig;
+import static 
org.apache.stanbol.enhancer.servicesapi.helper.ExecutionPlanHelper.createExecutionPlan;
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ExecutionPlanHelper.validateExecutionPlan;
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ExecutionPlanHelper.writeExecutionNode;
 
@@ -443,6 +444,7 @@ public class GraphChain extends Abstract
             }
             engines = Collections.unmodifiableSet(new 
HashSet<String>(config.keySet()));
             MGraph graph = new SimpleMGraph();
+            NonLiteral epNode = createExecutionPlan(graph, getName());
             //caches the String name -> {NonLiteral node, List<Stirng> 
dependsOn} mappings
             Map<String,Object[]> name2nodes = new HashMap<String,Object[]>();
             //1. write the nodes (without dependencies)
@@ -450,7 +452,7 @@ public class GraphChain extends Abstract
                 name2nodes.put(
                     node.getKey(),
                     new Object[]{
-                        writeExecutionNode(graph,
+                        writeExecutionNode(graph, epNode, 
                             node.getKey(), 
                             getState(node.getValue(), "optional"),
                             null),

Propchange: incubator/stanbol/trunk/enhancer/chain/list/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jan 27 14:41:59 2012
@@ -0,0 +1,7 @@
+.settings
+
+.project
+
+.classpath
+
+target

Added: incubator/stanbol/trunk/enhancer/chain/list/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/chain/list/pom.xml?rev=1236699&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/chain/list/pom.xml (added)
+++ incubator/stanbol/trunk/enhancer/chain/list/pom.xml Fri Jan 27 14:41:59 2012
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+       <modelVersion>4.0.0</modelVersion>
+
+       <parent>
+               <groupId>org.apache.stanbol</groupId>
+               <artifactId>org.apache.stanbol.enhancer.parent</artifactId>
+               <version>0.9.0-incubating-SNAPSHOT</version>
+               <relativePath>../../parent</relativePath>
+       </parent>
+
+       <groupId>org.apache.stanbol</groupId>
+       <artifactId>org.apache.stanbol.enhancer.chain.list</artifactId>
+       <packaging>bundle</packaging>
+
+       <name>Apache Stanbol Enhancer Chain: List</name>
+       <description>
+        This provides a Chain implementation that executes Enhancement
+        Engines in the exact order as configured by the user.
+    </description>
+
+       <inceptionYear>2012</inceptionYear>
+
+    <scm>
+        <connection>
+            
scm:svn:http://svn.apache.org/repos/asf/incubator/stanbol/trunk/enhancer/chian/list
+        </connection>
+        <developerConnection>
+            
scm:svn:https://svn.apache.org/repos/asf/incubator/stanbol/trunk/enhancer/chain/list
+        </developerConnection>
+        <url>http://incubator.apache.org/stanbol/</url>
+    </scm>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <extensions>true</extensions>
+                               <configuration>
+                                       <instructions>
+                                               <Export-Package>
+                                   </Export-Package>
+                                               <Private-Package>
+                            
org.apache.stanbol.enhancer.chain.list.impl;version=${project.version}
+                               </Private-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+               </plugins>
+       </build>
+
+       <dependencies>
+        <!-- Stanbol Commomns dependencies -->
+        <dependency>
+            <groupId>org.apache.stanbol</groupId>
+            
<artifactId>org.apache.stanbol.commons.stanboltools.datafileprovider</artifactId>
+        </dependency>
+        <!-- Stanbol Enhancer dependencies -->
+               <dependency>
+                       <groupId>org.apache.stanbol</groupId>
+                       
<artifactId>org.apache.stanbol.enhancer.servicesapi</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.clerezza</groupId>
+                       <artifactId>rdf.core</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>commons-io</groupId>
+                       <artifactId>commons-io</artifactId>
+               </dependency>
+               <!-- for tests -->
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-simple</artifactId>
+               </dependency>
+       </dependencies>
+
+</project>

Propchange: incubator/stanbol/trunk/enhancer/chain/list/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: 
incubator/stanbol/trunk/enhancer/chain/weighted/src/main/java/org/apache/stanbol/enhancer/chain/weighted/impl/WeightedChain.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/chain/weighted/src/main/java/org/apache/stanbol/enhancer/chain/weighted/impl/WeightedChain.java?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/chain/weighted/src/main/java/org/apache/stanbol/enhancer/chain/weighted/impl/WeightedChain.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/chain/weighted/src/main/java/org/apache/stanbol/enhancer/chain/weighted/impl/WeightedChain.java
 Fri Jan 27 14:41:59 2012
@@ -193,7 +193,7 @@ public class WeightedChain extends Abstr
 //            throw new ChainException("This Chain is missing the following " +
 //                     "required Engines "+missingEngines);
 //        }
-        return calculateExecutionPlan(availableEngines,optionalEngines, 
missingEngines);
+        return 
calculateExecutionPlan(getName(),availableEngines,optionalEngines, 
missingEngines);
     }
 
     @Override

Modified: 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ConfigUtils.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ConfigUtils.java?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ConfigUtils.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ConfigUtils.java
 Fri Jan 27 14:41:59 2012
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.slf4j.Logger;
@@ -137,6 +138,19 @@ public final class ConfigUtils {
         }
         return config;
     }
+    /**
+     * Returns the "key, parameter" entry parsed form the parsed configuration 
+     * line.<p>
+     * This method is useful if the caller need to preserve the oder of multi
+     * line configurations and therefore can not use the parseConfig methods.
+     * @param line a configuration line
+     * @return the key, parameter entry
+     */
+    public static Entry<String,Map<String,List<String>>> 
parseConfigEntry(String line){
+        String[] elements = line.split(";");
+        return Collections.singletonMap(elements[0].trim(), 
getParameters(elements,1))
+            .entrySet().iterator().next();
+    }
     
     /**
      * Internally used to parse single lines of an parsed {@link Iterable} or

Modified: 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ExecutionPlanHelper.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ExecutionPlanHelper.java?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ExecutionPlanHelper.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/ExecutionPlanHelper.java
 Fri Jan 27 14:41:59 2012
@@ -22,9 +22,12 @@ import static org.apache.stanbol.enhance
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.EnhancementEngineHelper.getString;
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ExecutionPlanHelper.getExecutable;
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ExecutionPlanHelper.writeExecutionNode;
+import static org.apache.stanbol.enhancer.servicesapi.rdf.ExecutionPlan.CHAIN;
 import static 
org.apache.stanbol.enhancer.servicesapi.rdf.ExecutionPlan.DEPENDS_ON;
 import static org.apache.stanbol.enhancer.servicesapi.rdf.ExecutionPlan.ENGINE;
 import static 
org.apache.stanbol.enhancer.servicesapi.rdf.ExecutionPlan.EXECUTION_NODE;
+import static 
org.apache.stanbol.enhancer.servicesapi.rdf.ExecutionPlan.EXECUTION_PLAN;
+import static 
org.apache.stanbol.enhancer.servicesapi.rdf.ExecutionPlan.HAS_EXECUTION_NODE;
 import static 
org.apache.stanbol.enhancer.servicesapi.rdf.ExecutionPlan.OPTIONAL;
 import static org.apache.stanbol.enhancer.servicesapi.rdf.Properties.RDF_TYPE;
 
@@ -67,20 +70,25 @@ public final class ExecutionPlanHelper {
      * Writes all triples for an ep:ExecutionNode to the parsed {@link MGraph}.
      * An {@link BNode} is use for representing the execution node resource.
      * @param graph the graph to write the triples. MUST NOT be empty
+     * @param epNode the NonLiteral representing the ep:ExecutionPlan
      * @param engineName the name of the engine. MUST NOT be <code>null</code> 
nor empty
      * @param optional if the execution of this node is optional or required
      * @param dependsOn other nodes that MUST BE executed before this one. 
Parse 
      * <code>null</code> or an empty set if none.
      * @return the resource representing the added ep:ExecutionNode.
      */
-    public static NonLiteral writeExecutionNode(MGraph graph,String 
engineName, boolean optional, Set<NonLiteral> dependsOn){
+    public static NonLiteral writeExecutionNode(MGraph graph,NonLiteral 
epNode, String engineName, boolean optional, Set<NonLiteral> dependsOn){
         if(graph == null){
             throw new IllegalArgumentException("The parsed MGraph MUST NOT be 
NULL!");
         }
         if(engineName == null || engineName.isEmpty()){
             throw new IllegalArgumentException("The parsed Engine name MUST 
NOT be NULL nor empty!");
         }
+        if(epNode == null){
+            throw new IllegalArgumentException("The ep:ExecutionPlan instance 
MUST NOT be NULL!");
+        }
         NonLiteral node = new BNode();
+        graph.add(new TripleImpl(epNode, HAS_EXECUTION_NODE, node));
         graph.add(new TripleImpl(node, RDF_TYPE, EXECUTION_NODE));
         graph.add(new TripleImpl(node,ENGINE,new 
PlainLiteralImpl(engineName)));
         if(dependsOn != null){
@@ -93,6 +101,24 @@ public final class ExecutionPlanHelper {
         graph.add(new TripleImpl(node, OPTIONAL, 
lf.createTypedLiteral(optional)));
         return node;
     }
+    /**
+     * Creates an ExecutionPlan for the parsed chainName in the parsed Graph
+     * @param graph the graph
+     * @param chainName the chain name
+     * @return the node representing the ex:ExecutionPlan
+     */
+    public static NonLiteral createExecutionPlan(MGraph graph,String 
chainName){
+        if(graph == null){
+            throw new IllegalArgumentException("The parsed MGraph MUST NOT be 
NULL!");
+        }
+        if(chainName == null || chainName.isEmpty()){
+            throw new IllegalArgumentException("The parsed Chain name MUST NOT 
be NULL nor empty!");
+        }
+        NonLiteral node = new BNode();
+        graph.add(new TripleImpl(node, RDF_TYPE, EXECUTION_PLAN));
+        graph.add(new TripleImpl(node, CHAIN,new PlainLiteralImpl(chainName)));
+        return node;
+    }
     
     /**
      * Evaluates the parsed {@link Graph execution plan} and the set of 
already executed
@@ -129,21 +155,26 @@ public final class ExecutionPlanHelper {
      * A second parameter with the set of optional engines can be used to 
define
      * what {@link ExecutionPlan#EXECUTION_NODE} in the execution plan should 
be 
      * marked as {@link ExecutionPlan#OPTIONAL}.
+     * @param chainName the name of the Chain to build the execution plan for
      * @param availableEngines the list of engines
      * @param the names of optional engines.
      * @return the execution plan
      */
-    public static Graph calculateExecutionPlan(List<EnhancementEngine> 
availableEngines, Set<String> optional, Set<String> missing) {
+    public static Graph calculateExecutionPlan(String chainName, 
List<EnhancementEngine> availableEngines, Set<String> optional, Set<String> 
missing) {
+        if(chainName == null || chainName.isEmpty()){
+            throw new IllegalArgumentException("The parsed ChainName MUST NOT 
be empty!");
+        }
         Collections.sort(availableEngines,EXECUTION_ORDER_COMPARATOR);
         //now we have all required and possible also optional engines
         //  -> build the execution plan
         MGraph ep = new SimpleMGraph();
+        NonLiteral epNode = createExecutionPlan(ep, chainName);
         Integer prevOrder = null;
         Set<NonLiteral> prev = null;
         Set<NonLiteral> current = new HashSet<NonLiteral>();
         for(String name : missing){
             boolean optionalMissing = optional.contains(name);
-            NonLiteral node = writeExecutionNode(ep, name, optionalMissing, 
null);
+            NonLiteral node = writeExecutionNode(ep, epNode, name, 
optionalMissing, null);
             if(!optionalMissing){
                 current.add(node);
             } // else add missing optional engines without any dependsOn 
restrictions
@@ -155,7 +186,7 @@ public final class ExecutionPlanHelper {
                 prev = current;
                 prevOrder = order;
             }
-            current.add(writeExecutionNode(ep, name, optional.contains(name), 
prev));
+            current.add(writeExecutionNode(ep, epNode, name, 
optional.contains(name), prev));
         }
         return ep.getGraph();
     }

Modified: 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/SingleEngineChain.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/SingleEngineChain.java?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/SingleEngineChain.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/helper/SingleEngineChain.java
 Fri Jan 27 14:41:59 2012
@@ -16,6 +16,7 @@
 */
 package org.apache.stanbol.enhancer.servicesapi.helper;
 
+import static 
org.apache.stanbol.enhancer.servicesapi.helper.ExecutionPlanHelper.createExecutionPlan;
 import static 
org.apache.stanbol.enhancer.servicesapi.helper.ExecutionPlanHelper.writeExecutionNode;
 
 import java.util.Collections;
@@ -38,7 +39,7 @@ import org.apache.stanbol.enhancer.servi
  * The intension is that it is instantiated by the component (e.g. the 
implementation
  * of a RESTful service) for an {@link EnhancementEngine} and directly parsed
  * to the {@link EnhancementJobManager}.
- * S
+ * 
  * @author Rupert Westenthaler 
  *
  */
@@ -53,10 +54,11 @@ public class SingleEngineChain implement
             throw new IllegalArgumentException("The parsed EnhancementEngine 
MUST NOT be NULL!");
         }
         this.engine = engine;
+        this.name = engine.getName()+"Chain";
         MGraph graph = new SimpleMGraph();
-        writeExecutionNode(graph, engine.getName(), false, null);
+        writeExecutionNode(graph, createExecutionPlan(graph, name),
+            engine.getName(), false, null);
         executionPlan = graph.getGraph();
-        name = engine.getName()+"Chain";
     }
     
     @Override

Modified: 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/rdf/ExecutionPlan.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/rdf/ExecutionPlan.java?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/rdf/ExecutionPlan.java
 (original)
+++ 
incubator/stanbol/trunk/enhancer/generic/servicesapi/src/main/java/org/apache/stanbol/enhancer/servicesapi/rdf/ExecutionPlan.java
 Fri Jan 27 14:41:59 2012
@@ -12,6 +12,20 @@ public final class ExecutionPlan {
 
     private ExecutionPlan(){/* No instances of Utility classes*/ }
     /**
+     * The Class ep:ExecutionPlan
+     */
+    public static final UriRef EXECUTION_PLAN = new 
UriRef(NamespaceEnum.ep+"ExecutionPlan");
+    /**
+     * The property ep:chain linking an {@link #EXECUTION_PLAN} to the name
+     * of the chain this plan is defined for
+     */
+    public static final UriRef CHAIN = new UriRef(NamespaceEnum.ep+"chain");
+    /**
+     * the property ep:hasExecutionNode linking an {@link #EXECUTION_PLAN} with
+     * all its {@link #EXECUTION_NODE}s
+     */
+    public static final UriRef HAS_EXECUTION_NODE = new 
UriRef(NamespaceEnum.ep+"hasExecutionNode");
+    /**
      * The Class ep:ExecutionMode
      */
     public static final UriRef EXECUTION_NODE = new 
UriRef(NamespaceEnum.ep+"ExecutionNode");
@@ -30,5 +44,5 @@ public final class ExecutionPlan {
      * an {@link #EXECUTION_NODE} is optional. The default is 
<code>false</code>.
      */
     public static final UriRef OPTIONAL = new 
UriRef(NamespaceEnum.ep+"optional");
-    
+ 
 }

Modified: incubator/stanbol/trunk/enhancer/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/pom.xml?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/pom.xml (original)
+++ incubator/stanbol/trunk/enhancer/pom.xml Fri Jan 27 14:41:59 2012
@@ -52,6 +52,7 @@
     <module>engines</module>
     <module>chain/allactive</module>
     <module>chain/graph</module>
+    <module>chain/list</module>
     <module>chain/weighted</module>
     <module>bundlelist</module>
   </modules>

Modified: incubator/stanbol/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/pom.xml?rev=1236699&r1=1236698&r2=1236699&view=diff
==============================================================================
--- incubator/stanbol/trunk/pom.xml (original)
+++ incubator/stanbol/trunk/pom.xml Fri Jan 27 14:41:59 2012
@@ -63,6 +63,7 @@
     <module>enhancer/chain/allactive</module>
     <module>enhancer/chain/graph</module>
     <module>enhancer/chain/weighted</module>
+    <module>enhancer/chain/list</module>
     <module>enhancer/jersey</module>
     <module>enhancer/benchmark</module>
     <module>enhancer/bundlelist</module>


Reply via email to