Dear jena-list, I have tried a lot to solve the following issue, and read a lot of stuff on the internet but i didnt make it in the end. Iam really desperate..:-(

Here I have a set of OntClasses and what I try to do is to find and print for each class the properties that appear in the domain and in the range of this class. With listDeclaredProperties() I can have an iteration of the properties that are associated with this class by their domain. MY PROBLEM is that I cannot find the iteration associated with this class by their range. Example PaintingName is a property in the domain it contains the class Painting -> with listDeclaredProperties this information will be retrieved But contains is another property with domain a class museum and range the class Painting how can I get this information?

for (OntClass topClass : topClassesSet) {

            System.out.println("top Class " + topClass);
            ExtendedIterator itq = topClass.listDeclaredProperties();
                  while(itq.hasNext()){
                       OntProperty property =  (OntProperty) itq.next();
                       System.out.println("property  "+ property);
                  }
               }

Please help me...

Reply via email to