You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by bu...@apache.org on 2012/04/11 10:30:50 UTC

svn commit: r812318 [5/10] - in /websites/staging/stanbol/trunk/content: ./ stanbol/docs/0.9.0-incubating/ stanbol/docs/0.9.0-incubating/cmsadapter/ stanbol/docs/0.9.0-incubating/contenthub/ stanbol/docs/0.9.0-incubating/enhancer/ stanbol/docs/0.9.0-in...

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/refactorengine.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/refactorengine.html (added)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/refactorengine.html Wed Apr 11 08:30:47 2012
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+  <link href="/stanbol/css/stanbol.css" rel="stylesheet" type="text/css">
+  <title>Apache Stanbol - The Refactor Engine</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <link rel="icon" type="image/png" href="/stanbol/images/stanbol-logo/stanbol-favicon.png"/>
+</head>
+
+<body>
+  <div id="navigation"> 
+  <a href="/stanbol/index.html"><img alt="Apache Stanbol" width="220" height="101" border="0" src="/stanbol/images/stanbol-logo/stanbol-2010-12-14.png"/></a>
+  <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Tutorial</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a></li>
+<li><a href="/stanbol/docs/trunk/building.html">Building</a></li>
+</ul>
+<h1 id="project">Project</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/mailinglists.html">Mailing Lists</a></li>
+<li><a href="https://issues.apache.org/jira/browse/STANBOL">Issue Tracker</a></li>
+<li><a href="/stanbol/team.html">Project Team</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/downloads.html">Overview</a></li>
+</ul>
+<h1 id="the-asf">The ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+  
+  <div id="content">
+    <h1 class="title">The Refactor Engine</h1>
+    <p>It re-factors the RDF graphs of recognized entities to a target vocabulary. The engines is provided with a default set of rules (a recipe) for the refactoring which allows to produce an RDF graph according to the google vocabulary. That default recipe allows to produce google rich
+snippets.</p>
+<h2 id="technical-description">Technical Description</h2>
+<p>This enhancement engine requires the following components running:</p>
+<ul>
+<li>Stanbol Entityhub</li>
+<li>Stanbol Refactor</li>
+<li>Stanbol OntoNet</li>
+</ul>
+<h2 id="example">Example</h2>
+<p>TODO</p>
+  </div>
+  
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2010 The Apache Software Foundation, Licensed under 
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache, Stanbol and the Apache feather and Stanbol logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+  
+</body>
+</html>

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/tikaengine.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/tikaengine.html (added)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/tikaengine.html Wed Apr 11 08:30:47 2012
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+  <link href="/stanbol/css/stanbol.css" rel="stylesheet" type="text/css">
+  <title>Apache Stanbol - Tika Engine</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <link rel="icon" type="image/png" href="/stanbol/images/stanbol-logo/stanbol-favicon.png"/>
+</head>
+
+<body>
+  <div id="navigation"> 
+  <a href="/stanbol/index.html"><img alt="Apache Stanbol" width="220" height="101" border="0" src="/stanbol/images/stanbol-logo/stanbol-2010-12-14.png"/></a>
+  <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Tutorial</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a></li>
+<li><a href="/stanbol/docs/trunk/building.html">Building</a></li>
+</ul>
+<h1 id="project">Project</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/mailinglists.html">Mailing Lists</a></li>
+<li><a href="https://issues.apache.org/jira/browse/STANBOL">Issue Tracker</a></li>
+<li><a href="/stanbol/team.html">Project Team</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/downloads.html">Overview</a></li>
+</ul>
+<h1 id="the-asf">The ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+  
+  <div id="content">
+    <h1 class="title">Tika Engine</h1>
+    <p>Apache Stanbol Enhancement Engine based on Apache Tika that has three main functionalities:</p>
+<ol>
+<li>To detect the content type of parsed content. This is only performed if the no content type is parsed of the cogent type is set to "application/octed-stream". The detected content type is added to the metadata of the Content Item. </li>
+<li>To extract the plain text (and XHTML) from parsed content and add it to the <a href="../contentitem.html">ContentItem</a>   as content parts with the type Blob.</li>
+<li>To extract metadata from the parsed content and add it to the metadata of the <a href="../contentitem.html">ContentItem</a></li>
+</ol>
+<h2 id="supported-media-types">Supported Media Types</h2>
+<p>As this engine uses Apache Tika the supported media types are the same as stated on the <a href="http://tika.apache.org/1.0/formats.html">Tika Homepage</a>.</p>
+<h2 id="extracted-metadata">Extracted Metadata</h2>
+<p>Tika provides metadata as 'key:values' pairs. To use them efficiently within stanbol they need to be converted to valid RDF and aligned with existing Ontologies.</p>
+<p>The TikaEngine supports alignments to several different Ontologies. Such alignment rules can be activated/deactivated within the configuration of the TikaEngine.</p>
+<p>Supported Ontologies:</p>
+<ul>
+<li>
+<p><a href="http://www.w3.org/TR/mediaont-10/">Ontology for Media Resources</a>: This is the most complete mapping to an single Ontology. This includes mappings for all Dublin Core metadata; geo locations; some image specific data and most of the Audio and Viedo related metadata.</p>
+</li>
+<li>
+<p><a href="http://dublincore.org/documents/dcmi-terms/">DC terms</a>: Provides good mappings for text documents (HTML, Office, OpenOffice, PDF ...)</p>
+</li>
+<li>
+<p><a href="http://www.semanticdesktop.org/ontologies/2007/05/10/nexif/">Nepomuk EXIF ontology</a>: Interesting for users that want to work with EXIF metadata extracted from images.</p>
+</li>
+<li>
+<p><a href="http://www.semanticdesktop.org/ontologies/2007/03/22/nmo/">Nepomuk Message Ontology</a>: Used for sender and recaiver information of mail messages. </p>
+</li>
+<li>
+<p>SKOS: Allows mapping of labels and notes to <a href="http://www.w3.org/2009/08/skos-reference/skos.html">SKOS</a>. This is deactivated by default.</p>
+</li>
+<li>
+<p>RDFS: Allows to map labels and comments to "rdfs:label" and "rdfs:comment"</p>
+</li>
+</ul>
+<h3 id="contenttype">ContentType:</h3>
+<p>The detected content type for the parsed contentItem is added by using the following two properties:</p>
+<ul>
+<li>'http://purl.org/dc/terms/format': Dublin Core terms 'format'</li>
+<li>'http://www.w3.org/ns/ma-ont#hasFormat': Media Resource Ontology 'hasFormat'</li>
+</ul>
+<p>Note that this properties will only be present if the related Ontology is activated in the TikaEngine configuration.</p>
+<h2 id="sending-requests-directly-to-the-tika-engine">Sending Requests directly to the Tika Engine</h2>
+<p>The Stanbol Enhancer allows to send enhancement requests directly to specific EnhancementEngine. This feature can be used in combination with the Tika Engine to request</p>
+<ol>
+<li>the "text/plain" or "application/xhtml+xml" version of parsed content</li>
+<li>the extracted metadata as RDF aligned to the activated Ontologies</li>
+</ol>
+<p>The first example requests the plain text version of a PDF file with the name "test.pdf". </p>
+<div class="codehilite"><pre>curl -v -X POST -H <span class="s2">&quot;Accept: text/plain&quot;</span> -T test.pdf <span class="se">\</span>
+    <span class="s2">&quot;http://localhost:8080/enhancer/engine/tika?omitMetadata=true&quot;</span>
+</pre></div>
+
+
+<p>Note the </p>
+<ul>
+<li>'Accept' header is set to the contentType of the requested content and the </li>
+<li>'omitMetadata=true' telling the Enhancer to not return the RDF metadata.</li>
+</ul>
+<p>This second example returns the metadata as extracted from the parsed "song.mp3"</p>
+<div class="codehilite"><pre>curl -v -X POST -H <span class="s2">&quot;Accept: application/rdf+xml&quot;</span> -T song.mp3 <span class="se">\</span>
+    <span class="s2">&quot;http://localhost:8080/enhancer/engine/tika&quot;</span>
+</pre></div>
+  </div>
+  
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2010 The Apache Software Foundation, Licensed under 
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache, Stanbol and the Apache feather and Stanbol logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+  
+</body>
+</html>

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/zemantaengine.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/zemantaengine.html (added)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/engines/zemantaengine.html Wed Apr 11 08:30:47 2012
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+  <link href="/stanbol/css/stanbol.css" rel="stylesheet" type="text/css">
+  <title>Apache Stanbol - The Zemanta enhancement engine</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <link rel="icon" type="image/png" href="/stanbol/images/stanbol-logo/stanbol-favicon.png"/>
+</head>
+
+<body>
+  <div id="navigation"> 
+  <a href="/stanbol/index.html"><img alt="Apache Stanbol" width="220" height="101" border="0" src="/stanbol/images/stanbol-logo/stanbol-2010-12-14.png"/></a>
+  <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Tutorial</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a></li>
+<li><a href="/stanbol/docs/trunk/building.html">Building</a></li>
+</ul>
+<h1 id="project">Project</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/mailinglists.html">Mailing Lists</a></li>
+<li><a href="https://issues.apache.org/jira/browse/STANBOL">Issue Tracker</a></li>
+<li><a href="/stanbol/team.html">Project Team</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/downloads.html">Overview</a></li>
+</ul>
+<h1 id="the-asf">The ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+  
+  <div id="content">
+    <h1 class="title">The Zemanta enhancement engine</h1>
+    <p>Enhancement engine that uses the Zemanta API. You need a Zemanta API key to run this engine.</p>
+<h2 id="usage">Usage</h2>
+<p>If the Engine does not show up in the Componets tab of the Apache Felix Web Console you will first need to build and install this Engine to your OSGI environment</p>
+<ol>
+<li>build ("mvn install") and deploy the Clerezza bundle org.apache.clerezza.rdf.jena.parser</li>
+<li>build the jar ("mvn install")</li>
+<li>import the jar into the OSGi runtime (all default</li>
+</ol>
+<p>To use this Enhancement Engine it is important to configure your Zemanta API key.</p>
+<ul>
+<li>In the OSGi web console, set the property "org.apache.stanbol.enhancer.engines.zemanta.key" with your API key</li>
+<li>restart the component in the OSGi console</li>
+<li>
+<p>Watch the console when you add text using commands such as:</p>
+<p>:::bash
+curl -T myText.txt -H Content-Type:text/plain http://localhost:8080/enhancer</p>
+</li>
+</ul>
+  </div>
+  
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2010 The Apache Software Foundation, Licensed under 
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache, Stanbol and the Apache feather and Stanbol logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+  
+</body>
+</html>

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementexample.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementexample.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementjobmanager.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementjobmanager.html (added)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementjobmanager.html Wed Apr 11 08:30:47 2012
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+  <link href="/stanbol/css/stanbol.css" rel="stylesheet" type="text/css">
+  <title>Apache Stanbol - EnhancementJobManager</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <link rel="icon" type="image/png" href="/stanbol/images/stanbol-logo/stanbol-favicon.png"/>
+</head>
+
+<body>
+  <div id="navigation"> 
+  <a href="/stanbol/index.html"><img alt="Apache Stanbol" width="220" height="101" border="0" src="/stanbol/images/stanbol-logo/stanbol-2010-12-14.png"/></a>
+  <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Tutorial</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a></li>
+<li><a href="/stanbol/docs/trunk/building.html">Building</a></li>
+</ul>
+<h1 id="project">Project</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/mailinglists.html">Mailing Lists</a></li>
+<li><a href="https://issues.apache.org/jira/browse/STANBOL">Issue Tracker</a></li>
+<li><a href="/stanbol/team.html">Project Team</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/downloads.html">Overview</a></li>
+</ul>
+<h1 id="the-asf">The ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+  
+  <div id="content">
+    <h1 class="title">EnhancementJobManager</h1>
+    <p>The EnhancementJobManager is the component responsible for the execution of the <a href="chains/executionplan.html">ExecutionPlan</a> as provided by the <a href="chains">Enhancement Chain</a> on the <a href="contentitem.html">ContentItem</a>.</p>
+<h2 id="enhancementjobmanager-interface">EnhancementJobManager interface</h2>
+<p>The interface of the EnhancementJobManager is very simple:</p>
+<div class="codehilite"><pre><span class="cm">/** Enhances the content item by using the default Chain */</span>
+<span class="o">+</span> <span class="n">enhanceContent</span><span class="o">(</span><span class="n">ContentItem</span> <span class="n">ci</span><span class="o">)</span>
+<span class="cm">/** Enhances the content item by using the parsed Chain */</span>
+<span class="o">+</span> <span class="n">enhanceContent</span><span class="o">(</span><span class="n">ContentItem</span> <span class="n">ci</span><span class="o">,</span> <span class="n">Chain</span> <span class="n">chain</span><span class="o">)</span>
+</pre></div>
+
+
+<p>Note: the parsed ContentItem will be changed during the enhancement process. <a href="engines">EnhancementEngines</a> will add extracted knowledge to the metadata of the content item. Also additional content parts may be added to the ContentItem.</p>
+<h2 id="enhancement-process">Enhancement Process</h2>
+<p><span style="float:right"> <img alt="Enhancement Job Manager Overview" src="enhancementjobmanageroverview.png" title="The Enhancement Job Manager executes the ExecutionPlan provided by the Enhancement Chain and records the ExecutionMetadata" /></span> </p>
+<p>While the <a href="chains/executionplan.html">ExecutionPlan</a> defines what EnhancementEngines are used and how they depend on each other, the EnhancementJobManager is responsible for the actual execution of the enhancement process based on this plan. This section provides detailed information about requirements and expectations that MUST BE considered.</p>
+<p>The EnhancementJobManager is also responsible to create and update the <a href="executionmetadata.html">ExecutionMetadata</a> in the metadata of the processed <a href="contentitem.html">ContentItem</a>. Details about this are provided in the section "<a href="executionmetadata.html#creationmanagement_of_executionmetadata">Creation/Management of ExecutionMetadata</a>" of the ExecutionMetadata documentation.</p>
+<h3 id="initializing-the-enhancement-process">Initializing the Enhancement Process</h3>
+<p>Here one needs to distinguish two cases:</p>
+<ol>
+<li>Initialization of an new Enhancement process and</li>
+<li>Continuation of an existing Enhancement process.</li>
+</ol>
+<p>The two cases can be easily detected by the EnhancementJobManager by evaluating if a content part with the URI  "http://stanbol.apache.org/ontology/enhancer/executionMetadata#ChainExecution"  is present within the parsed  <a href="contentitem.html">ContentItem</a>.</p>
+<p>In the first case the <a href="chains/executionplan.html">ExecutionPlan</a> to be used by the enhancement process is provided by the Chain in a final graph that is guaranteed to be not changed. However because the configuration of a Chain might be changed at any time the EnhancementJobManager MUST retrieve the execution plan only once and use it during the entire enhancement process. In addition the ExecutionPlan MUST BE also added to the graph containing the <a href="executionmetadata.html">EnahcementMetadata</a>. In case of continuing on an previously aborted enhancement process the ExecutionPlan MUST BE initialized from the ExecutionMetadata provided by the ContentItem.</p>
+<p>For details on how to initialize/load the execution metadata see the section "<a href="executionmetadata.html#creationmanagement_of_executionmetadata">Creation/Management of ExecutionMetadata</a>" of the ExecutionMetadata documentation.</p>
+<h3 id="engine-execution">Engine Execution</h3>
+<p>The ExecutionPlan provides the necessary information which <a href="engines">EnhancementEngines</a> can be executed at any given state. The following code shows how to determine executable engines. 
+This code snippet assumes to be called after the execution of an EnhancementEngine has completed. Note that in a multi threaded environment access to the list of executed and running engines need to be synchronized.</p>
+<div class="codehilite"><pre><span class="n">Collection</span><span class="o">&lt;</span><span class="n">NonLiteral</span><span class="o">&gt;</span> <span class="n">executed</span><span class="o">;</span> <span class="c1">//already executed Engines</span>
+<span class="n">Collection</span><span class="o">&lt;</span><span class="n">NonLiteral</span><span class="o">&gt;</span> <span class="n">running</span><span class="o">;</span> <span class="c1">//currently running Engines</span>
+
+<span class="n">Collection</span><span class="o">&lt;</span><span class="n">NonLiteral</span><span class="o">&gt;</span> <span class="n">next</span> <span class="o">=</span> <span class="n">ExecutionPlanUtils</span><span class="o">.</span><span class="na">getExecuteable</span><span class="o">(</span><span class="n">plan</span><span class="o">,</span> <span class="n">executed</span><span class="o">);</span>
+<span class="k">for</span><span class="o">(</span><span class="n">NonLiteral</span> <span class="n">node</span> <span class="o">:</span> <span class="n">next</span><span class="o">){</span>
+    <span class="k">if</span><span class="o">(!</span><span class="n">running</span><span class="o">.</span><span class="na">contains</span><span class="o">(</span><span class="n">node</span><span class="o">)){</span>
+        <span class="n">String</span> <span class="n">engineName</span> <span class="o">=</span> <span class="n">EnhancementEngineHelper</span><span class="o">.</span><span class="na">getString</span><span class="o">(</span><span class="n">executionPlan</span><span class="o">,</span><span class="n">node</span><span class="o">,</span> <span class="n">EX_ENGINE</span><span class="o">));</span>
+        <span class="n">EnhancementEngine</span> <span class="n">engine</span> <span class="o">=</span> <span class="n">tracker</span><span class="o">.</span><span class="na">getEngine</span><span class="o">(</span><span class="n">engineName</span><span class="o">);</span>
+        <span class="k">if</span><span class="o">(</span><span class="n">engine</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">){</span>
+            <span class="c1">// execute engine</span>
+        <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
+           <span class="c1">//check if optional and throw error if not</span>
+        <span class="o">}</span>
+    <span class="o">}</span> <span class="c1">// else already running -&gt; ignore</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p><em>NOTE</em> that the NonLiterals contained in the two collections are 'ep:ExecutionNode' instances and NOT 'em:EngineExecution' instances. Each 'em:EngineExecution' instance in the ExecutionMetadata' is linked by the 'em:executionNode' property to the corresponding 'ep:ExecutionNode' of the ExecutionPlan.</p>
+<p>Before executing an <a href="engines">EnhancementEngine</a>, the EnhancementJobManager needs to check if and how the engine can enhance a content item. This is indicated by the integer returned by the "canEnhance(ContentItem ci)" method:</p>
+<ul>
+<li><strong>CANNOT_ENHANCE</strong>: Indicates that this engines can not process the parsed content item. In this case the EnhancementJobManager needs to skip this engine and mark the EngineExecution as skipped with a status message that the EnhancementEngine was unable to process the content item. If this engine is marked as optional the enhancement process can continue; if not, the execution MUST be marked as failed and an according exception needs to be thrown.</li>
+<li><strong>ENHANCE_SYNCHRONOUS</strong>: Indicates that the engine needs exclusive access to the parsed content item. The EnhancementJobManager needs to ensure that in some way. Typically by calling the "computeEnhancement(ContentItem ci)" method within a write lock.</li>
+<li><strong>ENHANCE_ASYNC</strong>: Indicates that this engine supports asynchronous execution and takes itself care to acquire read and write locks on the parsed content item. However this does not require the JobManager to execute the engine asynchronously.</li>
+</ul>
+<p>If the execution of an EnhancementEngine completes, the JobManager needs to set the state of the execution to completed and update the execution metadata accordingly.</p>
+<p>If a call to "computeEnhancement(ContentItem ci)" results in an Exception the EnhancementJobManager must mark the execution of the engine as failed with a decryption of the occurred exception. If the execution of the affected engine was optional, the enhancement process is continued. Otherwise the enhancement process needs to be stopped and the Error needs to rethrown by the "enhanceContent(..)" method.</p>
+<p>For all the details on how to reflect state changes in the Execution metadata see <a href="executionmetadata.html#execution_state_management">this section</a> of the documentation of the ExecutionMetadata.</p>
+<h3 id="multi-threaded-enhancement-processes">Multi Threaded enhancement processes</h3>
+<p>In case the EnhancementJobManager supports to simultaneously call <a href="engines">EnhancementEngines</a> for the same content item in multiple threads, it is important to correctly use the ReadWriteLock as provided by the ContentItem.getLock() method.</p>
+<p>There are many good examples on how to correctly use "java.util.concurrent.ReadWriteLock" available on the web.</p>
+<h3 id="finalizing-the-enhancementprocess">Finalizing the EnhancementProcess</h3>
+<p>When the execution is completed (successfully or failed), the EnhancementJobManager need to ensure that the 'em:status' and the 'em:completed' of the 'em:ChainExecution' instance are set. If the execution failed also the 'em:statusMessage' should be available and contain a message that describes the problem.</p>
+<h2 id="enhancementjobmanager-implementations">EnhancementJobManager implementations</h2>
+<p>EnhancementJobManager implementations need to register itself as OSGI services. By default the Stanbol Enhancer will use the implementation with the highest service ranking. The service ranking can be set by providing a configuration defining an integer value for the property "service.ranking"</p>
+<h3 id="eventjobmanager">EventJobManager</h3>
+<p>This implementation is provided by the "org.apache.stanbol.enhancer.jobmanager.event" module and is currently used as default. It registers itself (by default) with a service ranking of '0'.</p>
+<p>This implementation supports an asynchronous enhancement process by using the <a href="http://www.osgi.org/javadoc/r4v42/org/osgi/service/event/package-summary.html">"org.osgi.service.event"</a> framework. </p>
+<h3 id="weightedjobmanager">WeightedJobManager</h3>
+<p>This JobManager was used as default before the introduction of EnhancementChains. It does not support EnhancementChains and will enhance parsed <a href="contentitem.html">ContentItems</a> by calling all currently active EnhancementEngines in a sequential manner. It does also not have support for EnhancementMetadata.</p>
+<p>This implementation is provided by the "org.apache.stanbol.enhancer.jobmanager.weightedjobmanager" module and is no longer included within the Apache Stanbol launchers. This JobManager registers itself with a service ranking of "-1000". Users that want to use this job manager need to manually install this bundle and either deactivate other EnhancementJobManager implementations or reconfigure the service ranking of this one to an value &gt; 0.</p>
+  </div>
+  
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2010 The Apache Software Foundation, Licensed under 
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache, Stanbol and the Apache feather and Stanbol logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+  
+</body>
+</html>

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementjobmanageroverview.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementjobmanageroverview.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementstructureoverview.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancementstructureoverview.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhanceroverview-s.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhanceroverview-s.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhanceroverview.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhanceroverview.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancerrest.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancerrest.html (added)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/0.9.0-incubating/enhancer/enhancerrest.html Wed Apr 11 08:30:47 2012
@@ -0,0 +1,414 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    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.
+-->
+
+  <link href="/stanbol/css/stanbol.css" rel="stylesheet" type="text/css">
+  <title>Apache Stanbol - Stanbol Enhancer RESTful Services</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <link rel="icon" type="image/png" href="/stanbol/images/stanbol-logo/stanbol-favicon.png"/>
+</head>
+
+<body>
+  <div id="navigation"> 
+  <a href="/stanbol/index.html"><img alt="Apache Stanbol" width="220" height="101" border="0" src="/stanbol/images/stanbol-logo/stanbol-2010-12-14.png"/></a>
+  <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Tutorial</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a></li>
+<li><a href="/stanbol/docs/trunk/building.html">Building</a></li>
+</ul>
+<h1 id="project">Project</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/mailinglists.html">Mailing Lists</a></li>
+<li><a href="https://issues.apache.org/jira/browse/STANBOL">Issue Tracker</a></li>
+<li><a href="/stanbol/team.html">Project Team</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/docs/trunk/downloads.html">Overview</a></li>
+</ul>
+<h1 id="the-asf">The ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+  
+  <div id="content">
+    <h1 class="title">Stanbol Enhancer RESTful Services</h1>
+    <p>The RESTful service endpoint provided by the Stanbol Enhancer is a stateless interface that allows the caller to submit content and get the resulting enhancements formatted as RDF at once without storing anything on the server-side. More advanced options also allow to parse pre-existing metadata, parse and request alternate content versions and additional metadata created by the Enhancer or specific Enhancement Engines.</p>
+<p>The RESTful interface described below is provided on several endpoints</p>
+<ul>
+<li><strong>'/enhancer':</strong> The main endpoint of the Stanbol Enhancer. Parsed content will get enhanced by using the default enhancement chain.</li>
+<li><strong>'/enhancer/chain/{chain-name}'</strong>: The Stanbol Enhancer supports the configuration of multiple <a href="chains">Enhancement Chains</a>. Users can lookup active chains by requests to the 'enhancer/chain' endpoint.</li>
+<li><strong>'/enhancer/engine/{engine-name}'</strong>: This can be used to enhance parsed Content with a single <a href="engines">Enhancement Engine</a>. Note that the parsed Content MUST be processable by the referenced engine. So if the engine is not able to directly process the parsed content you might need to send existing metadata such as explained in the section <a href="#parsing_multiple_contentparts">Parsing multiple ContentParts</a>. This feature is e.g. useful to directly send a MP3 file to the <a href="engines/tikaengine.html">TikaEnigne</a> to extract the metadata.</li>
+<li><strong>'/engines':</strong> Same as '/enhancer' this ensures backward compatibility to older Stanbol versions.</li>
+</ul>
+<h2 id="basic-enhancement-service">Basic Enhancement Service</h2>
+<p>This sections describes how to parse content to the Stanbol Enhancer which then gets analyzed. Results are sent back in the form of a serialized RDF graph.</p>
+<p>The content to analyze should be sent in a POST request with the mime-type specified in
+the <code>Content-type</code> header. The response will hold the RDF enhancement serialized in the format specified in the <code>Accept</code> header:</p>
+<div class="codehilite"><pre>curl -X POST -H <span class="s2">&quot;Accept: text/turtle&quot;</span> -H <span class="s2">&quot;Content-type: text/plain&quot;</span> <span class="se">\</span>
+    --data <span class="s2">&quot;The Stanbol enhancer can detect famous cities such as Paris \</span>
+<span class="s2">            and people such as Bob Marley.&quot;</span> <span class="se">\</span>
+    http://localhost:8080/enhancer
+</pre></div>
+
+
+<p>The list of mime-types accepted as inputs depends on the deployed engines. By default most Enhancement Engines can only process plain text content. However EnhancementEngines like <a href="engines/metaxaengine.html">Metaxa</a> can be used to create 'text/plain' versions of parsed content. This allows also to enhance contents with mime-types such as html, pdf and MS office documents (see the Metaxa documentation for details)</p>
+<p>Stanbol Enhancer is able to serialize the response in the following RDF formats:</p>
+<div class="codehilite"><pre>application/json (JSON-LD)
+application/rdf+xml (RDF/XML)
+application/rdf+json (RDF/JSON)
+text/turtle (Turtle)
+text/rdf+nt (N-TRIPLES)
+</pre></div>
+
+
+<h3 id="additional-parameters">Additional Parameters</h3>
+<ul>
+<li><strong>uri={content-item-uri}:</strong> By default the URI of the content item being enhanced is a local, non de-referencable URI automatically built out of a hash digest of the binary content. Sometimes it might be helpful to provide the URI of the <a href="contentitem.html">ContentItem</a> to be used in the enhancements RDF graph.</li>
+<li><strong>executionmetadata=true/false:</strong> Allows the include of <a href="executionmetadata.html">execution metadata</a> in the enhancement metadata of the response. Such data include also the <a href="chains/executionplan.html">execution plan</a> used to enhance the parsed content. This information is typically only useful to clients that want to know how the parsed content was processed by the enhancer. NOTE that the execution metadata can also be requested by using the multi-part content item API described below.</li>
+</ul>
+<p>The following example shows how to send an enhancement request with a custom content item URI that will include the execution metadata in the response.
+In addition this request is directed to a <a href="chains">Enhancement Chain</a> with the name "dbpedia-keyword"</p>
+<div class="codehilite"><pre>curl -X POST -H <span class="s2">&quot;Accept: text/turtle&quot;</span> -H <span class="s2">&quot;Content-type: text/plain&quot;</span> <span class="se">\</span>
+    --data <span class="s2">&quot;The Stanbol enhancer can detect famous cities such as Paris \</span>
+<span class="s2">            and people such as Bob Marley.&quot;</span> <span class="se">\</span>
+    <span class="s2">&quot;http://localhost:8080/enhancer/chain/dbpedia-keyword?uri=urn:fise-example-content-item&amp;executionmetadata=true&quot;</span>
+</pre></div>
+
+
+<h2 id="enhancer-configuration">Enhancer Configuration</h2>
+<p>The Stanbol Enhancer supports several RESTful services to inspect the configuration. This services allow to retrieve currently active <a href="engines">Enhancement Engines</a> and <a href="chains">Enhancement Chains</a>.</p>
+<ul>
+<li><strong>'/enhancer':</strong> GET requests to the main Stanbol Enhancer endpoint the do used an 'Accept' header compatible to one of the supported RDF serializations will return the current configuration as RDF.</li>
+<li><strong>'/enhancer/engine':</strong> Same as above however the response will only include active enhancement engines</li>
+<li><strong>'/enhancer/chain':</strong> Returns the currently active enhancement chains.</li>
+<li><strong>'/enhancer/sparql':</strong> SPARQL endpoint that allows to query the configuration.</li>
+</ul>
+<p>Example Response as 'application/rdf' serialization of the default configuration of the Stanbol Enhancer.</p>
+<p>The request</p>
+<div class="codehilite"><pre>curl -v -X GET -H <span class="s2">&quot;Accept: application/rdf+xml&quot;</span> <span class="s2">&quot;http://localhost:8080/enhancer/ep&quot;</span>
+</pre></div>
+
+
+<p>returns the following results</p>
+<div class="codehilite"><pre><span class="nt">&lt;rdf:RDF</span>
+    <span class="na">xmlns:rdf=</span><span class="s">&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;</span>
+    <span class="na">xmlns:j.0=</span><span class="s">&quot;http://stanbol.apache.org/ontology/enhancer/enhancer#&quot;</span>
+    <span class="na">xmlns:rdfs=</span><span class="s">&quot;http://www.w3.org/2000/01/rdf-schema#&quot;</span> <span class="nt">&gt;</span> 
+  <span class="nt">&lt;rdf:Description</span> <span class="na">rdf:about=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/langid&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;rdfs:label&gt;</span>langid<span class="nt">&lt;/rdfs:label&gt;</span>
+    <span class="nt">&lt;rdf:type</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://stanbol.apache.org/ontology/enhancer/enhancer#EnhancementEngine&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;/rdf:Description&gt;</span>
+  <span class="nt">&lt;rdf:Description</span> <span class="na">rdf:about=</span><span class="s">&quot;http://localhost:8080/enhancer&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;rdf:type</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://stanbol.apache.org/ontology/enhancer/enhancer#Enhancer&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasEngine</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/dbpediaLinking&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasEngine</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/langid&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasEngine</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/entityhubLinking&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasEngine</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/tika&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasEngine</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/metaxa&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasEngine</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/ner&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasChain</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/chain/default&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasDefaultChain</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/chain/default&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;j.0:hasChain</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://localhost:8080/enhancer/chain/language&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;/rdf:Description&gt;</span>
+  <span class="nt">&lt;rdf:Description</span> <span class="na">rdf:about=</span><span class="s">&quot;http://localhost:8080/enhancer/chain/language&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;rdfs:label&gt;</span>language<span class="nt">&lt;/rdfs:label&gt;</span>
+    <span class="nt">&lt;rdf:type</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://stanbol.apache.org/ontology/enhancer/enhancer#EnhancementChain&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;/rdf:Description&gt;</span>
+  <span class="nt">&lt;rdf:Description</span> <span class="na">rdf:about=</span><span class="s">&quot;http://localhost:8080/enhancer/engine/ner&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;rdf:type</span> <span class="na">rdf:resource=</span><span class="s">&quot;http://stanbol.apache.org/ontology/enhancer/enhancer#EnhancementEngine&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;rdfs:label&gt;</span>ner<span class="nt">&lt;/rdfs:label&gt;</span>
+  <span class="nt">&lt;/rdf:Description&gt;</span>
+[...]
+<span class="nt">&lt;/rdf:RDF&gt;</span>
+</pre></div>
+
+
+<h3 id="executionplan-of-enhancement-chains">Executionplan of Enhancement Chains</h3>
+<p>The <a href="chains/executionplan.html">ExecutionPlan</a> can be also requested by sending a GET request with an supported RDF serialization as 'Accept' header to</p>
+<ul>
+<li><strong>'/enhancer/ep'</strong></li>
+<li><strong>'/enhancer/chain/{chain-name}/ep'</strong></li>
+<li><strong>'/engines/ep'</strong></li>
+</ul>
+<h2 id="multi-part-contentitem-support">Multi-part ContentItem support</h2>
+<p>The multipart <code>ContentItem</code> extensions to the basic RESTful services are provided by the Stanbol Enhancer. It was introduced (by <a href="https://issues.apache.org/jira/browse/STANBOL-481">STANBOL-481</a>) to allow advanced usage scenarios. Users will want to use this extensions if they need to:</p>
+<ul>
+<li>parse multiple versions of the content: Most CMS already do have support for converting content to plain text. This API allows to parse both the original AND multiple transcoded versions of the content to the Enhancer.</li>
+<li>parse pre-existing metadata: Typically CMS do have already some metadata about content parsed to the Stanbol Enhancer (e.g. User provided Tags, Categories …). The multi-part extensions do allow to parse such data in addition to the content. </li>
+<li>request transcoded versions of the parsed content: This API extensions allows to include transcoded (e.g. the 'plain/text') version of parsed content in the response. It also allows requests that directly returns transcoded content by omitting extracted metadata.</li>
+<li>request additional metadata that are normally not included within the metadata of the Enhancement response: This can to request the <a href="executionmetadata.html">execution metadata</a> in an own RDF graph, but it can also be used to request metadata of specific enhancement engines (TODO: add example)</li>
+</ul>
+<h3 id="queryparameters">QueryParameters</h3>
+<p>The following QueryParameters are defined by the multi-part content item extension:</p>
+<ul>
+<li>
+<p><strong>outputContent=[mediaType]:</strong> Allows to specify the Mime-types of content included within the Response of the Stanbol Enhancer. This parameter supports wild cards (e.g. '<em>' ... all, 'text/</em>'' ... all text versions,  'text/plain' ... only the plain text version). This parameter can be used multiple times.</p>
+<p>Responses to requests with this parameter will be encoded as <code>multipart/form-data</code>. If the "Accept" header of the request is not compatible to <code>multipart/form-data</code> it is assumed as a <code>400 BAD_REQUEST</code>. For details see the documentation of the <a href="contentitem.html#multipart_mime_serialization">Multipart MIME format for ContentItems</a>.</p>
+</li>
+<li>
+<p><strong>omitParsed=[true/false]:</strong> Makes only sense in combination with the <code>outputContent</code> parameter. This allows to exclude all content included in the request from the response. A typical combination is <code>outputContentPart=<em>/</em>&amp;omitParsed=true</code>. The default value of this parameter is <code>false</code>.</p>
+</li>
+<li>
+<p><strong>outputContentPart=[uri/'*']:</strong> This parameter allows to explicitly include content parts with a specific URI in the response. Currently this only supports <a href="contentitem.html#content_parts">ContentParts</a> that are stored as RDF graphs. </p>
+<p>Responses to requests with this parameter will be encoded as <code>multipart/form-data</code>. If the "Accept" header of the request is not compatible to <code>multipart/form-data</code> it is assumed as a <code>400 BAD_REQUEST</code>. The selected content parts will be included as MIME parts in the returned <a href="contentitem.html#multipart_mime_serialization">Multipart MIME formated ContentItems</a>. The URI of the part will be used as name. Such parts will be added after the "metadata" and the "content" (if present).</p>
+</li>
+<li>
+<p><strong>omitMetadata=[true/false]:</strong> This allows to enable/disable the inclusion of the metadata in the response. The default is <code>false</code>.</p>
+<p>Typically <code>omitMetadata=true</code> is used when users want to use the Stanbol Enhancer just to get one or more ContentParts as an response. Note that Requests that use an <code>Accept: {mimeType}</code> header AND <code>omitMetadata=true</code> will directly return the content version of <code>{mimeType}</code> and NOT wrap the result as <code>multipart/form-data</code>. See also the example further down this documentation.</p>
+</li>
+<li>
+<p><strong>rdfFormat=[rdfMimeType]:</strong> This allows for requests that result in <code>multipart/form-data</code> encoded responses to specify the used RDF serialization format. Supported formats and defaults are the same as for normal Enhancer Requests. </p>
+</li>
+</ul>
+<h3 id="parsing-multiple-contentparts">Parsing multiple ContentParts</h3>
+<p>Requests to the Stanbol Enhancer with the <code>Content-Type: multipart/form-data</code> are considered to contain a ContentItem serialized as MultiPart MIME. The exact specification of the <a href="contentitem.html#multipart_mime_serialization">MultiPart MIME format for ContentItems</a> is provided by the documentation of the ContentItem.</p>
+<p>The combination of <code>multipart/form-data</code> encoded requests with QueryParameters as described above allow for the usage of <a href="contentitem.html#multipart_mime_serialization">MultiPart MIME format for ContentItems</a> for both request and response.</p>
+<h2 id="using-the-multi-part-content-item-restful-api-extensions">Using the multi-part content item RESTful API extensions</h2>
+<p>The following examples show typical usage scenarios of the multi-part content item RESTful API. Note that for better readability the values of the query parameters are not URL-encoded.</p>
+<h3 id="example-1-return-metadata-and-content">Example 1: Return metadata and content</h3>
+<p>The first example shows how users can request both the metadata and transcoded versions of the parsed content.
+This can be achieved relatively easy by using the "<code>outputContent=<em>/</em></code>" in combination with "<code>omitParsed=true</code>".</p>
+<div class="codehilite"><pre>curl -v -X POST -H <span class="s2">&quot;Accept: multipart/form-data&quot;</span> <span class="se">\</span>
+    -H <span class="s2">&quot;Content-type: text/html; charset=UTF-8&quot;</span>  <span class="se">\</span>
+    --data <span class="s2">&quot;&lt;html&gt;&lt;body&gt;&lt;p&gt;The Stanbol enhancer can detect famous cities \</span>
+<span class="s2">            such as Paris and people such as Bob Marley.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;&quot;</span> <span class="se">\</span>
+    <span class="s2">&quot;${it.serviceUrl}?outputContent=*/*&amp;omitParsed=true&amp;rdfFormat=application/rdf+xml&quot;</span>
+</pre></div>
+
+
+<p>This will result in a response with the mime-type <code>"Content-Type: multipart/form-data; charset=UTF-8; boundary=contentItem"</code> and the metadata as well as the plain text version of the parsed HTML document as content.</p>
+<div class="codehilite"><pre>--contentItem
+Content-Disposition: form-data; name=&quot;metadata&quot;; filename=&quot;urn:content-item-sha1-76e44d4b51c626bbed38ce88370be88702de9341&quot;
+Content-Type: application/rdf+xml; charset=UTF-8;
+Content-Transfer-Encoding: 8bit
+
+&lt;rdf:RDF
+    xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;
+[..the metadata formatted as RDF+XML..]
+&lt;/rdf:RDF&gt;
+
+--contentItem
+Content-Disposition: form-data; name=&quot;content&quot;
+Content-Type: multipart/alternate; boundary=contentParts; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+--contentParts
+Content-Disposition: form-data; name=&quot;urn:metaxa:plain-text:2daba9dc-21f6-7ea1-70dd-a2b0d5c6cd08&quot;
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley.
+--contentParts--
+
+--contentItem--
+</pre></div>
+
+
+<p>Se also the formal specification of the <a href="contentitem.html#multipart_mime_serialization">MultiPart MIME format for ContentItems</a> for ContentItems.</p>
+<h3 id="example-2-directly-return-the-plain-text-version-of-parsed-content">Example 2: Directly return the plain text version of parsed content</h3>
+<p>The using the '<code>omitMetadata=true</code>' together with the "Accept: {requested-content-type}" the multi-part content API allows to directly request the transcoded version of the content with the format {requested-content-type}. </p>
+<div class="codehilite"><pre>curl -v -X POST -H &quot;Accept: text/plain&quot; \
+    -H &quot;Content-type: text/html; charset=UTF-8&quot; \
+    --data &quot;<span class="nt">&lt;html&gt;&lt;body&gt;&lt;p&gt;</span>The Stanbol enhancer can detect famous cities \
+            such as Paris and people such as Bob Marley.<span class="nt">&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</span>&quot; \
+    &quot;<span class="cp">${</span><span class="n">it</span><span class="o">.</span><span class="n">serviceUrl</span><span class="cp">}</span>?omitMetadata=true&quot;
+</pre></div>
+
+
+<p>The response will use <code>Content-Type: text/plain</code> and contain the string</p>
+<div class="codehilite"><pre>The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley.
+</pre></div>
+
+
+<p>To make this work the requested <a href="chains">Enhancement Chain</a> will need to include an engine (e.g. <a href="engines/metaxaengine.html">Metaxa</a>) that supports transcoding the parsed content. If no content with the request type is available the request will answer with a "<code>404 NOT FOUND</code>". </p>
+<p>Note also that because the metadata are omitted by responses to such requests it is also recommended to configure/use a chain that does no further processing on the transcoded content. </p>
+<h3 id="example-3-parse-multiple-content-versions">Example 3: Parse multiple content versions</h3>
+<p>This example will use the "httpmime" part of the Apache commons httpcomponents to create the Multipart MIME sent to the Stanbol enhancer.</p>
+<div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.apache.httpcomponents<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>httpmime<span class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>4.1.2<span class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</pre></div>
+
+
+<p>The created Multipart MIME content MUST follow the specifications as defined by the <a href="contentitem.html#multipart_mime_serialization">MultiPart MIME format for ContentItems</a>.</p>
+<div class="codehilite"><pre><span class="n">InputStream</span> <span class="n">wordIn</span><span class="o">;</span> <span class="c1">//The MS Word version of the Content</span>
+<span class="n">InputStream</span> <span class="n">plainIn</span><span class="o">;</span> <span class="c1">//The plain text version of the Content</span>
+<span class="n">HttpClient</span> <span class="n">httpClient</span><span class="o">;</span> <span class="c1">//The client used to execute the request</span>
+
+<span class="c1">//create the multipart/form-data container for the ContentItem</span>
+<span class="c1">//MultipartEntity also implements HttpEntity</span>
+<span class="n">MultipartEntity</span> <span class="n">contentItem</span> <span class="o">=</span> <span class="k">new</span> <span class="n">MultipartEntity</span><span class="o">(</span><span class="kc">null</span><span class="o">,</span> <span class="kc">null</span> <span class="o">,</span><span class="n">UTF8</span><span class="o">);</span>
+<span class="c1">//The multipart/alternate container for the contents</span>
+<span class="n">HttpMultipart</span> <span class="n">content</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HttpMultipart</span><span class="o">(</span><span class="s">&quot;alternate&quot;</span><span class="o">,</span> <span class="n">UTF8</span> <span class="o">,</span><span class="s">&quot;contentParts&quot;</span><span class="o">);</span>
+
+<span class="c1">//now add the container for the content to the content item container</span>
+<span class="n">contentItem</span><span class="o">.</span><span class="na">addPart</span><span class="o">(</span>
+    <span class="s">&quot;content&quot;</span><span class="o">,</span> <span class="c1">//the name MUST BE &quot;content&quot;!</span>
+    <span class="k">new</span> <span class="nf">MultipartContentBody</span><span class="o">(</span><span class="n">content</span><span class="o">));</span>
+
+<span class="c1">//now add the MS word content at the first location</span>
+<span class="c1">//this will make it the &quot;original&quot; content</span>
+<span class="n">content</span><span class="o">.</span><span class="na">addBodyPart</span><span class="o">(</span><span class="k">new</span> <span class="n">FormBodyPart</span><span class="o">(</span>
+    <span class="s">&quot;http://www.example.com/example.docx&quot;</span><span class="o">,</span> <span class="c1">//the id of the content part</span>
+    <span class="k">new</span> <span class="nf">InputStreamBody</span><span class="o">(</span>
+        <span class="n">wordIn</span><span class="o">,</span> 
+        <span class="s">&quot;application/vnd.openxmlformats-officedocument.wordprocessingml.document&quot;</span><span class="o">,</span> 
+        <span class="s">&quot;example.docx&quot;</span><span class="o">)));</span>
+
+<span class="c1">//now add the alternate plain text version</span>
+<span class="n">content</span><span class="o">.</span><span class="na">addBodyPart</span><span class="o">(</span><span class="k">new</span> <span class="n">FormBodyPart</span><span class="o">(</span>
+    <span class="s">&quot;http://www.example.com/example.docx&quot;</span><span class="o">,</span> <span class="c1">//the id of the content part</span>
+    <span class="k">new</span> <span class="nf">StringBody</span><span class="o">(</span> <span class="c1">//use a StringBody to avoid binary encoding for text</span>
+        <span class="n">IOUtils</span><span class="o">.</span><span class="na">toString</span><span class="o">(</span><span class="n">plainIn</span><span class="o">),</span> <span class="c1">//apache commons IO utility</span>
+        <span class="s">&quot;text/plain&quot;</span><span class="o">,</span>
+        <span class="n">Charset</span><span class="o">.</span><span class="na">forName</span><span class="o">(</span><span class="s">&quot;UTF-8&quot;</span><span class="o">))));</span>
+
+<span class="c1">//now we are ready to create and execute the POST request to the</span>
+<span class="c1">//Stanbol Enhancer</span>
+<span class="n">HttpPost</span> <span class="n">request</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HttpPost</span><span class="o">(</span><span class="s">&quot;http://localhost:8080/enhancer&quot;</span><span class="o">);</span>
+<span class="n">request</span><span class="o">.</span><span class="na">setEntity</span><span class="o">(</span><span class="n">contentItem</span><span class="o">);</span>
+<span class="n">request</span><span class="o">.</span><span class="na">setHeader</span><span class="o">(</span><span class="s">&quot;Accept&quot;</span><span class="o">,</span><span class="s">&quot;application/rdf+xml&quot;</span><span class="o">);</span>
+<span class="n">Response</span> <span class="n">response</span> <span class="o">=</span> <span class="n">httpClient</span><span class="o">.</span><span class="na">execute</span><span class="o">(</span><span class="n">request</span><span class="o">);</span>
+</pre></div>
+
+
+<p>Note that for such requests <a href="engines/metaxaengine.html">Metaxa</a> will still try to extract metadata of the parsed MS Word document, but all other engines will use the plain text version as parsed by the request for processing.</p>
+<h3 id="example-4-parse-existing-free-text-annotations">Example 4: Parse existing free text annotations</h3>
+<p>This example shows how the multi-part content item API can be used to parse already existing tags for an parsed content to the Stanbol Enhancer. For this example it is important to understand that parsed metadata need to confirm to the Stanbol Enhancement Structure. Because of that this example consist of two main steps:</p>
+<ol>
+<li>Convert user tags to <code>TextAnnotation</code>s</li>
+<li>Send existing Metadata along with the Content to the Stanbol Enhancer</li>
+</ol>
+<p>Also note that the code snippets will use utilities provided by the "org.apache.stannbol.enhancer.servicesapi" module. As RDF framework Apache Clerezza is used. Both dependencies are easily replaceable.</p>
+<p>First lets have a look at the required information</p>
+<div class="codehilite"><pre><span class="n">MGraph</span> <span class="n">graph</span><span class="o">;</span> <span class="c1">//the RDF graph to store the metadata</span>
+<span class="n">UriRef</span> <span class="n">ciUri</span><span class="o">;</span> <span class="c1">//the URI for the contentItem</span>
+<span class="n">String</span> <span class="n">tag</span><span class="o">;</span> <span class="c1">// user provided tag</span>
+<span class="n">UriRef</span> <span class="n">tagType</span><span class="o">;</span> <span class="c1">//the type of the Tag</span>
+</pre></div>
+
+
+<p>Regarding the tag type: Stanbol natively supports the following types </p>
+<ul>
+<li><strong>Person</strong> (http://dbpedia.org/ontology/Person)</li>
+<li><strong>Organization</strong> (http://dbpedia.org/ontology/Organisation): NOTE the British spelling</li>
+<li><strong>Place</strong> (http://dbpedia.org/ontology/Place)</li>
+</ul>
+<p>The processing of parsed tags that use other or no type depends on the used <a href="engines">enhancement engines</a> and their configurations. Especially the configuration of the <a href="engines/namedentitytaggingengine.html">Named Entity Tagging Engine</a> is important in that respect.</p>
+<div class="codehilite"><pre><span class="n">Resource</span> <span class="n">user</span><span class="o">;</span> <span class="c1">//the user that has created the tag (optional)</span>
+<span class="c1">//in case of an name just use a literal</span>
+<span class="n">user</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PlainLiteral</span><span class="o">(</span><span class="s">&quot;Rudolf Huber&quot;</span><span class="o">);</span>
+<span class="c1">//in case users have assigned URIs</span>
+<span class="n">user</span> <span class="o">=</span> <span class="k">new</span> <span class="n">UriRef</span><span class="o">(</span><span class="s">&quot;http://my.cms.org/users/rudof.huber&quot;</span><span class="o">);</span>
+</pre></div>
+
+
+<p>Now we can convert the User Tags to <code>TextAnnotation</code>s</p>
+<div class="codehilite"><pre><span class="c1">//first create a URI for the text annotation. Here we use a random URN</span>
+<span class="c1">//If you can create a meaningful URI this would be better!</span>
+<span class="n">UriRef</span> <span class="n">ta</span> <span class="o">=</span> <span class="k">new</span> <span class="n">UriRef</span><span class="o">(</span><span class="s">&quot;urn:user-annotation:&quot;</span><span class="o">+</span><span class="n">EnhancementEngineHelper</span><span class="o">.</span><span class="na">randomUUID</span><span class="o">());</span>
+<span class="c1">//The the &#39;rdf:type&#39;s</span>
+<span class="n">graph</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">TripleImpl</span><span class="o">(</span><span class="n">ta</span><span class="o">,</span> <span class="n">RDF</span><span class="o">.</span><span class="na">type</span><span class="o">,</span> <span class="n">TechnicalClasses</span><span class="o">.</span><span class="na">ENHANCER_TEXTANNOTATION</span><span class="o">));</span>
+<span class="n">graph</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">TripleImpl</span><span class="o">(</span><span class="n">ta</span><span class="o">,</span> <span class="n">RDF</span><span class="o">.</span><span class="na">type</span><span class="o">,</span> <span class="n">TechnicalClasses</span><span class="o">.</span><span class="na">ENHANCER_ENHANCEMENT</span><span class="o">));</span>
+
+<span class="c1">//this TextAnnotation is about the ContentItem</span>
+<span class="n">graph</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">TripleImpl</span><span class="o">(</span><span class="n">ta</span><span class="o">,</span> <span class="n">Properties</span><span class="o">.</span><span class="na">ENHANCER_EXTRACTED_FROM</span><span class="o">,</span> <span class="n">ciUri</span><span class="o">));</span>
+<span class="c1">//if the Tag uses a type add it</span>
+<span class="k">if</span><span class="o">(</span><span class="n">tagType</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">){</span>
+    <span class="n">graph</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">TripleImpl</span><span class="o">(</span><span class="n">ta</span><span class="o">,</span> <span class="n">Properties</span><span class="o">.</span><span class="na">DC_TYPE</span><span class="o">,</span> <span class="n">tagType</span><span class="o">));</span>
+<span class="o">}</span>
+<span class="c1">//add the value of the tag</span>
+<span class="n">graph</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">TripleImpl</span><span class="o">(</span><span class="n">ta</span><span class="o">,</span> <span class="n">Properties</span><span class="o">.</span><span class="na">ENHANCER_SELECTED_TEXT</span><span class="o">,</span> <span class="k">new</span> <span class="n">PlainLiteralImpl</span><span class="o">(</span><span class="n">tag</span><span class="o">)));</span>
+<span class="c1">//add the user</span>
+<span class="k">if</span><span class="o">(</span><span class="n">user</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">){</span>
+    <span class="n">graph</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">TripleImpl</span><span class="o">(</span><span class="n">ta</span><span class="o">,</span> <span class="n">Properties</span><span class="o">.</span><span class="na">DC_CREATOR</span><span class="o">,</span><span class="n">user</span><span class="o">));</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Now the 'graph' contains a valid <code>TextAnnotation</code> for the given user tag. This should be done for all tags of the current content.</p>
+<p>In the next step we need to serialize the RDF data. Again we will use here Clerezza as API, but any RDF framework will provide similar functionality</p>
+<div class="codehilite"><pre><span class="n">ByteArrayOutputStream</span> <span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ByteArrayOutputStream</span><span class="o">();</span>
+<span class="c1">//this tells the Serializer to create &quot;application/rdf+xml&quot;</span>
+<span class="n">serializer</span><span class="o">.</span><span class="na">serialize</span><span class="o">(</span><span class="n">out</span><span class="o">,</span> <span class="n">metadata</span><span class="o">,</span> <span class="n">SupportedFormat</span><span class="o">.</span><span class="na">RDF_XML</span><span class="o">);</span>
+<span class="n">String</span> <span class="n">rdfContent</span> <span class="o">=</span> <span class="k">new</span> <span class="n">String</span><span class="o">(</span><span class="n">out</span><span class="o">.</span><span class="na">toByteArray</span><span class="o">(),</span><span class="n">UTF8</span><span class="o">);</span>
+</pre></div>
+
+
+<p>Now we need to create the MultiPart MIME content item containing the metadata and the content</p>
+<div class="codehilite"><pre><span class="n">String</span> <span class="n">content</span><span class="o">;</span> <span class="c1">//the content we want to send to the Stanbol Enhancer</span>
+
+<span class="c1">//the container for the ContentITem</span>
+<span class="n">MultipartEntity</span> <span class="n">contentItem</span> <span class="o">=</span> <span class="k">new</span> <span class="n">MultipartEntity</span><span class="o">(</span><span class="kc">null</span><span class="o">,</span> <span class="kc">null</span> <span class="o">,</span><span class="n">UTF8</span><span class="o">);</span>
+
+<span class="c1">//The Metadata MUST BE the first element</span>
+<span class="n">contentItem</span><span class="o">.</span><span class="na">addPart</span><span class="o">(</span>
+    <span class="s">&quot;metadata&quot;</span><span class="o">,</span> <span class="c1">//the name MUST BE &quot;metadata&quot; </span>
+    <span class="k">new</span> <span class="nf">StringBody</span><span class="o">(</span><span class="n">rdfContent</span><span class="o">,</span><span class="n">SupportedFormat</span><span class="o">.</span><span class="na">RDF_XML</span><span class="o">,</span><span class="n">UTF8</span><span class="o">){</span>
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">String</span> <span class="nf">getFilename</span><span class="o">()</span> <span class="o">{</span> <span class="c1">//The filename MUST BE the</span>
+            <span class="k">return</span> <span class="n">ciUri</span><span class="o">.</span><span class="na">getUnicodeString</span><span class="o">();</span> <span class="c1">//uri of the ContentItem</span>
+        <span class="o">}</span>
+    <span class="o">});</span>
+</pre></div>
+
+
+<p>Note that because the <code>StringBody</code> class provided my the "httpmime" framework does not set a filename we need to override this method and return the URI of the content item. This is essential, because we need ensure that the URI of the <code>ContentItem</code> is the same as the URI (variable '<code>ciUri</code>') as used when creating the <code>TextAnnotation</code>s for the user tags.</p>
+<p>For the following code snippet note that we can directly add the content to the content item container. Only if we would need to sent multiple alternate content versions (as shown in 'Example 3') the usage of an <code>'multipart/alternate'</code> container is required.</p>
+<div class="codehilite"><pre><span class="c1">//Add the content as second mime part</span>
+<span class="n">contentItem</span><span class="o">.</span><span class="na">addPart</span><span class="o">(</span>
+    <span class="s">&quot;content&quot;</span><span class="o">,</span> <span class="c1">//the name MUST BE &quot;content&quot;</span>
+    <span class="k">new</span> <span class="nf">StringBody</span><span class="o">(</span><span class="n">content</span><span class="o">,</span><span class="s">&quot;text/plain&quot;</span><span class="o">,</span><span class="n">UTF8</span><span class="o">));</span>
+
+<span class="c1">//now we are ready to create and execute the POST request to the</span>
+<span class="c1">//Stanbol Enhancer</span>
+<span class="n">HttpPost</span> <span class="n">request</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HttpPost</span><span class="o">(</span><span class="s">&quot;http://localhost:8080/enhancer&quot;</span><span class="o">);</span>
+<span class="n">request</span><span class="o">.</span><span class="na">setEntity</span><span class="o">(</span><span class="n">contentItem</span><span class="o">);</span>
+<span class="n">request</span><span class="o">.</span><span class="na">setHeader</span><span class="o">(</span><span class="s">&quot;Accept&quot;</span><span class="o">,</span> <span class="n">SupportedFormat</span><span class="o">.</span><span class="na">RDF_XML</span><span class="o">);</span>
+<span class="n">Response</span> <span class="n">response</span> <span class="o">=</span> <span class="n">httpClient</span><span class="o">.</span><span class="na">execute</span><span class="o">(</span><span class="n">request</span><span class="o">);</span>
+</pre></div>
+
+
+<p>The response of the Enhancer will now contain entity suggestions for the free text user tags.</p>
+  </div>
+  
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2010 The Apache Software Foundation, Licensed under 
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache, Stanbol and the Apache feather and Stanbol logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+  
+</body>
+</html>