|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.search.QueryArgs
public class QueryArgs
Contains the arguments for a query. Fill it out and pass to the query engine
| Constructor Summary | |
|---|---|
QueryArgs()
|
|
| Method Summary | |
|---|---|
String |
buildHTTPQuery(javax.servlet.http.HttpServletRequest request)
Builds an HTTP query string for some parameters with the value taken from the request context passed in. |
String |
buildQuery(javax.servlet.http.HttpServletRequest request)
Builds an advanced-query description string. |
HashMap |
buildQueryHash(javax.servlet.http.HttpServletRequest request)
Constructs a HashMap with the keys field{1,2,3}, query{1,2,3} and conjunction{1,2} taking the values from the passed-in argument defaulting to "". |
int |
getEtAl()
|
int |
getPageSize()
get the count of hits to return |
String |
getQuery()
retrieve the query string |
SortOption |
getSortOption()
|
String |
getSortOrder()
|
int |
getStart()
read the search's starting offset |
void |
setEtAl(int etAl)
set the number of metadata fields at which to truncate with "et al" |
void |
setPageSize(int newSize)
set the count of hits to return; used to implement paged searching see the initializer for the default value |
void |
setQuery(String newQuery)
set the query string |
void |
setSortOption(SortOption sortOption)
|
void |
setSortOrder(String sortOrder)
|
void |
setStart(int newStart)
set the offset of the desired search results, beginning with 0 ; used to page results (the default value is 0) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryArgs()
| Method Detail |
|---|
public int getEtAl()
public void setEtAl(int etAl)
etAl - public void setQuery(String newQuery)
newQuery - public String getQuery()
public void setStart(int newStart)
newStart - index of first desired resultpublic int getStart()
public void setPageSize(int newSize)
newSize - number of hits per pagepublic int getPageSize()
public SortOption getSortOption()
public void setSortOption(SortOption sortOption)
public String getSortOrder()
public void setSortOrder(String sortOrder)
public String buildQuery(javax.servlet.http.HttpServletRequest request)
request - the request object to take the values from
public HashMap buildQueryHash(javax.servlet.http.HttpServletRequest request)
request - the request-describing object to take the values from
public String buildHTTPQuery(javax.servlet.http.HttpServletRequest request)
throws UnsupportedEncodingException
Note, that the values are url-encoded using the UTF-8 encoding scheme as the corresponding W3C recommendation states.
Also note that neither leading ? (question mark) nor leading & (ampersand mark) is included. Take this into account when appending to a real URL.
request - the request object to take the values from
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||