net.sf.zekr.common.resource
Interface IQuranText

All Known Implementing Classes:
AbstractQuranText, AbstractRangedQuranText, FilteredQuranText, QuranText, RangedQuranText, TranslationData

public interface IQuranText

A general interface for Quran text access. All classes/methods who need Quran access should have this through IQuranText interface.
This interface is applicable to translation as well as Quran.

Author:
Mohsen Saboorian

Field Summary
static int SIMPLE_MODE
          Simple (Imlaaei) Quran text
static int UTHMANI_MODE
          Uthmani Quran text
 
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 get(IQuranLocation quranLocation)
          Returns the requested aya.
 java.lang.String getBismillah(int suraNum)
          Return Bismillah (the beginning part of suras).
 java.lang.String[][] getFullText()
           
 int getMode()
          Return Quran text mode.
This method should only be implemented in subclasses which are aimed for Quran 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.
 

Field Detail

UTHMANI_MODE

static final int UTHMANI_MODE
Uthmani Quran text

See Also:
Constant Field Values

SIMPLE_MODE

static final int SIMPLE_MODE
Simple (Imlaaei) Quran text

See Also:
Constant Field Values
Method Detail

get

java.lang.String get(int suraNum,
                     int ayaNum)
Returns the requested aya.

Parameters:
suraNum - the sura number counted from 1
ayaNum - the aya number counted from 1
Returns:
returns ayaNumth aya of the suraNumth sura of the Quran.

get

java.lang.String get(int absoluteAyaNum)
Returns the requested absolute aya.

Parameters:
absoluteAyaNum - absolute sura number counted from 1
Returns:
returns the requested aya

get

java.lang.String get(IQuranLocation quranLocation)
Returns the requested aya.

Parameters:
quranLocation - sura-aya location of the Quran text to be retrieved
Returns:
returns requested Quran location

getSura

java.lang.String[] getSura(int suraNum)
Returns the requested sura as an array of strings.
Note: no range check is performed.

Parameters:
suraNum - indicates the sura number (which is counted from 1)
Returns:
a String array of the sura (#suraNum) ayas.

getFullText

java.lang.String[][] getFullText()
Returns:
Full text of the Quran/translation text as a 2D array.

getTranslationData

TranslationData getTranslationData()
This method should only be implemented in subclasses which are aimed for Quran translation.

Returns:
translation data

getBismillah

java.lang.String getBismillah(int suraNum)
Return Bismillah (the beginning part of suras).

Parameters:
suraNum - sura number (1-based)
Returns:
Bismillah part

getMode

int getMode()
Return Quran text mode.
This method should only be implemented in subclasses which are aimed for Quran text.

Returns:
Quran text mode: SIMPLE_MODE or UTHMANI_MODE.