VIVO-828: updated the publisherOf (vivo) property to use a new list view with fuller citation details

This commit is contained in:
Tim Worrall 2014-07-17 14:36:50 -04:00
parent c4f01e9cb0
commit f3575d6309
3 changed files with 267 additions and 0 deletions

View file

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
SELECT DISTINCT ?subclass
?infoResource ?infoResourceName
?dateTime
?journal
?volume
?startPage
?endPage
?locale
?appearsIn
?partOf
WHERE {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource rdfs:label ?infoResourceName .
OPTIONAL { ?infoResource bibo:volume ?volume }
OPTIONAL { ?infoResource bibo:pageStart ?startPage }
OPTIONAL { ?infoResource bibo:pageEnd ?endPage }
OPTIONAL { ?infoResource core:placeOfPublication ?locale }
OPTIONAL { ?infoResource bibo:reproducedIn ?appearsInObj .
?appearsInObj rdfs:label ?appearsIn
}
OPTIONAL { ?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?partOfObj rdfs:label ?partOf
}
OPTIONAL { ?infoResource core:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal
}
OPTIONAL { ?infoResource vitro:mostSpecificType ?subclass }
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
}
<critical-data-required>
FILTER ( bound(?infoResource) )
</critical-data-required>
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
</query-select>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource vitro:mostSpecificType ?subclass
} WHERE {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource vitro:mostSpecificType ?subclass
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
CONSTRUCT {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource rdfs:label ?infoResourceName .
?infoResource core:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal
} WHERE {
{
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt;
} UNION {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource rdfs:label ?infoResourceName
} UNION {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:hasPublicationVenue ?publishedIn
} UNION {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource ?infoResourceProperty ?infoResourceValue .
?infoResource bibo:reproducedIn ?appearsInObj .
?infoResource core:publisher ?publisherObj .
?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship .
?editorship core:relates ?editorObj .
?editorObj a foaf:Person .
?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?appearsInObj rdfs:label ?appearsIn .
?editorObj rdfs:label ?editor .
?partOfObj rdfs:label ?partOf
} WHERE {
{
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
} UNION {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource ?infoResourceProperty ?infoResourceValue
} UNION {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:reproducedIn ?appearsInObj .
?appearsInObj rdfs:label ?appearsIn
} UNION {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship .
?editorship core:relates ?editorObj .
?editorObj a foaf:Person .
?editorObj rdfs:label ?editor
} UNION {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?partOfObj rdfs:label ?partOf
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
CONSTRUCT {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource rdfs:label ?infoResourceName .
?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
} WHERE {
?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource rdfs:label ?infoResourceName .
?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
}
</query-construct>
<template>propStatement-publisherOf.ftl</template>
</list-view-config>

View file

@ -0,0 +1,94 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for faux property "editor of". See the PropertyConfig.3 file for details.
This template must be self-contained and not rely on other variables set for the individual page, because it
is also used to generate the property statement during a deletion.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>
<@showEditorship statement />
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showEditorship statement>
<#local citationDetails>
<#if statement.subclass??>
<#if statement.subclass?contains("Article")>
<#if statement.journal??>
<em>${statement.journal!}</em>.&nbsp;
<#if statement.volume?? && statement.startPage?? && statement.endPage??>
${statement.volume!}:${statement.startPage!}-${statement.endPage!}.
<#elseif statement.volume?? && statement.startPage??>
${statement.volume!}:${statement.startPage!}.
<#elseif statement.volume??>
${statement.volume!}.
<#elseif statement.startPage?? && statement.endPage??>
${statement.startPage!}-${statement.endPage!}.
<#elseif statement.startPage??>
${statement.startPage!}.
</#if>
</#if>
<#elseif statement.subclass?contains("Chapter")>
<#if statement.journal??>
<em>${statement.journal!}</em>.
<#elseif statement.appearsIn??>
<em>${statement.appearsIn!}</em>.
<#elseif statement.partOf??>
<em>${statement.partOf!}</em>.
</#if>
<#if statement.locale?? && statement.publisher??>
${statement.locale!}:&nbsp;${statement.publisher!}.
<#elseif statement.locale??>
${statement.locale!}.
<#elseif statement.publisher??>
${statement.publisher!}.
</#if>
<#if statement.startPage?? && statement.endPage??>
${statement.startPage!}-${statement.endPage!}.
<#elseif statement.startPage??>
${statement.startPage!}.
</#if>
<#elseif statement.subclass?contains("Book")>
<#if statement.volume?? && (statement.volume!?length > 0 )>
${i18n().volume_abbreviated}&nbsp;${statement.volume!}.&nbsp;
</#if>
<#if statement.locale?? && statement.publisher??>
${statement.locale!}:&nbsp;${statement.publisher!}.
<#elseif statement.locale??>
${statement.locale!}.
</#if>
<#else>
<#if statement.journal??>
<em>${statement.journal!}</em>.
<#elseif statement.appearsIn??>
<em>${statement.appearsIn!}</em>.
<#elseif statement.partOf??>
<em>${statement.partOf!}</em>.
</#if>
<#if statement.startPage?? && statement.endPage??>
${statement.startPage!}-${statement.endPage!}.
<#elseif statement.startPage??>
${statement.startPage!}.
</#if>
</#if>
</#if>
</#local>
<#local resourceTitle>
<#if statement.infoResource??>
<#if citationDetails?has_content>
<a href="${profileUrl(statement.uri("infoResource"))}" title="${i18n().resource_name}">${statement.infoResourceName}</a>.&nbsp;
<#else>
<a href="${profileUrl(statement.uri("infoResource"))}" title="${i18n().resource_name}">${statement.infoResourceName}</a>
</#if>
<#else>
<#-- This shouldn't happen, but we must provide for it -->
<a href="${profileUrl(statement.uri("editorship"))}" title="${i18n().missing_info_resource}">${i18n().missing_info_resource}</a>
</#if>
</#local>
${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" />
</#macro>

View file

@ -69,6 +69,10 @@
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasResearchArea">
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasAssociatedConcept.xml</display:listViewConfigFile>
</rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#publisherOf">
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-publisherOf.xml</display:listViewConfigFile>
</rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#orcidId">
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-orcidId.xml</display:listViewConfigFile>