From 68e9a89c271872b25fbc825951bfdd5edc4be623 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Wed, 11 Mar 2015 11:58:50 -0400 Subject: [PATCH 1/3] VIVO-990: updated filegraph .n3 file to prevent research areas from displaying twice. On the restriction, all values had to be from Thing, not Concept. --- rdf/tbox/filegraph/appControls-temp.n3 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rdf/tbox/filegraph/appControls-temp.n3 b/rdf/tbox/filegraph/appControls-temp.n3 index b66095d2..d5566035 100644 --- a/rdf/tbox/filegraph/appControls-temp.n3 +++ b/rdf/tbox/filegraph/appControls-temp.n3 @@ -66,11 +66,6 @@ foaf:Person owl:someValuesFrom ; owl:onProperty ] ; - rdfs:subClassOf - [ a owl:Restriction ; - owl:onProperty ; - owl:allValuesFrom - ] ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty ; From d004f3b3e6e26bd80e308f16f51c93645b503ed1 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Wed, 11 Mar 2015 13:56:03 -0400 Subject: [PATCH 2/3] No Jira issue but related to VIVO-989. Object properties for which the range is the union of multiple classes needed their own list view. The default list view, which pulls in the object type, does not work for these properties. --- .../config/listViewConfig-rangeUnion.xml | 106 ++++++++++++++++++ rdf/display/everytime/vivoListViewConfig.rdf | 34 ++++++ 2 files changed, 140 insertions(+) create mode 100644 productMods/config/listViewConfig-rangeUnion.xml diff --git a/productMods/config/listViewConfig-rangeUnion.xml b/productMods/config/listViewConfig-rangeUnion.xml new file mode 100644 index 00000000..f240b560 --- /dev/null +++ b/productMods/config/listViewConfig-rangeUnion.xml @@ -0,0 +1,106 @@ + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX obo: <http://purl.obolibrary.org/obo/> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + + SELECT ?subclass + ?object + ?label + ?localName + ?type + ?title WHERE { + + ?subject ?property ?object . + LET (?localName := afn:localname(?object)) + + OPTIONAL { ?object rdfs:label ?label } + + OPTIONAL { + # Get mostSpecificType only for Persons + ?object vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?type . + # Display only a mostSpecificType that belongs to a classgroup. + ?subclass vitro:inClassGroup ?classGroup . + ?classGroup a vitro:ClassGroup + } + + OPTIONAL { ?object obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title + } + + + FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" ) + + + # Order by ?type is important, because if the object has more than one mostSpecificType, + # they all get returned, but postprocessing culls out all but one. Ordering by ?type + # will ensure that at least we'll get the same one every time. + } ORDER BY ?subclass ASC( ?label ) ASC( ?localName ) ?type + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?object . + ?object rdfs:label ?label . + } WHERE { + { + ?subject ?property ?object . + } UNION { + ?subject ?property ?object . + ?object rdfs:label ?label . + } + } + + + + 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#> + PREFIX obo: <http://purl.obolibrary.org/obo/> + PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> + + CONSTRUCT { + ?subject ?property ?object . + ?object vitro:mostSpecificType ?subclass . + ?subclass vitro:inClassGroup ?classGroup . + ?classGroup a vitro:ClassGroup . + ?subclass rdfs:label ?type . + ?object obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title + } WHERE { + { + ?subject ?property ?object . + } UNION { + ?subject ?property ?object . + ?object vitro:mostSpecificType ?subclass . + ?subclass rdfs:label ?type . + ?subclass vitro:inClassGroup ?classGroup . + ?classGroup a vitro:ClassGroup + } UNION { + ?subject ?property ?object . + ?object obo:ARG_2000028 ?vcard . + ?vcard vcard:hasTitle ?titleObj . + ?titleObj vcard:title ?title + } + } + + + + \ No newline at end of file diff --git a/rdf/display/everytime/vivoListViewConfig.rdf b/rdf/display/everytime/vivoListViewConfig.rdf index 01501ec2..c595b91f 100644 --- a/rdf/display/everytime/vivoListViewConfig.rdf +++ b/rdf/display/everytime/vivoListViewConfig.rdf @@ -82,6 +82,40 @@ listViewConfig-orcidId.xml + + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + + + listViewConfig-rangeUnion.xml + +