From 2ef703f380660c0520e89562b900d90eb2d21a79 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Thu, 17 Jul 2014 15:43:58 -0400 Subject: [PATCH] VIVO-828: updated the publicationVenueOf (vivo) property to use a new list view with fuller citation details --- .../listViewConfig-publicationVenueFor.xml | 133 ++++++++++++++++++ .../propStatement-publicationVenueFor.ftl | 49 +++++++ rdf/display/everytime/vivoListViewConfig.rdf | 4 + 3 files changed, 186 insertions(+) create mode 100644 productMods/config/listViewConfig-publicationVenueFor.xml create mode 100644 productMods/templates/freemarker/body/partials/individual/propStatement-publicationVenueFor.ftl diff --git a/productMods/config/listViewConfig-publicationVenueFor.xml b/productMods/config/listViewConfig-publicationVenueFor.xml new file mode 100644 index 00000000..55ef130f --- /dev/null +++ b/productMods/config/listViewConfig-publicationVenueFor.xml @@ -0,0 +1,133 @@ + + + + + + + + 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#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + + SELECT DISTINCT ?subclass + ?infoResource ?infoResourceName + ?dateTime + ?volume + ?startPage + ?endPage + ?locale + WHERE { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?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 vitro:mostSpecificType ?subclass } + OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime + } + + + FILTER ( bound(?infoResource) ) + + } ORDER BY ?subclass DESC(?dateTime) ?infoResourceName + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + CONSTRUCT { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource vitro:mostSpecificType ?subclass + } WHERE { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource vitro:mostSpecificType ?subclass + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + CONSTRUCT { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource rdfs:label ?infoResourceName . + } WHERE { + { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> + } UNION { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource rdfs:label ?infoResourceName + } } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CONSTRUCT { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?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 <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj . + ?editorObj rdfs:label ?editor . + } WHERE { + { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + } UNION { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource ?infoResourceProperty ?infoResourceValue + } UNION { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource core:relatedBy ?editorship . + ?editorship a core:Editorship . + ?editorship core:relates ?editorObj . + ?editorObj a foaf:Person . + ?editorObj rdfs:label ?editor + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + CONSTRUCT { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource rdfs:label ?infoResourceName . + ?infoResource core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime + } WHERE { + ?subject ?property ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource rdfs:label ?infoResourceName . + ?infoResource core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime + } + + + + diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-publicationVenueFor.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-publicationVenueFor.ftl new file mode 100644 index 00000000..e6a0f33a --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-publicationVenueFor.ftl @@ -0,0 +1,49 @@ +<#-- $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.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!}. + + + + + + <#local resourceTitle> + <#if statement.infoResource??> + <#if citationDetails?has_content> + ${statement.infoResourceName}.  + <#else> + ${statement.infoResourceName} + + <#else> + <#-- This shouldn't happen, but we must provide for it --> + ${i18n().missing_info_resource} + + + + ${resourceTitle} ${citationDetails!} <@dt.yearSpan "${statement.dateTime!}" /> + diff --git a/rdf/display/everytime/vivoListViewConfig.rdf b/rdf/display/everytime/vivoListViewConfig.rdf index 642840ee..01501ec2 100644 --- a/rdf/display/everytime/vivoListViewConfig.rdf +++ b/rdf/display/everytime/vivoListViewConfig.rdf @@ -74,6 +74,10 @@ listViewConfig-publisherOf.xml + + listViewConfig-publicationVenueFor.xml + + listViewConfig-orcidId.xml