diff --git a/productMods/config/listViewConfig-dateTimeInterval.xml b/productMods/config/listViewConfig-dateTimeInterval.xml index 201c90c0..d3f258e8 100644 --- a/productMods/config/listViewConfig-dateTimeInterval.xml +++ b/productMods/config/listViewConfig-dateTimeInterval.xml @@ -9,16 +9,21 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT DISTINCT ?dateTimeStart (afn:localname(?dateTimePrecisionStart) AS ?precisionStart) - ?dateTimeEnd (afn:localname(?dateTimePrecisionEnd) AS ?precisionEnd) WHERE { + SELECT DISTINCT ?dateTimeInterval (afn:localname(?dateTimeInterval) AS ?intervalName) + ?valueStart (afn:localname(?valueStart) AS ?valueStartName) + ?dateTimeStart + (afn:localname(?dateTimePrecisionStart) AS ?precisionStart) + ?valueEnd (afn:localname(?valueEnd) AS ?valueEndName) + ?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 . } - } - OPTIONAL { GRAPH ?g3 { ?dateTimeInterval core:end ?dateTimeEndValue . - ?dateTimeEndValue core:dateTime ?dateTimeEnd ; - core:dateTimePrecision ?dateTimePrecisionEnd . } + OPTIONAL { GRAPH ?g2 { ?dateTimeInterval core:start ?valueStart } + OPTIONAL { GRAPH ?g3 { ?valueStart core:dateTime ?dateTimeStart } } + OPTIONAL { GRAPH ?g4 { ?valueStart core:dateTimePrecision ?dateTimePrecisionStart } } + } + OPTIONAL { GRAPH ?g5 { ?dateTimeInterval core:end ?valueEnd } + OPTIONAL { GRAPH ?g6 { ?valueEnd core:dateTime ?dateTimeEnd } } + OPTIONAL { GRAPH ?g7 { ?valueEnd core:dateTimePrecision ?dateTimePrecisionEnd } } } } diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl index 92ec115d..0e764608 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeInterval.ftl @@ -4,5 +4,9 @@ <#import "lib-datetime.ftl" as dt> -${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}", - "${statement.dateTimeEnd!}", "${statement.precisionEnd!}")} +<#if ! statement.valueStart?? && ! statement.valueEnd??> + ${statement.intervalName} (incomplete date/time interval data) +<#else> + ${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}", + "${statement.dateTimeEnd!}", "${statement.precisionEnd!}")} + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeValue.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeValue.ftl index 036363d6..47b06195 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeValue.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-dateTimeValue.ftl @@ -6,7 +6,7 @@ <#-- No core:dateTime data property assigned. Display a link to the core:DateTimeValue object --> <#if ! statement.dateTime??> - ${localName(statement.dateTimeValue)} (incomplete data) + ${dateTimeValueName} (incomplete date/time data) <#else> ${dt.formatXsdDateTimeLong(statement.dateTime, statement.precision!)} \ No newline at end of file