diff --git a/productMods/config/listViewConfig-authorInAuthorship.xml b/productMods/config/listViewConfig-authorInAuthorship.xml
index 96da0684..43b356e0 100644
--- a/productMods/config/listViewConfig-authorInAuthorship.xml
+++ b/productMods/config/listViewConfig-authorInAuthorship.xml
@@ -11,31 +11,30 @@
sending it to the template
Query requirements:
- - WHERE clause must contain a statement ?subject ?property ?objectvariable, with the variables
- ?subject and ?property named as such. The objectvariable can be given any name, but it must be
+ - WHERE clause must contain a statement ?subject ?property ?object, with the variables
+ ?subject and ?property named as such. The object can be given any name, but it must be
included in the SELECT terms retrieved by the query. This is the statement that will be edited
from the edit links.
+ - If the linked individual may be missing, the query should select the object's localname using
+ the ARQ localname function, so that the template can display the local name in the absence of
+ the linked individual.
-->
+
propStatement-authorInAuthorship.ftl
\ No newline at end of file
diff --git a/productMods/config/listViewConfig-educationalTraining.xml b/productMods/config/listViewConfig-educationalTraining.xml
index c7c958ad..9972e376 100644
--- a/productMods/config/listViewConfig-educationalTraining.xml
+++ b/productMods/config/listViewConfig-educationalTraining.xml
@@ -11,30 +11,37 @@
sending it to the template
Query requirements:
- - WHERE clause must contain a statement ?subject ?property ?objectvariable, with the variables
- ?subject and ?property named as such. The objectvariable can be given any name, but it must be
+ - WHERE clause must contain a statement ?subject ?property ?object, with the variables
+ ?subject and ?property named as such. The object can be given any name, but it must be
included in the SELECT terms retrieved by the query. This is the statement that will be edited
from the edit links.
+ - If the linked individual may be missing, the query should select the object's localname using
+ the ARQ localname function, so that the template can display the local name in the absence of
+ the linked individual. An alternative is to use the localName() method provided to the template
+ instead.
-->
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 ?edTraining ?org ?orgName ?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime WHERE {
- ?subject ?property ?edTraining .
- ?edTraining core:trainingAtOrganization ?org .
- ?org rdfs:label ?orgName .
- OPTIONAL { ?edTraining core:degreeEarned ?degree . }
- OPTIONAL { ?degree rdfs:label ?degreeName . }
- OPTIONAL { ?degree core:abbreviation ?degreeAbbr . }
- OPTIONAL { ?edTraining core:majorField ?majorField . }
- OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool . }
- OPTIONAL { ?edTraining core:supplementalInformation ?info . }
- OPTIONAL { ?edTraining core:hasDateTimeValue ?dateTimeValue .
- ?dateTimeValue core:dateTime ?dateTime . }
- } ORDER BY DESC(?dateTime)
+ SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName
+ ?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime
+ WHERE {
+ ?subject ?property ?edTraining .
+ OPTIONAL { ?edTraining core:trainingAtOrganization ?org .
+ ?org rdfs:label ?orgName . }
+ OPTIONAL { ?edTraining core:degreeEarned ?degree . }
+ OPTIONAL { ?degree rdfs:label ?degreeName . }
+ OPTIONAL { ?degree core:abbreviation ?degreeAbbr . }
+ OPTIONAL { ?edTraining core:majorField ?majorField . }
+ OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool . }
+ OPTIONAL { ?edTraining core:supplementalInformation ?info . }
+ OPTIONAL { ?edTraining core:hasDateTimeValue ?dateTimeValue .
+ ?dateTimeValue core:dateTime ?dateTime . }
+ } ORDER BY DESC(?dateTime)
propStatement-educationalTraining.ftl
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl
new file mode 100644
index 00000000..7ba33325
--- /dev/null
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl
@@ -0,0 +1,7 @@
+<#-- $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#educationalTraining -->
+
+<#import "lib-sequence.ftl" as s>
+<#import "lib-datetime.ftl" as dt>
+
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl
index 98f4fd40..3281bb24 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl
@@ -11,10 +11,17 @@
#if>
#assign>
-<#assign org>${statement.orgName}#assign>
+<#assign linkedIndividual>
+ <#if statement.org??>
+ ${statement.orgName}
+ <#else>
+ <#-- This shouldn't happen, but we must provide for it -->
+ educational training ${statement.edTrainingName}
+ #if>
+#assign>
<#if statement.dateTime??>
<#assign dateTime = dt.xsdDateTimeToYear(statement.dateTime)>
#if>
-<@s.join [ degree, org, statement.deptOrSchool!, statement.info!, dateTime! ] />
+<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info!, dateTime! ] />