public abstract class OpenSearchResponse extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
containsInfo
A common OpenSearch specs violation is for a provider not to include response information in its
search query responses.
|
protected Boolean |
isFirstPage |
protected Boolean |
isLastPage |
protected Integer |
itemsPerPage |
protected org.slf4j.Logger |
logger |
protected Map<String,String> |
nsPrefixes |
protected Map<String,List<QueryBuilder>> |
queryBuilders
An association of role values with lists of query builders
|
protected List<QueryElement> |
queryElements |
protected Document |
response |
protected Integer |
startIndex |
protected Integer |
totalResults |
| Constructor and Description |
|---|
OpenSearchResponse() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsPagingElements()
Determines whether this search response page contains OpenSearch response information relevant to page handling.
|
protected void |
createQueryBuilder(Node n,
QueryElementFactory qElFactory,
QueryBuilder qb)
Adds a QueryBuilder to the list of available query builders after assigning the parameter values contained
in the QueryElement and another QueryBuilder
|
Integer |
getItemsPerPage()
Returns the number of results per page that are contained in the OpenSearch response
|
List<QueryBuilder> |
getQueryBuilders(String role)
Returns a list of QueryBuilder objects that may be used to construct queries for a specific role
|
Document |
getResponse()
Returns the OpenSearch response Document
|
Integer |
getStartIndex()
Returns the start index of the first result contained in the OpenSearch response
|
Integer |
getTotalResults()
Returns the number of total results contained in the OpenSearchResponse
|
boolean |
isFirstPage()
Determines whether this page is the first page of search results
|
boolean |
isLastPage()
Determines whether this page is the last page of search results
|
protected Document response
protected Integer totalResults
protected Integer startIndex
protected Integer itemsPerPage
protected Boolean isLastPage
protected Boolean isFirstPage
protected boolean containsInfo
protected List<QueryElement> queryElements
protected org.slf4j.Logger logger
protected Map<String,List<QueryBuilder>> queryBuilders
protected void createQueryBuilder(Node n, QueryElementFactory qElFactory, QueryBuilder qb) throws Exception
n - The Element corresponding to a query element contained in an OpenSearch responseqElFactory - The QueryElement factory to be usedqb - The QueryBuilderExceptionpublic Document getResponse()
public Integer getTotalResults()
public Integer getStartIndex()
public Integer getItemsPerPage()
public boolean isFirstPage()
public boolean isLastPage()
public boolean containsPagingElements()
getItemsPerPage()public List<QueryBuilder> getQueryBuilders(String role)
role - The role that tCopyright © 2014. All Rights Reserved.