[Pellet-users] java.util.NoSuchElementException
Christiane Telöken
teloeken at tzi.de
Sun Jan 27 17:29:19 UTC 2008
Dear Pellet users,
I am using the Jena Framework with Pellet 1.5 and would like to retrieve
all the possible values of an objectproperty. Excecuting the following
code causes an exception in the main method, although the specific
objectproperty has some values.
The exception goes like:
Exception in thread "main" java.util.NoSuchElementException
The code is:
Resource prop;
ExtendedIterator exIt = ontoModel.listObjectProperties();
if (exIt != null){
while (exIt != null){
prop = (Resource) exIt.next();
NodeIterator nIt = (NodeIterator) ontoModel.listObjectsOfProperty
(prop, OWL.allValuesFrom);
if (nIt != null){
while (nIt.hasNext()){
RDFNode obj = (RDFNode) nIt.nextNode();
System.out.println (obj.toString());
}
}
}
}
I would be very grateful to get any hints why the code causes an exception.
:)
Thank you for any help in advance,
Christiane
More information about the Pellet-users
mailing list