NIHVIVO-1591 Custom views for core:dateTimeValue, core:dateTimeInterval, core:start, core:end
This commit is contained in:
parent
03269fce33
commit
21f3291f55
5 changed files with 17 additions and 23 deletions
|
@ -111,4 +111,10 @@
|
|||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#dateTimeValue">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-dateTimeValue.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#start">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-dateTimeValue.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#end">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-dateTimeValue.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
</rdf:RDF>
|
|
@ -9,17 +9,16 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?dateTimeStart ?precisionStart ?dateTimeEnd ?precisionEnd WHERE {
|
||||
SELECT DISTINCT ?dateTimeStart (afn:localname(?dateTimePrecisionStart) AS ?precisionStart)
|
||||
?dateTimeEnd (afn:localname(?dateTimePrecisionEnd) AS ?precisionEnd) WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?dateTimeInterval }
|
||||
OPTIONAL { GRAPH ?g2 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart ;
|
||||
core:dateTimePrecision ?dateTimePrecisionStart . }
|
||||
GRAPH ?g3 { ?dateTimePrecisionStart rdfs:label ?precisionStart }
|
||||
core:dateTimePrecision ?dateTimePrecisionStart . }
|
||||
}
|
||||
OPTIONAL { GRAPH ?g4 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
OPTIONAL { GRAPH ?g3 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd ;
|
||||
core:dateTimePrecision ?dateTimePrecisionEnd . }
|
||||
GRAPH ?g5 { ?dateTimePrecisionEnd rdfs:label ?precisionEnd }
|
||||
core:dateTimePrecision ?dateTimePrecisionEnd . }
|
||||
}
|
||||
}
|
||||
</query>
|
||||
|
|
|
@ -9,11 +9,10 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?dateTime ?precision WHERE {
|
||||
SELECT DISTINCT ?dateTime (afn:localname(?dateTimePrecision) AS ?precision) WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?dateTimeValue }
|
||||
GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime ;
|
||||
core:dateTimePrecision ?dateTimePrecision . }
|
||||
GRAPH ?g3 { ?dateTimePrecision rdfs:label ?precision }
|
||||
}
|
||||
</query>
|
||||
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
|
||||
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeInterval -->
|
||||
|
||||
<#if statement.dateTimeStart??>
|
||||
${dateTimeStart} ${precisionStart}
|
||||
</#if>
|
||||
-
|
||||
<#if statement.dateTimeEnd??>
|
||||
${dateTimeEnd} ${precisionEnd}
|
||||
</#if>
|
||||
<#import "lib-datetime.ftl" as dt>
|
||||
|
||||
<@dt.dateTimeIntervalLong "${statement.dateTimeStart!}" "${statement.precisionStart!}"
|
||||
"${statement.dateTimeEnd!}" "${statement.precisionEnd!}" />
|
||||
|
|
|
@ -4,11 +4,4 @@
|
|||
|
||||
<#import "lib-datetime.ftl" as dt>
|
||||
|
||||
<#--
|
||||
${statement.dateTime} ${statement.precision} <br />
|
||||
|
||||
<#assign dateTime = statement.dateTime?replace("T", " ")>
|
||||
${dateTime?datetime("yyyy-MM-dd HH:mm:ss")?string("h:mm a")} -->
|
||||
|
||||
|
||||
${dt.formatXsdDateTime(statement.dateTime, statement.precision, "long")}
|
||||
${dt.formatXsdDateTimeLong(statement.dateTime, statement.precision)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue