[Pellet-users] Strange Pellet behaviour with getIndividuals

Robert Davey robert.davey at bbsrc.ac.uk
Fri May 9 09:11:06 UTC 2008


Hi Gustavo,

The only "updating" method that I can see on the Reasoner is the
refresh() method, and that reloads the ontology from scratch, which I
don't really want to do.

I thought the reference to the OWLOntologyManager in the Reasoner should
track any ontology changes and allow the reasoner to update accordingly?

Cheers

Rob

On Thu, 2008-05-08 at 18:40 -0300, Gustavo Enrique Salazar Torres wrote:
> Hi Robert
> Perhaps you should update the reasoner's knowledge base.
> 
> Best Regards
> 
> On Thu, May 8, 2008 at 1:37 PM, Robert Davey
> <robert.davey at bbsrc.ac.uk> wrote:
>         Hi all,
>         
>         I really don't know if this is just me, but I'm having trouble
>         getting
>         some individuals out of the Pizza ontology [1].
>         
>         I'm adding an individual for each of the NamedPizzas in a
>         simple loop...
>         
>         <snip>
>         OWLClass pizzaClass =
>         factory.getOWLClass(URI.create("http://www.co-ode.org/ontologies/pizza/pizza.owl#NamedPizza"));
>         int count = 0;
>         for (OWLSubClassAxiom sca :
>         ontology.getSubClassAxiomsForRHS(pizzaClass))
>         {
>            count++;
>            OWLIndividual individual =
>         dataFactory.getOWLIndividual(ontology.getURI().toString()+count));
>            owlOntologyManager.applyChange(new AddAxiom(ontology,
>         dataFactory.getOWLClassAssertionAxiom(individual,
>         (OWLClass)sca.getSubClass())));
>         }
>         </snip>
>         
>         I load the ontology into Pellet prior to adding the
>         individuals, but I
>         understand that shouldn't make any difference with the way the
>         OWLOntologyManager stuff should work.  I then try and get all
>         the
>         individuals using:
>         
>         reasoner.getIndividuals();
>         
>         However, it only outputs the 5 Country individuals that are
>         already
>         asserted in the Pizza ontology.  There should be 23 more
>         individuals,
>         one for each NamedPizza subclass.
>         
>         If I use:
>         
>         ontology.getReferencedIndividuals()
>         
>         I can see all the individuals correctly.
>         
>         Bear in mind that I have a bit of an old bunch of Pellet jars
>         built from
>         SVN, and I can't get to the new SVN versions.
>         
>         Am I being daft?
>         
>         Cheers
>         
>         Rob
>         
>         [1]
>         http://www.co-ode.org/ontologies/pizza/2007/02/12/pizza.owl
>         
>         --
>         ---------------------------------------
>         Dr. Rob Davey
>         NCYC / Institute of Food Research
>         Computational Biology / John Innes Centre
>         Norwich Research Park
>         Norwich, Norfolk, NR4 7HU
>         
>         http://www.comparagrid.org/
>         http://cbr.jic.ac.uk/dicks/
>         ---------------------------------------
>         
>         _______________________________________________
>         Pellet-users mailing list
>         Pellet-users at lists.owldl.com
>         http://lists.owldl.com/mailman/listinfo/pellet-users
>         _______________________________________________
>         
>         Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
> 
> 
> 
> -- 
> Gustavo Salazar Torres
> MSc.(C) in Computer Science
> IME-USP
> http://www.ime.usp.br/~gsalazar
> ---------------------------------
> "En la sencillez de mi corazon te he dado todo con alegría" Mons.
> Luigi Giussani
-- 
---------------------------------------
Dr. Rob Davey
NCYC / Institute of Food Research
Computational Biology / John Innes Centre
Norwich Research Park
Norwich, Norfolk, NR4 7HU

http://www.comparagrid.org/
http://cbr.jic.ac.uk/dicks/
---------------------------------------



More information about the Pellet-users mailing list