%@ page import="java.util.*" %> <%@ page import="gui.collections.input.CollectionManagement" %> <%@ page import="gui.common.query.UserQuery" %> <%@ page import="gui.common.settings.UIConst" %> <%@ page import="gui.common.management.UIManager" %> <%-- ******************Radio buttons state initialisation************** --%> <% String path = manager.getPath(); String Search=request.getParameter("Search"); String redirection = request.getParameter("redirection"); %> <%manager.setSearchType(UIConst.METADATA_ADVANCED_SEARCH);%> <%manager.setScreenID(UIConst.METADATA_ADVANCED_SEARCH);%> <%manager.setAdditionalTitle(UIConst.EMPTY_STRING);%> <%manager.setaAditionalSubTitle(UIConst.EMPTY_STRING);%> <% if (Search!= null){%> <%if (Search.equals("ALPHABET_ORG")){%> <%manager.setScreenID(UIConst.CORM_ADVANCED_SEARCH_ALPH_LIST);%> <%manager.setAdditionalTitle(manager.getText("alph_title_org"));%><%}%> <%if (Search.equals("ALPHABET_TOWN")){%> <%manager.setScreenID(UIConst.CORM_ADVANCED_SEARCH_ALPH_LIST);%> <%manager.setAdditionalTitle(manager.getText("alph_title_towns"));%><%}%> <%if (Search.equals("ALPHABET_PERSON")){%> <%manager.setScreenID(UIConst.CORM_ADVANCED_SEARCH_ALPH_LIST);%> <%manager.setAdditionalTitle(manager.getText("alph_title_persons"));%><%}%> <%if (Search.equals("ALPHABET_TAXONOMIC_COVERAGE")){%> <%manager.setScreenID(UIConst.CORM_ADVANCED_SEARCH_ALPH_LIST);%> <%manager.setAdditionalTitle(manager.getText("alph_title_tax"));%><%}%> <%if (Search.equals("ALPHABET_COMMON_NAME_COVERAGE")){%> <%manager.setScreenID(UIConst.CORM_ADVANCED_SEARCH_ALPH_LIST);%> <%manager.setAdditionalTitle(manager.getText("alph_title_common"));%><%}%> <%}%> <%-- *******Update query object -if alphabetic items from list selected-***** --%> <%String prevAction=request.getParameter("PreviousAction");%> <%if (prevAction != null) { if (prevAction.compareTo("COUNTRY_MAP") == 0) { String [] theListOfCountries = request.getParameterValues("countries_map"); if (theListOfCountries != null) UserQuery.addcountries(theListOfCountries); } if (prevAction.compareTo("TIME_PERIOD_TABLE") == 0) { String [] theListOfTimeperiodKeywords = request.getParameterValues("strati"); UserQuery.setstratigraphicKeywords(theListOfTimeperiodKeywords); } if (prevAction.compareTo("GEO_TREE") == 0) { String [] theListOfGeoKeywords = request.getParameterValues("geo"); UserQuery.setgeographicKeywords(theListOfGeoKeywords); } String letter=request.getParameter("Letter"); if (prevAction.compareTo("ALPHABET_ORG") == 0) { String [] theListOfOrganisations = request.getParameterValues("organisations"); UserQuery.setmetadataItemNameOrg(theListOfOrganisations, letter); } if (prevAction.compareTo("ALPHABET_TOWN") == 0) { String [] theListOfTowns= request.getParameterValues("towns"); UserQuery.settowns(theListOfTowns, letter); } if (prevAction.compareTo("ALPHABET_PERSON") == 0) { String [] theListOfPersons= request.getParameterValues("persons"); UserQuery.setpersons(theListOfPersons, letter); } if (prevAction.compareTo("ALPHABET_TAXONOMIC_COVERAGE") == 0) { String [] theListOfTaxonomicKeywords= request.getParameterValues("taxon"); UserQuery.settaxonomicKeywords(theListOfTaxonomicKeywords, letter); } if (prevAction.compareTo("ALPHABET_COMMON_NAME_COVERAGE") == 0) { String [] theListOfTCommonNameKeywords= request.getParameterValues("commonName"); UserQuery.setcommonKeywords(theListOfTCommonNameKeywords, letter); } } %> <%if (redirection != null){ HttpSession currSession = request.getSession(); %> <%-- ***************************----Redirections---************************* --%> <% if (redirection.compareTo("advanced_search")==0) { String [] theListOfStratigraphicKeywords= request.getParameterValues("strati"); if (theListOfStratigraphicKeywords != null) UserQuery.setstratigraphicKeywords(theListOfStratigraphicKeywords); String [] theListOfGeographicKeywords= request.getParameterValues("geo"); if (theListOfGeographicKeywords != null) UserQuery.setgeographicKeywords(theListOfGeographicKeywords); UserQuery.settown(request.getParameter("Town")); UserQuery.setorganisationName(request.getParameter("organisationName")); UserQuery.setpersonName(request.getParameter("Persons")); UserQuery.setkeywordTaxonomic(request.getParameter("keywordTaxonomic")); UserQuery.setkeywordCommon(request.getParameter("keywordCommon")); UserQuery.setkeywordGeospatial(request.getParameter("keywordGeospatial")); UserQuery.setkeywordTimeperiod(request.getParameter("keywordTimeperiod")); UserQuery.setclassOfCollection(request.getParameterValues("classOfCollection")); UserQuery.setTypeOfOrganisation(request.getParameterValues("typeOfOrganisation")); UserQuery.setcollectedObjects(request.getParameterValues("collectedObjects")); UserQuery.setcountries(request.getParameterValues("countries")); UserQuery.setstatus(request.getParameter("Types")); UserQuery.setBoolOperator(request.getParameter("operator1")); currSession.setAttribute("UserQuery", UserQuery); manager.addCORMAdvancedQuery(UserQuery); manager.forward(path + manager.getLink("CORM_RESULT") + "?Action=" + UIConst.CORM_ADVANCED_SEARCH, response, request,getServletContext()); } if (redirection.compareTo("Reset")==0) { UserQuery = new UserQuery(); currSession.setAttribute("UserQuery", UserQuery); Search = null; } if (redirection.compareTo("RefineQuery")==0) { UserQuery = manager.getLastCORMQuery(); if (UserQuery != null) currSession.setAttribute("UserQuery", UserQuery); } if (redirection.compareTo("ReloadQuery")==0) { String idx = request.getParameter("ID"); UserQuery = manager.getCurrentCORMAdvancedQuery(idx); System.out.println(UserQuery.getSearchType()); if (idx != null) currSession.setAttribute("UserQuery", UserQuery); } if (redirection.compareTo("AlphList")==0) { System.out.println("list"); } else manager.dispatch(redirection,response, request,getServletContext()); } %>