NIHVIVO-2775 Change names of Solr* controllers to remove the "Solr" prefix
This commit is contained in:
parent
6083deeaf7
commit
b3c6c61325
8 changed files with 29 additions and 30 deletions
|
@ -870,7 +870,7 @@
|
|||
|
||||
<servlet>
|
||||
<servlet-name>IndividualListController</servlet-name>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.freemarker.SolrIndividualListController</servlet-class>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.freemarker.IndividualListController</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>IndividualListController</servlet-name>
|
||||
|
@ -888,7 +888,7 @@
|
|||
|
||||
<servlet>
|
||||
<servlet-name>SearchController</servlet-name>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.search.controller.SolrPagedSearchController</servlet-class>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.search.controller.PagedSearchController</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
|
@ -911,7 +911,7 @@
|
|||
|
||||
<servlet>
|
||||
<servlet-name>AutocompleteController</servlet-name>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.search.controller.SolrAutocompleteController</servlet-class>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.search.controller.AutocompleteController</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>AutocompleteController</servlet-name>
|
||||
|
@ -960,7 +960,7 @@
|
|||
|
||||
<servlet>
|
||||
<servlet-name>JSON Service</servlet-name>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.SolrJsonServlet</servlet-class>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.JsonServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>JSON Service</servlet-name>
|
||||
|
|
|
@ -33,7 +33,7 @@ import edu.cornell.mannlib.vitro.webapp.beans.DataProperty;
|
|||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.SolrIndividualListController;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.IndividualListController;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyStatementDao;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
||||
|
@ -49,10 +49,10 @@ import edu.cornell.mannlib.vitro.webapp.utils.pageDataGetter.DataGetterUtils;
|
|||
* @author bdc34
|
||||
*
|
||||
*/
|
||||
public class SolrJsonServlet extends VitroHttpServlet {
|
||||
public class JsonServlet extends VitroHttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(SolrJsonServlet.class);
|
||||
private static final Log log = LogFactory.getLog(JsonServlet.class);
|
||||
private static final int REPLY_SIZE = 256;
|
||||
|
||||
@Override
|
||||
|
@ -254,11 +254,11 @@ public class SolrJsonServlet extends VitroHttpServlet {
|
|||
|
||||
//Including version for Solr query for Vclass Intersections
|
||||
private static Map<String,Object> getSolrVClassIntersectionResults(List<String> vclassURIs, VitroRequest vreq, ServletContext context){
|
||||
String alpha = SolrIndividualListController.getAlphaParameter(vreq);
|
||||
int page = SolrIndividualListController.getPageParameter(vreq);
|
||||
String alpha = IndividualListController.getAlphaParameter(vreq);
|
||||
int page = IndividualListController.getPageParameter(vreq);
|
||||
Map<String,Object> map = null;
|
||||
try {
|
||||
map = SolrIndividualListController.getResultsForVClassIntersections(
|
||||
map = IndividualListController.getResultsForVClassIntersections(
|
||||
vclassURIs,
|
||||
page,
|
||||
alpha,
|
|
@ -39,10 +39,10 @@ import freemarker.template.TemplateModel;
|
|||
/**
|
||||
* Generates a list of individuals for display in a template
|
||||
*/
|
||||
public class SolrIndividualListController extends FreemarkerHttpServlet {
|
||||
public class IndividualListController extends FreemarkerHttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(SolrIndividualListController.class.getName());
|
||||
private static final Log log = LogFactory.getLog(IndividualListController.class.getName());
|
||||
|
||||
private static final int INDIVIDUAL_LIST_CONTROLLER_MAX_RESULTS = 30000;
|
||||
private static final int INDIVIDUALS_PER_PAGE = 30;
|
||||
|
@ -233,13 +233,13 @@ public class SolrIndividualListController extends FreemarkerHttpServlet {
|
|||
}
|
||||
|
||||
if ( response == null ) {
|
||||
throw new ServletException("Could not run search in SolrIndividualListController");
|
||||
throw new ServletException("Could not run search in IndividualListController");
|
||||
}
|
||||
|
||||
SolrDocumentList docs = response.getResults();
|
||||
|
||||
if (docs == null) {
|
||||
throw new ServletException("Could not run search in SorlIndividualListController");
|
||||
throw new ServletException("Could not run search in IndividualListController");
|
||||
}
|
||||
|
||||
// get list of individuals for the search results
|
|
@ -33,14 +33,13 @@ import edu.cornell.mannlib.vitro.webapp.search.solr.SolrSetup;
|
|||
|
||||
/**
|
||||
* AutocompleteController generates autocomplete content
|
||||
* through a Solr search.
|
||||
* via the search index.
|
||||
*/
|
||||
|
||||
// RY Rename to AutocompleteController once the transition to Solr is complete.
|
||||
public class SolrAutocompleteController extends VitroAjaxController {
|
||||
public class AutocompleteController extends VitroAjaxController {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(SolrAutocompleteController.class);
|
||||
private static final Log log = LogFactory.getLog(AutocompleteController.class);
|
||||
|
||||
//private static final String TEMPLATE_DEFAULT = "autocompleteResults.ftl";
|
||||
|
|
@ -62,10 +62,10 @@ import freemarker.template.Configuration;
|
|||
*
|
||||
*/
|
||||
|
||||
public class SolrPagedSearchController extends FreemarkerHttpServlet {
|
||||
public class PagedSearchController extends FreemarkerHttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(SolrPagedSearchController.class);
|
||||
private static final Log log = LogFactory.getLog(PagedSearchController.class);
|
||||
|
||||
private static final int DEFAULT_HITS_PER_PAGE = 25;
|
||||
private static final int DEFAULT_MAX_HIT_COUNT = 1000;
|
|
@ -19,7 +19,7 @@ import org.json.JSONObject;
|
|||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.SolrJsonServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.JsonServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary;
|
||||
|
@ -81,7 +81,7 @@ public class BrowseDataGetter implements PageDataGetter {
|
|||
VClass vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(classUri);
|
||||
map.put("class", new VClassTemplateModel(vclass));
|
||||
|
||||
JSONObject vclassRes = SolrJsonServlet.getSolrIndividualsByVClass(vclass.getURI(), request, context);
|
||||
JSONObject vclassRes = JsonServlet.getSolrIndividualsByVClass(vclass.getURI(), request, context);
|
||||
map.put("totalCount", JsonToFmModel.convertJSONObjectToMap( (String) vclassRes.get("totalCount") ));
|
||||
map.put("alpha", JsonToFmModel.convertJSONObjectToMap( (String) vclassRes.get("alpha") ));
|
||||
map.put("individuals", JsonToFmModel.convertJSONArrayToList( (JSONArray) vclassRes.get("individuals") ));
|
||||
|
|
|
@ -23,9 +23,9 @@ import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
|||
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.Controllers;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.SolrJsonServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.JsonServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.SolrIndividualListController.PageRecord;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.IndividualListController.PageRecord;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
||||
|
||||
|
@ -231,11 +231,11 @@ public class DataGetterUtils {
|
|||
jo.put("imageUrl", ind.getImageUrl());
|
||||
jo.put("profileUrl", UrlBuilder.getIndividualProfileUrl(ind, vreq));
|
||||
|
||||
jo.put("mostSpecificTypes", SolrJsonServlet.getMostSpecificTypes(ind,fullWdf));
|
||||
jo.put("mostSpecificTypes", JsonServlet.getMostSpecificTypes(ind,fullWdf));
|
||||
|
||||
jo.put("preferredTitle", SolrJsonServlet.getDataPropertyValue(ind, preferredTitleDp, fullWdf));
|
||||
jo.put("firstName", SolrJsonServlet.getDataPropertyValue(ind, fNameDp, fullWdf));
|
||||
jo.put("lastName", SolrJsonServlet.getDataPropertyValue(ind, lNameDp, fullWdf));
|
||||
jo.put("preferredTitle", JsonServlet.getDataPropertyValue(ind, preferredTitleDp, fullWdf));
|
||||
jo.put("firstName", JsonServlet.getDataPropertyValue(ind, fNameDp, fullWdf));
|
||||
jo.put("lastName", JsonServlet.getDataPropertyValue(ind, lNameDp, fullWdf));
|
||||
|
||||
jInds.put(jo);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import org.json.JSONObject;
|
|||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.SolrJsonServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.JsonServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.VClassGroupCache;
|
||||
|
@ -83,7 +83,7 @@ public class BrowseWidget extends Widget {
|
|||
VClass vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(classUri);
|
||||
map.put("class", new VClassTemplateModel(vclass));
|
||||
|
||||
JSONObject vclassRes = SolrJsonServlet.getSolrIndividualsByVClass(vclass.getURI(), request, context);
|
||||
JSONObject vclassRes = JsonServlet.getSolrIndividualsByVClass(vclass.getURI(), request, context);
|
||||
map.put("totalCount", JsonToFmModel.convertJSONObjectToMap( (String) vclassRes.get("totalCount") ));
|
||||
map.put("alpha", JsonToFmModel.convertJSONObjectToMap( (String) vclassRes.get("alpha") ));
|
||||
map.put("individuals", JsonToFmModel.convertJSONArrayToList( (JSONArray) vclassRes.get("individuals") ));
|
||||
|
|
Loading…
Add table
Reference in a new issue