<%@ 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()); } %>
"> <%-- **********Main frame table-*********** --%>
  <%if (Search == null){%> <%-- ******************Test if cookies are setting (mandatory************** --%> <% if (request.getParameter("flag")==null) { // the first request Cookie cookie = new Cookie("cookieSetting", "on"); response.addCookie(cookie); String nextUrl = request.getRequestURI() + "?flag=10"; // force the browser to refresh out.println(""); } else { // the second request Cookie[] cookies = request.getCookies(); boolean cookieFound = false; if (cookies!=null) { int length = cookies.length; for (int i=0; i <%-- ******************End cookies settings test************** --%> <%String typeSpecimenStatus = UIConst.EMPTY_STRING; if (UserQuery.getstatus().compareTo("1")==0) typeSpecimenStatus = "CHECKED";%>
<%=manager.getText("corm_adv_search.col_coverage")%>
<%=manager.getText("corm_adv_search.l_taxon")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> " size="40" onChange="window.document.userSearch.Submit.focus()"> <%=manager.getText("corm_adv_search.l_common_name")%> <%=manager.getText(" width="15" height="15" border="0" align="right"> " size="40">
       
<%=manager.getText("corm_adv_search.l_geo_spatial")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> " size="40">
<%=manager.getText("corm_adv_search.l_time_period")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> ">
    " onMouseOver="BtnOver(this)" onMouseOut="BtnOut(this)" onClick="javascript:go('Geo')" >     " onMouseOver="BtnOver(this)" onMouseOut="BtnOut(this)" onClick="javascript:go('ColTimeStrati')">
<%=manager.getText("corm_adv_search.l_objects")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> <%=manager.displayCollTypesList(UserQuery)%>
<%=manager.getText("corm_adv_search.l_type_specimens")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> > <%=manager.getText("corm_adv_search.l_yes")%>
<%=manager.getText("corm_adv_search.data_repository")%>
<%=manager.getText("corm_adv_search.l_name")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> "">
<%=manager.getText("corm_adv_search.l_country")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> <%=manager.displayCountryList(UserQuery)%>  " onMouseOver="BtnOver(this)" onMouseOut="BtnOut(this)" onClick="javascript:go('Map')">
<%=manager.getText("corm_adv_search.l_town")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> " size="40">
<%=manager.getText("corm_adv_search.l_organisation")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> <%=manager.displayOrgTypesList(UserQuery)%>
<%=manager.getText("corm_adv_search.l_collection")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> <%=manager.displayCollClassesList(UserQuery)%>

 

<%=manager.getText("corm_adv_search.persons")%>
<%=manager.getText("corm_adv_search.l_name")%>
<%=manager.getText(" width="15" height="15" border="0" align="right"> " size="40">
<%=manager.getText("corm_adv_search.operator")%> <%=manager.getOperatorCheckBox(UserQuery.getBoolOperator())%>
" onclick="valid()" TITLE="<%=manager.getText("btn_Search_t")%>">   " onClick="resetQuery(document.userSearch.redirection,document.userSearch)" TITLE="<%=manager.getText("btn_Search_t")%>" TITLE="<%=manager.getText("btn_New_Query_t")%>">  
<%-- ***************************----Alphabetic list management---******************** --%> <%} else if (Search!= null){%> <%String letter = request.getParameter("ID");%> <%if (Search.equals("ALPHABET_ORG")){%> <%out.println ("
"+ manager.getText("alph_title_org")+"

");%> <%=management.buildCheckboxList("ALPHABET_ORG", "organisations", letter, UserQuery.getmetadataItemNameOrg())%> <%out.println("");%> <%out.println("");%> <%}%> <%if (Search.equals("ALPHABET_TOWN")){%> <%out.println ("
" + manager.getText("alph_title_towns")+ "

");%> <%=management.buildCheckboxList("ALPHABET_TOWN", "towns", letter, UserQuery.gettowns())%> <%out.println("");%> <%}%> <%if (Search.equals("ALPHABET_PERSON")){%> <%out.println("
"+ manager.getText("alph_title_persons")+"

");%> <%=management.buildCheckboxList("ALPHABET_PERSON","persons", letter, UserQuery.getpersons())%> <%out.println("");%> <%}%> <%if (Search.equals("ALPHABET_TAXONOMIC_COVERAGE")){%> <%out.println ("
" + manager.getText("alph_title_tax") + "

");%> <%=management.buildCheckboxList("ALPHABET_TAXONOMIC_COVERAGE","taxon", letter, UserQuery.gettaxonomicKeywords())%> <%out.println("");%> <%}%> <%if (Search.equals("ALPHABET_COMMON_NAME_COVERAGE")){%> <%out.println ("
"+ manager.getText("alph_title_common")+"

");%> <%=management.buildCheckboxList("ALPHABET_COMMON_NAME_COVERAGE","commonName", letter, UserQuery.getcommonNameKeywords())%> <%out.println("");%> <%}%> <%out.println("");%> <%out.println("");%> <%out.println("");%> <%out.println("

");%> <%}%> <%-- **********Main frame table end-*********** --%>