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">
|
<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>
|
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-dateTimeValue.xml</display:listViewConfigFile>
|
||||||
</rdf:Description>
|
</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>
|
</rdf:RDF>
|
|
@ -9,17 +9,16 @@
|
||||||
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 ?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 }
|
GRAPH ?g1 { ?subject ?property ?dateTimeInterval }
|
||||||
OPTIONAL { GRAPH ?g2 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
OPTIONAL { GRAPH ?g2 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart ;
|
?dateTimeStartValue core:dateTime ?dateTimeStart ;
|
||||||
core:dateTimePrecision ?dateTimePrecisionStart . }
|
core:dateTimePrecision ?dateTimePrecisionStart . }
|
||||||
GRAPH ?g3 { ?dateTimePrecisionStart rdfs:label ?precisionStart }
|
|
||||||
}
|
}
|
||||||
OPTIONAL { GRAPH ?g4 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
OPTIONAL { GRAPH ?g3 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd ;
|
?dateTimeEndValue core:dateTime ?dateTimeEnd ;
|
||||||
core:dateTimePrecision ?dateTimePrecisionEnd . }
|
core:dateTimePrecision ?dateTimePrecisionEnd . }
|
||||||
GRAPH ?g5 { ?dateTimePrecisionEnd rdfs:label ?precisionEnd }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</query>
|
</query>
|
||||||
|
|
|
@ -9,11 +9,10 @@
|
||||||
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 ?dateTime ?precision WHERE {
|
SELECT DISTINCT ?dateTime (afn:localname(?dateTimePrecision) AS ?precision) WHERE {
|
||||||
GRAPH ?g1 { ?subject ?property ?dateTimeValue }
|
GRAPH ?g1 { ?subject ?property ?dateTimeValue }
|
||||||
GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime ;
|
GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime ;
|
||||||
core:dateTimePrecision ?dateTimePrecision . }
|
core:dateTimePrecision ?dateTimePrecision . }
|
||||||
GRAPH ?g3 { ?dateTimePrecision rdfs:label ?precision }
|
|
||||||
}
|
}
|
||||||
</query>
|
</query>
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
|
|
||||||
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeInterval -->
|
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeInterval -->
|
||||||
|
|
||||||
<#if statement.dateTimeStart??>
|
<#import "lib-datetime.ftl" as dt>
|
||||||
${dateTimeStart} ${precisionStart}
|
|
||||||
</#if>
|
<@dt.dateTimeIntervalLong "${statement.dateTimeStart!}" "${statement.precisionStart!}"
|
||||||
-
|
"${statement.dateTimeEnd!}" "${statement.precisionEnd!}" />
|
||||||
<#if statement.dateTimeEnd??>
|
|
||||||
${dateTimeEnd} ${precisionEnd}
|
|
||||||
</#if>
|
|
||||||
|
|
|
@ -4,11 +4,4 @@
|
||||||
|
|
||||||
<#import "lib-datetime.ftl" as dt>
|
<#import "lib-datetime.ftl" as dt>
|
||||||
|
|
||||||
<#--
|
${dt.formatXsdDateTimeLong(statement.dateTime, statement.precision)}
|
||||||
${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")}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue