public class SaxResultsSearchComponent extends Object implements SearchComponent
SearchComponent for saxing resultsDISABLE_DEFAULT_SAX_PARAMETER_NAME, MAX_PRIORITY, MIN_PRIORITY, SEARCH_PRIORITY| Constructor and Description |
|---|
SaxResultsSearchComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(SearchComponentArguments args)
Executes the component.
|
protected Optional<ReturnableSaxer> |
getSaxer(AmetysObject hit,
SearchComponentArguments args,
List<Returnable> returnables,
AdditionalParameterValueMap additionalParameterValues)
Gets the
Saxer to use for SAXing the given hit |
int |
priority()
Get the priority of the component.
|
protected void |
saxHit(SearchResult<AmetysObject> result,
int number,
SearchComponentArguments args,
List<Returnable> returnables,
AdditionalParameterValueMap additionalParameterValues)
SAX the result hit
|
protected void |
saxHits(SearchResults<AmetysObject> results,
int start,
SearchComponentArguments args,
List<Returnable> returnables,
AdditionalParameterValueMap additionalParameterValues)
SAX the result hits
|
protected void |
saxPagination(int totalHits,
int currentPage,
int start,
int resultsPerPage,
ContentHandler contentHandler)
SAX elements for pagination
|
boolean |
supports(SearchComponentArguments args)
Returns
true if the component must be executed. |
public SaxResultsSearchComponent()
public int priority()
SearchComponentpriority in interface SearchComponentpublic boolean supports(SearchComponentArguments args)
SearchComponenttrue if the component must be executed.supports in interface SearchComponentargs - the argumentstrue if the component must be executed.public void execute(SearchComponentArguments args) throws Exception
SearchComponentexecute in interface SearchComponentargs - the argumentsException - if an exception occurs. Other search components will be attempted to be executedprotected void saxHits(SearchResults<AmetysObject> results, int start, SearchComponentArguments args, List<Returnable> returnables, AdditionalParameterValueMap additionalParameterValues) throws SAXException
results - The search resultsstart - The start index of searchargs - The argumentsreturnables - The returnablesadditionalParameterValues - The additional parameter valuesSAXException - If an error occurs while SAXingprotected void saxHit(SearchResult<AmetysObject> result, int number, SearchComponentArguments args, List<Returnable> returnables, AdditionalParameterValueMap additionalParameterValues) throws SAXException
result - The search resultnumber - The hit numberargs - The argumentsreturnables - The returnablesadditionalParameterValues - The additional parameter valuesSAXException - If an error occurs while SAXingprotected Optional<ReturnableSaxer> getSaxer(AmetysObject hit, SearchComponentArguments args, List<Returnable> returnables, AdditionalParameterValueMap additionalParameterValues)
Saxer to use for SAXing the given hithit - The hit to SAXargs - The argumentsreturnables - The returnables for the current search service instanceadditionalParameterValues - The additional parameter valuesSaxer to use for SAXing the given hitprotected void saxPagination(int totalHits, int currentPage, int start, int resultsPerPage, ContentHandler contentHandler) throws SAXException
totalHits - The total number of resultstart - The start index of searchcurrentPage - The current page indexresultsPerPage - The max number of results per pagecontentHandler - The content handlerSAXException - SAXException If an error occurs while SAXing