diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/BaseIndividualTemplateModel.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/BaseIndividualTemplateModel.java index c4250c998..22c6b1cc3 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/BaseIndividualTemplateModel.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/BaseIndividualTemplateModel.java @@ -70,15 +70,15 @@ public abstract class BaseIndividualTemplateModel extends BaseTemplateModel { return UrlBuilder.getIndividualProfileUrl(individual, vreq.getWebappDaoFactory()); } - // This remains as a convenience method for getting the image url. We could instead use a custom list - // view for mainImage which would provide this data in the query results. + // For image, we use the default list view and Individual methods to reconstruct the image + // url from various triples. A custom list view would require that logic to be duplicated here. public String getImageUrl() { String imageUrl = individual.getImageUrl(); return imageUrl == null ? null : getUrl(imageUrl); } - // This remains as a convenience method for getting the thumbnail url. We could instead use a custom list - // view for mainImage which would provide this data in the query results. + // For image, we use the default list view and Individual methods to reconstruct the image + // url from various triples. A custom list view would require that logic to be duplicated here. public String getThumbUrl() { String thumbUrl = individual.getThumbUrl(); return thumbUrl == null ? null : getUrl(thumbUrl); diff --git a/webapp/web/config/listViewConfig-default.xml b/webapp/web/config/listViewConfig-default.xml index e6d5fd44d..a44605743 100644 --- a/webapp/web/config/listViewConfig-default.xml +++ b/webapp/web/config/listViewConfig-default.xml @@ -1,7 +1,7 @@ - @@ -12,7 +12,7 @@ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> SELECT ?subclass - ?object ?name ?moniker { + ?object ?name ?moniker WHERE { ?subject ?property ?object OPTIONAL { ?object a ?subclass } FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )