NIHVIVO-1590 dateTimeValue custom list view finished; dateTimeInterval custom list view in progress.
This commit is contained in:
parent
3cd9016715
commit
4d69f9574b
6 changed files with 83 additions and 1 deletions
|
@ -103,4 +103,12 @@
|
|||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#relatedRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-relatedRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#dateTimeInterval">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-dateTimeInterval.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<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:RDF>
|
|
@ -20,7 +20,7 @@
|
|||
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
||||
}
|
||||
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime . }
|
||||
?dateTimeValue core:dateTime ?dateTime . }
|
||||
}
|
||||
}
|
||||
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
|
||||
|
|
28
productMods/config/listViewConfig-dateTimeInterval.xml
Normal file
28
productMods/config/listViewConfig-dateTimeInterval.xml
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?dateTimeStart ?precisionStart ?dateTimeEnd ?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 }
|
||||
}
|
||||
OPTIONAL { GRAPH ?g4 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd ;
|
||||
core:dateTimePrecision ?dateTimePrecisionEnd . }
|
||||
GRAPH ?g5 { ?dateTimePrecisionEnd rdfs:label ?precisionEnd }
|
||||
}
|
||||
}
|
||||
</query>
|
||||
|
||||
<template>propStatement-dateTimeInterval.ftl</template>
|
||||
</list-view-config>
|
21
productMods/config/listViewConfig-dateTimeValue.xml
Normal file
21
productMods/config/listViewConfig-dateTimeValue.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?dateTime ?precision WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?dateTimeValue }
|
||||
GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime ;
|
||||
core:dateTimePrecision ?dateTimePrecision . }
|
||||
GRAPH ?g3 { ?dateTimePrecision rdfs:label ?precision }
|
||||
}
|
||||
</query>
|
||||
|
||||
<template>propStatement-dateTimeValue.ftl</template>
|
||||
</list-view-config>
|
|
@ -0,0 +1,11 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeInterval -->
|
||||
|
||||
<#if statement.dateTimeStart??>
|
||||
${dateTimeStart} ${precisionStart}
|
||||
</#if>
|
||||
-
|
||||
<#if statement.dateTimeEnd??>
|
||||
${dateTimeEnd} ${precisionEnd}
|
||||
</#if>
|
|
@ -0,0 +1,14 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#dateTimeValue -->
|
||||
|
||||
<#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")}
|
Loading…
Add table
Add a link
Reference in a new issue