NIHVIVO-1335, NIHVIVO-1510 Working on authorship list view and collated object properties: some reorganization to handle collated properties, but not displaying as collated yet.
This commit is contained in:
parent
5a4d336077
commit
a0c88c859c
4 changed files with 35 additions and 13 deletions
|
@ -17,24 +17,28 @@
|
|||
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.
|
||||
the linked individual.
|
||||
- Each assertion or set of optional assertions must reference a different graph variable, so that
|
||||
we do not impose a requirement about which assertions are in the same graph.
|
||||
-->
|
||||
|
||||
<list-view-config>
|
||||
<!--
|
||||
<query>
|
||||
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 ?subClass ?authorship ?infoResource ?infoResourceName ?dateTime WHERE {
|
||||
SELECT DISTINCT ?subClass ?authorship (afn:localname(?authorship) AS ?authorshipName)
|
||||
?infoResource ?infoResourceName ?dateTime WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?authorship }
|
||||
GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
|
||||
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
|
||||
GRAPH ?g4 { ?subClass rdfs:subClassOf core:InformationResource }
|
||||
OPTIONAL { GRAPH ?g5 { ?infoResource core:hasDateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime . } }
|
||||
OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf core:InformationResource }
|
||||
GRAPH ?g5 { ?infoResource a ?subclass } }
|
||||
OPTIONAL { GRAPH ?g6 { ?infoResource core:hasDateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime . } }
|
||||
} ORDER BY ?subClass DESC(?dateTime) ?infoResourceName
|
||||
</query>
|
||||
-->
|
||||
|
||||
<template>propStatement-authorInAuthorship.ftl</template>
|
||||
</list-view-config>
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
- 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.
|
||||
instead.
|
||||
- Each assertion or set of optional assertions must reference a different graph variable, so that
|
||||
we do not impose a requirement about which assertions are in the same graph.
|
||||
-->
|
||||
|
||||
<list-view-config>
|
||||
|
@ -30,9 +32,10 @@
|
|||
SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName
|
||||
?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime
|
||||
WHERE {
|
||||
|
||||
GRAPH ?g1 { ?subject ?property ?edTraining }
|
||||
OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
|
||||
?org rdfs:label ?orgName . } }
|
||||
?org rdfs:label ?orgName . } }
|
||||
OPTIONAL { GRAPH ?g3 { ?edTraining core:degreeEarned ?degree } }
|
||||
OPTIONAL { GRAPH ?g4 { ?degree rdfs:label ?degreeName } }
|
||||
OPTIONAL { GRAPH ?g5 { ?degree core:abbreviation ?degreeAbbr } }
|
||||
|
@ -40,7 +43,8 @@
|
|||
OPTIONAL { GRAPH ?g7 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
|
||||
OPTIONAL { GRAPH ?g8 { ?edTraining core:supplementalInformation ?info } }
|
||||
OPTIONAL { GRAPH ?g9 { ?edTraining core:hasDateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime } }
|
||||
?dateTimeValue core:dateTime ?dateTime } }
|
||||
|
||||
} ORDER BY DESC(?dateTime)
|
||||
</query>
|
||||
|
||||
|
|
|
@ -5,3 +5,17 @@
|
|||
<#import "lib-sequence.ftl" as s>
|
||||
<#import "lib-datetime.ftl" as dt>
|
||||
|
||||
<#assign linkedIndividual>
|
||||
<#if statement.infoResource??>
|
||||
<a href="${url(statement.infoResource)}">${statement.infoResourceName}</a>
|
||||
<#else>
|
||||
<#-- This shouldn't happen, but we must provide for it -->
|
||||
<a href="${url(statement.authorship)}">(no linked publication) ${statement.authorshipName}</a>
|
||||
</#if>
|
||||
</#assign>
|
||||
|
||||
<#if statement.dateTime??>
|
||||
<#assign year = dt.xsdDateTimeToYear(statement.dateTime)>
|
||||
</#if>
|
||||
|
||||
<@s.join [ linkedIndividual, year! ] />
|
|
@ -16,12 +16,12 @@
|
|||
<a href="${url(statement.org)}">${statement.orgName}</a>
|
||||
<#else>
|
||||
<#-- This shouldn't happen, but we must provide for it -->
|
||||
<a href="${url(statement.edTraining)}">educational training ${statement.edTrainingName}</a>
|
||||
<a href="${url(statement.edTraining)}">(no linked organization) ${statement.edTrainingName}</a>
|
||||
</#if>
|
||||
</#assign>
|
||||
|
||||
<#if statement.dateTime??>
|
||||
<#assign dateTime = dt.xsdDateTimeToYear(statement.dateTime)>
|
||||
<#assign year = dt.xsdDateTimeToYear(statement.dateTime)>
|
||||
</#if>
|
||||
|
||||
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info!, dateTime! ] />
|
||||
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info!, year! ] />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue