|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.opensearch.opensearchlibrary.responseelements.OpenSearchResponse
public abstract class OpenSearchResponse
Class implementing functionality common to all OpenSearch responses
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
OpenSearchResponse()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Document response
protected Integer totalResults
protected Integer startIndex
protected Integer itemsPerPage
protected Boolean isLastPage
protected Boolean isFirstPage
protected Map<String,String> nsPrefixes
protected boolean containsInfo
protected List<QueryElement> queryElements
protected org.slf4j.Logger logger
protected Map<String,List<QueryBuilder>> queryBuilders
| Constructor Detail |
|---|
public OpenSearchResponse()
| Method Detail |
|---|
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 QueryBuilder
Exceptionpublic 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 t
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||