From f1abafa3aa23a5deaed8bda9955c1da8e60921d5 Mon Sep 17 00:00:00 2001 From: tworrall Date: Fri, 25 Oct 2013 16:35:44 -0400 Subject: [PATCH] updates for VIVO-401 and VIVO-418 which were related issues --- productMods/config/listViewConfig-hasRole.xml | 20 ++++++++----------- .../utilities/UtilitiesRequestHandler.java | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index e9a631fa..5e4a4e1b 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -25,25 +25,22 @@ ?role a ?objectType . ?role vitro:mostSpecificType ?roleSubclass - OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } + OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . + ?activity rdfs:label ?activityLabel ?activity vitro:mostSpecificType ?subclass } - OPTIONAL { ?role core:relates ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } + OPTIONAL { ?role core:relates ?activity . + ?activity rdfs:label ?activityLabel ?activity vitro:mostSpecificType ?subclass } - OPTIONAL { ?role core:roleContributesTo ?activity - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } + OPTIONAL { ?role core:roleContributesTo ?activity . + ?activity rdfs:label ?activityLabel ?activity vitro:mostSpecificType ?subclass @@ -51,8 +48,7 @@ } OPTIONAL { ?role core:relatedBy ?activity . - LET (?activityName := afn:localname(?activity)) - OPTIONAL { ?activity rdfs:label ?activityLabel } + ?activity rdfs:label ?activityLabel ?activity vitro:mostSpecificType ?subclass @@ -68,7 +64,7 @@ ?dateTimeEndValue core:dateTime ?dateTimeEnd } } - FILTER ( bound(?activity) && ?objectType = ?roleSubclass ) + FILTER ( ?objectType = ?roleSubclass ) } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java index b2f5d42c..3ec5ea23 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/utilities/UtilitiesRequestHandler.java @@ -148,7 +148,7 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler { Map fieldLabelToOutputFieldLabel = new HashMap(); String aggregationRules = "(count(DISTINCT ?Grant) AS ?numOfGrants)"; - String grantType = "http://vivoweb.org/ontology#Grant"; + String grantType = "http://vivoweb.org/ontology/core#Grant"; ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(grantType, vitroRequest.getWebappDaoFactory()); String roleToGrantPredicate = "<" + predicate.getURI() + ">";