Author: alexdma
Date: Wed Jan 18 13:57:38 2012
New Revision: 1232883

URL: http://svn.apache.org/viewvc?rev=1232883&view=rev
Log:
STANBOL-461 : OntoNet input sources section

Modified:
    
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.mdtext

Modified: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.mdtext
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.mdtext?rev=1232883&r1=1232882&r2=1232883&view=diff
==============================================================================
--- 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.mdtext
 (original)
+++ 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/ontologymanager/ontonet.mdtext
 Wed Jan 18 13:57:38 2012
@@ -4,9 +4,9 @@ Title: Ontology Network Manager (OntoNet
 
 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:
 
-* 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.
+* __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.
 
-* 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).
+* __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).
 
 * 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.
 
@@ -39,6 +39,25 @@ First and foremost let us obtain referen
 In a non-OSGi environment they must be instantiated as POJOs (Plain Old Java 
Objects):
 
     TODO
+    
+#### Managing an ontology scope.
+
+#### Ontology input sources.
+
+Note that when you add an ontology to a space or session, you pass it an 
`OntologyInputSource` object, or more precisely, an `OntologyInputSource<O,P>`. 
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 
__Ontology input source__ 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.
+
+* __`OWLOntology` input sources__ comply with the OWL API specification <a 
href="#ref1">[1]</a> and creates objects of type `OWLOntology` stored in an 
_in-memory_ `OWLOntologyManager`. It will be stored persistently once added to 
an ontology network.
+** `RootOntologySource`. Wraps an already existing `OWLOntology`, therefore it 
does not provide a physical IRI.
+** `RootOntologyIRISource`. Tries to locate and load an ontology, and its 
imports, from a given IRI. It can use a custom `OWLOntologyManager` as a store, 
and can even override any mappers, in order to force-dereference the IRI.
+** `ParentPathInputSource`. Tries to load an ontology from a root `File`, and 
will seek its imports among the files in the same directory as the root `File`. 
It also allows a custom `OWLOntologyManager` as a store.
+Loads the ontology source codeWraps an already existing `OWLOntology`, 
therefore it does not provide a physical IRI.
+** `BlankOntologySource`. Creates an `OWLOntology` 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 
`BlankOntologySource` has a distinct blank ontology object, and they are _not_ 
equal! This means that the following statement is false:
+    
+    new BlankOntologySource().getRootOntology().equals(new 
BlankOntologySource().getRootOntology());
+    
+* __`TripleCollection` input sources__ comply with the Apache Clerezza API 
specification, which is also the default native implementation of OntoNet. The 
resulting ontology is a subtype of `TripleCollection` (`Graph` or `MGraph`) and 
uses a `TcProvider` 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 `TripleCollection` can be exported as an 
`OWLOntology` afterwards, once stored.
+** `GraphContentInputSource`. Creates a `TripleCollection` by reading an input 
stream, which can be obtained from a file, URL etc. It can use any `TcProvider` 
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 
`TcProvider` is the `TcManager` used by Stanbol, its triples are not copied 
across.
+** `GraphSource`. Wraps an existing `TripleCollection` object. In general, it 
does not 'know' where the ontology was stored.
 
 ### Service Endpoints
 
@@ -46,16 +65,20 @@ The OntoNet RESTful API is structured as
 
 _(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)_
 
-### Scopes ("/ontonet/ontology")
+#### Scopes ("/ontonet/ontology")
 * The endpoint @ [/ontonet/ontology](http://localhost:8080/ontonet/ontology) 
shows an overview (as an RDF graph or HTML document) of all registered ontology 
scopes.
 * An Ontology Scope @ /ontonet/ontology/{scopeId} provides the 
de-referenceable OWL form of the ontology scope _scopeId_, inclusive of OWL 
import statements for the spaces and ontologies therein.
 
-### Sessions ("/ontonet/session")
+#### Sessions ("/ontonet/session")
 * The endpoint @ [/ontonet/session](http://localhost:8080/ontonet/session) 
shows an overview (as an RDF graph or HTML document) of all open OntoNet 
sessions.
 * A Session @ /ontonet/session/{sessionId} provides the de-referenceable OWL 
form of the OntoNet Session _sessionId_, inclusive of OWL import statements for 
the ontologies therein.
 
-### Managed Ontologies ("ontonet/{ontologyId}")
-* A Managed Ontology @ /ontonet/{ontologyId}, where _ontologyId_ 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.
+#### Managed Ontologies ("ontonet/{ontologyId}")
+* A Managed Ontology @ /ontonet/{ontologyId}, where _ontologyId_ 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).
+
+## References:
+
+* [1] <a name="ref1" href="http://owlapi.sourceforge.net"; target="_blank">OWL 
API</a></li>
 
 ____
 _[Back to Ontology Manager](../ontologymanager.html)_
\ No newline at end of file


Reply via email to