From 4aa5c90b5eb747d03f2dc178b53b3b468ad5c114 Mon Sep 17 00:00:00 2001 From: stellamit Date: Sun, 6 Nov 2011 03:17:23 +0000 Subject: [PATCH] NIHVIVO-3271 list view for internal and external concepts --- .../config/listViewConfig-hasAssociatedConcept.xml | 10 ++++++---- .../individual/propStatement-hasAssociatedConcept.ftl | 10 ++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/productMods/config/listViewConfig-hasAssociatedConcept.xml b/productMods/config/listViewConfig-hasAssociatedConcept.xml index 8cec32d1..e5a4dfa4 100644 --- a/productMods/config/listViewConfig-hasAssociatedConcept.xml +++ b/productMods/config/listViewConfig-hasAssociatedConcept.xml @@ -8,12 +8,14 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX vivo: <http://vivoweb.org/ontology/core#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - SELECT ?conceptLabel ?concept + SELECT ?concept ?conceptLabel ?conceptName WHERE { ?subject ?property ?concept . - ?concept rdfs:label ?conceptLabel - } ORDER BY ?conceptLabel + LET (?conceptName := afn:localname(?concept)) + optional {?concept rdfs:label ?conceptLabel} + } ORDER BY ?conceptLabel ?conceptName @@ -23,7 +25,7 @@ ?concept rdfs:label ?conceptLabel } WHERE { ?subject ?property ?concept . - ?concept rdfs:label ?conceptLabel + optional {?concept rdfs:label ?conceptLabel} } diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasAssociatedConcept.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasAssociatedConcept.ftl index 0589521a..34aaa443 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasAssociatedConcept.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasAssociatedConcept.ftl @@ -6,13 +6,11 @@ is also used to generate the property statement during a deletion. --> -<#import "lib-sequence.ftl" as s> -<#import "lib-datetime.ftl" as dt> -<@showTerm statement /> +<@showConcept statement /> <#-- Use a macro to keep variable assignments local; otherwise the values carry over to the next statement --> -<#macro showTerm statement> - ${statement.conceptLabel} - \ No newline at end of file +<#macro showConcept statement> + ${statement.conceptLabel!statement.conceptName} +