|
|||||||||
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.QuranText
public class QuranText
This class is a repository for the whole quran text. All public methods act as 1-relative arrays. This class acts as a pool for two types of Quran text file: "simple" and "uthmani".
Field Summary |
---|
Fields inherited from interface net.sf.zekr.common.resource.IQuranText |
---|
SIMPLE_MODE, UTHMANI_MODE |
Constructor Summary | |
---|---|
protected |
QuranText(int textType)
The private constructor, which loads the whole Quran text from file into memory ( quranText ). |
Method Summary | |
---|---|
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). |
java.lang.String[][] |
getFullText()
|
static QuranText |
getInstance()
|
static QuranText |
getInstance(int mode)
|
int |
getMode()
Return Quran text mode. This method should only be implemented in subclasses which are aimed for Quran text. |
static QuranText |
getSimpleTextInstance()
|
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. |
static QuranText |
getUthmaniTextInstance()
|
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 |
---|
protected QuranText(int textType) throws java.io.IOException
quranText
).
textType
- can be either UTHMANI_MODE or SIMPLE_MODE
java.io.IOException
Method Detail |
---|
public static QuranText getInstance() throws java.io.IOException
java.io.IOException
public static QuranText getInstance(int mode) throws java.io.IOException
mode
-
java.io.IOException
public static QuranText getSimpleTextInstance() throws java.io.IOException
java.io.IOException
public static QuranText getUthmaniTextInstance() throws java.io.IOException
java.io.IOException
public int getMode()
IQuranText
UTHMANI_MODE
or SIMPLE_MODE
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 get(int absoluteAyaNum)
IQuranText
absoluteAyaNum
- absolute sura number counted from 1
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 toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |