-
Notifications
You must be signed in to change notification settings - Fork 7
/
version_date.rq
42 lines (41 loc) · 1.06 KB
/
version_date.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Try to identify the version and/or date of a dataset
#
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX void: <http://rdfs.org/ns/void#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
#
select distinct ?s ?datasetClass ?property ?value
where {
# try different strategies
{
# look for version
# suppose that owl:versionInfo is only used once
select ?s ?datasetClass ?property ?value
where {
bind(owl:versionInfo as ?property)
?s ?property ?value .
}
} union {
# look for dates
# restrict to classes which typically occur once,
# because the date properties may be in use for multiple subjects
select ?s ?datasetClass ?property ?value
where {
{
?s a void:Dataset
} union {
?s a skos:ConceptScheme
}
?s ?property ?value .
}
values ( ?property ) {
( dc:date)
( dcterms:date )
( dcterms:created )
( dcterms:issued )
( dcterms:modified )
}
}
}