SPARQL Nikhil Rajguru
W3C Standards SPARQL Query Language for RDF SPARQL 1.1 Update SPARQL 1.1 Protocol SPARQL 1.1 Graph Store HTTP Protocol SPARQL Result Specification – SPARQL Query Results XML Format – Serializing SPARQL Query Results in JSON – SPARQL 1.1 Query Results CSV and TSV Formats
SPARQL Query Language W3C Standard Specification An introduction to the Query Language – Examples and query results – Constraints that SPARQL can express on terms in a query (FILTER, OPTIONAL, UNION, etc.) SPARQL Syntax – Literals, query variables, blank nodes, etc.
A Simple SPARQL Query foaf:. _:a foaf:name "Johnny Lee Outlaw". _:a foaf:mbox. _:b foaf:name "Peter Goodguy". _:b foaf:mbox. _:c foaf:mbox. Query PREFIX foaf: SELECT ?name ?mbox WHERE { ?x foaf:name ?name. ?x foaf:mbox ?mbox } Result s
Portal Query SELECT ?BuildingNum ?BuildingCode ?Address ?BuildingFloors ?built ?floorA WHERE { ?contributor Building:hasBuildingNo ?BuildingNum. ?contributor Building:hasBuildingCode ?BuildingCode. ?contributor Building:address ?Address. ?contributor Building:elevation ?BuildingFloors. ?contributor Building:buildingstartdate ?built. ?contributor Building:floorArea ?floorA. "+ FILTER (?BuildingCode == "EEB" ) }
Java Client Query and Update 4store Does a http POST request for every query/update Results can be requested in XML/JSON/TSV Examples on using the client are included with the source on svn svn folder -> d/RDFStore/
Querying using Java Client d/RDFStore/4storeClientEngine/src/uk/co/ma gus/fourstore/examples/Query.java d/RDFStore/4storeClientEngine/src/uk/co/ma gus/fourstore/examples/Query.java
Update using Java Client d/RDFStore/4storeClientEngine/src/uk/co/ma gus/fourstore/examples/Insert.java d/RDFStore/4storeClientEngine/src/uk/co/ma gus/fourstore/examples/Insert.java