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 core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
|
||||||
SELECT DISTINCT ?dateTimeInterval
|
SELECT DISTINCT ?dateTimeInterval ?label
|
||||||
?valueStart ?valueStartName
|
?valueStart ?valueStartName
|
||||||
?dateTimeStart
|
?dateTimeStart
|
||||||
?precisionStart
|
?precisionStart
|
||||||
|
@ -32,6 +32,8 @@
|
||||||
LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd))
|
LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
OPTIONAL {?dateTimeInterval rdfs:label ?label}
|
||||||
|
|
||||||
<critical-data-required>
|
<critical-data-required>
|
||||||
FILTER ( bound(?dateTimeStart) || bound(?dateTimeEnd) )
|
FILTER ( bound(?dateTimeStart) || bound(?dateTimeEnd) )
|
||||||
</critical-data-required>
|
</critical-data-required>
|
||||||
|
@ -40,11 +42,13 @@
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
||||||
CONSTRUCT {
|
CONSTRUCT {
|
||||||
?subject ?property ?dateTimeInterval .
|
?subject ?property ?dateTimeInterval .
|
||||||
?dateTimeInterval core:start ?valueStart .
|
?dateTimeInterval core:start ?valueStart .
|
||||||
?dateTimeInterval core:end ?valueEnd
|
?dateTimeInterval core:end ?valueEnd .
|
||||||
|
?dateTimeInterval rdfs:label ?label
|
||||||
} WHERE {
|
} WHERE {
|
||||||
{
|
{
|
||||||
?subject ?property ?dateTimeInterval
|
?subject ?property ?dateTimeInterval
|
||||||
|
@ -57,6 +61,10 @@
|
||||||
?subject ?property ?dateTimeInterval .
|
?subject ?property ?dateTimeInterval .
|
||||||
?dateTimeInterval core:end ?valueEnd
|
?dateTimeInterval core:end ?valueEnd
|
||||||
}
|
}
|
||||||
|
UNION {
|
||||||
|
?subject ?property ?dateTimeInterval .
|
||||||
|
?dateTimeInterval rdfs:label ?label
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</query-construct>
|
</query-construct>
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,10 @@
|
||||||
<#if ! statement.valueStart?? && ! statement.valueEnd??>
|
<#if ! statement.valueStart?? && ! statement.valueEnd??>
|
||||||
<a href="${profileUrl(statement.dateTimeInterval)}">incomplete date/time interval</a>
|
<a href="${profileUrl(statement.dateTimeInterval)}">incomplete date/time interval</a>
|
||||||
<#else>
|
<#else>
|
||||||
${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}", "${statement.dateTimeEnd!}", "${statement.precisionEnd!}")}
|
<#if statement.label??>
|
||||||
|
${statement.label!}
|
||||||
|
<#else>
|
||||||
|
${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}", "${statement.dateTimeEnd!}", "${statement.precisionEnd!}")}
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue