Author: buildbot
Date: Wed Jan 18 13:57:44 2012
New Revision: 802871
Log:
Staging update by buildbot for stanbol
Modified:
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.html
Modified:
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.html
==============================================================================
---
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.html
(original)
+++
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.html
Wed Jan 18 13:57:44 2012
@@ -61,10 +61,10 @@
<p>Stanbol OntoNet implements the API section for managing OWL and OWL2
ontologies, in order to prepare them for consumption by reasoning services,
refactorers, rule engines and the like. Ontology management in OntoNet is
sparse and not connected: once loaded internally from their remote locations,
ontologies live and are known within the realm they were loaded in. This allows
loose-coupling and (de-)activation of ontologies in order to scale the data
sets for reasoners to process and optimize them for efficiency. The following
concepts have been introduced with OntoNet:</p>
<ul>
<li>
-<p>Ontology scope: a "logical realm" for all the ontologies that encompass a
certain CMS-related set of concepts (such as "User", "ACL", "Event", "Content",
"Domain", "Reengineering", "Community", "Travelling" etc.). Scopes never
inherit from each other, though they can load the same ontologies if need
be.</p>
+<p><strong>Ontology scope</strong>: a "logical realm" for all the ontologies
that encompass a certain CMS-related set of concepts (such as "User", "ACL",
"Event", "Content", "Domain", "Reengineering", "Community", "Travelling" etc.).
Scopes never inherit from each other, though they can load the same ontologies
if need be.</p>
</li>
<li>
-<p>Ontology space: an access-restricted container for synchronized access to
ontologies within a scope. The ontologies in a scope are loaded within its set
of spaces. An ontology scope contains: (a) one core space, which contains the
immutable set of essential ontologies that describe the scope; (b) one
(possibly empty) custom space, which extends the core space according to
specific CMS needs (e.g. the core space for the User scope may contains
alignments to FOAF).</p>
+<p><strong>Ontology space</strong>: an access-restricted container for
synchronized access to ontologies within a scope. The ontologies in a scope are
loaded within its set of spaces. An ontology scope contains: (a) one core
space, which contains the immutable set of essential ontologies that describe
the scope; (b) one (possibly empty) custom space, which extends the core space
according to specific CMS needs (e.g. the core space for the User scope may
contains alignments to FOAF).</p>
</li>
<li>
<p>Session: a container of (supposedly volatile) semantic data which need to
be intercrossed with one or more Scopes, for stateful management of ontology
networks. It can be used to load instances and reason on them using different
models (one per scope). An OntoNet Session is not equivalent to an HTTP session
(since it can live persistently across multiple HTTP sessions), although its
behaviour can reflect the one of the HTTP session that created it, if required
by the implementation.</p>
@@ -101,22 +101,45 @@
</pre></div>
+<h4 id="managing_an_ontology_scope">Managing an ontology scope.</h4>
+<h4 id="ontology_input_sources">Ontology input sources.</h4>
+<p>Note that when you add an ontology to a space or session, you pass it an
<code>OntologyInputSource</code> object, or more precisely, an
<code>OntologyInputSource<O,P></code>. This is because there can be
several ways to obtain an ontology, and those most common are supported in
Stanbol. For example, it can be obtained by defererencing a IRI and parsing its
source code (in RDF/XML, Turtle, etc.), or by reading an input stream, or
taking an already stored RDF graph in the Stanbol store; or it could be an
ontology Java object created from scratch. An <strong>Ontology input
source</strong> is an object that incorporates (1) the "method" by which an
ontology should be accessed; (2) the type of Java object it should create to
represent an ontology; (3) where it should store the ontology.</p>
+<ul>
+<li>
+<p><strong><code>OWLOntology</code> input sources</strong> comply with the OWL
API specification <a href="#ref1">[1]</a> and creates objects of type
<code>OWLOntology</code> stored in an <em>in-memory</em>
<code>OWLOntologyManager</code>. It will be stored persistently once added to
an ontology network.
+<strong> <code>RootOntologySource</code>. Wraps an already existing
<code>OWLOntology</code>, therefore it does not provide a physical IRI.
+</strong> <code>RootOntologyIRISource</code>. Tries to locate and load an
ontology, and its imports, from a given IRI. It can use a custom
<code>OWLOntologyManager</code> as a store, and can even override any mappers,
in order to force-dereference the IRI.
+<strong> <code>ParentPathInputSource</code>. Tries to load an ontology from a
root <code>File</code>, and will seek its imports among the files in the same
directory as the root <code>File</code>. It also allows a custom
<code>OWLOntologyManager</code> as a store.
+Loads the ontology source codeWraps an already existing
<code>OWLOntology</code>, therefore it does not provide a physical IRI.
+</strong> <code>BlankOntologySource</code>. Creates an
<code>OWLOntology</code> with no ID and no axioms. It can be useful for
supplying dummy ontologies to methods that will not admit a null ontology. Note
that the blank ontology is not shared: each <code>BlankOntologySource</code>
has a distinct blank ontology object, and they are <em>not</em> equal! This
means that the following statement is false:</p>
+<p>new BlankOntologySource().getRootOntology().equals(new
BlankOntologySource().getRootOntology());</p>
+</li>
+<li>
+<p><strong><code>TripleCollection</code> input sources</strong> comply with
the Apache Clerezza API specification, which is also the default native
implementation of OntoNet. The resulting ontology is a subtype of
<code>TripleCollection</code> (<code>Graph</code> or <code>MGraph</code>) and
uses a <code>TcProvider</code> as a store. Depending on the chosen Stanbol
storage, it can be pesistent or in-memory. Generally, these input sources take
less memory that OWL API counterparts, but do not allow RDF graphs to be
managed using the OWL language constructs. Note that any
<code>TripleCollection</code> can be exported as an <code>OWLOntology</code>
afterwards, once stored.
+<strong> <code>GraphContentInputSource</code>. Creates a
<code>TripleCollection</code> by reading an input stream, which can be obtained
from a file, URL etc. It can use any <code>TcProvider</code> as a store,
otherwise it will create an in-memory triple collection, which will be copied
to the Stanbol store when adding the ontology to a network. If this
<code>TcProvider</code> is the <code>TcManager</code> used by Stanbol, its
triples are not copied across.
+</strong> <code>GraphSource</code>. Wraps an existing
<code>TripleCollection</code> object. In general, it does not 'know' where the
ontology was stored.</p>
+</li>
+</ul>
<h3 id="service_endpoints">Service Endpoints</h3>
<p>The OntoNet RESTful API is structured as follows:</p>
<p><em>(Please note, that the following links to the actual service endpoints
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="scopes_ontonetontology">Scopes ("/ontonet/ontology")</h3>
+<h4 id="scopes_ontonetontology">Scopes ("/ontonet/ontology")</h4>
<ul>
<li>The endpoint @ <a
href="http://localhost:8080/ontonet/ontology">/ontonet/ontology</a> shows an
overview (as an RDF graph or HTML document) of all registered ontology
scopes.</li>
<li>An Ontology Scope @ /ontonet/ontology/{scopeId} provides the
de-referenceable OWL form of the ontology scope <em>scopeId</em>, inclusive of
OWL import statements for the spaces and ontologies therein.</li>
</ul>
-<h3 id="sessions_ontonetsession">Sessions ("/ontonet/session")</h3>
+<h4 id="sessions_ontonetsession">Sessions ("/ontonet/session")</h4>
<ul>
<li>The endpoint @ <a
href="http://localhost:8080/ontonet/session">/ontonet/session</a> shows an
overview (as an RDF graph or HTML document) of all open OntoNet sessions.</li>
<li>A Session @ /ontonet/session/{sessionId} provides the de-referenceable OWL
form of the OntoNet Session <em>sessionId</em>, inclusive of OWL import
statements for the ontologies therein.</li>
</ul>
-<h3 id="managed_ontologies_ontonetontologyid">Managed Ontologies
("ontonet/{ontologyId}")</h3>
+<h4 id="managed_ontologies_ontonetontologyid">Managed Ontologies
("ontonet/{ontologyId}")</h4>
+<ul>
+<li>A Managed Ontology @ /ontonet/{ontologyId}, where <em>ontologyId</em> is
the full logical IRI that identifies the ontology, provides the RDF form of the
ontology with that ID, if that ontology has been stored and is managed by
OntoNet (i.e. is in some scope or session).</li>
+</ul>
+<h2 id="references">References:</h2>
<ul>
-<li>A Managed Ontology @ /ontonet/{ontologyId}, where <em>ontologyId</em> is
the full logical IRI that identifies the ontology, provides the RDF form of the
ontology with that ID, if that ontology has been stored and is managed by
OntoNet.</li>
+<li>[1] <a name="ref1" href="http://owlapi.sourceforge.net"
target="_blank">OWL API</a></li></li>
</ul>
<hr />
<p><em><a href="../ontologymanager.html">Back to Ontology Manager</a></em></p>