NIHVIVO-1336 Modifications to educational training query and template due to core:EducationalTraining being associated with a core:DateTimeInterval rather than a core:DateTimeValue
This commit is contained in:
parent
88697e61db
commit
9f62e70e81
2 changed files with 31 additions and 8 deletions
|
@ -10,7 +10,7 @@
|
|||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName
|
||||
?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime
|
||||
?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTimeStart ?dateTimeEnd
|
||||
WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?edTraining }
|
||||
OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
|
||||
|
@ -23,10 +23,15 @@
|
|||
OPTIONAL { GRAPH ?g6 { ?edTraining core:majorField ?majorField } }
|
||||
OPTIONAL { GRAPH ?g7 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
|
||||
OPTIONAL { GRAPH ?g8 { ?edTraining core:supplementalInformation ?info } }
|
||||
OPTIONAL { GRAPH ?g9 { ?edTraining core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:dateTime ?dateTime }
|
||||
OPTIONAL { GRAPH ?g9 { ?edTraining core:dateTimeInterval ?dateTimeInterval }
|
||||
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart }
|
||||
}
|
||||
} ORDER BY DESC(?dateTime)
|
||||
OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
||||
}
|
||||
}
|
||||
} ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart)
|
||||
</query>
|
||||
|
||||
<template>propStatement-educationalTraining.ftl</template>
|
||||
|
|
|
@ -26,10 +26,28 @@
|
|||
</#if>
|
||||
</#local>
|
||||
|
||||
<#if statement.dateTime??>
|
||||
<#local year = dt.xsdDateTimeToYear(statement.dateTime)>
|
||||
<#local dateTimeInterval>
|
||||
<#if statement.dateTimeStart??>
|
||||
<#local startYear = dt.xsdDateTimeToYear(statement.dateTimeStart)>
|
||||
</#if>
|
||||
<#if statement.dateTimeEnd??>
|
||||
<#local endYear = dt.xsdDateTimeToYear(statement.dateTimeEnd)>
|
||||
</#if>
|
||||
<#if startYear?? && endYear??>
|
||||
${startYear} - ${endYear}
|
||||
<#elseif startYear??>
|
||||
${startYear} -
|
||||
<#elseif endYear ??>
|
||||
${endYear} <#-- no hyphen, so doesn't display as a range with missing start date -->
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info!, year! ] />
|
||||
<#local date>
|
||||
<#if dateTimeInterval?has_content>
|
||||
<span class="listDateTime">${dateTimeInterval}</span>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info! ] /> ${date}
|
||||
|
||||
</#macro>
|
Loading…
Add table
Add a link
Reference in a new issue