|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zekr.engine.search.SearchResultModel
public class SearchResultModel
Instances of this class hold search results. This class supports iteration.
Nested Class Summary | |
---|---|
class |
SearchResultModel.Iter
|
Field Summary | |
---|---|
protected java.lang.String |
clause
|
protected int |
maxResultPerPage
|
protected int |
pageNum
Current search page. |
protected java.lang.String |
rawQuery
|
protected int |
resultPerPage
|
protected java.util.List |
results
A list of matched SearchResultItem s. |
protected int |
totalMatch
|
Constructor Summary | |
---|---|
SearchResultModel(IQuranText quranText,
java.util.List results,
java.lang.String clause,
java.lang.String rawQuery,
int totalMatch,
AbstractSearchResultComparator ayaComparator,
boolean ascending)
Create an instance of this class to hold search results. |
Method Summary | |
---|---|
java.lang.String |
getClause()
|
int |
getMaxResultPerPage()
|
java.util.List |
getPage(int page)
Retrieves the specified page of search results. |
IQuranText |
getQuranText()
|
java.lang.String |
getRawQuery()
|
int |
getResultCount()
|
int |
getResultPageCount()
|
java.util.List |
getResults()
|
int |
getTotalMatch()
|
java.util.Iterator |
iterator()
Create and return a new iterator to iterate on pages of SearchResultItem s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int resultPerPage
protected int totalMatch
protected java.lang.String rawQuery
protected java.lang.String clause
protected int maxResultPerPage
protected java.util.List results
SearchResultItem
s.
protected int pageNum
Constructor Detail |
---|
public SearchResultModel(IQuranText quranText, java.util.List results, java.lang.String clause, java.lang.String rawQuery, int totalMatch, AbstractSearchResultComparator ayaComparator, boolean ascending)
quranText
- Quran or translation text on which search taken placeresults
- a list of SearchResultItem
sclause
- a string representation of whole-words of all the matched text partsrawQuery
- raw user querytotalMatch
- total count of all highlighted text partsayaComparator
- the AbstractSearchResultComparator
to be used for sorting resultsascending
- Method Detail |
---|
public java.util.List getPage(int page)
page
- page number (zero-based)
java.util.NoSuchElementException
- if no such page existspublic java.util.List getResults()
public int getResultCount()
public int getResultPageCount()
public int getTotalMatch()
public IQuranText getQuranText()
public java.util.Iterator iterator()
SearchResultItem
s.
public java.lang.String getRawQuery()
public java.lang.String getClause()
public int getMaxResultPerPage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |