[Pellet-users] Get individuals of 2 ontologies
Catarina Ferreira Da Silva
cferreir at bat710.univ-lyon1.fr
Wed Oct 31 12:42:29 UTC 2007
Dear Pellet experts,
I am using Pellet-1.5-1. I want to load 2 ontologies and then get the inferred and asserted individuals of both of them.
Please find the ontologies at [1] and [2]. The ontology e1-DOF.owl states an equivalentProperty between the property "PA1-B1" of this ontology
and the property "Pe2" of the ontology e2-DOF.owl. The code I use to get the individuals [3] is based on the iteration of the file
IndividualsExample.java that comes with the Pellet release examples.
I use the method loadOntologies instead of loadOntology. Then I iterate
over individuals of each one of the ontologies separately.
Question 1) How could I iterate over the "setOfOntologies" instead? I
did not find a method for doing this in the javadoc.
Regarding the results, I get all the individuals as instances of the
classes of the ontology e2-DOF.owl, /i.e./ of the classes e2-211 and
e2-111. The output follows:
-------------
Instances inferred from ontology file:/...//tests-e1-e2//e1-DOF.owl
Instance: e2-211_ie2-2
Type: e2-211
Instance: B1_i1
Type: e2-211
Instances inferred from ontology file:/...//tests-e1-e2//e2-DOF.owl
Instance: e2-211_ie2-2
Type: e2-211
Instance: B1_i1
Type: e2-211
Instance: e2-111_ie2-1
Type: e2-111
Instance: A1_i1
Type: e2-111
--------------
This is fine and I think it results from having an equivalentProperty,
which connects roles from both ontologies. However, I would like the
individuals of the ontology e1-DOF.owl, /i.e./ "A1_i1" and "B1_i1", to
be also associated to their own classes (/i.e./ "A1" and "A2"
respectively). In other words, I would like to get asserted and inferred
types of the individuals.
Question 2) Does the method
getIndividuals(org.semanticweb.owl.model.OWLDescription clsC, boolean
direct) enable to get the inferred instances only?
Question 3) If the answer to the previous question is yes, how can I get
the asserted instances also? If the answer to the previous question is
no, why do I not get the asserted type of the individuals "A1_i1" and
"B1_i1"?
I'll be very grateful for your help.
Catarina Ferreira Da Silva
[1]
http://liris.cnrs.fr/catarina.ferreira.da.silva/tests-e1-e2/output/e1-DOF.owl
[2]
http://liris.cnrs.fr/catarina.ferreira.da.silva/tests-e1-e2/output/e2-DOF.owl
[3]
http://liris.cnrs.fr/catarina.ferreira.da.silva/tests-e1-e2/GetIndividualsInSetOfOntologies.java
More information about the Pellet-users
mailing list