org.sakaiproject.tool.search
Interface SearchResultInterface

All Known Implementing Classes:
SearchResultBase

public interface SearchResultInterface

Search characteristics, all matching items


Method Summary
 void addItem(MatchItem item)
          Add a MatchItem object
 int getMatchCount()
          Return the count of matching items found
 String getQuery()
          Fetch the original query text
 String getSearchResponseString()
          Return search results as a String
 int getSearchStart()
          Return the starting item number for this search (one based)
 void initialize(QueryBase query)
          Save various attributes of the general search request
 Iterator iterator()
          Get an iterator to the result list
 MatchItem[] toArray()
          Return the MatchItem list as a simple array
 

Method Detail

initialize

public void initialize(QueryBase query)
Save various attributes of the general search request

Parameters:
query - The QueryBase extension that sent the search request

addItem

public void addItem(MatchItem item)
Add a MatchItem object

Parameters:
item - MatchItem to add

getQuery

public String getQuery()
Fetch the original query text

Returns:
Search string

getSearchResponseString

public String getSearchResponseString()
Return search results as a String

Returns:
Result Document

getSearchStart

public int getSearchStart()
Return the starting item number for this search (one based)

Returns:
Starting item number

getMatchCount

public int getMatchCount()
Return the count of matching items found

Returns:
Item count

iterator

public Iterator iterator()
Get an iterator to the result list

Returns:
SearchResult Iterator

toArray

public MatchItem[] toArray()
Return the MatchItem list as a simple array

Returns:
MatchItem array