I want to find the path between two resource in DBpedia English SKOS thesaurus by using Jena! I am using the following code, but it returns null, even though nodes seem to have two "skos:broader" links between them! By the way, if there is only one "skos:broader" between some other nodes then it is able to find it.
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
model.read(".../skos_categories_en.ttl", "N-TRIPLE");
Resource rscResource=ResourceFactory.createResource("http://dbpedia.org/resource/Category:Sistine_Chapel");
Resource rscResource2 =ResourceFactory.createResource("http://dbpedia.org/resource/Category:Paintings_in_Lazio");
Path path = OntTools.findShortestPath(model, rscResource, rscResource2, Filter.any);
I have also tried this solution but since thesaurus is too big, it takes forever! Thanks in advance!