|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zekr.common.resource.AbstractQuranText
net.sf.zekr.common.resource.AbstractRangedQuranText
net.sf.zekr.common.resource.RangedQuranText
public class RangedQuranText
Field Summary |
---|
Fields inherited from interface net.sf.zekr.common.resource.IQuranText |
---|
SIMPLE_MODE, UTHMANI_MODE |
Constructor Summary | |
---|---|
RangedQuranText(IQuranText quran,
SearchScope searchScope)
Constructs a new instance of this class. |
Method Summary | |
---|---|
java.lang.String |
currentAya()
Returns the current aya. |
boolean |
findNext()
Finds the next aya matching range restrictions (after applying scopes). |
java.lang.String |
get(int absoluteAyaNum)
Returns the requested absolute aya. |
java.lang.String |
get(int suraNum,
int ayaNum)
Returns the requested aya. |
java.lang.String |
getBismillah(int suraNum)
Return Bismillah (the beginning part of suras). |
IQuranLocation |
getCurrentLocation()
Returns the current Quran location. |
java.lang.String[][] |
getFullText()
|
int |
getMode()
Return Quran text mode. This method should only be implemented in subclasses which are aimed for Quran text. |
IQuranText |
getQuran()
|
SearchScope |
getSearchScope()
Returns SearchScope object for this ranged text. |
java.lang.String[] |
getSura(int suraNum)
Returns the requested sura as an array of strings. Note: no range check is performed. |
TranslationData |
getTranslationData()
This method should only be implemented in subclasses which are aimed for Quran translation. |
protected void |
init()
Initialize and cache appropriate (matching in scope) Quran ayas. |
void |
reset()
Resets the Quran location, setting the pointer to the start of the text. |
void |
setQuran(IQuranText quran)
|
void |
setSearchScope(SearchScope searchScope)
|
java.lang.String |
toString()
|
Methods inherited from class net.sf.zekr.common.resource.AbstractQuranText |
---|
get |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RangedQuranText(IQuranText quran, SearchScope searchScope)
quran
- the Quran/translation textsearchScope
- the scope object. Set null
, if you don't need any scope constraint.Method Detail |
---|
public void setQuran(IQuranText quran)
public IQuranText getQuran()
public void setSearchScope(SearchScope searchScope)
public SearchScope getSearchScope()
AbstractRangedQuranText
getSearchScope
in class AbstractRangedQuranText
SearchScope
objectprotected void init()
new
ing an instance, before call to any other method).
public void reset()
AbstractRangedQuranText
reset
in class AbstractRangedQuranText
public IQuranLocation getCurrentLocation()
AbstractRangedQuranText
getCurrentLocation
in class AbstractRangedQuranText
public final boolean findNext()
AbstractRangedQuranText
currentAya()
() will return the found aya.
findNext
in class AbstractRangedQuranText
true
if next aya found, or false
if no more aya.public java.lang.String currentAya()
AbstractRangedQuranText
currentAya
in class AbstractRangedQuranText
public java.lang.String get(int suraNum, int ayaNum)
IQuranText
suraNum
- the sura number counted from 1ayaNum
- the aya number counted from 1
ayaNum
th aya of the suraNum
th sura of the Quran.public java.lang.String[] getSura(int suraNum)
IQuranText
suraNum
- indicates the sura number (which is counted from 1)
String
array of the sura (#suraNum
) ayas.public java.lang.String[][] getFullText()
public TranslationData getTranslationData()
IQuranText
public java.lang.String getBismillah(int suraNum)
IQuranText
suraNum
- sura number (1-based)
public java.lang.String get(int absoluteAyaNum)
IQuranText
absoluteAyaNum
- absolute sura number counted from 1
public int getMode()
IQuranText
IQuranText.SIMPLE_MODE
or IQuranText.UTHMANI_MODE
.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |