Dear Jena-Team,

we are very happy about the experimental OntTools method “getShortestPath”. It works fine, but up from a specific amount of in-between concepts, the returned path is NULL. We are working with the VDOT-Ontology ( . We focused out, that the method does not have any problems with the relationships between the concepts – because when we cut the path in smaller pieces e.g. path between patient and blood sample and path between blood sample and leukocyte it works fine.
We tried it with the following code:

OntClass toClass = model.getOntClass("";); OntClass fromClass = model.getOntClass("";);

Predicate<Statement> onPath = new Predicate<Statement>() {
    public boolean test(Statement t) {
                // TODO Auto-generated method stub
                return true;
Path path = OntTools.findShortestPath(model, fromClass, toClass, onPath);
if (path!= null){
    System.out.println("I am not empty!");
} else {
    System.out.println("I am empty!");

We are looking forward for your answer!

Best Regards

Kerstin Rohm

Kerstin Rohm
Health Information Systems
Fraunhofer Institute for Biomedical Engineering
Joseph-von-Fraunhofer-Weg 1
66280 Sulzbach

Phone: +49 (0)6894 980253
Fax:   +49 (0)6894 980400

Reply via email to