SPARQL queries

SPARQL queries

The following SPARQL query on the LAK dataset returns the full text of all 2011 papers (LAK 2011, EDM conference and journal 2011) in .srx format (XML file which can be opened in any text editor):

PREFIX led:<http://data.linkededucation.org/ns/linked-education.rdf#>
PREFIX swrc:<http://swrc.ontoware.org/ontology#>
SELECT ?paper ?fulltext WHERE { ?paper led:body ?fulltext . ?paper swrc:year ?year . FILTER (?year = “2011″) }

 This query can be executed via the following HTTP GET request.

As a second example, the following query can be used to retrieve, as RDF data, all papers co-authored by Simon Buckingham Shum and Rebecca Ferguson

PREFIX dc:<http://purl.org/dc/elements/1.1/>
DESCRIBE ?paper WHERE {?paper dc:creator <http://data.linkededucation.org/resource/lak/person/simon-buckingham-shum> . ?paper dc:creator <http://data.linkededucation.org/resource/lak/person/rebecca-ferguson> }

…with this request.

All the EDM papers of 2012 (and not LAK 2012 papers):

PREFIX led:<http://data.linkededucation.org/ns/linked-education.rdf#>
PREFIX swrc:<http://swrc.ontoware.org/ontology#>
PREFIX swc:<http://data.semanticweb.org/ns/swc/ontology#>

SELECT ?paper ?fulltext WHERE { ?conference swc:hasAcronym ?acronym . ?proceedings  swc:relatedToEvent ?conference . ?proceedings swc:hasPart ?paper . ?paper led:body ?fulltext . FILTER (?acronym = “EDM2012″)  }

with this corresponding link.

All papers published in both EDM and LAK conferences by the authors affiliated to an institution (the “Worcester Polytechnic Institute” in the example):

PREFIX dc:<http://purl.org/dc/elements/1.1/>
PREFIX swrc:<http://swrc.ontoware.org/ontology#>
PREFIX swc:<http://data.semanticweb.org/ns/swc/ontology#>

select  distinct ?title ?year ?acronym WHERE { ?conference swc:hasAcronym ?acronym . ?proceedings  swc:relatedToEvent ?conference . ?proceedings swc:hasPart ?paper . ?paper dc:creator ?author . ?paper dc:title ?title . ?paper swrc:year ?year . ?author swrc:affiliation ?organization . FILTER (?organization = <http://data.linkededucation.org/resource/lak/organization/worcester-polytechnic-institute> )}

with this link.