diff --git a/productMods/config/listViewConfig-default.xml b/productMods/config/listViewConfig-default.xml index 79e6138e..1846f0ef 100644 --- a/productMods/config/listViewConfig-default.xml +++ b/productMods/config/listViewConfig-default.xml @@ -31,10 +31,11 @@ OPTIONAL { # Get mostSpecificType only for Persons - ?object vitro:mostSpecificType ?subclass . - ?subclass rdfs:label ?type . + ?object a foaf:Person . + ?object vitro:mostSpecificType ?typeUri . + ?typeUri rdfs:label ?type . # Display only a mostSpecificType that belongs to a classgroup. - ?subclass vitro:inClassGroup ?classGroup . + ?typeUri vitro:inClassGroup ?classGroup . ?classGroup a vitro:ClassGroup } @@ -44,6 +45,7 @@ } + OPTIONAL { ?object a ?subclass } FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" ) @@ -60,6 +62,7 @@ CONSTRUCT { ?subject ?property ?object . ?object a ?objectType . + ?object a ?subclass . ?object rdfs:label ?label . } WHERE { { @@ -83,10 +86,10 @@ CONSTRUCT { ?subject ?property ?object . ?object a ?objectType . - ?object vitro:mostSpecificType ?subclass . - ?subclass vitro:inClassGroup ?classGroup . + ?object vitro:mostSpecificType ?typeUri . + ?typeUri vitro:inClassGroup ?classGroup . ?classGroup a vitro:ClassGroup . - ?subclass rdfs:label ?type . + ?typeUri rdfs:label ?type . ?object obo:ARG_2000028 ?vcard . ?vcard vcard:hasTitle ?titleObj . ?titleObj vcard:title ?title @@ -97,9 +100,9 @@ } UNION { ?subject ?property ?object . ?object a ?objectType . - ?object vitro:mostSpecificType ?subclass . - ?subclass rdfs:label ?type . - ?subclass vitro:inClassGroup ?classGroup . + ?object vitro:mostSpecificType ?typeUri . + ?typeUri rdfs:label ?type . + ?typeUri vitro:inClassGroup ?classGroup . ?classGroup a vitro:ClassGroup } UNION { ?subject ?property ?object . diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-default.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-default.ftl index 57d72690..27582951 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-default.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-default.ftl @@ -10,11 +10,7 @@ <#macro showStatement statement> <#-- The query retrieves a type only for Persons. Post-processing will remove all but one. --> - <#if statement.subclass??> - ${statement.label!statement.localName!} - <#else> - ${statement.label!statement.localName!}  ${statement.title!statement.type!} - + ${statement.label!statement.localName!}  ${statement.title!statement.type!}