diff --git a/productMods/config/listViewConfig-hasEditReviewRole.xml b/productMods/config/listViewConfig-hasEditReviewRole.xml index 91491aa9..f0bd0bbe 100644 --- a/productMods/config/listViewConfig-hasEditReviewRole.xml +++ b/productMods/config/listViewConfig-hasEditReviewRole.xml @@ -8,15 +8,16 @@ - 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 afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> SELECT DISTINCT ?subclass # send the property to the template, since this view supports multiple role properties ?property ?role - ?startDateOnly ?roleLabel ?activity ?activityName ?activityLabel @@ -34,12 +35,17 @@ OPTIONAL { ?role core:forInformationResource ?infoResource LET (?infoResourceName := afn:localname(?infoResource)) OPTIONAL { ?infoResource rdfs:label ?infoResourceLabel } + + # NB Currently we can only retrieve subclass for either the + # infoResource or the activity, but not both. Later, we could have + # the query retrieve both and write a custom preprocessor to merge + # the results into a single subclass column. + OPTIONAL { ?infoResource vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf bibo:Collection + } + } - - OPTIONAL { ?role a ?subclass . - ?subclass rdfs:subClassOf core:Role - } - + OPTIONAL { ?role rdfs:label ?roleLabel } OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue . @@ -52,16 +58,27 @@ FILTER ( bound(?infoResource) ) - } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?infoResourceName + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?infoResourceLabel ?infoResourceName - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX bibo: <http://purl.org/ontology/bibo/> PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + CONSTRUCT { - ?subclass rdfs:subClassOf core:Role + ?subject ?property ?role . + ?role core:forInformationResource ?infoResource . + # ?infoResource a ?subclass . + ?infoResource vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf bibo:Collection } WHERE { - ?subclass rdfs:subClassOf core:Role + ?subject ?property ?role . + ?role core:forInformationResource ?infoResource . + # ?infoResource a ?subclass . + ?infoResource vitro:mostSpecificType ?subclass . + ?subclass rdfs:subClassOf bibo:Collection } diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index e4a82741..65cc61bd 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -5,15 +5,15 @@ - 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 afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> SELECT DISTINCT ?subclass # send the property to the template, since this view supports multiple role properties ?property ?role - ?startDateOnly ?roleLabel ?activity ?activityName ?activityLabel @@ -26,8 +26,9 @@ OPTIONAL { ?activity rdfs:label ?activityLabel } } - OPTIONAL { ?role a ?subclass . - ?subclass rdfs:subClassOf core:Role + OPTIONAL { + # ?activity a ?subclass + ?activity vitro:mostSpecificType ?subclass } OPTIONAL { ?role rdfs:label ?roleLabel } @@ -42,16 +43,24 @@ FILTER ( bound(?activity) ) - } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityName + } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + CONSTRUCT { - ?subclass rdfs:subClassOf core:Role + ?subject ?property ?role . + ?role core:roleIn ?activity . + # ?activity a ?subclass . + ?activity vitro:mostSpecificType ?subclass . } WHERE { - ?subclass rdfs:subClassOf core:Role + ?subject ?property ?role . + ?role core:roleIn ?activity . + # ?activity a ?subclass . + ?activity vitro:mostSpecificType ?subclass }