net.sf.zekr.common.resource
Class FilteredQuranText

java.lang.Object
  extended by net.sf.zekr.common.resource.AbstractQuranText
      extended by net.sf.zekr.common.resource.FilteredQuranText
All Implemented Interfaces:
IQuranText

public class FilteredQuranText
extends AbstractQuranText

Author:
Mohsen Saboorian

Field Summary
 
Fields inherited from interface net.sf.zekr.common.resource.IQuranText
SIMPLE_MODE, UTHMANI_MODE
 
Constructor Summary
FilteredQuranText()
          Call FilteredQuranText(QuranText.getSimpleTextInstance(), IQuranFilter.HIGHLIGHT_WAQF_SIGN)
FilteredQuranText(int mode)
           
FilteredQuranText(int mode, int filterParams)
           
FilteredQuranText(IQuranFilter filter, int mode)
           
FilteredQuranText(IQuranText quranText)
           
FilteredQuranText(IQuranText quranText, int filterParams)
           
FilteredQuranText(IQuranText quranText, IQuranFilter quranFilter)
           
FilteredQuranText(IQuranText quranText, IQuranFilter filter, int filterParams)
           
 
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()
          Returns the raw Quran text (unfiltered).
 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.
 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

FilteredQuranText

public FilteredQuranText()
                  throws java.io.IOException
Call FilteredQuranText(QuranText.getSimpleTextInstance(), IQuranFilter.HIGHLIGHT_WAQF_SIGN)

Throws:
java.io.IOException

FilteredQuranText

public FilteredQuranText(IQuranText quranText)
                  throws java.io.IOException
Throws:
java.io.IOException

FilteredQuranText

public FilteredQuranText(int mode)
                  throws java.io.IOException
Throws:
java.io.IOException

FilteredQuranText

public FilteredQuranText(IQuranFilter filter,
                         int mode)
                  throws java.io.IOException
Throws:
java.io.IOException

FilteredQuranText

public FilteredQuranText(IQuranText quranText,
                         IQuranFilter filter,
                         int filterParams)
                  throws java.io.IOException
Throws:
java.io.IOException

FilteredQuranText

public FilteredQuranText(int mode,
                         int filterParams)
                  throws java.io.IOException
Throws:
java.io.IOException

FilteredQuranText

public FilteredQuranText(IQuranText quranText,
                         int filterParams)
                  throws java.io.IOException
Throws:
java.io.IOException

FilteredQuranText

public FilteredQuranText(IQuranText quranText,
                         IQuranFilter quranFilter)
                  throws java.io.IOException
Throws:
java.io.IOException
Method Detail

get

public java.lang.String get(int suraNum,
                            int ayaNum)
Description copied from interface: IQuranText
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.

getFullText

public java.lang.String[][] getFullText()
Returns the raw Quran text (unfiltered).

Returns:
Full text of the Quran/translation text as a 2D array.

getSura

public java.lang.String[] getSura(int suraNum)
Description copied from interface: IQuranText
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.

get

public java.lang.String get(int absoluteAyaNum)
Description copied from interface: IQuranText
Returns the requested absolute aya.

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

getTranslationData

public TranslationData getTranslationData()
Description copied from interface: IQuranText
This method should only be implemented in subclasses which are aimed for Quran translation.

Returns:
translation data

getBismillah

public java.lang.String getBismillah(int suraNum)
Description copied from interface: IQuranText
Return Bismillah (the beginning part of suras).

Parameters:
suraNum - 1-base sura number
Returns:
Bismillah (the beginning part of the sura)

getMode

public int getMode()
Description copied from interface: IQuranText
Return Quran text mode.
This method should only be implemented in subclasses which are aimed for Quran text.

Returns:
Quran text mode: IQuranText.SIMPLE_MODE or IQuranText.UTHMANI_MODE.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object