From 19d40bf2a45f832ecca5b97f7ecb5aefe3b8f4a5 Mon Sep 17 00:00:00 2001 From: Graham Triggs Date: Tue, 5 Jul 2016 17:53:27 +0100 Subject: [PATCH] [VIVO-1237] Add citation meta tags --- .../main/webapp/config/listViewConfig-default.xml | 15 +++++++++++---- .../individual/propStatement-dataDefault.ftl | 8 +++++--- .../individual/propStatement-dateTimeValue.ftl | 2 ++ .../partials/individual/propStatement-default.ftl | 3 +++ .../partials/individual/propStatement-doi.ftl | 7 +++++-- ...pStatement-informationResourceInAuthorship.ftl | 3 +++ 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/webapp/src/main/webapp/config/listViewConfig-default.xml b/webapp/src/main/webapp/config/listViewConfig-default.xml index 8404ca7e..3aaa19f1 100644 --- a/webapp/src/main/webapp/config/listViewConfig-default.xml +++ b/webapp/src/main/webapp/config/listViewConfig-default.xml @@ -20,12 +20,11 @@ ?label ?localName ?type - ?objectType + ?specificObjectType ?title WHERE { ?subject ?property ?object . - ?object a ?objectType . LET (?localName := afn:localname(?object)) OPTIONAL @@ -33,6 +32,11 @@ ?object rdfs:label ?label . } + OPTIONAL + { + ?object vitro:mostSpecificType ?specificObjectType . + } + OPTIONAL { # Get mostSpecificType only for Persons @@ -72,7 +76,6 @@ CONSTRUCT { ?subject ?property ?object . - ?object a ?objectType . ?object rdfs:label ?label . ?object vitro:mostSpecificType ?subclass . ?subclass rdfs:label ?type . @@ -84,7 +87,6 @@ { { ?subject ?property ?object . - ?object a ?objectType . } UNION { @@ -92,6 +94,11 @@ ?object rdfs:label ?label . } UNION + { + ?subject ?property ?object . + ?object vitro:mostSpecificType ?subclass . + } + UNION { ?subject ?property ?object . ?object vitro:mostSpecificType ?subclass . diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-dataDefault.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-dataDefault.ftl index 7891a72e..ec1540b1 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-dataDefault.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-dataDefault.ftl @@ -6,14 +6,15 @@ is also used to generate the property statement during a deletion. --> <#import "lib-datetime.ftl" as dt> +<#import "lib-meta-tags.ftl" as lmt> <#if property.rangeDatatypeURI?? && property.rangeDatatypeURI?contains("#")> <#assign datatype = property.rangeDatatypeURI?substring(property.rangeDatatypeURI?last_index_of("#")+1) /> <#else> <#assign datatype = "none" /> -<@showStatement statement datatype /> +<@showStatement statement property datatype /> -<#macro showStatement statement datatype> +<#macro showStatement statement property datatype> <#assign theValue = statement.value /> <#if theValue?contains("