Enter SparQL query:

 

(Sample queries over rdf graph representation of the SIMILE Longwell project codebase)

Sample Query 1: (OnPath query)

# This query determines the dependencies of the class jena.rdfquery # It does so by computing the transitive closure of the the "uses" # predicate from jena.rdfquery. It also returns the location (jar file) # for each result. PREFIX gleen:<java:edu.washington.sig.gleen.> PREFIX java:<http://simile.mit.edu/2004/09/ontologies/java#> SELECT ?dependency ?location FROM <http://sig.biostr.washington.edu/~detwiler/OntViews/GLEEN_demo/longwell-code.n3> WHERE { <urn:java:jena.rdfquery> gleen:OnPath ( "[java:uses]*" ?dependency ). OPTIONAL { ?dependency java:located ?location . } . } ORDER BY ?dependency

Sample Query 2: (Subgraph query over SIMILE Longwell codebase rdf graph)

# This query calculates the subgraph described by the set of paths # which start with jena.rdfquery and end at org.xml.sax.Locator and contain only # "uses" predicates. It returns the results as a new rdf graph. PREFIX gleen:<java:edu.washington.sig.gleen.> PREFIX java:<http://simile.mit.edu/2004/09/ontologies/java#> CONSTRUCT { ?a ?b ?c . } FROM <http://sig.biostr.washington.edu/~detwiler/OntViews/GLEEN_demo/longwell-code.n3> WHERE { ( <urn:java:jena.rdfquery> "[java:uses]+" <urn:java:org.xml.sax.Locator> ) gleen:Subgraph ( ?a ?b ?c ). }