org.eaglei.search.provider
Class SearchRequest

java.lang.Object
  extended by org.eaglei.search.provider.SearchRequest
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AuthSearchRequest

public class SearchRequest
extends java.lang.Object
implements java.io.Serializable

Represents a search request.

See Also:
Serialized Form

Nested Class Summary
static class SearchRequest.Term
          Represents the search focus: a search query (w/ advanced syntax) and/or an explicit entity URI.
static class SearchRequest.TypeBinding
          Set of resource type-specific bindings for a search.
 
Field Summary
static int DEFAULT_PAGE_SIZE
           
static long serialVersionUID
           
 
Constructor Summary
SearchRequest()
          Creates a new "everything" SearchRequest
SearchRequest(SearchRequest.Term term)
          Creates a new SearchRequest for the specified term
SearchRequest(java.lang.String urlParams)
          Parses a url param list into a search request.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 SearchRequest.TypeBinding getBinding()
          Gets the search resource type binding, may be null.
 org.eaglei.model.EIURI getInstitution()
          Get the URI for the eagle-i institution instance used to constrain the search term
 int getMaxResults()
          Gets the max number of results.
 int getStartIndex()
          Gets the request start index.
 SearchRequest.Term getTerm()
          Gets the search term, may be null.
 int hashCode()
           
 void setBinding(SearchRequest.TypeBinding binding)
          Sets the search resource type binding.
 void setInstitution(org.eaglei.model.EIURI institution)
          Sets the URI for the eagle-i institution instance used to constrain the search term.
 void setMaxResults(int maxResults)
          Sets the maximum results to return.
 void setStartIndex(int startIndex)
          Sets the search request start index.
 void setTerm(SearchRequest.Term term)
          Sets the search term.
 java.lang.String toString()
           
 java.lang.String toURLParams()
          Returns a string representation of this request suitable for use as the param list in a catalyst search URL.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

DEFAULT_PAGE_SIZE

public static final int DEFAULT_PAGE_SIZE
See Also:
Constant Field Values
Constructor Detail

SearchRequest

public SearchRequest()
Creates a new "everything" SearchRequest


SearchRequest

public SearchRequest(SearchRequest.Term term)
Creates a new SearchRequest for the specified term


SearchRequest

public SearchRequest(java.lang.String urlParams)
Parses a url param list into a search request. Invalid params will be ignored.

Parameters:
urlParams -
Method Detail

getInstitution

public org.eaglei.model.EIURI getInstitution()
Get the URI for the eagle-i institution instance used to constrain the search term

Returns:
Institution URI. May be null.

setInstitution

public void setInstitution(org.eaglei.model.EIURI institution)
Sets the URI for the eagle-i institution instance used to constrain the search term.

Parameters:
institution - Institution URI.

getTerm

public SearchRequest.Term getTerm()
Gets the search term, may be null.


setTerm

public void setTerm(SearchRequest.Term term)
Sets the search term.

Parameters:
term - The search term

getBinding

public SearchRequest.TypeBinding getBinding()
Gets the search resource type binding, may be null.


setBinding

public void setBinding(SearchRequest.TypeBinding binding)
Sets the search resource type binding.

Parameters:
binding - The search result resource type binding.

getStartIndex

public int getStartIndex()
Gets the request start index.

Returns:
The request start index.

setStartIndex

public void setStartIndex(int startIndex)
Sets the search request start index.

Parameters:
startIndex - The start index.

getMaxResults

public int getMaxResults()
Gets the max number of results.

Returns:
Maximum results to return.

setMaxResults

public void setMaxResults(int maxResults)
Sets the maximum results to return.

Parameters:
maxResults - Maximum number of results to return.

toURLParams

public java.lang.String toURLParams()
Returns a string representation of this request suitable for use as the param list in a catalyst search URL.

Returns:
param String

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2009-2010 Eagle-I. All Rights Reserved.