public class SearchServlet extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements SearchService
| Constructor and Description |
|---|
SearchServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSearchField(SearchableFieldBean sField)
This method is used to add a new criterion to the active query.
|
void |
addSearchFieldOnPreviousQuery(SearchableFieldBean sField)
This method is used to add a new criterion on a previous query
|
SearchableFieldBean[] |
createPreviousQuery(int indexOfQueryGroupToClone)
This method creates a new previous query.
|
ArrayList<String> |
getAvailableLanguages() |
ArrayList<BrowsableFieldBean> |
getBrowsableFields()
This method retrieves the browsable fields
|
Integer |
getNumberOfSelectedCollections()
Gets the number of the selected collections, excluding group collections
|
LinkedList<PreviousResultsInfo> |
getPreviousQueries()
This method retrieves all the previous advanced or simple queries that had been performed.
|
SavedBasketQueriesInfo |
getQueryFromBasket(String id)
This method gets the information of a specific object that is saved as a Query in basket
|
Integer |
getResultsNumberPerPage()
This method is used to retrieve the number of results per page that a user has selected in browse
|
ArrayList<SearchableFieldBean> |
getSearchFields()
This method retrieves the available search fields
|
SearchAvailabilityType |
getSearchStatus() |
String |
getSelectedConditionType()
This method returns the current condition type, AND | OR
|
String |
getSelectedConditionTypeOnPreviousSearch()
This method returns the current condition type of a previous query, AND | OR
|
ArrayList<SearchableFieldBean> |
getSelectedFields()
This method returns the current criteria
|
ArrayList<SearchableFieldBean> |
getSelectedFieldsOnPreviousSearch()
This method returns the current criteria for a previous query
|
String |
getSelectedLanguage() |
Boolean |
getSelectedRadioBtn()
This method retrieves the current selected tab of the search portlet
|
Integer |
getSelectedTab()
This method retrieves the current selected tab of the search portlet
|
String |
getSimpleSearchTerm()
This method returns the text that was last used in a simple search
|
ArrayList<SearchableFieldBean> |
getSortableFields()
This method retrieves the sortable fields
|
void |
init(javax.servlet.ServletConfig conf)
Init Method
|
boolean |
isAdvancedOpen() |
Boolean |
isRankSelected() |
Boolean |
isSemanticAvailableForCurrentScope() |
Boolean |
isSemanticSelected() |
String |
readPropertyFromFile(String propertyName) |
void |
removeSearchField(int searchFieldNo)
This method is used to remove a criterion.
|
void |
removeSearchFieldOnPreviousQuery(int searchFieldNo)
This method is used to remove a criterion on a previous query.
|
void |
resetFields(boolean isPrevious)
This method is used to reset all the current criteria
|
void |
sendEmailWithErrorToSupport(Throwable caught) |
void |
setAdvancedPanelStatus(boolean isOpened) |
Boolean |
setSelectedLanguage(String language) |
void |
setSelectedRadioBtn(boolean isBasketSelected) |
void |
setSelectedTab(Integer x)
This method sets the current selected tab to the session
|
void |
setSimpleSearchTerm(String term) |
String |
stackTraceAsString(Throwable caught) |
void |
storeConditionType(String newValue)
This method is used to change the condition type of the criteria.
|
void |
storeConditionTypeOnPreviousSearch(String newValue)
This method is used to change the condition type of the selected fields on the previous results portlet.
|
void |
storeSelectedFieldsOnPreviousSearch(int fieldNo,
int internalNo,
String newValue)
This method is used to change the name, the value or the operator of the selected field for the 'search
previous results functionality, depending on the given parameters.
|
void |
submitAdvancedQuery(ArrayList<SearchableFieldBean> criteria,
String sortby,
String order,
boolean searchPerCollection,
boolean isSemanticEnriched)
This method submits the advances query to the underlying system, by using the ASL
|
Boolean |
submitBrowseQuery(BrowsableFieldBean browseBy,
String sortOrder,
String typeOfBrowse,
int resultNumPerPage)
Submits a browse query
|
void |
submitBrowseQueryOnPreviousResult(int index)
This method is used to show the results of a query that is already performed in the current session
|
void |
submitGenericQuery(String query,
String type)
This method submits a query that is saved in user's basket
|
void |
submitQueryOnPreviousResult(ArrayList<SearchableFieldBean> criteria,
String sortby,
String sortOrder,
String showRank) |
void |
submitSimpleQuery(String fts,
boolean setRanking,
boolean isSemanticSearch)
Submits a simple query
|
void |
updateCriterionName(int internalNo,
String newID,
String newName)
This method is used to update the name of the criterion, specified by the internalNo
|
void |
updateCriterionNameOnPreviousQuery(int internalNo,
String newID,
String newName)
This method is used to update the name of the criterion, specified by the internalNo in a previous Query
|
void |
updateCriterionValue(int internalNo,
String newValue)
This method is used to update the value of the criterion, specified by the internalNo
|
void |
updateCriterionValueOnPreviousQuery(int internalNo,
String newValue)
This method is used to update the value of the criterion, specified by the internalNo in a previous Query
|
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponsedoPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic void init(javax.servlet.ServletConfig conf)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic void addSearchField(SearchableFieldBean sField)
addSearchField in interface SearchServicename - The name of the criterion to be addedpublic void addSearchFieldOnPreviousQuery(SearchableFieldBean sField)
addSearchFieldOnPreviousQuery in interface SearchServicename - The name of the criterion to be addedpublic SearchableFieldBean[] createPreviousQuery(int indexOfQueryGroupToClone)
createPreviousQuery in interface SearchServiceindexOfQueryGroupToClone - The index of the existing query to clonepublic ArrayList<String> getAvailableLanguages()
getAvailableLanguages in interface SearchServicepublic ArrayList<BrowsableFieldBean> getBrowsableFields()
getBrowsableFields in interface SearchServicepublic Integer getNumberOfSelectedCollections()
getNumberOfSelectedCollections in interface SearchServicepublic LinkedList<PreviousResultsInfo> getPreviousQueries()
getPreviousQueries in interface SearchServicepublic SavedBasketQueriesInfo getQueryFromBasket(String id)
getQueryFromBasket in interface SearchServiceThe - ID of the query that is saved in basketpublic Integer getResultsNumberPerPage()
getResultsNumberPerPage in interface SearchServicepublic ArrayList<SearchableFieldBean> getSearchFields()
getSearchFields in interface SearchServicepublic String getSelectedConditionType()
getSelectedConditionType in interface SearchServicepublic String getSelectedConditionTypeOnPreviousSearch()
getSelectedConditionTypeOnPreviousSearch in interface SearchServicepublic ArrayList<SearchableFieldBean> getSelectedFields()
getSelectedFields in interface SearchServicepublic ArrayList<SearchableFieldBean> getSelectedFieldsOnPreviousSearch()
getSelectedFieldsOnPreviousSearch in interface SearchServicepublic String getSelectedLanguage()
getSelectedLanguage in interface SearchServicepublic Integer getSelectedTab()
getSelectedTab in interface SearchServicepublic Boolean isSemanticSelected()
isSemanticSelected in interface SearchServicepublic Boolean isRankSelected()
isRankSelected in interface SearchServicepublic Boolean getSelectedRadioBtn()
getSelectedRadioBtn in interface SearchServicepublic boolean isAdvancedOpen()
isAdvancedOpen in interface SearchServicepublic String getSimpleSearchTerm()
getSimpleSearchTerm in interface SearchServicepublic void setSimpleSearchTerm(String term)
setSimpleSearchTerm in interface SearchServicepublic ArrayList<SearchableFieldBean> getSortableFields()
getSortableFields in interface SearchServicepublic SearchAvailabilityType getSearchStatus()
getSearchStatus in interface SearchServicepublic void removeSearchField(int searchFieldNo)
removeSearchField in interface SearchServicesearchFieldNo - the internal ID of the criterion to be removedpublic void removeSearchFieldOnPreviousQuery(int searchFieldNo)
removeSearchFieldOnPreviousQuery in interface SearchServicesearchFieldNo - the internal ID of the criterion to be removedpublic void resetFields(boolean isPrevious)
resetFields in interface SearchServicepublic void sendEmailWithErrorToSupport(Throwable caught)
sendEmailWithErrorToSupport in interface SearchServicepublic Boolean setSelectedLanguage(String language)
setSelectedLanguage in interface SearchServicepublic void setSelectedTab(Integer x)
setSelectedTab in interface SearchServiceAn - integer with the selected tab of the search panelpublic void setAdvancedPanelStatus(boolean isOpened)
setAdvancedPanelStatus in interface SearchServicepublic void setSelectedRadioBtn(boolean isBasketSelected)
setSelectedRadioBtn in interface SearchServicepublic String stackTraceAsString(Throwable caught)
stackTraceAsString in interface SearchServicepublic void storeConditionType(String newValue)
storeConditionType in interface SearchServicenewValue - the condition type, AND | ORpublic void storeConditionTypeOnPreviousSearch(String newValue)
storeConditionTypeOnPreviousSearch in interface SearchServicepublic void storeSelectedFieldsOnPreviousSearch(int fieldNo,
int internalNo,
String newValue)
public void submitAdvancedQuery(ArrayList<SearchableFieldBean> criteria, String sortby, String order, boolean searchPerCollection, boolean isSemanticEnriched) throws SearchSubmissionException
submitAdvancedQuery in interface SearchServicesortby - which field will be used to sort the resultorder - Ascending or Descending orderkeepTop - searchPerCollection - if "True" perform a search per collection, else merge the collectionsSearchSubmissionExceptionExceptionpublic Boolean submitBrowseQuery(BrowsableFieldBean browseBy, String sortOrder, String typeOfBrowse, int resultNumPerPage) throws SearchSubmissionException
submitBrowseQuery in interface SearchServicesortBy - which field will be used to sort the resultsortOrder - Ascending or Descending ordertypeOfBrowse - Browse collection or browse only one fieldSearchSubmissionExceptionpublic void submitBrowseQueryOnPreviousResult(int index)
throws SearchSubmissionException
submitBrowseQueryOnPreviousResult in interface SearchServiceThe - index of the queryGroup which the results will be shownSearchSubmissionExceptionpublic void submitGenericQuery(String query, String type) throws SearchSubmissionException
submitGenericQuery in interface SearchServiceThe - query that will be submitted, written in gCube's query languageThe - type of search that this query representsSearchSubmissionExceptionpublic void submitQueryOnPreviousResult(ArrayList<SearchableFieldBean> criteria, String sortby, String sortOrder, String showRank) throws SearchSubmissionException
submitQueryOnPreviousResult in interface SearchServiceSearchSubmissionExceptionpublic void submitSimpleQuery(String fts, boolean setRanking, boolean isSemanticSearch) throws SearchSubmissionException
submitSimpleQuery in interface SearchServicefts - The keyword to search forSearchSubmissionExceptionpublic void updateCriterionName(int internalNo,
String newID,
String newName)
updateCriterionName in interface SearchServiceinternalNo - the internal ID of the criterion to be changednewName - the name to be set to the criterionpublic void updateCriterionNameOnPreviousQuery(int internalNo,
String newID,
String newName)
updateCriterionNameOnPreviousQuery in interface SearchServiceinternalNo - the internal ID of the criterion to be changednewName - the name to be set to the criterionpublic void updateCriterionValue(int internalNo,
String newValue)
updateCriterionValue in interface SearchServiceinternalNo - the internal ID of the criterion to be changednewValue - the value to be set to the criterionpublic void updateCriterionValueOnPreviousQuery(int internalNo,
String newValue)
updateCriterionValueOnPreviousQuery in interface SearchServiceinternalNo - the internal ID of the criterion to be changednewValue - the value to be set to the criterionpublic Boolean isSemanticAvailableForCurrentScope()
isSemanticAvailableForCurrentScope in interface SearchServiceCopyright © 2014. All Rights Reserved.