USGCRP / gcis-ontology

Ontology for the Global Change Information System
4 stars 7 forks source link

SPARQL query: copyrighted figures in the NCA3 #126

Closed justgo129 closed 9 years ago

justgo129 commented 9 years ago

Objective: Identify the (a) copyrighted figures which exist in the NCA3 and (b) the non-copyrighted ones.

This is the query to date: select ?figure from http://data.globalchange.gov where { ?s a gcis:Report . ?s gcis:hasFigure ?figure . ?figure dcterms:rights [ rdf:value "Free to use with credit to the original figure source."^^xsd:string; ] }

and of course we could modify the penultimate line as necessary.

Only column names show up in the API output. Could anyone fix this query? This is a real-life example of a request we received. Thanks!

zednis commented 9 years ago

There are no statements using predicate dcterms:rights in the triplestore.

select ?figure ?rights from <http://data.globalchange.gov> where {
?figure dcterms:rights ?rights
}

has 0 results

zednis commented 9 years ago

actually, scratch my last comment. The dcterms prefix must not be configured for the sparql endpoint.

This query works:

PREFIX dcterms: <http://purl.org/dc/terms/>

select ?figure from <http://data.globalchange.gov> where {
?s a gcis:Report .
?s gcis:hasFigure ?figure .
?figure dcterms:rights [ rdf:value "Free to use with credit to the original figure source."^^xsd:string; ]
}
justgo129 commented 9 years ago

Great, @zednis . I have subsequently restricted the query to NCA3 ones: PREFIX dcterms: http://purl.org/dc/terms/

select ?figure from http://data.globalchange.gov where { ?s a gcis:Report . ?s dcterms:title "Climate Change Impacts in the United States: The Third National Climate Assessment"^^xsd:string . ?s gcis:hasFigure ?figure . ?figure dcterms:rights [ rdf:value "Free to use with credit to the original figure source."^^xsd:string; ] }

which comes up with 147 figures, out of the 290 from the NCA3.

justgo129 commented 9 years ago

Closed #126 due to successful resolution. I'm surprised that the dcterms prefix isn't configured, though. Anyway, thanks, @zednis!

justgo129 commented 9 years ago

@zednis could you please add this to the test suite? I know it's a relatively simple query but it's still worth adding. Thanks.

justgo129 commented 9 years ago

Closed #126 due to merged https://github.com/USGCRP/gcis-sparql/pull/5.