[Pellet-users] OWL API Reasoner and OWLOntologyManager
Swanson, Tim
tim.swanson at semanticarts.com
Tue Feb 26 20:18:33 UTC 2008
> -----Original Message-----
> From: Evren Sirin [mailto:evren at clarkparsia.com]
> Sent: Tuesday, February 26, 2008 6:23 AM
>
> On 2/26/08 1:39 AM, Swanson, Tim wrote:
> >
> > I'm not sure whether this is a Pellet question or an OWL API
> question.
> > I think it's a Pellet question, so I'm going to ask here first.
> >
>
> I think this is a question for both Pellet and OWL API and I can
answer
> it from Pellet's point-of-view.
> >
> >
> > The Pellet implementation of the OWL API reasoner classes
> > (org.mindswap.pellet.owlapi.Reasoner) takes an OWLOntologyManager as
> a
> > constructor argument and has a getManager() method. (As far as I can
> > tell, the method isn't required by any of the OWL API interfaces.)
> >
>
> Not explicitly but the design of OWLAPI requires you to have the
> manager
> for couple of reasons. One reason is to get the imports of an
ontology.
> The ontology object itself only gives you the imported URIs not
> ontology
> objects and if you'd like the reasoner to load imports automatically
> you
> need to provide the manager for that ontology.
>
Ok. I wasn't aware that Pellet did load imported ontologies
automatically.
Does that mean that, in Pellet's case, code like the following is
unnecessary?
(from the OWL API example code #8)
OWLOntology ontology = // get ontology
OWLReasoner pellet = // get Pellet reasoner
pellet.loadOntologies(manager.getImportsClosure(ontology));
If I'm taking your meaning correctly, then the above should be
equivalent to:
pellet.loadOntologies(Collections.singleton(ontology));
(as long as the manager in Pellet matches the manager used to get the
imports closure)
>
> The other reason is
> conversion from Pellet representation (ATerms) to OWLAPI objects
> requires a OWLDataFactory that is given by a manager. You will see
that
> many (maybe all?) other reasoner implementations require a manager in
> the constructor.
>
Of course. That should have occurred to me.
> >
> > Why does the reasoner have the OWLOntologyManager object?
> > Specifically, what happens if I try to load an ontology into the
> > reasoner that is not managed by that manager? (i.e.
> > reasoner.getManager.getOntologies().contains(ontology) returns
> false.)
> >
>
> The only implication would be that imported ontologies would not be
> loaded automatically.
>
So they wouldn't be loaded automatically, but it's also not an error?
I think a lot of my confusion arises out of a lack of understanding
about
the relationship between OWLOntology objects and OWLOntologyManagers
that
manage them. I'll probably follow up on the OWL API list about those
issues.
For my purposes, can I assume that the call:
manager.getImportsClosure(ontology);
will be made when a new ontology is loaded into the OWLReasoner object?
Thanks for the help,
Tim Swanson
Semantic Arts, Inc.
Fort Collins, Colorado
More information about the Pellet-users
mailing list