diff --git a/productMods/config/listViewConfig-authorInAuthorship.xml b/productMods/config/listViewConfig-authorInAuthorship.xml index 9c3b63be..ea402104 100644 --- a/productMods/config/listViewConfig-authorInAuthorship.xml +++ b/productMods/config/listViewConfig-authorInAuthorship.xml @@ -8,19 +8,51 @@ 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/> + SELECT DISTINCT ?subclass ?authorship ?infoResource ?infoResourceName - ?dateTime WHERE { + ?dateTime + ?journal + ?volume + ?startPage + ?endPage + ?publisher + ?locale + ?appearsIn + ?partOf + ?editor + WHERE { ?subject ?property ?authorship OPTIONAL { ?authorship core:linkedInformationResource ?infoResource . ?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 core:publisher ?publisherObj . + ?publisherObj rdfs:label ?publisher + } + OPTIONAL { ?infoResource core:editor ?editorObj . + ?editorObj rdfs:label ?editor + } + OPTIONAL { ?infoResource core:partOf ?partOfObj . + ?partOfObj rdfs:label ?partOf + } + OPTIONAL { ?subclass rdfs:subClassOf core:InformationResource . ?infoResource a ?subclass } + OPTIONAL { ?infoResource core:hasPublicationVenue ?publishedIn . + ?publishedIn rdfs:label ?journal + } OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue . ?dateTimeValue core:dateTime ?dateTime } @@ -44,23 +76,94 @@ 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 ?authorship . ?authorship ?authorshipProperty ?authorshipValue . ?authorship core:linkedInformationResource ?infoResource . - ?infoResource rdfs:label ?infoResourceName + ?infoResource rdfs:label ?infoResourceName . + ?infoResource core:hasPublicationVenue ?publishedIn . + ?publishedIn rdfs:label ?journal } WHERE { { ?subject ?property ?authorship } UNION { ?subject ?property ?authorship . - ?authorship ?authorshipProperty ?authorshipValue . + ?authorship ?authorshipProperty ?authorshipValue + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource } UNION { ?subject ?property ?authorship . ?authorship core:linkedInformationResource ?infoResource . ?infoResource rdfs:label ?infoResourceName + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource core:hasPublicationVenue ?publishedIn + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource core:hasPublicationVenue ?publishedIn . + ?publishedIn rdfs:label ?journal } + + } + + + + 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 ?authorship . + ?authorship ?authorshipProperty ?authorshipValue . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource ?infoResourceProperty ?infoResourceValue . + ?infoResource bibo:reproducedIn ?appearsInObj . + ?infoResource core:publisher ?publisherObj . + ?infoResource core:editor ?editorObj . + ?infoResource core:partOf ?partOfObj . + ?appearsInObj rdfs:label ?appearsIn . + ?publisherObj rdfs:label ?publisher . + ?editorObj rdfs:label ?editor . + ?partOfObj rdfs:label ?partOf + } WHERE { + { + ?subject ?property ?authorship + } + UNION { + ?subject ?property ?authorship . + ?authorship ?authorshipProperty ?authorshipValue + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource ?infoResourceProperty ?infoResourceValue + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource bibo:reproducedIn ?appearsInObj . + ?appearsInObj rdfs:label ?appearsIn + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource core:publisher ?publisherObj . + ?publisherObj rdfs:label ?publisher + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource core:editor ?editorObj . + ?editorObj rdfs:label ?editor + } UNION { + ?subject ?property ?authorship . + ?authorship core:linkedInformationResource ?infoResource . + ?infoResource core:partOf ?partOfObj . + ?partOfObj rdfs:label ?partOf + } } diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl index 85bdbba3..8a059a6b 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl @@ -14,16 +14,89 @@ <#-- Use a macro to keep variable assignments local; otherwise the values carry over to the next statement --> <#macro showAuthorship statement> - - <#local linkedIndividual> + <#local resourceTitle> <#if statement.infoResource??> - ${statement.infoResourceName} + ${statement.infoResourceName}.  <#else> <#-- This shouldn't happen, but we must provide for it --> - missing information resource + missing information resource - ${linkedIndividual} <@dt.yearSpan "${statement.dateTime!}" /> + <#local citationDetails> + <#if statement.subclass??> + <#if statement.subclass?contains("Article")> + <#if statement.journal??> + ${statement.journal!}.  + <#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!}. + + + <#elseif statement.subclass?contains("Chapter")> + <#if statement.journal??> + ${statement.journal!}. + <#elseif statement.appearsIn??> + ${statement.appearsIn!}. + <#elseif statement.partOf??> + ${statement.partOf!}. + + <#if statement.editor??> + Ed. ${statement.editor!}.  + + <#if statement.locale?? && statement.publisher??> + ${statement.locale!}: ${statement.publisher!}. + <#elseif statement.locale??> + ${statement.locale!}. + <#elseif statement.publisher??> + ${statement.publisher!}. + + <#if statement.startPage?? && statement.endPage??> + ${statement.startPage!}-${statement.endPage!}. + <#elseif statement.startPage??> + ${statement.startPage!}. + + <#elseif statement.subclass?contains("Book")> + <#if statement.volume??> + Vol. ${statement.volume!}.  + + <#if statement.editor??> + Ed. ${statement.editor!}.  + + <#if statement.locale?? && statement.publisher??> + ${statement.locale!}: ${statement.publisher!}. + <#elseif statement.locale??> + ${statement.locale!}. + <#elseif statement.publisher??> + ${statement.publisher!}. + + <#else> + <#if statement.journal??> + ${statement.journal!}. + <#elseif statement.appearsIn??> + ${statement.appearsIn!}. + <#elseif statement.partOf??> + ${statement.partOf!}. + + <#if statement.editor??> + Ed. ${statement.editor!}.  + + <#if statement.startPage?? && statement.endPage??> + ${statement.startPage!}-${statement.endPage!}. + <#elseif statement.startPage??> + ${statement.startPage!}. + + + + - \ No newline at end of file + ${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" /> + +