Author: rwesten
Date: Tue Jan 24 14:07:57 2012
New Revision: 1235256

URL: http://svn.apache.org/viewvc?rev=1235256&view=rev
Log:
Started documentation for enhancement chains, minor updates to the STANBOL-414 
spec

Added:
    incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/
    
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/defaultchain.mdtext
    
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-defaultchain-config.png
   (with props)
    
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-weightedchain-config.png
   (with props)
    
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/weightedchain.mdtext
Modified:
    
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/STANBOL-414-specification.mdtext

Modified: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/STANBOL-414-specification.mdtext
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/STANBOL-414-specification.mdtext?rev=1235256&r1=1235255&r2=1235256&view=diff
==============================================================================
--- 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/STANBOL-414-specification.mdtext
 (original)
+++ 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/STANBOL-414-specification.mdtext
 Tue Jan 24 14:07:57 2012
@@ -158,9 +158,18 @@ NOTE: We could also provide the possibil
 
 Implementation that keeps track of all currently active EnhancementEngine and 
registers itself as a Chain service with the 
"stanbol.enhancer.chain.name=default" an service ranking of Integer.MIN_VALUE.
 
-This will provide a Chain returned by ChainManager.getDefault() that will 
result in the same enhancement process as Stanbol used before the addition of 
Chains.
+This will cause this chain to be returned by the ChainManager.getDefault() 
method if users:
+
+* do not deactivate this Chain (see below)
+* configure an other Chain with the "stanbol.enhancer.chain.name=default" and 
an higher service ranking
+
+This chain can be enabled/disabled by using the 
"stanbol.enhancer.chain.default.enabled"
+
+![DefaultChain Configuration](enhancer-defaultchain-config.png "Configuration 
Options for the Default Chain")
+
+Note that the DefaultChain does not actually implement the Chain interface, 
but only registers an instance of the AllActiveEnginesChain on activation.
+The implementation is part of the 
"org.apache.stanbol.enhancer.chain.allactive" module.
 
-Note that users can change the default chain by either stopping this component 
of adding an other Chain with "stanbol.enhancer.chain.name=default" and an 
higher service ranking. 
 
 ### SingleEngineChain
 

Added: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/defaultchain.mdtext
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/defaultchain.mdtext?rev=1235256&view=auto
==============================================================================
--- 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/defaultchain.mdtext
 (added)
+++ 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/defaultchain.mdtext
 Tue Jan 24 14:07:57 2012
@@ -0,0 +1,32 @@
+Title: DefaultChain
+
+Implementation that keeps track of all currently active EnhancementEngine and 
registers itself as a Chain service with the 
"stanbol.enhancer.chain.name=default" an service ranking of Integer.MIN_VALUE.
+
+This will cause this chain to be returned by the ChainManager.getDefault() 
method if users:
+
+* do not deactivate this Chain (see below)
+* configure an other Chain with the "stanbol.enhancer.chain.name=default" and 
an higher service ranking
+
+The Chain returned by ChainManager.getDefault() is the one used for requests 
that do not specify a chain. This are enhancement requests to the "/engines" 
and "/enhancer" endpoint.
+
+### Configuration
+
+This chain can be enabled/disabled by using the 
"stanbol.enhancer.chain.default.enabled"
+
+![DefaultChain Configuration](enhancer-defaultchain-config.png "Configuration 
Options for the Default Chain")
+
+This chain does not support the configuration of the name nor the service 
ranking. The name is fixed to "default" and the service ranking is 
Integer.MIN_VALUE
+
+Note that the DefaultChain does not actually implement the Chain interface, 
but only registers an instance of the AllActiveEnginesChain on activation.
+The implementation is part of the 
"org.apache.stanbol.enhancer.chain.allactive" module.
+
+### Calculation of the ExecutionPlan
+
+This chain considers all currently active EnhancementEngines. The 
ExecutionPlan is calculated by using the value for the 
"org.apache.stanbol.enhancer.engine.order" property provided by the 
EnhancementEngine:
+
+* Engines with a lower order are executed before Engines with a higher value
+* Engines with the same order may be executed simultaneously if the 
EnhancementJobMananger and the EnhancementEngine do support this feature.
+
+The DefaultChain ensures therefore that the default behavior of the Stanbol 
Enhancer does not change after the introduction of EnhancementChains. This is 
because the WeightedJobManager as used previously followed exactly the same 
rules.
+
+However after the introduction of EnhancementChains users can now easily 
change the default behavior.
\ No newline at end of file

Added: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-defaultchain-config.png
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-defaultchain-config.png?rev=1235256&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-defaultchain-config.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-weightedchain-config.png
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-weightedchain-config.png?rev=1235256&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/enhancer-weightedchain-config.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/weightedchain.mdtext
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/weightedchain.mdtext?rev=1235256&view=auto
==============================================================================
--- 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/weightedchain.mdtext
 (added)
+++ 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/chains/weightedchain.mdtext
 Tue Jan 24 14:07:57 2012
@@ -0,0 +1,30 @@
+Title: WeightedChain
+
+The Wighted Chain takes a list of Enhancement Engine names as input and uses 
the "org.apache.stanbol.enhancer.engine.order" metadata of the configured 
Engines to calculate the ExecutionPlan.
+
+This Chain is designed for easy configuration - just a list of the engine 
names - but has limited possibilities to control the execution order.
+
+### Configuration
+
+The property "stanbol.enhancer.chain.weighted.chain" is used to provide the 
list of engine names. Both Arrays and Collections are supported as values.
+
+In addition it is possible to define Engines as optional. This allows to 
specify that the enhancement process should not fail if an Engine is not active 
or fails while processing a content item.
+
+The syntax to define an Engine as optional is as follows
+
+    <name>;optional
+    <name>;optional=true
+
+both variants result that the execution of the engine with the name <name> is 
optional.
+
+![Configuration Dialog for the 
WeightedCahin](enhancer-weightedchain-config.png "Sceenshot of the 
Configuration Dialog for a WeightedChain with two required and one optional 
Engine")
+
+### Calculation of the ExecutionPlan
+
+It is important to note that the ordering of the list has no influence on the 
ExecutionPlan because the order of execution of the configured 
EnhancementEngines is calculated only by using the value for the 
"org.apache.stanbol.enhancer.engine.order" property provided by the 
EnhancementEngine:
+
+* Engines with a lower order are executed before Engines with a higher value
+* Engines with the same order may be executed simultaneously if the 
EnhancementJobMananger and the EnhancementEngine do support this feature.
+
+The WeightedCahin follows exactly the same algorithm as the WeightedJobManager 
used to decide the execution order of all active EnhancementEngines. However 
the WeightedChain will only consider configured chains and ignore others.
+


Reply via email to