net.sf.zekr.engine.search
Class AbstractQuranSearch
java.lang.Object
net.sf.zekr.engine.search.AbstractQuranSearch
- Direct Known Subclasses:
- QuranSearch, TranslationSearch
public abstract class AbstractQuranSearch
- extends java.lang.Object
- Since:
- Zekr 1.0
- Author:
- Mohsen Saboorian
Method Summary |
protected abstract java.util.List |
find(java.lang.String src,
java.lang.String keyword)
|
boolean |
findAll(java.util.Map result,
java.lang.String keyword)
Finds all occurrences of keyword in IQuranText and returns it as
result Map . |
int |
getMaxAyaMatch()
|
int |
getResultCount()
|
void |
setMaxAyaMatch(int maxAyaMatch)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
quran
protected AbstractRangedQuranText quran
resultCount
protected int resultCount
maxAyaMatch
protected int maxAyaMatch
finder
protected net.sf.zekr.engine.search.Finder finder
AbstractQuranSearch
protected AbstractQuranSearch(AbstractRangedQuranText quran)
- Call
this(quran, false, true)
- Parameters:
quran
- the Quran text to search on
AbstractQuranSearch
protected AbstractQuranSearch(AbstractRangedQuranText quran,
boolean matchDiac,
boolean matchCase,
java.util.Locale locale)
- Parameters:
quran
- the Quran text to search onmatchDiac
- will ignore diacritics in search for both keyword and text if false
matchCase
- specifies whether search should match the case or not. Only applicable to translation.locale
- text locale
findAll
public boolean findAll(java.util.Map result,
java.lang.String keyword)
- Finds all occurrences of
keyword
in IQuranText
and returns it as
result
Map
.
- Parameters:
result
- return result Map
keyword
- keyword to be found
- Returns:
false
if too much results found (more than maxAyaMatch
),
otherwise true
.
getResultCount
public int getResultCount()
setMaxAyaMatch
public void setMaxAyaMatch(int maxAyaMatch)
getMaxAyaMatch
public int getMaxAyaMatch()
find
protected abstract java.util.List find(java.lang.String src,
java.lang.String keyword)