Using constant string for context attribute key for display model.
This commit is contained in:
parent
ef412632cf
commit
0d94f3ac4c
1 changed files with 3 additions and 2 deletions
|
@ -43,6 +43,8 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.SelectListG
|
||||||
import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch;
|
import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch;
|
||||||
import edu.cornell.mannlib.vitro.webapp.utils.pageDataGetter.DataGetterUtils;
|
import edu.cornell.mannlib.vitro.webapp.utils.pageDataGetter.DataGetterUtils;
|
||||||
|
|
||||||
|
import static edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary.DISPLAY_ONT_MODEL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This servlet is for servicing requests for JSON objects/data.
|
* This servlet is for servicing requests for JSON objects/data.
|
||||||
* It could be generalized to get other types of data ex. XML, HTML etc
|
* It could be generalized to get other types of data ex. XML, HTML etc
|
||||||
|
@ -328,8 +330,7 @@ public class JsonServlet extends VitroHttpServlet {
|
||||||
// set ProhibitedFromSearch object so picklist doesn't show
|
// set ProhibitedFromSearch object so picklist doesn't show
|
||||||
// individuals from classes that should be hidden from list views
|
// individuals from classes that should be hidden from list views
|
||||||
OntModel displayOntModel =
|
OntModel displayOntModel =
|
||||||
(OntModel) getServletConfig().getServletContext()
|
(OntModel) getServletConfig().getServletContext().getAttribute(DISPLAY_ONT_MODEL);
|
||||||
.getAttribute("displayOntModel");
|
|
||||||
if (displayOntModel != null) {
|
if (displayOntModel != null) {
|
||||||
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
ProhibitedFromSearch pfs = new ProhibitedFromSearch(
|
||||||
DisplayVocabulary.SEARCH_INDEX_URI, displayOntModel);
|
DisplayVocabulary.SEARCH_INDEX_URI, displayOntModel);
|
||||||
|
|
Loading…
Add table
Reference in a new issue