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/09/20 16:14:35 UTC

svn commit: r832567 [22/27] - in /websites/staging/stanbol/trunk/content: ./ css/ development/ docs/ docs/0.9.0-incubating/ docs/0.9.0-incubating/cmsadapter/ docs/0.9.0-incubating/contenthub/ docs/0.9.0-incubating/enhancer/ docs/0.9.0-incubating/enhanc...

Propchange: websites/staging/stanbol/trunk/content/docs/trunk/components/ontologymanager/ontonet/ontonet.png
------------------------------------------------------------------------------
    svn:executable = *

Propchange: websites/staging/stanbol/trunk/content/docs/trunk/components/ontologymanager/ontonet/ontonet.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/stanbol/trunk/content/docs/trunk/components/ontologymanager/registry/index.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/ontologymanager/registry/index.html (added)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/ontologymanager/registry/index.html Thu Sep 20 14:14:28 2012
@@ -0,0 +1,176 @@
+<!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 - Ontology Registry Manager</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"/>
+  <script type="text/javascript">
+    // Google Analytics Tracking Code
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-32086816-1']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+  </script>  
+</head>
+
+<body>
+  <div id="logo"> <!-- do not scroll the logo -->
+  <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></div>
+  <div id="navigation"> <!-- but auto scroll the menue -->
+      <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Getting Started</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a><ul>
+<li><a href="/stanbol/docs/trunk/scenarios.html">Usage Scenarios</a></li>
+<li><a href="/stanbol/docs/trunk/components">Components</a></li>
+</ul>
+</li>
+<li><a href="/stanbol/development/">Development</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>
+<li><a href="/stanbol/privacy-policy.html">Privacy Policy</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/downloads/">Overview</a><ul>
+<li><a href="/stanbol/downloads/releases.html">Releases</a></li>
+<li><a href="/stanbol/downloads/launchers.html">Launchers</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="archive">Archive</h1>
+<ul>
+<li><a href="/stanbol/docs/0.9.0-incubating/">0.9.0-incubating</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">
+    <div class="breadcrumbs">
+      <ul> <li><a href="/">Home</a></li> <li class="item"><a href="/docs/">Docs</a></li> <li class="item"><a href="/docs/trunk/">Trunk</a></li> <li class="item"><a href="/docs/trunk/components/">Components</a></li> <li class="item"><a href="/docs/trunk/components/ontologymanager/">Ontologymanager</a></li> <li class="item"><a href="/docs/trunk/components/ontologymanager/registry/">Registry</a></li> </ul>
+    </div>
+    <h1 class="title">Ontology Registry Manager</h1>
+    <p>Registry management is a facility for Stanbol <strong>administrators</strong> to pre-configure sets of ontologies that Stanbol should load and store, or simply be aware of, <em>before</em> they are included in a part of the ontology network (e.g. a scope or session). Via the registry manager, it is possible to configure whether these ontologies should be loaded immediately when Stanbol is initialized, or only when explicitly requested. The Ontology Registry Manager is essentially an ontology bookmarker with caching support. It is also possible to cache multiple versions of the same ontology if needed.</p>
+<h2 id="terminology">Terminology</h2>
+<ul>
+<li>A <strong>Library</strong> is a collection of references to ontologies, which can be located anywhere on the Web. CMS administrators and knowledge managers can create a library by any criterion, e.g. a library of all <em>W3C ontologies</em>, a library of all the ontologies that describe a <em>social network</em> (which can include <a href="http://sioc-project.org/ontology">SIOC</a>, <a href="http://xmlns.com/foaf/spec">FOAF</a> etc.), a library of <em>ontology alignments</em> (which includes ontologies that align DBPedia to Schema.org, GeoNames to DBPedia, or a custom product ontology to GoodRelations).</li>
+<li>A <strong>Registry</strong> is an RDF resource (i.e. an ontology itself) that describes one or more libraries. It is the physical object that has to be accessed to gain knowledge about libraries.</li>
+</ul>
+<h2 id="usage-scenarios">Usage Scenarios</h2>
+<p>Your CMS ca handle hundreds of vocabularies together for semantic annotation, but you do not want to clutter the system runtime by having all those vocabularies loaded altogether. You would like the ontology of a specific vocabulary to be loaded only when someone uses or requests it, and once it is loaded you would like it to be stored internally, rather than fetching it from the Web over and over again.</p>
+<p>The Ontology Registry Manager can help you with that. With a simple RDF document that references these hundreds of ontologies, it is possible to organize them into libraries, e.g. by topic ("user profile", "product", "event") or by provenance ("W3C", "Industrial standards", "nonstandard" etc.). If a user decides to annotate a content item using <code>schema.org</code>, she can choose to do so and the Registry Manager will automatically figure out that it is referenced by libraries "Industrial standards", "user profile" and "product"). None of these libraries has been preloaded yet, so Stanbol will automatically choose the smallest one, say "Industrial standards", and load it. The <code>schema.org</code> ontology will be available from that point on.</p>
+<h2 id="configuration">Configuration</h2>
+<p>Ontology registries (and, by extension, the libraries they reference) are configured by the Stanbol administrator via the Felix Web console. <em>Note that the following links assume Stanbol to be deployed on http://localhost:8080 .</em></p>
+<ol>
+<li>Go to the <a href="http://localhost:8080/system/console/configMgr">Felix console Configuration Manager</a> and select <strong>Apache Stanbol Ontology Registry Manager</strong> (or follow this <a href="http://localhost:8080/system/console/configMgr/org.apache.stanbol.ontologymanager.registry.impl.RegistryManagerImpl">direct link</a>)</li>
+<li>Under <strong>Registry locations</strong> you can add or remove the physical URIs of ontology registries, i.e. RDF resources that contain knowledge about ontology libraries.</li>
+<li>If you wish all the registry contents to be loaded altogether on startup, uncheck the <strong>lazy ontology loading</strong> box.</li>
+<li>You can select one <strong>Caching policy</strong> between Centralised (default) and Distributed. In <em>Centralised</em> caching, all the libraries that reference an ontology with the same URI will share the very same version of that ontology. In <em>Distributed</em> caching, each library will reference its own version of each ontology. Centralised caching is generally recommended, as distributed caching allows multi-version ontology management, but occupies much more storage space, depending on the amount of ontologies in common.</li>
+</ol>
+<h2 id="usage">Usage</h2>
+<h3 id="setup-an-ontology-registry">Setup an Ontology Registry</h3>
+<p>To create a Registry, you simply need to make an OWL ontology with certain types of axioms. See <a href="language">Registry Language</a> for examples on how to create a Registry and add Library instances to it. </p>
+<p>Then upload the ontology on the Web and add it to the <strong>Registry locations</strong> from the <a href="http://localhost:8080/system/console/configMgr/org.apache.stanbol.ontologymanager.registry.impl.RegistryManagerImpl">Felix console Configuration</a>.</p>
+<p>Note that not only can a single registry describe multiple libraries, but also multiple registries can describe the same library, each adding information on the ontologies referenced by it. Library descriptions are <em>monotonic</em>, in that registries can only <em>add</em> information about libraries, never <em>remove</em> any.</p>
+<h3 id="access-a-cached-ontology">Access a cached ontology</h3>
+<p>A cached ontology does not need to be loaded into an OntoNet scope or session in order to be available. It can be accessed at <code>@/ontonet/{ontologyURI}</code>, where <code>{ontologyURI}</code> can be either the ontology ID, if the ontology is named, of the physical URI it was retrieved from.</p>
+<h3 id="load-a-library-into-ontonet">Load a library into OntoNet</h3>
+<p>One useful application of ontology libraries is that they can be used to populate an OntoNet ontology collector (space or session) with multiple ontologies with a single command. There are two ways to do so.</p>
+<h4 id="java-api">Java API</h4>
+<p>The Registry Manager is an OSGi service component. To obtain the service reference:</p>
+<div class="codehilite"><pre><span class="nv">@Reference</span>
+<span class="n">RegistryManager</span> <span class="n">registryManager</span><span class="p">;</span>
+</pre></div>
+
+
+<p>Loading the contents of a library into an ontology collector is done in the same way as with loading single ontologies, i.e. by creating a suitable <code>OntologyInputSource</code>. This time, though, it is a special input source called <code>LibrarySource</code>. A <code>LibrarySource</code> creates a new blank ontology (or uses an existing one upon request) and appends all the contents of a library to it via <code>owl:imports</code> statements.</p>
+<p>Suppose we want to load the contents of a library called <code>http://stanbol.apache.org/ontologies/library/W3C_ontologies</code> into a scope called <code>AnnotationStandards</code> that already exists (so we'll have to use its custom space). First of all let us get a hold of the space:</p>
+<div class="codehilite"><pre><span class="nv">@Reference</span>
+<span class="n">ONManager</span> <span class="n">onManager</span><span class="p">;</span>
+
+<span class="n">OntologyScope</span> <span class="n">scope</span> <span class="o">=</span> <span class="n">onManager</span><span class="o">.</span><span class="n">getScopeRegistry</span><span class="p">()</span><span class="o">.</span><span class="n">getScope</span><span class="p">(</span><span class="s">&quot;AnnotationStandards&quot;</span><span class="p">);</span>
+<span class="n">OntologySpace</span> <span class="n">space</span> <span class="o">=</span> <span class="n">scope</span><span class="o">.</span><span class="n">getCustomSpace</span><span class="p">();</span>
+</pre></div>
+
+
+<p>Now create the <code>LibrarySource</code>:</p>
+<div class="codehilite"><pre><span class="x">IRI libraryID = IRI.create(&quot;http://stanbol.apache.org/ontologies/library/W3C_ontologies&quot;);</span>
+<span class="x">OntologyInputSource</span><span class="cp">&lt;?</span><span class="p">,</span><span class="cp">?&gt;</span><span class="x"> libSrc = new LibrarySource(libraryID, registryManager);</span>
+</pre></div>
+
+
+<p>Note that all <code>LibrarySource</code> constructors require that a <code>RegistryManager</code> be passed to them. This is because ontology input sources in general are not OSGi components and cannot trade service references.</p>
+<p>Also note that building a <code>LibrarySource</code> will cause the contents of the corresponding library to be loaded and stored into the ontology manager, assuming the <em>lazy loading policy</em> option is set and the library had not been loaded earlier. Creating library sources is one way to "touch" an ontology library and get the Registry Manager to load it.</p>
+<p>Finally, add the input source to the custom space. Simple as that:</p>
+<div class="codehilite"><pre><span class="n">space</span><span class="o">.</span><span class="n">addOntology</span><span class="p">(</span><span class="n">libSrc</span><span class="p">);</span>
+</pre></div>
+
+
+<p>Note that we called <code>addOntology()</code> although this resulted in adding multiple ontologies. This is because a <code>LibrarySource</code> "fools" OntoNet into thinking a single ontology is being loaded, i.e. the <em>root</em> ontology that depends on the library contents. It will still possible to access a single imported ontology, though.</p>
+<h4 id="rest-api">REST API</h4>
+<p>When using the REST API, an ontology library can be loaded into a scope the very moment the scope is created.</p>
+<p>To load the contents of library <code>http://stanbol.apache.org/ontologies/library/W3C_ontologies</code> into a <em>new</em> scope called <code>AnnotationStandards</code>:</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">PUT</span> <span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="sr">/ontonet/o</span><span class="n">ntology</span><span class="sr">/AnnotationStandards?corereg=http://stanbol.apache.org/o</span><span class="n">ntologies</span><span class="sr">/library/</span><span class="n">W3C_ontologies</span>
+</pre></div>
+
+
+<h3 id="load-selected-ontologies-from-library">Load selected ontologies from library</h3>
+<p>We are working on that. Stay tuned.</p>
+<h3 id="service-endpoints">Service Endpoints</h3>
+<p>Because the configuration of registries is a task for <strong>administrators</strong> and is performed through the Felix administration console, there are no RESTful services for modifying ontology registries. It is however possible to browse the known ontology <em>libraries</em>.</p>
+<ul>
+<li><a href="http://localhost:8080/ontonet/registry"><strong>Libraries</strong></a>. If called from a Web browser, shows a list of known ontology libraries, and for each of them the caching state and the number of referenced ontologies. <em>Note that this service does not provide information on the registries that describe these libraries; that is classified information for administrators.</em> This endpoint supports only GET with no parameters, and generates text/html only.</li>
+</ul>
+<hr />
+<p><em><a href="../">Back to Ontology Manager</a></em></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/docs/trunk/components/ontologymanager/registry/language.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/ontologymanager/registry/language.html (added)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/ontologymanager/registry/language.html Thu Sep 20 14:14:28 2012
@@ -0,0 +1,135 @@
+<!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 - Ontology Registry Language</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"/>
+  <script type="text/javascript">
+    // Google Analytics Tracking Code
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-32086816-1']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+  </script>  
+</head>
+
+<body>
+  <div id="logo"> <!-- do not scroll the logo -->
+  <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></div>
+  <div id="navigation"> <!-- but auto scroll the menue -->
+      <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Getting Started</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a><ul>
+<li><a href="/stanbol/docs/trunk/scenarios.html">Usage Scenarios</a></li>
+<li><a href="/stanbol/docs/trunk/components">Components</a></li>
+</ul>
+</li>
+<li><a href="/stanbol/development/">Development</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>
+<li><a href="/stanbol/privacy-policy.html">Privacy Policy</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/downloads/">Overview</a><ul>
+<li><a href="/stanbol/downloads/releases.html">Releases</a></li>
+<li><a href="/stanbol/downloads/launchers.html">Launchers</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="archive">Archive</h1>
+<ul>
+<li><a href="/stanbol/docs/0.9.0-incubating/">0.9.0-incubating</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">
+    <div class="breadcrumbs">
+      <ul> <li><a href="/">Home</a></li> <li class="item"><a href="/docs/">Docs</a></li> <li class="item"><a href="/docs/trunk/">Trunk</a></li> <li class="item"><a href="/docs/trunk/components/">Components</a></li> <li class="item"><a href="/docs/trunk/components/ontologymanager/">Ontologymanager</a></li> <li class="item"><a href="/docs/trunk/components/ontologymanager/registry/">Registry</a></li> </ul>
+    </div>
+    <h1 class="title">Ontology Registry Language</h1>
+    <p>To create an ontology registry, simply create an ontology and upload it somewhere on the Web. 
+Supported formats are RDF/XML, OWL/XML, Turtle, N3, Manchester OWL Syntax and OWL Functional Syntax. RDF/JSON and JSON-LD are not supported.</p>
+<p>The ontology must contain individuals of type <a href="http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#OntologyLibrary"><a href="http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#OntologyLibrary">http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#OntologyLibrary</a></a> (libraries) and/or <a href="http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#Ontology"><a href="http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#Ontology">http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#Ontology</a></a> (ontologies referenced by libraries). The URI that identifies an individual of type <tt>Ontology</tt> MUST be the (dereferenceable) physical location of the ontology document, no matter if it differs from the actual ontology ID (which is found out only after the ontology is laoded).</p>
+<p>Relations between libraries and ontologies are assertions on the properties <a href="http://www.ontologydesignpatterns.org/schemas/meta.owl#hasOntology"><a href="http://www.ontologydesignpatterns.org/schemas/meta.owl#hasOntology">http://www.ontologydesignpatterns.org/schemas/meta.owl#hasOntology</a></a> (with subject of type <tt>OntologyLibrary</tt> and object of type <tt>Ontology</tt>) and <a href="http://www.ontologydesignpatterns.org/schemas/meta.owl#isOntologyOf"><a href="http://www.ontologydesignpatterns.org/schemas/meta.owl#isOntologyOf">http://www.ontologydesignpatterns.org/schemas/meta.owl#isOntologyOf</a></a> (with inverted subject and object types). It does not matter which property you choose.</p>
+<h2 id="examples">Examples</h2>
+<p>Given the prefix mappings:</p>
+<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">meta:</span> <span class="sr">&lt;http://www.ontologydesignpatterns.org/schemas/meta.owl#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">owl:</span> <span class="sr">&lt;http://www.w3.org/2002/07/owl#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdf:</span> <span class="sr">&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdfs:</span> <span class="sr">&lt;http://www.w3.org/2000/01/rdf-schema#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="p">:</span> <span class="sr">&lt;http://www.example.org/ontologies/registries#&gt;</span> <span class="o">.</span>
+<span class="nv">@base</span> <span class="sr">&lt;http://www.example.org/ontologies/registries&gt;</span> <span class="o">.</span>
+</pre></div>
+
+
+<p>The following RDF code (in Turtle syntax) shows how to create an OWL individual for a library called <tt>SocialOntologies</tt> which contains the ontologies of <a href="http://sioc-project.org/ontology">SIOC</a> and <a href="http://trdf.sourceforge.net/provenance/ns.html">Provenance</a>.</p>
+<div class="codehilite"><pre><span class="p">:</span><span class="n">SocialOntologies</span> <span class="n">rdf:type</span> <span class="sr">&lt;http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#OntologyLibrary&gt;</span> <span class="p">;</span>
+          <span class="n">rdfs:label</span> <span class="s">&quot;Social Network Ontologies&quot;</span><span class="o">^^</span><span class="n">xsd:string</span> <span class="p">;</span>
+          <span class="n">meta:hasOntology</span> <span class="sr">&lt;http://rdfs.org/sioc/ns&gt;</span> <span class="p">;</span>
+          <span class="n">meta:hasOntology</span> <span class="sr">&lt;http://trdf.sourceforge.net/provenance/ns.rdf&gt;</span> <span class="o">.</span>
+</pre></div>
+
+
+<p>You can also specify Library-Ontology relations the other way around, by stating them in the OWL individual that represents the ontology.</p>
+<div class="codehilite"><pre><span class="sr">&lt;http://rdfs.org/sioc/ns&gt;</span> <span class="n">rdf:type</span> <span class="sr">&lt;http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#Ontology&gt;</span> <span class="p">;</span>
+          <span class="n">meta:isOntologyOf</span> <span class="p">:</span><span class="n">SocialOntologies</span> <span class="o">.</span>
+</pre></div>
+
+
+<hr />
+<p><em><a href="./">Back to Registry Manager</a></em></p>
+<p><em><a href="../">Back to Ontology Manager</a></em></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/docs/trunk/components/reasoner/index.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/reasoner/index.html (added)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/reasoner/index.html Thu Sep 20 14:14:28 2012
@@ -0,0 +1,352 @@
+<!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 - Apache Stanbol Reasoners</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"/>
+  <script type="text/javascript">
+    // Google Analytics Tracking Code
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-32086816-1']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+  </script>  
+</head>
+
+<body>
+  <div id="logo"> <!-- do not scroll the logo -->
+  <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></div>
+  <div id="navigation"> <!-- but auto scroll the menue -->
+      <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Getting Started</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a><ul>
+<li><a href="/stanbol/docs/trunk/scenarios.html">Usage Scenarios</a></li>
+<li><a href="/stanbol/docs/trunk/components">Components</a></li>
+</ul>
+</li>
+<li><a href="/stanbol/development/">Development</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>
+<li><a href="/stanbol/privacy-policy.html">Privacy Policy</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/downloads/">Overview</a><ul>
+<li><a href="/stanbol/downloads/releases.html">Releases</a></li>
+<li><a href="/stanbol/downloads/launchers.html">Launchers</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="archive">Archive</h1>
+<ul>
+<li><a href="/stanbol/docs/0.9.0-incubating/">0.9.0-incubating</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">
+    <div class="breadcrumbs">
+      <ul> <li><a href="/">Home</a></li> <li class="item"><a href="/docs/">Docs</a></li> <li class="item"><a href="/docs/trunk/">Trunk</a></li> <li class="item"><a href="/docs/trunk/components/">Components</a></li> <li class="item"><a href="/docs/trunk/components/reasoner/">Reasoner</a></li> </ul>
+    </div>
+    <h1 class="title">Apache Stanbol Reasoners</h1>
+    <p>The Stanbol Reasoners component provides a set of services that take advantage of automatic inference engines.</p>
+<p>The module implements a common api for reasoning services, providing the possibility to plug different reasoners and configurations in parallel.</p>
+<p>Actually the module includes <a href="http://owlapi.sourceforge.net/" target="_blank">OWLApi</a> and <a href="http://jena.sourceforge.net/" target="_blank">Jena</a> based abstract services, with concrete implementations for Jena RDFS, OWL, OWLMini and HermiT reasoning service.</p>
+<p>The Reasoners module expose a REST endpoint at the following location:</p>
+<div class="codehilite"><pre><span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="o">/</span><span class="n">reasoners</span>
+</pre></div>
+
+
+<p>with the following preloaded services:</p>
+<ul>
+<li><tt>/rdfs</tt>, which is based on Jena RDFS reasoner and supports almost all of the RDFS <a href="#ref1">[1]</a> entailments.</li>
+<li><tt>/owl</tt>, a Jena reasoner configured to support OWL <a href="#ref2">[2]</a> (with some limitations, <a href="#ref4">[4]</a>)</li>
+<li><tt>/owlmini</tt>, another Jena configuration that partially supports OWL (see <a href="#ref5">[5]</a>)</li>
+</ul>
+<p>In addition, it is also available a service which uses the HermiT <a href="#ref6">[6]</a> reasoner to exploit the full OWL 2 <a href="#ref3">[3]</a> specification.</p>
+<p>Each reasoner can be accessed with one of three tasks:</p>
+<ul>
+<li>check: to perform a consistency check. This service returns HTTP Status <tt>200</tt> if data is consistent, <tt>204</tt> otherwise (at the current state of implementation the service does not include an explanation about why the input is inconsistent. This feature is in our todo list, by the way)</li>
+<li>classify: to materialize all inferred <tt>rdf:type</tt> statements.</li>
+<li>enrich: to materialize all inferred statements.</li>
+</ul>
+<p>For example:</p>
+<div class="codehilite"><pre><span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="sr">/reasoners/o</span><span class="n">wl</span><span class="sr">/check /</span><span class="o">/</span> <span class="n">expose</span> <span class="n">the</span> <span class="n">Jena</span> <span class="n">owl</span> <span class="n">service</span> <span class="n">with</span> <span class="n">task</span> <span class="n">check</span><span class="p">,</span> <span class="ow">or</span>
+<span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="sr">/reasoners/o</span><span class="n">wl2</span><span class="sr">/classify /</span><span class="o">/</span> <span class="n">to</span> <span class="k">use</span> <span class="n">the</span> <span class="n">HermiT</span> <span class="n">service</span> <span class="n">with</span> <span class="n">task</span> <span class="n">classify</span>
+</pre></div>
+
+
+<p>We can use the curl command line utility to ask the Jena OWL reasoning service to materialize all inferences produced by loading the FOAF ontology:</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">H</span> <span class="s">&quot;Accept: text/n3&quot;</span> <span class="s">&quot;http://localhost:8080/stanbol/reasoners/owl/enrich?url=http://xmlns.com/foaf/0.1/&quot;</span>
+</pre></div>
+
+
+<p class="..">The above example performs a GET  asking for a <tt>text/n3</tt> representation of the result. For example, the equivalency of <tt>foaf:Agent</tt> and <tt>dc:Agent</tt> result in the <tt>rdfs:subClassOf</tt> statements for the <tt>foaf:Person</tt> type:
+<pre></p>
+<h2 id="differences-between-the-reasoners">Differences between the reasoners</h2>
+<p>Let's give some example on the differences between the available reasoners (to try the example ontology snippets you can download them from <a href="https://github.com/enridaga/reasoners.examples/tree/master/enridaga.reasoners.examples" target="_blank">here</a>).</p>
+<p>The first snippet uses rdfs:subClassOf to declare that any Article is a Document, which is in turn a ContentItem. 
+<pre>
+&lt;!-- item_1 is an Article --&gt;
+&lt;ex:Article rdf:about="http://www.example.org/reasoners/item_1"/&gt;</p>
+<p>&lt;!-- An article is a kind of Document --&gt;
+&lt;rdf:Description rdf:about="http://www.example.org/reasoners/Article"&gt;
+    &lt;rdfs:subClassOf rdf:resource="http://www.example.org/reasoners/Document"/&gt;
+&lt;/rdf:Description&gt;</p>
+<p>&lt;!-- An document is a kind of content item --&gt;
+&lt;rdf:Description rdf:about="http://www.example.org/reasoners/Document"&gt;
+    &lt;rdfs:subClassOf rdf:resource="http://www.example.org/reasoners/ContentItem"/&gt;
+&lt;/rdf:Description&gt;
+</pre>
+<a href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/rdfs/subclass.xml" target="_blank">download it</a></p>
+<p>Giving it to the /rdfs reasoning service, we obtain as resulted inferred statement that item_1 is also a Document and a ContentItem. Another feature of RDFS is the definition of the domain and range of a property.
+<pre style="overflow: auto">
+&lt;!-- Both enridaga and alexdma are authors of item_1 --&gt;
+&lt;rdf:Description rdf:about="http://www.example.org/reasoners/enridaga"&gt;
+    &lt;ex:author rdf:resource="http://www.example.org/reasoners/item_1"/&gt;
+&lt;/rdf:Description&gt;
+&lt;rdf:Description rdf:about="http://www.example.org/reasoners/alexdma"&gt;
+    &lt;ex:author rdf:resource="http://www.example.org/reasoners/item_1"/&gt;
+&lt;/rdf:Description&gt;</p>
+<p>&lt;!-- ex:author wants a person as subject, and a content-item as object --&gt;
+&lt;rdf:Description rdf:about="http://www.example.org/reasoners/author"&gt;
+    &lt;rdfs:domain rdf:resource="http://www.example.org/reasoners/Person"/&gt;
+    &lt;rdfs:range rdf:resource="http://www.example.org/reasoners/ContentItem"/&gt;
+&lt;/rdf:Description&gt;
+</pre>
+<a href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/rdfs/domain-range.xml" target="_blank">download it</a>
+We will obtain, in this case, that both <tt>enridaga</tt> and <tt>alexdma</tt> are <tt>Authors</tt>, and that <tt>item_1</tt> is a <tt>ContentItem</tt>. RDFS semantics is considered also by other reasoners. The <tt>/rdfs</tt> service is the less "expressive" of the four.</p>
+<p>The following snippet will work with <tt>/owl</tt>, <tt>/owlmini</tt> and <tt>/owl2</tt> (but not with <tt>/rdfs</tt>):
+<pre style="overflow: auto">
+&lt;!-- ogrisel, enridaga and alexdma are developers --&gt;
+&lt;ex:Developer rdf:about="#enridaga" /&gt;
+&lt;ex:Developer rdf:about="#ogrisel" /&gt;
+&lt;ex:Developer rdf:about="#alexdma" /&gt;</p>
+<p>&lt;!-- We know: #alexdma #workedTogheter #enridaga and #ogrisel --&gt;
+&lt;rdf:Description rdf:about="#alexdma"&gt;
+&lt;workedTogheter rdf:resource="#ogrisel"/&gt;
+&lt;workedTogheter rdf:resource="#enridaga"/&gt;
+&lt;/rdf:Description&gt;</p>
+<p>&lt;!-- #workedTogheter is an owl:SymmetricProperty (well, this is an example...) --&gt;
+&lt;owl:SymmetricProperty rdf:about="#workedTogheter"/&gt;
+&lt;!-- #workedTogheter is also a owl:TransitiveProperty (well, this is an example...) --&gt;
+&lt;owl:TransitiveProperty rdf:about="#workedTogheter"/&gt;
+</pre>
+<a href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/owlmini/symmetric.xml" target="_blank">download it</a>
+The OWL vocabulary introduce logical capabilities, allowing more complex inferences to be produced. In the above example we state that <tt>alexdma workedWith enridaga</tt> and <tt>ogrisel</tt>. Since we declare the property <tt>workedTogheter</tt> to be "Symmetric" and "Transitive", the result will include the following:
+<ul>
+<li><tt>enridaga workedWith alexdma</tt> (is symmetric)</li>
+<li><tt>ogrisel workedWith alexdma</tt></li>
+<li><tt>ogrisel workedWith enridaga</tt> (is transitive)</li>
+<li><tt>enridaga workedWith ogrisel</tt></li>
+</ul></p>
+<p>Next snippet is inconsistent. This means that the OWL based reasoners will not return any inference, but a 204 HTTP response:
+<pre style="overflow: auto">
+&lt;!-- enridaga is a person --&gt;
+&lt;ex:Person rdf:about="http://www.example.org/reasoners/enridaga" /&gt;</p>
+<p>&lt;!-- Persons and Organizations are disjoint --&gt;
+&lt;owl:Class rdf:about="http://www.example.org/reasoners/Person" /&gt;
+&lt;owl:Class rdf:about="http://www.example.org/reasoners/Organization"&gt;
+    &lt;owl:disjointWith rdf:resource="http://www.example.org/reasoners/Person" /&gt;
+&lt;/owl:Class&gt;</p>
+<p>&lt;!-- A Public Limited Company is a kind of Company, which is a kind of Organization --&gt;
+&lt;owl:Class rdf:about="http://www.example.org/reasoners/PublicLimitedCompany"&gt;
+    &lt;rdfs:subClassOf rdf:resource="http://www.example.org/reasoners/Company" /&gt;
+&lt;/owl:Class&gt;
+&lt;owl:Class rdf:about="http://www.example.org/reasoners/Company"&gt;
+    &lt;rdfs:subClassOf rdf:resource="http://www.example.org/reasoners/Organization" /&gt;
+&lt;/owl:Class&gt;</p>
+<p>&lt;!-- enridaga cannot be a Public Limited Company --&gt;
+&lt;ex:PublicLimitedCompany rdf:about="http://www.example.org/reasoners/enridaga" /&gt;
+</pre>
+<a href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/owlmini/inconsistent-types.xml" target="_blank">download it</a>
+The <tt>/owlmini</tt> implements the OWL language with some (more) limitations then <tt>/owl</tt> (both are based on the Jena rule based reasoner, as said before).</p>
+<p>The following example shows the use of class restrictions, in particular the usage of <tt>owl:someValuesFrom</tt>:
+<pre style="overflow: auto">
+&lt;!-- john, is an developer, but we don't know anything else --&gt;
+&lt;ex:Developer rdf:about="#john"&gt;
+&lt;/ex:Developer&gt;</p>
+<p>&lt;!-- a #SoftwareCompany is a kind of #Organization --&gt;
+&lt;owl:Class rdf:about="SoftwareCompany"&gt;
+    &lt;rdfs:subClassOf rdf:resource="#Organization" /&gt;
+&lt;/owl:Class&gt;</p>
+<p>&lt;!-- #Developers #worksAt some #SoftwareCompany (they are not the only one..., 
+    this is why we use owl:subClassOf) --&gt;
+&lt;owl:Class rdf:about="#Developer"&gt;
+    &lt;rdfs:subClassOf&gt;
+        &lt;owl:restriction&gt;
+            &lt;owl:onProperty rdf:resource="#worksAt" /&gt;
+            &lt;owl:someValuesFrom rdf:resource="#SoftwareCompany" /&gt;
+        &lt;/owl:restriction&gt;
+    &lt;/rdfs:subClassOf&gt;
+&lt;/owl:Class&gt;</p>
+<p>&lt;!-- Employees are all who #worksAt any kind of Organization (owl:equivalentClass) --&gt;
+&lt;owl:Class rdf:about="#Employee"&gt;
+    &lt;owl:equivalentClass&gt;
+        &lt;owl:restriction&gt;
+            &lt;owl:onProperty rdf:resource="#worksAt" /&gt;
+            &lt;owl:someValuesFrom rdf:resource="#Organization" /&gt;
+        &lt;/owl:restriction&gt;
+    &lt;/owl:equivalentClass&gt;
+&lt;/owl:Class&gt;
+</pre>
+<a href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/owl/some-values-from.xml" target="_blank">download it</a></p>
+<p>We expect an OWL reasoner to state that John is an <tt>Employee</tt>. This example does not work with <tt>/rdfs</tt> (it ignores the OWL semantics), and does not work with <tt>/owlmini</tt>, because the Jena OWL(mini) reasoner omits the forward entailments for <tt>owl:someValuesFrom restrictions</tt> (see <a href="#ref4">[4]</a>). It works correctly if we use the service <tt>/owl</tt>.</p>
+<p>The <tt>/owl</tt> service support the most of the semantic of OWL. The HermiT reasoner is based on <a href="http://owlapi.sourceforge.net/">OWLApi</a> and is an example of a DL reasoner. It fully covers OWL and OWL2, which introduces lot of interesting features. Here is an example:
+<pre style="overflow: auto">
+&lt;!-- any Employee must have some features: firstname, familyname, email 
+    and worksAt (in one of the allowed places) --&gt;
+&lt;owl:Class rdf:about="#Employee"&gt;
+    &lt;owl:equivalentClass&gt;
+        &lt;owl:Class&gt;
+            &lt;owl:intersectionOf rdf:parseType="Collection"&gt;
+                &lt;rdf:Description rdf:about="#Person" /&gt;
+                &lt;owl:Restriction&gt;
+                    &lt;owl:onProperty rdf:resource="#firstname" /&gt;
+                    &lt;owl:someValuesFrom rdf:resource="&amp;rdfs;Literal" /&gt;
+                &lt;/owl:Restriction&gt;
+                &lt;owl:Restriction&gt;
+                    &lt;owl:onProperty rdf:resource="#familyname" /&gt;
+                    &lt;owl:someValuesFrom rdf:resource="&amp;rdfs;Literal" /&gt;
+                &lt;/owl:Restriction&gt;
+                &lt;owl:Restriction&gt;
+                    &lt;owl:onProperty rdf:resource="#email" /&gt;
+                    &lt;owl:someValuesFrom rdf:resource="&amp;rdfs;Literal" /&gt;
+                &lt;/owl:Restriction&gt;
+                &lt;!-- --&gt;
+                &lt;!-- Let's say that Employees can work only in #Rome , #Catania and 
+                    #Bologna --&gt;
+                &lt;owl:Restriction&gt;
+                    &lt;owl:onProperty rdf:resource="#worksAt" /&gt;
+                    &lt;owl:someValuesFrom&gt;
+                        &lt;owl:Class&gt;
+                            &lt;owl:oneOf rdf:parseType="Collection"&gt;
+                                &lt;owl:Thing rdf:about="#Rome" /&gt;
+                                &lt;owl:Thing rdf:about="#Catania" /&gt;
+                                &lt;owl:Thing rdf:about="#Bologna" /&gt;
+                            &lt;/owl:oneOf&gt;
+                        &lt;/owl:Class&gt;
+                    &lt;/owl:someValuesFrom&gt;
+                &lt;/owl:Restriction&gt;
+            &lt;/owl:intersectionOf&gt;
+        &lt;/owl:Class&gt;
+    &lt;/owl:equivalentClass&gt;
+&lt;/owl:Class&gt;</p>
+<p>&lt;owl:DatatypeProperty rdf:about="#firstname" /&gt;
+&lt;owl:DatatypeProperty rdf:about="#familyname" /&gt;
+&lt;owl:DatatypeProperty rdf:about="#email" /&gt;</p>
+<p>&lt;!-- #worksAt has range #Place --&gt;
+&lt;owl:ObjectProperty rdf:about="#worksAt"&gt;
+    &lt;rdfs:range rdf:resource="#Place" /&gt;
+&lt;/owl:ObjectProperty&gt;</p>
+<p>&lt;!-- all the following places are distinct (no synonyms here) --&gt;
+&lt;owl:AllDifferent&gt;
+    &lt;owl:distinctMembers rdf:parseType="Collection"&gt;
+        &lt;owl:Thing rdf:about="#Rome" /&gt;
+        &lt;owl:Thing rdf:about="#Catania" /&gt;
+        &lt;owl:Thing rdf:about="#Bologna" /&gt;
+        &lt;owl:Thing rdf:about="#Moricone" /&gt;
+    &lt;/owl:distinctMembers&gt;
+&lt;/owl:AllDifferent&gt;</p>
+<p>&lt;!-- enridaga, to be an Employee, must fulfill the restrictions defined 
+    for the class #Employee. --&gt;
+&lt;Person rdf:about="#enridaga"&gt;
+    &lt;!-- If you comment one of the next 4 statement, you won't have #enridaga 
+        to result as #Employee. --&gt;
+    &lt;firstname&gt;Enrico&lt;/firstname&gt;
+    &lt;familyname&gt;Daga&lt;/familyname&gt;
+    &lt;email&gt;enridaga@example.org&lt;/email&gt;
+    &lt;worksAt rdf:resource="#Catania" /&gt;
+    &lt;!-- If you uncomment the two statements below you will obtain an inconsistency, 
+        because #Moricone is not an allowed place for developers --&gt;
+    &lt;!-- &lt;worksAt rdf:resource="#Moricone" /&gt; &lt;rdf:type rdf:resource="#Employee" 
+        /&gt; --&gt;
+&lt;/Person&gt;
+</pre>
+<a href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/owl2/class-restrictions-owl2.xml" target="_blank">download it</a></p>
+<p>The above differences depend on the semantic supported by the specific reasoner and from the implementation, which limit the power of the system in favour of a better efficiency (is the case of the <tt>/owlmini</tt> implementation of Jena, more efficient then the respective <tt>/owl</tt>). If you need to work with RDFS semantic, and don't need OWL for your inferences, just use the RDFS one.</p>
+<h2 id="build-and-install">Build and install</h2>
+<p>Run Stanbol, for example:</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">java</span> <span class="o">-</span><span class="n">jar</span> <span class="o">-</span><span class="n">Xmx1g</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">stanbol</span><span class="o">.</span><span class="n">launchers</span><span class="o">.</span><span class="n">full</span><span class="o">-</span><span class="mf">0.9.0</span><span class="o">-</span><span class="n">incubating</span><span class="o">-</span><span class="n">SNAPSHOT</span><span class="o">.</span><span class="n">jar</span>
+</pre></div>
+
+
+<p>You must have the Ontonet and Rules modules already installed (they are if you have followed the above example).
+Move to the <tt>/reasoners</tt> directory, then run</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">mvn</span> <span class="n">install</span> <span class="o">-</span><span class="n">PinstallBundle</span> <span class="o">-</span><span class="n">Dsling</span><span class="o">.</span><span class="n">url</span><span class="o">=&amp;</span><span class="ow">lt</span><span class="p">;</span><span class="n">the</span> <span class="n">path</span> <span class="n">to</span> <span class="n">your</span> <span class="n">running</span> <span class="n">Felix</span> <span class="n">administration</span> <span class="n">console</span><span class="o">&amp;</span><span class="ow">gt</span><span class="p">;</span>
+</pre></div>
+
+
+<p>for example</p>
+<p>% mvn install -PinstallBundle http://localhost:8080/system/console</p>
+<h3 id="add-the-hermit-reasoner">Add the HermiT reasoner</h3>
+<p>To enable HermiT as OWL2 reasoner you can download and install it from the Stanbol (Incubating) svn repository. The steps are the following:</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">svn</span> <span class="n">co</span> <span class="n">https:</span><span class="sr">//s</span><span class="n">vn</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">org</span><span class="sr">/repos/</span><span class="n">asf</span><span class="sr">/incubator/s</span><span class="n">tanbol</span><span class="sr">/trunk/</span><span class="n">reasoners</span><span class="o">/</span><span class="n">hermit</span> <span class="n">stanbol</span><span class="o">-</span><span class="n">hermit</span>
+<span class="nv">$</span> <span class="nv">cd</span> <span class="n">stanbol</span><span class="o">-</span><span class="n">hermit</span>
+<span class="nv">$</span> <span class="nv">mvn</span> <span class="n">install</span> <span class="o">-</span><span class="n">PinstallBundle</span> <span class="o">-</span><span class="n">Dsling</span><span class="o">.</span><span class="n">url</span><span class="o">=</span><span class="n">http:</span><span class="sr">//</span><span class="n">localhost:8080</span><span class="sr">/system/co</span><span class="n">nsole</span> <span class="sr">//</span> <span class="n">change</span> <span class="n">this</span> <span class="n">to</span> <span class="n">the</span> <span class="n">path</span> <span class="n">related</span> <span class="n">to</span> <span class="n">your</span> <span class="n">Stanbol</span> <span class="n">instance</span>
+</pre></div>
+
+
+<h2 id="references">References:</h2>
+<ul>
+<li>[1] <a name="ref1" href="http://www.w3.org/TR/rdf-schema/" target="_blank">RDFS</a></li></li>
+<li>[2] <a name="ref2" href="http://www.w3.org/TR/owl-features/" target="_blank">OWL</a></li></li>
+<li>[3] <a name="ref3" href="http://www.w3.org/TR/owl2-overview/" target="_blank">OWL 2</a></li></li>
+<li>[4] <a name="ref4" href="http://jena.sourceforge.net/inference/" target="_blank">Jena inference support</a></li></li>
+<li>[5] <a name="ref5" href="http://jena.sourceforge.net/inference/#OWLnotes" target="_blank">Jena OWL notes</a></li></li>
+<li>[6] <a name="ref6" href="http://hermit-reasoner.com/" target="_blank">HermiT</a></li>
+</ul>
+<hr />
+<p><em><a href="components.html">Back to components</a></em></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/docs/trunk/components/rules/index.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/rules/index.html (added)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/rules/index.html Thu Sep 20 14:14:28 2012
@@ -0,0 +1,155 @@
+<!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 - Rules</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"/>
+  <script type="text/javascript">
+    // Google Analytics Tracking Code
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-32086816-1']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+  </script>  
+</head>
+
+<body>
+  <div id="logo"> <!-- do not scroll the logo -->
+  <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></div>
+  <div id="navigation"> <!-- but auto scroll the menue -->
+      <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Getting Started</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a><ul>
+<li><a href="/stanbol/docs/trunk/scenarios.html">Usage Scenarios</a></li>
+<li><a href="/stanbol/docs/trunk/components">Components</a></li>
+</ul>
+</li>
+<li><a href="/stanbol/development/">Development</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>
+<li><a href="/stanbol/privacy-policy.html">Privacy Policy</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/downloads/">Overview</a><ul>
+<li><a href="/stanbol/downloads/releases.html">Releases</a></li>
+<li><a href="/stanbol/downloads/launchers.html">Launchers</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="archive">Archive</h1>
+<ul>
+<li><a href="/stanbol/docs/0.9.0-incubating/">0.9.0-incubating</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">
+    <div class="breadcrumbs">
+      <ul> <li><a href="/">Home</a></li> <li class="item"><a href="/docs/">Docs</a></li> <li class="item"><a href="/docs/trunk/">Trunk</a></li> <li class="item"><a href="/docs/trunk/components/">Components</a></li> <li class="item"><a href="/docs/trunk/components/rules/">Rules</a></li> </ul>
+    </div>
+    <h1 class="title">Rules</h1>
+    <p>Stanbol Rules is a component that supports the construction and execution of inference rules. An <strong>inference rule</strong>, or transformation rule, is a syntactic rule or function which takes premises and returns a conclusion. Stanbol Rules allows to add a layer for expressing business logics by means of axioms, which encode the inference rules. These axioms can be organized into a container called <strong>recipe</strong>, which identifies a set of rules that share the same business logic and interpret them as a whole.</p>
+<h2 id="usage-scenarios">Usage Scenarios</h2>
+<h3 id="integrity-check-from-data-fusion">Integrity check from data fusion</h3>
+<p>With Stanbol Rules the administrator can define integrity checks for data fetched from heterogeneous and external sources in order to prevent unwanted formats or inconsistent data. 
+In such a way the administrator is able to configure the CMS in order filter knowledge retrieved in Linked Data, e.g., via the <a href="enhancer.html">Enhancer</a>, that satisfies some integrity driven constraint. The constraint can be defined by means of Stanbol Rules.
+For instance in a CMS which collects core knowledge about musicians it might possible to define integrity check rules which keep only entities that are typed as Musicians in DBpedia <a href="#dbpedia">[5]</a> and have an associated image, a birth place and the instrument played.
+Any other entity not satisfying the constraints is discarded. <br />
+</p>
+<h3 id="vocabulary-harmonization">Vocabulary harmonization</h3>
+<p>Supposing we want to use some dataset in Linked
+Data as external knowledge bases for a generic CMS enhanced with Stanbol. 
+Now the problem how to use data from those datasets expressed with some external 
+and heterogeneous vocabularies or ontologies within the CMS has. 
+Furthermore the CMS has its own way to formalize knowledge, namely the its 
+Ontology Network managed by <a href="../ontologymanager/ontonet/">Stanbol OntoNet</a>.
+The solution is provided by Refactor which allows to interpret the rules of
+inference as refactoring rules in order harmonize external data to the Stanbol's ontologies.</p>
+<p>Also, Stanbol Rules can be used to derive new knowledge or integrate information 
+from different semantically enhanced contents.</p>
+<h2 id="features">Features</h2>
+<p>Stanbol allows to provide rules to other component, i.e., Stanbol Reasoners, or to third parties in three different formats.</p>
+<ul>
+<li><strong>SWRL</strong> <a href="#swrl">[1]</a>. The Semantic Web Rule Language (SWRL) is a rule language which combines OWL DL with the Unary/Binary Datalog RuleML sublanguages of the Rule Markup Language and enables enables Horn-like rules to be combined with an OWL knowledge base. Providing Stanbol Rules as SWRL rules means that they can be interpreted in classical DL reasoning. That allows, for inantace, to use Stanbol Rules with any of the OWL 2 reasoners configured in the <a href="../reasoner/">Stanbol Reasoners component</a>; </li>
+<li><strong>Jena Rules</strong> <a href="#jena">[2]</a>. It enables compatibility with inference engines based on Jena inference and rule language. Internally, the <a href="../reasoner/">Stanbol Reasoner component</a> provides a reasoning profile based on Jena inference;</li>
+<li><strong>SPARQL</strong> <a href="#sparql">[3]</a>. SPARQL is a W3C recommendation as a query language for RDF. A natural way to represent inference transformation rules in SPARQL is by using the CONSTRUCT query form. Stanbl Rules can be converted to SPARQL CONSTRUCTs and executed by any SPARQL engine. Stanbol provides a particular SPARQL engine, namely the <a href="refactor.html">Refactor</a> which is supposed to perform transformation of RDF graphs based on transformation rules defined in Stanbol. The latter allows, for instance, the vocabulary harmonization of RDF graphs retrieved from different sources in Linked Data <a href="#linkeddata">[4]</a>.</li>
+</ul>
+<p>The rule pattern used for representing rules is the <em>modus ponens</em>, e.g. <strong><em>if</em></strong> <em>condition</em> <strong><em>then</em></strong> <em>consequent</em> . For example the axiom <em>"every person has a father"</em> can be expressed with
+the modus ponens in the following way:</p>
+<p><center>
+<strong>if</strong> X is a person <strong>then</strong> X has a father
+</center></p>
+<p>and by means of predicate calculus as:</p>
+<p><center>
+&forall;x&exist;y.Person(x) &rArr; hasFather(x, y)
+</center></p>
+<p>where Person and hasF ather are two predicates.</p>
+<p>The Stanbol Rules component allows to add a layer which enables Stanbol to express business logics by means of axioms, i.e., rules. These axioms can be organized into a container called Recipe, which groups and identifies set of rules which share the same business logic and interprets them as a whole.</p>
+<h3 id="sub-components">Sub-Components</h3>
+<ul>
+<li><a href="language.html">Rule language</a>     - specifies the syntax used in Stanbol in order to represent rules. Stanbol rules can be as SWRL, Jema rules or SPARQL CONSTRUCT;</li>
+<li><a href="store.html">Rule Store</a>     - allows to rules persistence. Rules in set called <strong>recipies</strong>, which are designed to aggregate rules by their functionality;</li>
+<li><a href="refactor.html">Refactor</a>     - performs RDF graphs transformations to specific target vocabularies or ontologies by means of rules. This allows the harmonization and the alignment of RDF graphs expressed with different vocabularies, e.g., DBpedia, schema.org etc...  <br />
+</li>
+</ul>
+<h2 id="references">References</h2>
+<p>[1] <a name="swrl" href="http://www.w3.org/Submission/SWRL/" target="_blank">SWRL</a> <br/>
+[2] <a name="jena" href="http://jena.sourceforge.net/inference/#rules" target="_blank">Jena Rules</a><br/>
+[3] <a name="sparql" href="http://www.w3.org/TR/rdf-sparql-query/" target="_blank">SPARQL</a><br/>
+[4] <a name="linkeddata" href="http://linkeddata.org/" target="_blank">Linked Data</a><br/>
+[5] <a name="linkeddata" href="http://dbpedia.org/About" target="_blank">DBpedia</a><br/></p>
+<hr />
+<p><em><a href="components.html">Back to components</a></em></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/docs/trunk/components/rules/language.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/rules/language.html (added)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/rules/language.html Thu Sep 20 14:14:28 2012
@@ -0,0 +1,153 @@
+<!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 Rule Language</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"/>
+  <script type="text/javascript">
+    // Google Analytics Tracking Code
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-32086816-1']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+  </script>  
+</head>
+
+<body>
+  <div id="logo"> <!-- do not scroll the logo -->
+  <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></div>
+  <div id="navigation"> <!-- but auto scroll the menue -->
+      <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Getting Started</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a><ul>
+<li><a href="/stanbol/docs/trunk/scenarios.html">Usage Scenarios</a></li>
+<li><a href="/stanbol/docs/trunk/components">Components</a></li>
+</ul>
+</li>
+<li><a href="/stanbol/development/">Development</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>
+<li><a href="/stanbol/privacy-policy.html">Privacy Policy</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/downloads/">Overview</a><ul>
+<li><a href="/stanbol/downloads/releases.html">Releases</a></li>
+<li><a href="/stanbol/downloads/launchers.html">Launchers</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="archive">Archive</h1>
+<ul>
+<li><a href="/stanbol/docs/0.9.0-incubating/">0.9.0-incubating</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">
+    <div class="breadcrumbs">
+      <ul> <li><a href="/">Home</a></li> <li class="item"><a href="/docs/">Docs</a></li> <li class="item"><a href="/docs/trunk/">Trunk</a></li> <li class="item"><a href="/docs/trunk/components/">Components</a></li> <li class="item"><a href="/docs/trunk/components/rules/">Rules</a></li> </ul>
+    </div>
+    <h1 class="title">Stanbol Rule Language</h1>
+    <h2 id="example">Example</h2>
+<p>The following is a rule, called <code>uncleRule</code>, for inferring the relation <code>hasUncle</code> between individuals <code>x</code> and <code>y</code> if <code>z</code> is a parent of <code>x</code> and <code>z</code> is brother of <code>y</code>.</p>
+<p>In <strong>Stanbol Rule</strong> syntax it is:</p>
+<div class="codehilite"><pre><span class="n">uncleRule</span><span class="p">[</span><span class="n">has</span><span class="p">(</span><span class="sr">&lt;http://www.foo.org/myont.owl#hasParent&gt;</span><span class="p">,</span> <span class="p">?</span><span class="n">x</span><span class="p">,</span> <span class="p">?</span><span class="n">z</span><span class="p">)</span> <span class="o">.</span>
+          <span class="n">has</span><span class="p">(</span><span class="sr">&lt;http://www.foo.org/myont.owl#hasSibling&gt;</span><span class="p">,</span> <span class="p">?</span><span class="n">z</span><span class="p">,</span> <span class="p">?</span><span class="n">y</span><span class="p">)</span>
+             <span class="o">-&gt;</span>
+          <span class="n">has</span><span class="p">(</span><span class="sr">&lt;http://www.foo.org/myont.owl#hasUncle&gt;</span><span class="p">,</span> <span class="p">?</span><span class="n">x</span><span class="p">,</span> <span class="p">?</span><span class="n">y</span><span class="p">)</span>
+<span class="p">]</span>
+</pre></div>
+
+
+<p>The rule above becomes the following <strong>SWRL</strong> rule:</p>
+<div class="codehilite"><pre><span class="nt">&lt;swrl:Variable</span> <span class="na">rdf:ID=</span><span class="s">&quot;x&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;swrl:Variable</span> <span class="na">rdf:ID=</span><span class="s">&quot;z&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;swrl:Variable</span> <span class="na">rdf:ID=</span><span class="s">&quot;y&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;ruleml:Imp&gt;</span> 
+   <span class="nt">&lt;ruleml:body</span> <span class="na">rdf:parseType=</span><span class="s">&quot;Collection&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;swrl:IndividualPropertyAtom&gt;</span> 
+          <span class="nt">&lt;swrl:propertyPredicate</span> <span class="na">rdf:resource=</span><span class="s">&quot;&amp;eg;hasParent&quot;</span><span class="nt">/&gt;</span> 
+          <span class="nt">&lt;swrl:argument1</span> <span class="na">rdf:resource=</span><span class="s">&quot;#x&quot;</span> <span class="nt">/&gt;</span>
+          <span class="nt">&lt;swrl:argument2</span> <span class="na">rdf:resource=</span><span class="s">&quot;#z&quot;</span> <span class="nt">/&gt;</span>
+      <span class="nt">&lt;/swrl:IndividualPropertyAtom&gt;</span>
+      <span class="nt">&lt;swrl:IndividualPropertyAtom&gt;</span> 
+          <span class="nt">&lt;swrl:propertyPredicate</span> <span class="na">rdf:resource=</span><span class="s">&quot;&amp;eg;hasSibling&quot;</span><span class="nt">/&gt;</span> 
+          <span class="nt">&lt;swrl:argument1</span> <span class="na">rdf:resource=</span><span class="s">&quot;#z&quot;</span> <span class="nt">/&gt;</span>
+          <span class="nt">&lt;swrl:argument2</span> <span class="na">rdf:resource=</span><span class="s">&quot;#y&quot;</span> <span class="nt">/&gt;</span>
+      <span class="nt">&lt;/swrl:IndividualPropertyAtom&gt;</span>
+   <span class="nt">&lt;/ruleml:body&gt;</span>
+   <span class="nt">&lt;ruleml:head</span> <span class="na">rdf:parseType=</span><span class="s">&quot;Collection&quot;</span><span class="nt">&gt;</span> 
+      <span class="nt">&lt;swrl:IndividualPropertyAtom&gt;</span> 
+          <span class="nt">&lt;swrl:propertyPredicate</span> <span class="na">rdf:resource=</span><span class="s">&quot;&amp;eg;hasUncle&quot;</span><span class="nt">/&gt;</span> 
+          <span class="nt">&lt;swrl:argument1</span> <span class="na">rdf:resource=</span><span class="s">&quot;#x&quot;</span> <span class="nt">/&gt;</span>
+          <span class="nt">&lt;swrl:argument2</span> <span class="na">rdf:resource=</span><span class="s">&quot;#y&quot;</span> <span class="nt">/&gt;</span>
+      <span class="nt">&lt;/swrl:IndividualPropertyAtom&gt;</span>
+   <span class="nt">&lt;/ruleml:head&gt;</span> 
+<span class="nt">&lt;/ruleml:Imp&gt;</span>
+</pre></div>
+
+
+<p>or the following <strong>SPARQL CONSTRUCT</strong> statement:</p>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">myont:</span> <span class="sr">&lt;http://www.foo.org/myont.owl#&gt;</span>
+
+<span class="n">CONSTRUCT</span> <span class="p">{</span> <span class="p">?</span><span class="n">x</span> <span class="n">myont:hasUncle</span> <span class="p">?</span><span class="n">y</span> <span class="p">}</span>
+<span class="n">WHERE</span> <span class="p">{</span> <span class="p">?</span><span class="n">x</span> <span class="n">myont:hasParent</span> <span class="p">?</span><span class="n">z</span> <span class="o">.</span> 
+        <span class="p">?</span><span class="n">z</span> <span class="n">myont:hasSibling</span> <span class="p">?</span><span class="n">y</span><span class="p">}</span>
+</pre></div>
+
+
+<hr />
+<p><em><a href="../rules.html">Back to Rules</a></em> </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/docs/trunk/components/rules/refactor.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/rules/refactor.html (added)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/rules/refactor.html Thu Sep 20 14:14:28 2012
@@ -0,0 +1,217 @@
+<!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 - Refactor</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"/>
+  <script type="text/javascript">
+    // Google Analytics Tracking Code
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-32086816-1']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+  </script>  
+</head>
+
+<body>
+  <div id="logo"> <!-- do not scroll the logo -->
+  <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></div>
+  <div id="navigation"> <!-- but auto scroll the menue -->
+      <h1 id="stanbol">Stanbol</h1>
+<ul>
+<li><a href="/stanbol/index.html">Home</a></li>
+<li><a href="/stanbol/docs/trunk/tutorial.html">Getting Started</a></li>
+<li><a href="/stanbol/docs/trunk/">Documentation</a><ul>
+<li><a href="/stanbol/docs/trunk/scenarios.html">Usage Scenarios</a></li>
+<li><a href="/stanbol/docs/trunk/components">Components</a></li>
+</ul>
+</li>
+<li><a href="/stanbol/development/">Development</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>
+<li><a href="/stanbol/privacy-policy.html">Privacy Policy</a></li>
+</ul>
+<h1 id="downloads">Downloads</h1>
+<ul>
+<li><a href="/stanbol/downloads/">Overview</a><ul>
+<li><a href="/stanbol/downloads/releases.html">Releases</a></li>
+<li><a href="/stanbol/downloads/launchers.html">Launchers</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="archive">Archive</h1>
+<ul>
+<li><a href="/stanbol/docs/0.9.0-incubating/">0.9.0-incubating</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">
+    <div class="breadcrumbs">
+      <ul> <li><a href="/">Home</a></li> <li class="item"><a href="/docs/">Docs</a></li> <li class="item"><a href="/docs/trunk/">Trunk</a></li> <li class="item"><a href="/docs/trunk/components/">Components</a></li> <li class="item"><a href="/docs/trunk/components/rules/">Rules</a></li> </ul>
+    </div>
+    <h1 class="title">Refactor</h1>
+    <p>The Refactor is a service which allows to interpret rules in order to perform refactoring of RDF graphs. For the refactoring the set of rules in the recipes are interpreted and run as SPARQL CONTRUCT in which the where clause is derived from the body of the rule and the construct clause is derived from the head of the rule. The output of a refactoring is a transformed graph which satisfies the constraints expressed in the rules. The refactoring in useful for tasks of semantic harmonization of RDF graphs expressed with different ontologies/vocabularies towards their representation with a single ontology or vocagulary. The output of a refactoring is a transformed graph which satisfies the constraints expressed in the rules. </p>
+<h2 id="terminology">Terminology</h2>
+<ul>
+<li>A <strong>Recipe</strong> is a set of rules defined according to a specific task. Rules are written in a specific syntax, and can then be executed for refactoring (as SPARQL queries) or through reasoning services.</li>
+<li><strong>Refactoring</strong> is the task aimed to perform the transformation of RDF graphs. The transformation is driven by refactoring rules, basically Stanbol Rules interpreted as SPARQL CONSTRUCT clauses.</li>
+<li><strong>Reasoning</strong> is the activity of interpreting axioms for inferring new knowledge, classifying, checking the consistency of an ontology, etc...</li>
+</ul>
+<h2 id="usage-scenarios">Usage Scenarios</h2>
+<h3 id="vocabulary-harmonization">Vocabulary harmonization</h3>
+<p>Supposing we want to use some dataset in Linked
+Data as external knowledge bases for a generic CMS enhanced with Stanbol. 
+Now the problem how to use data from those datasets expressed with some 
+external and heterogeneous vocabularies or ontologies within the CMS has. 
+Furthermore the CMS has its own way to formalize knowledge, namely the 
+its Ontology Network managed by <a href="../ontologymanager/ontonet.html">Stanbol OntoNet</a>.
+The solution is provided by Refactor which allows to interpret the rules of
+inference as refactoring rules in order harmonize external data to the
+Stanbol's ontologies. Figure 1 gives a very quick idea about how the CMS can 
+benefit from the Refactor showing how external data can be aligned and used within the CMS.</p>
+<p><center>
+<figure>
+<img width="500px" src="refactor.png" alt="Vocabulary harmonization via Stanbol Refactor">
+<figcaption>Figure 1: the refactor is used to align external data to the ontologies used in a generic CMS enhanced with Stanbol.</figcaption>
+<figure>
+</center></p>
+<p>We can specify a concrete scenario for a better understanding of the
+Refactor. Suppose we have configured the CMS (i.e. <a href="../entityhub/">Stanbol EntityHub</a>) in order
+to fetch entities about persons from DBpedia. Now we want to represent these
+entities adopting the vocabulary from schema.org and produce
+schema.org Rich Snippets in order to provide search engine
+optimization capabilities to the CMS. What we need to do is to write a recipe and call
+the Refactor via HTTP REST passing to it the recipe itself and the entities we
+have fetched from Linked Data.</p>
+<h2 id="features">Features</h2>
+<p>In the Refactor rules are interpreted as <a href="http://www.w3.org/TR/rdf-sparql-query/#construct">SPARQL CONSTRUCT</a> queries in which
+the premises (the left part before the arrow in the rule) are the WHERE clause, while the conclusion (the right part after the arrow in the rule) is
+translated into the construct template, i.e., triple patterns in conjunctive form. </p>
+<p>As an example, we can take in account the following rule:</p>
+<div class="codehilite"><pre><span class="n">prefix</span> <span class="n">kn</span> <span class="o">=</span> <span class="sr">&lt;http://foo.org/kinship#&gt;</span> <span class="o">.</span> 
+<span class="n">uncleRule</span><span class="p">[</span> <span class="n">has</span><span class="p">(</span><span class="n">kn:parent</span><span class="p">,</span> <span class="p">?</span><span class="n">x</span><span class="p">,</span> <span class="p">?</span><span class="n">y</span><span class="p">)</span> <span class="o">.</span> <span class="n">has</span><span class="p">(</span><span class="n">kn:sibling</span><span class="p">,</span> <span class="p">?</span><span class="n">y</span><span class="p">,</span> <span class="p">?</span><span class="n">z</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">has</span><span class="p">(</span><span class="n">kn:uncle</span><span class="p">,</span> <span class="p">?</span><span class="n">x</span><span class="p">,</span> <span class="p">?</span><span class="n">z</span><span class="p">)</span> <span class="p">]</span>
+</pre></div>
+
+
+<p>The rule above is transformed into the following SPARQL CONSTRUCT query:</p>
+<div class="codehilite"><pre><span class="n">PREFIX</span> <span class="n">kn:</span> <span class="sr">&lt;http://foo.org/kinship#&gt;</span>
+<span class="n">CONSTRUCT</span> <span class="p">{</span> <span class="p">?</span><span class="n">x</span> <span class="n">kn:uncle</span> <span class="p">?</span><span class="n">z</span> <span class="p">}</span>
+<span class="n">WHERE</span> <span class="p">{</span> 
+    <span class="p">?</span><span class="n">x</span> <span class="n">kn:parent</span> <span class="p">?</span><span class="n">y</span> <span class="o">.</span>
+    <span class="p">?</span><span class="n">y</span> <span class="n">kn:sibling</span> <span class="p">?</span><span class="n">z</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>The SPARQL engines used internally by the Refactor for running rules is <a href="http://incubator.apache.org/jena/documentation/query/">Apache Jena ARQ</a></p>
+<p>We remand any detail about the syntax and the expressivity of the Stanbole Rule language to its <a href="./language.html">section</a>.<br />
+</p>
+<h2 id="service-endpoints">Service Endpoints</h2>
+<p>The Refactor RESTful API is structured as follows:
+<em>(Please note, that the following links to the actual service endpoint link to a running instance of Apache Stanbol. If you use other domains or ports than "localhost:8080", then please change accordingly)</em></p>
+<h3 id="refactor-engine-refactor">Refactor Engine ("/refactor"):</h3>
+<ul>
+<li>The Refactor Engine <strong>@/refactor</strong> performs a refactoring applying an existing recipe in the rule store to the provided RDF graph. </li>
+</ul>
+<p>The request should be done as it follows:</p>
+<ul>
+<li>Method: GET</li>
+<li>Parameters:<ul>
+<li>input-graph: the ID of RDF graph in the triplestore provided as input</li>
+<li>output-graph: the ID of RDF graph in the triplestore in which we want to store the result.</li>
+<li>recipe: the ID of the recipe in the rule store</li>
+</ul>
+</li>
+</ul>
+<p>Example:</p>
+<div class="codehilite"><pre>curl -G -X GET <span class="se">\</span>
+-d input-graph<span class="o">=</span>stored_graph -d <span class="nv">recipe</span><span class="o">=</span>myTestRecipeA -d output-graph<span class="o">=</span>result_graph <span class="se">\</span>
+http://localhost:8080/refactor
+</pre></div>
+
+
+<h3 id="refactor-engine-refactorapply">Refactor Engine ("/refactor/apply"):</h3>
+<ul>
+<li>Refactor Engine <strong>@/refactor/apply</strong> performs a refactoring applying an recipe as string to the provided RDF graph as input source.</li>
+</ul>
+<p>The request should be done as it follows:</p>
+<ul>
+<li>Method: POST</li>
+<li>Parameters:<ul>
+<li>recipe: the ID of the recipe (MANDATORY)</li>
+<li>input: the RDF graph to which the refactoring has to be applied. The graph has to be provided as a binary file (MANDATORY)</li>
+</ul>
+</li>
+<li>Accepts:<ul>
+<li>application/rdf+xml</li>
+<li>text/html</li>
+<li>text/plain</li>
+<li>application/owl+xml</li>
+<li>text/owl-functional</li>
+<li>text/owl-manchester</li>
+<li>application/rdf+json,</li>
+<li>text/turle</li>
+</ul>
+</li>
+</ul>
+<p>Example:</p>
+<div class="codehilite"><pre>curl -X POST -H <span class="s2">&quot;Content-type: multipart/form-data&quot;</span> <span class="se">\</span>
+-H <span class="s2">&quot;Accept: application/rdf+json&quot;</span> <span class="se">\</span>
+-F <span class="nv">recipe</span><span class="o">=</span>recipeTestA -F <span class="nv">input</span><span class="o">=</span>@graph.rdf <span class="se">\</span>
+http://localhost:8080/refactor/apply
+</pre></div>
+
+
+<hr />
+<p><em><a href=".">Back to Stanbol Rules</a></em></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/docs/trunk/components/rules/refactor.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/stanbol/trunk/content/docs/trunk/components/rules/refactor.png
------------------------------------------------------------------------------
    svn:mime-type = image/png