NIHVIVO-1341, NIHVIVO-1335 Handle various error conditions in list view config (blank query, blank template name, template doesn't exist)

This commit is contained in:
rjy7 2010-12-21 00:00:23 +00:00
parent 7341db981b
commit 9195704be9
3 changed files with 36 additions and 0 deletions

View file

@ -15,8 +15,17 @@
xmlns:rdfs="&rdfs;"
xmlns:vitro="&vitro;">
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#authorInAuthorship">
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-authorInAuthorship.xml</display:listViewConfigFile>
</rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#educationalTraining">
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-educationalTraining.xml</display:listViewConfigFile>
</rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#informationResourceInAuthorship">
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-informationResourceInAuthorship.xml</display:listViewConfigFile>
</rdf:Description>
</rdf:RDF>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<list-view-config>
<query>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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)
</query>
<edit-object>edTraining</edit-object>
<template>propStatement-authorInAuthorship.ftl</template>
</list-view-config>

View file

@ -18,3 +18,4 @@
</#if>
<@s.join [ degree, org, statement.deptOrSchool!, statement.info!, dateTime! ] />
c