date/time interval list view will now display the label if there is one
This commit is contained in:
parent
74d9eb2396
commit
c5a1582fe8
2 changed files with 17 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?dateTimeInterval
|
||||
SELECT DISTINCT ?dateTimeInterval ?label
|
||||
?valueStart ?valueStartName
|
||||
?dateTimeStart
|
||||
?precisionStart
|
||||
|
@ -32,6 +32,8 @@
|
|||
LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd))
|
||||
}
|
||||
}
|
||||
OPTIONAL {?dateTimeInterval rdfs:label ?label}
|
||||
|
||||
<critical-data-required>
|
||||
FILTER ( bound(?dateTimeStart) || bound(?dateTimeEnd) )
|
||||
</critical-data-required>
|
||||
|
@ -40,11 +42,13 @@
|
|||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?valueStart .
|
||||
?dateTimeInterval core:end ?valueEnd
|
||||
?dateTimeInterval core:end ?valueEnd .
|
||||
?dateTimeInterval rdfs:label ?label
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?dateTimeInterval
|
||||
|
@ -57,6 +61,10 @@
|
|||
?subject ?property ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?valueEnd
|
||||
}
|
||||
UNION {
|
||||
?subject ?property ?dateTimeInterval .
|
||||
?dateTimeInterval rdfs:label ?label
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
|
||||
<#if ! statement.valueStart?? && ! statement.valueEnd??>
|
||||
<a href="${profileUrl(statement.dateTimeInterval)}">incomplete date/time interval</a>
|
||||
<#else>
|
||||
<#if statement.label??>
|
||||
${statement.label!}
|
||||
<#else>
|
||||
${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}", "${statement.dateTimeEnd!}", "${statement.precisionEnd!}")}
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue