there are obvious limitations with that approach. Also, this would only tell you if there is any path but not return the path itself. The most promising approach is described here: https://stackoverflow.com/a/18032019/4744359
But even there you have to extract the full path from the resultset via client code. Other than that, SPARQL is not a graph traversal language, there are better languages in that regards, e.g. Cypher, Gremlin, etc. - or you create some RDF API based Java code. Like the OntTools from Jena: https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/ontology/OntTools.html On 10.08.20 21:48, Florian Kleedorfer wrote: > > There are ways to do that in SPARQL - maybe start here > https://stackoverflow.com/questions/30916040/sparql-is-there-any-path-between-two-nodes > > > You can execute sparql queries on a jena dataset or against a sparql > endpoint: https://jena.apache.org/tutorials/sparql.html > > best > Florian > > Am 2020-08-10 19:52, schrieb Ahmed Helal: >> Greetings, >> >> I am now working on a project involving Apache Jena. I would like to >> ask if Jena supports finding a path between two nodes. >> >> Thank you for your time, >> Ahmed Helal.
