Hi there 

SITUATION

-- A

I am working with ontology L (denoted as Ontology_input_file in Code below) 
with URI:
http://www.b-l.net/ontologies/2016/L_Ontology.owl#


-- B

This ontology imports an ontology PS with URI:
http://www.b-l.net/ontologies/2016/PS_Ontology.owl#

Note that I have added a number of indivuduals to L, as individuals of classes 
coming from import ontology PS. I.e. these individuals have L's URI but are of 
types defined in PS.

PROBLEM

In order to get the complete list of individuals I use the following code:

OntModel model = ModelFactory.createOntologyModel();
model.read(Ontology_input_file);

ExtendedIterator individuals = model.listIndividuals();
while (individuals.hasNext()) {
Individual thisIndividual = (Individual) individuals.next();
System.out.println(thisIndividual.toString()) 
}


With this code I only get individuals defined in L as instances of classes that 
have L's URI. 

How do I get the entire list of individuals, including those described in B 
above?
        

Thanks, Jos             
                        



Reply via email to