Hi Steve,
Thank you for your interest. It seems I should probably add more input
to the docs.
I can see how one can create a RegistryOntology from an OWLNamedIndividual,
and one can create a Library similarly, and presumably then use
Library#addChild to add one or more ontologies to the library.
You are most likely not going to need the Java API in order to configure
your libraries. You can use the Felix console for most of it.
A Registry is itself an ontology. It can reference one or more
libraries, each identified by an IRI, and more registries can reference
different libraries or add ontologies to the same library.
An example is the unit test resource at
http://svn.apache.org/repos/asf/incubator/stanbol/trunk/ontologymanager/registry/src/test/resources/ontologies/registry/onmtest.owl
or the first stub of "IKS default ontologies" registry at
http://svn.apache.org/repos/asf/incubator/stanbol/trunk/ontologymanager/registry/src/main/resources/ontologies/registry/iksnetwork.owl
But I'm struggling with the usage of Registry; how do I create this and add
my Library? Presumably I need to do this and then use the
RegistryManager#addRegistry(Registry) to register my ontologies
After creating such an RDF document, you have to put it online so as to
have a physical IRI. In my TODO list, you will also be able to provide
the file in a bundle so that the Data file provider will load it.
Then go to the Stanbol Felix configuration console, open the Ontology
Registry Manager configuration and add the physical location of the
Registry.
The internal model for the registry (addChild() and everything) will be
created by itself. If you keep the default configuration (i.e. lazy
loading), the ontologies referenced by the registry will *not* be loaded
until you "touch" a library.
Overall the use case is to use a LibrarySource to load several ontologies
into a space's core scope.
This is when you "touch" the library indeed, and where you could use the
Java API.
the registry manager is an OSGi service component (you have to supply it
because library sources are not components):
@Reference
RegistryManager registryManager;
new LibrarySource(libraryIRI, registryManager)
Now all the referenced ontologies are loaded (using the Clerezza
ontology provider from OntoNet) and appended to a new root ontology. You
can then feed this source to a space or session.
The ontologies loaded from a library will be loaded using the same
storage backend as OntoNet (by default, the Clerezza one), whereas the
model of libraries is in-memory OWL API stuff (but should always be
reasonably small).
Is there anything here that triggered a thought in your head like "but
why can't I just do that with a simple line of code such as _____" ? We
can work with that I suppose.
Perhaps I can help you shape your registry. How is the knowledge base
you'd like to structure into libraries organised?
All the best,
Alessandro
--
M.Sc. Alessandro Adamou
Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy
Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy
"As for the charges against me, I am unconcerned. I am beyond their timid, lying
morality, and so I am beyond caring."
(Col. Walter E. Kurtz)
Not sent from my iSnobTechDevice