NIHVIVO-1665 Handle display core:DateTimeValue with core:dateTime data prop but no precision, and with neither precision nor dateTime data prop. DateTimeValues as part of DateTimeIntervals not handled yet.
This commit is contained in:
parent
aed0c6abb3
commit
31cb81dec6
3 changed files with 12 additions and 5 deletions
|
@ -9,10 +9,11 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?dateTime (afn:localname(?dateTimePrecision) AS ?precision) WHERE {
|
||||
SELECT DISTINCT ?dateTimeValue (afn:localname(?dateTimeValue) AS ?dateTimeValueName)
|
||||
(afn:localname(?dateTimePrecision) AS ?precision) ?dateTime WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?dateTimeValue }
|
||||
GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime ;
|
||||
core:dateTimePrecision ?dateTimePrecision . }
|
||||
OPTIONAL { GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime } }
|
||||
OPTIONAL { GRAPH ?g3 { ?dateTimeValue core:dateTimePrecision ?dateTimePrecision } }
|
||||
}
|
||||
</query>
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName)
|
||||
?roleLabel ?roleTypeLabel ?indivInRole ?indivName ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
?roleLabel ?roleTypeLabel ?indivInRole ?indivName
|
||||
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?role }
|
||||
OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf }
|
||||
GRAPH ?g3 { ?role ?roleProp ?indivInRole }
|
||||
|
|
|
@ -4,4 +4,9 @@
|
|||
|
||||
<#import "lib-datetime.ftl" as dt>
|
||||
|
||||
${dt.formatXsdDateTimeLong(statement.dateTime, statement.precision)}
|
||||
<#-- No core:dateTime data property assigned. Display a link to the core:DateTimeValue object -->
|
||||
<#if ! statement.dateTime??>
|
||||
<a href="${profileUrl(statement.dateTimeValue)}">${localName(statement.dateTimeValue)}</a> (incomplete data)
|
||||
<#else>
|
||||
${dt.formatXsdDateTimeLong(statement.dateTime, statement.precision!)}
|
||||
</#if>
|
Loading…
Add table
Add a link
Reference in a new issue