The Land Library will provide very soon the machine interfaces that will enable the development of an ecosystem of apps by developers and companies. Interfaces will include both RESTful API and a SPARQL end point.

NOTE: ALL THESE QUERIES WILL WORK ONCE THE TRIPLES ARE UPLOADED
THE TRIPLES WILL BE UPLOADED ONCE VIRTUOSO IS RECOMPILED WITH PERMISSIONS TO WRITE FROM DRUPAL.
To do: Change Spqrql endpoint to http://beta.landportal.info/sparql
You can either write your own query or copy one of the sample queries and execute it.
 


Query results

 

 

 

Query examples

 
 

1. List all Land Library topics (URI and name)

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select ?TopicURI ?Name where {
 ?TopicURI a skos:Concept . 
 ?TopicURI skos:prefLabel ?Name .
 ?TopicURI skos:inScheme <http://data.landportal.info/vocabulary/5>
}

 
 

2. Get basic information (title, author, year) for each resource under topic "land reform"

You can adjust this query for any of the other topics by replacing the URI in the last line of the query with the URI of the topic (see query n.1 to get all the topics with corresponding URIs).
http://data.landportal.info/concept/4ab317bf-512f-41db-a71c-440857d9aa20 is the URI of the topic "land reform"

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
select ?Title ?Author ?Date where {
 ?doc a bibo:Document .
 ?doc dc:title ?Title . 
 ?doc dc:creator ?auth .
 ?auth foaf:name ?Author .
 ?doc dc:date ?Date .
 ?doc dc:subject <http://data.landportal.info/concept/4ab317bf-512f-41db-a71c-440857d9aa20> .
}

 
 

3. Get the same data using the AGROVOC URI instead of the LP topic URI. Example for "land reform"

You can adjust this query for any of the other topics by replacing the URI in the last line of the query with the URI of the topic in AGROVOC.
http://aims.fao.org/aos/agrovoc/c_4178 is the URI of the topic "land reform" in AGROVOC

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
select ?Title ?Author ?Date where {
 ?doc a bibo:Document .
 ?doc dc:title ?Title . 
 ?doc dc:creator ?auth .
 ?auth foaf:name ?Author .
 ?doc dc:date ?Date .
 ?doc dc:subject ?topic .
 ?topic owl:sameAs <http://aims.fao.org/aos/agrovoc/c_4178>
}

 
 

4. List all countries (URI and name)

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select ?CountryURI ?Name where {
 ?CountryURI a skos:Concept . 
 ?CountryURI skos:prefLabel ?Name .
 ?CountryURI skos:inScheme <http://data.landportal.info/vocabulary/3>
}

 
 

5. Get basic information (title, author, year) for each resource related to "Kenya"

You can adjust this query for any of the other topics by replacing the URI in the last line of the query with the URI of the country (see query n.3 to get all the countries with corresponding URIs).
http://data.landportal.info/country/f0792a6b-04f3-488e-a628-c8879899ed24 is the URI of the country "Kenya"

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
select ?Title ?Author ?Date where {
 ?doc a bibo:Document .
 ?doc dc:title ?Title . 
 ?doc dc:creator ?auth .
 ?auth foaf:name ?Author .
 ?doc dc:date ?Date .
 ?doc dc:spatial <http://data.landportal.info/country/f0792a6b-04f3-488e-a628-c8879899ed24> .
}

 
 

6. Get the same data using the Geopolitical URI instead of the LP country URI. Example for Kenya

You can adjust this query for any of the other countries by replacing the URI in the last line of the query with the URI of the country in the Geopolitical ontology.
http://www.fao.org/countryprofiles/geoinfo/geopolitical/resource/Kenya is the URI of the country "Kenya" in the Geopolitical ontology

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
select ?Title ?Author ?Date where {
 ?doc a bibo:Document .
 ?doc dc:title ?Title . 
 ?doc dc:creator ?auth .
 ?auth foaf:name ?Author .
 ?doc dc:date ?Date .
 ?doc dc:spatial ?country .
 ?country owl:sameAs <http://www.fao.org/countryprofiles/geoinfo/geopolitical/resource/Kenya>
}