PREFIX rdfs:
PREFIX list:
PREFIX SO:
SELECT (str(?member) as ?abstract)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:description ?list .
?list list:index (?pos ?member) .
# Don't include referenced sub-Datasets (i.e. a Dataset in a 'hasPart' property)
FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . }
}
order by (?pos)
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ( ?name as ?title )
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:name ?name .
# Don't include referenced sub-Datasets (i.e. a Dataset in a 'hasPart' property)
FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . }
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?label
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:alternateName ?label .
# Don't include referenced sub-Datasets (i.e. a Dataset in a 'hasPart' property)
FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . }
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT
( str(?identifier) as ?awardNumber)
WHERE {
?datasetId rdf:type SO:Dataset .
{
?awardId rdf:type SO:MonetaryGrant .
?awardId SO:fundedItem ?datasetId .
?awardId SO:identifier ?identifier .
}
UNION
{
?datasetId SO:about ?awardId .
?awardId rdf:type SO:MonetaryGrant .
?awardId SO:sameAs ?identifier .
}
}
]]>
PREFIX rdfs:
PREFIX SO:
SELECT
( str(?name) as ?awardTitle)
WHERE {
?datasetId rdf:type SO:Dataset .
{
?awardId rdf:type SO:MonetaryGrant .
?awardId SO:fundedItem ?datasetId .
?awardId SO:name ?name .
}
UNION
{
?datasetId SO:about ?awardId .
?awardId rdf:type SO:MonetaryGrant .
?awardId SO:name ?name .
}
}
]]>
PREFIX list:
PREFIX SO:
SELECT (?name as ?author)
WHERE {
?dsId rdf:type SO:Dataset .
?dsId SO:creator ?list .
?list list:index (?pos ?member) .
?member SO:name ?name .
}
order by (?pos)
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT
( str(?datePublished) as ?pubDate)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:datePublished ?datePublished
# Don't include referenced sub-Datasets (i.e. a Dataset in a 'hasPart' property)
FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . }
}
]]>
PREFIX list:
PREFIX SO:
SELECT (?givenName as ?authorGivenName)
WHERE {
?dsId rdf:type SO:Dataset .
?dsId SO:creator ?list .
?list list:index (?pos ?member) .
?member SO:givenName ?givenName .
}
order by (?pos)
limit 1
]]>
PREFIX list:
PREFIX SO:
SELECT (?familyName as ?authorLastName)
WHERE {
?dsId rdf:type SO:Dataset .
?dsId SO:creator ?list .
?list list:index (?pos ?member) .
?member SO:familyName ?familyName .
}
order by (?pos)
]]>
PREFIX list:
PREFIX SO:
SELECT (?familyName as ?investigator)
WHERE {
?dsId rdf:type SO:Dataset .
?dsId SO:creator ?list .
?list list:index (?pos ?member) .
?member SO:familyName ?familyName .
}
order by (?pos)
]]>
PREFIX rdfs:
PREFIX SO:
SELECT
(?identifier as ?funderIdentifier)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:funder ?funderId .
?funderId SO:identifier ?identifier .
}
]]>
PREFIX rdfs:
PREFIX SO:
SELECT
(?name as ?funderName)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:funder ?funderId .
?funderId SO:name ?name .
}
]]>
PREFIX list:
PREFIX SO:
SELECT (?name as ?origin)
WHERE {
?dsId rdf:type SO:Dataset .
?dsId SO:creator ?list .
?list list:index (?pos ?member) .
?member SO:name ?name .
}
order by (?pos)
]]>
PREFIX rdfs:
PREFIX SO:
PREFIX PROV:
PREFIX PROVONE:
SELECT ( str(?derivations) as ?prov_hasDerivations )
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId PROV:hadDerivation ?derivations .
}
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?hasPart
WHERE {
?datasetId rdf:type SO:Dataset .
{
?datasetId SO:hasPart ?node .
?node rdf:type SO:Dataset .
?node SO:name ?hasPart .
}
UNION
{
?datasetId SO:hasPart ?hasPart .
# SO:Dataset can also appear as a sub-element of the 'SO:hasPart'
# so exclude those from the query result.
FILTER NOT EXISTS { ?hasPart rdf:type SO:Dataset . }
}
}
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?keywords
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:keywords ?keywords .
}
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?southBoundCoord
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:spatialCoverage ?spatial .
?spatial rdf:type SO:Place .
?spatial SO:geo ?geo .
?geo rdf:type SO:GeoShape .
?geo SO:box ?box .
# Extract south coord, replacing commas and multiple whitespaces to single whitespaces
# to simplify parsing
bind(strbefore(replace(str(?box), "\\s*,\\s*|\\s{2,}", " "), " ") as ?southBoundCoord)
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?westBoundCoord
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:spatialCoverage ?spatial .
?spatial rdf:type SO:Place .
?spatial SO:geo ?geo .
?geo rdf:type SO:GeoShape .
?geo SO:box ?box .
bind(strbefore(replace(str(?box), "\\s*,\\s*|\\s{2,}", " "), " ") as ?southBoundCoord)
bind(strafter(replace(str(?box), "\\s*,\\s*|\\s{2,}", " "), " ") as ?rest)
bind(strbefore(str(?rest), " ") as ?westBoundCoord)
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?northBoundCoord
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:spatialCoverage ?spatial .
?spatial rdf:type SO:Place .
?spatial SO:geo ?geo .
?geo rdf:type SO:GeoShape .
?geo SO:box ?box .
bind(strbefore(replace(str(?box), "\\s*,\\s*|\\s{2,}", " "), " ") as ?southBoundCoord)
bind(strafter(replace(str(?box), "\\s*,\\s*|\\s{2,}", " "), " ") as ?rest)
bind(strbefore(str(?rest), " ") as ?westBoundCoord)
bind(strafter(str(?rest), " ") as ?rest2)
bind(strbefore(str(?rest2), " ") as ?northBoundCoord)
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?eastBoundCoord
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:spatialCoverage ?spatial .
?spatial rdf:type SO:Place .
?spatial SO:geo ?geo .
?geo rdf:type SO:GeoShape .
?geo SO:box ?box .
bind(strbefore(replace(str(?box), "\\s*,\\s*|\\s{2,}", " "), " ") as ?southBoundCoord)
bind(strafter(replace(str(?box), "\\s*,\\s*|\\s{2,}", " "), " ") as ?rest)
bind(strbefore(str(?rest), " ") as ?westBoundCoord)
bind(strafter(str(?rest), " ") as ?rest2)
bind(strbefore(str(?rest2), " ") as ?northBoundCoord)
bind(strafter(str(?rest2), " ") as ?eastBoundCoord)
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ?namedLocation
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:spatialCoverage ?namedLocation .
FILTER NOT EXISTS { ?namedLocation rdf:type SO:Place . }
}
]]>
PREFIX rdfs:
PREFIX SO:
SELECT
# possible formats: "start/end", "start/..", "start"
(if(contains(?dates, "/"), strbefore(?dates, "/"), ?dates) as ?beginDate)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:temporalCoverage ?dates .
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT
# possible formats: "start/end", "start/..", "start"
(if(contains(?dates, "/"), strafter(?dates, "/"), "") as ?endDate)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId SO:temporalCoverage ?dates .
}
limit 1
]]>
PREFIX rdfs:
PREFIX SO:
SELECT (?variableMeasured as ?parameter)
WHERE {
?datasetId rdf:type SO:Dataset .
{
?datasetId SO:variableMeasured ?variable .
?variable rdf:type SO:PropertyValue .
?variable SO:name ?variableMeasured .
}
UNION
{
?datasetId SO:variableMeasured ?variableMeasured .
FILTER NOT EXISTS { ?parameter rdf:type SO:PropertyValue . }
}
}
]]>
PREFIX rdfs:
PREFIX schema:
SELECT ( str(?version) as ?edition )
WHERE {
?datasetId rdf:type schema:Dataset .
?datasetId schema:version ?version .
}
limit 1
]]>
PREFIX SO:
PREFIX PROV:
PREFIX PROVONE:
SELECT DISTINCT
( str(?wasDerivedFrom) as ?prov_wasDerivedFrom )
WHERE {
?datasetId rdf:type SO:Dataset .
{
?datasetId SO:isBasedOn ?wasDerivedFrom .
}
UNION
{
?datasetId PROV:wasDerivedFrom ?wasDerivedFrom .
}
}
]]>
PREFIX SO:
PREFIX PROV:
PREFIX PROVONE:
SELECT ( str(?executionId) as ?prov_usedByExecution)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId PROV:wasUsedBy ?executionId .
}
]]>
PREFIX SO:
PREFIX PROV:
PREFIX PROVONE:
SELECT ( str(?plan) as ?prov_usedByProgram)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId PROV:wasUsedBy ?executionId .
?executionId PROV:hadPlan ?plan.
}
]]>
PREFIX SO:
PREFIX PROV:
PREFIX PROVONE:
SELECT ( str(?executionId) as ?prov_generatedByExecution)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId PROV:wasGeneratedBy ?executionId
}
]]>
PREFIX SO:
PREFIX PROV:
PREFIX PROVONE:
SELECT
( str(?planId ) as ?prov_generatedByProgram)
WHERE {
?datasetId rdf:type SO:Dataset .
?datasetId PROV:wasGeneratedBy ?executionId .
?executionId PROV:hadPlan ?planId
}
]]>
PREFIX SO:
PREFIX PROV:
PREFIX PROVONE:
SELECT DISTINCT
( str(?instanceType ) as ?prov_instanceOfClass )
WHERE {
?datasetId rdf:type SO:Dataset .
{
?datasetId PROV:wasGeneratedBy ?executionId .
bind ( PROVONE:Data as ?instanceType )
}
UNION
{
?datasetId PROV:wasUsedBy ?executionId .
bind ( PROVONE:Data as ?instanceType )
}
}
]]>
PREFIX rdfs:
PREFIX SO:
SELECT ( str(?url) as ?serviceEndpoint )
WHERE {
?datasetId rdf:type SO:Dataset .
{
?datasetId SO:url ?url .
# Don't include referenced sub-Datasets (i.e. a Dataset in a 'hasPart' property)
FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . }
}
UNION
{
?datasetId SO:distribution ?distribution .
?distribution rdf:type SO:DataDownload .
?distribution SO:contentUrl ?url .
FILTER NOT EXISTS { ?id SO:hasPart ?datasetId . }
}
}
]]>
PREFIX xsd:
SELECT DISTINCT (str(?string) as ?text)
WHERE {
{
?a ?b ?string .
filter(datatype(?string) = xsd:string) .
}
UNION
{
?a ?b ?string .
filter(datatype(?string) = SO:HTML) .
}
}
]]>