diff --git a/productMods/config/listViewConfig-dateTimeInterval.xml b/productMods/config/listViewConfig-dateTimeInterval.xml index 21bbfde5..82ec1671 100644 --- a/productMods/config/listViewConfig-dateTimeInterval.xml +++ b/productMods/config/listViewConfig-dateTimeInterval.xml @@ -9,7 +9,7 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT DISTINCT ?dateTimeInterval + SELECT DISTINCT ?dateTimeInterval ?label ?valueStart ?valueStartName ?dateTimeStart ?precisionStart @@ -32,6 +32,8 @@ LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd)) } } + OPTIONAL {?dateTimeInterval rdfs:label ?label} + FILTER ( bound(?dateTimeStart) || bound(?dateTimeEnd) ) @@ -40,11 +42,13 @@ PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> CONSTRUCT { ?subject ?property ?dateTimeInterval . ?dateTimeInterval core:start ?valueStart . - ?dateTimeInterval core:end ?valueEnd + ?dateTimeInterval core:end ?valueEnd . + ?dateTimeInterval rdfs:label ?label } WHERE { { ?subject ?property ?dateTimeInterval @@ -57,6 +61,10 @@ ?subject ?property ?dateTimeInterval . ?dateTimeInterval core:end ?valueEnd } + UNION { + ?subject ?property ?dateTimeInterval . + ?dateTimeInterval rdfs:label ?label + } } diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl index 91702a2b..281ef448 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl @@ -11,5 +11,10 @@ <#if ! statement.valueStart?? && ! statement.valueEnd??> incomplete date/time interval <#else> - ${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}", "${statement.dateTimeEnd!}", "${statement.precisionEnd!}")} - \ No newline at end of file + <#if statement.label??> + ${statement.label!} + <#else> + ${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}", "${statement.dateTimeEnd!}", "${statement.precisionEnd!}")} + + +