From be6bbdea6fe92e9aa14b3496436aeeaa8eccb812 Mon Sep 17 00:00:00 2001 From: brianjlowe Date: Mon, 4 Nov 2013 13:32:57 -0500 Subject: [PATCH] VIVO-459 change "show classes with restrictions on this property" to use languageNeutralWebappDaoFactory when finding classes --- .../freemarker/ListDatatypePropertiesController.java | 4 +++- .../controller/freemarker/ListPropertyWebappsController.java | 2 +- .../controller/freemarker/ListVClassWebappsController.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java index 36f513f0d..6272cd553 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListDatatypePropertiesController.java @@ -64,7 +64,9 @@ public class ListDatatypePropertiesController extends FreemarkerHttpServlet { List props = new ArrayList(); if (vreq.getParameter("propsForClass") != null) { noResultsMsgStr = "There are no data properties that apply to this class."; - Collection dataProps = dao.getDataPropertiesForVClass(vreq.getParameter("vclassUri")); + Collection dataProps = vreq.getLanguageNeutralWebappDaoFactory() + .getDataPropertyDao().getDataPropertiesForVClass( + vreq.getParameter("vclassUri")); Iterator dataPropIt = dataProps.iterator(); HashSet propURIs = new HashSet(); while (dataPropIt.hasNext()) { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java index 973f50c67..5e2213a61 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListPropertyWebappsController.java @@ -59,7 +59,7 @@ public class ListPropertyWebappsController extends FreemarkerHttpServlet { String ontologyUri = vreq.getParameter("ontologyUri"); ObjectPropertyDao dao = vreq.getUnfilteredWebappDaoFactory().getObjectPropertyDao(); - PropertyInstanceDao piDao = vreq.getUnfilteredWebappDaoFactory().getPropertyInstanceDao(); + PropertyInstanceDao piDao = vreq.getLanguageNeutralWebappDaoFactory().getPropertyInstanceDao(); VClassDao vcDao = vreq.getUnfilteredWebappDaoFactory().getVClassDao(); PropertyGroupDao pgDao = vreq.getUnfilteredWebappDaoFactory().getPropertyGroupDao(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListVClassWebappsController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListVClassWebappsController.java index d76ac897c..8c964ad5b 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListVClassWebappsController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ListVClassWebappsController.java @@ -51,7 +51,7 @@ public class ListVClassWebappsController extends FreemarkerHttpServlet { List classes = null; if (vreq.getParameter("showPropertyRestrictions") != null) { - PropertyDao pdao = vreq.getUnfilteredWebappDaoFactory().getObjectPropertyDao(); + PropertyDao pdao = vreq.getLanguageNeutralWebappDaoFactory().getObjectPropertyDao(); classes = pdao.getClassesWithRestrictionOnProperty(vreq.getParameter("propertyURI")); } else { VClassDao vcdao = vreq.getUnfilteredWebappDaoFactory().getVClassDao();