net.sf.zekr.common.runtime
Class HtmlRepository
java.lang.Object
net.sf.zekr.common.runtime.HtmlRepository
public class HtmlRepository
- extends java.lang.Object
HTML Creator object.
- Author:
- Mohsen Saboorian
Method Summary |
static java.lang.String |
getAdvancedSearchQuranUri(SearchResultModel searchResult,
int pageNo)
|
static java.lang.String |
getCustomMixedUri(int sura,
int aya)
|
static java.lang.String |
getCustomMixedUri(int sura,
int aya,
boolean update)
|
static java.lang.String |
getCustomMixedUri(IQuranLocation loc)
|
static java.lang.String |
getMixedUri(int sura,
int aya)
|
static java.lang.String |
getMixedUri(int sura,
int aya,
boolean update)
|
static java.lang.String |
getMixedUri(IQuranLocation loc)
|
static java.lang.String |
getQuranUri(int sura,
int aya)
|
static java.lang.String |
getQuranUri(int sura,
int aya,
boolean update)
The method will create a new HTML file if
Sura HTML file does not exist at QURAN_CACHE_DIR
HTML file exists but the file size is zero
update is true
Otherwise the file will be read from the HTML cache. |
static java.lang.String |
getQuranUri(IQuranLocation loc)
|
static java.lang.String |
getTransUri(int sura,
int aya)
|
static java.lang.String |
getTransUri(int sura,
int aya,
boolean update)
|
static java.lang.String |
getTransUri(IQuranLocation location)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HtmlRepository
public HtmlRepository()
getQuranUri
public static java.lang.String getQuranUri(int sura,
int aya,
boolean update)
throws HtmlGenerationException
- The method will create a new HTML file if
- Sura HTML file does not exist at
QURAN_CACHE_DIR
- HTML file exists but the file size is zero
update
is true
Otherwise the file will be read from the HTML cache.
- Parameters:
sura
- sura number (which is counted from 1) aya
- the aya number (this will affect on the end of the URL, which appends something like: #
sura
, e.g. file:///somepath/sura.html#5
. Please note that
aya
should be sent and counted from 1. If aya
is 0 the URL will
not have #ayaNumber
at the end of it.update
- Specify whether recreate the HTML file if it also exists.
- Returns:
- URL to the sura HTML file
- Throws:
HtmlGenerationException
getQuranUri
public static java.lang.String getQuranUri(int sura,
int aya)
throws HtmlGenerationException
- Parameters:
sura
- aya
-
- Returns:
HtmlRepository#getQuranUri(sura, aya, false);
- Throws:
HtmlGenerationException
getTransUri
public static java.lang.String getTransUri(int sura,
int aya,
boolean update)
throws HtmlGenerationException
- Throws:
HtmlGenerationException
getTransUri
public static java.lang.String getTransUri(int sura,
int aya)
throws HtmlGenerationException
- Throws:
HtmlGenerationException
getMixedUri
public static java.lang.String getMixedUri(int sura,
int aya,
boolean update)
throws HtmlGenerationException
- Throws:
HtmlGenerationException
getCustomMixedUri
public static java.lang.String getCustomMixedUri(int sura,
int aya,
boolean update)
throws HtmlGenerationException
- Throws:
HtmlGenerationException
getAdvancedSearchQuranUri
public static java.lang.String getAdvancedSearchQuranUri(SearchResultModel searchResult,
int pageNo)
throws HtmlGenerationException
- Parameters:
searchResult
- pageNo
- 0-based page number
- Returns:
- generated search result HTML
- Throws:
HtmlGenerationException
getMixedUri
public static java.lang.String getMixedUri(int sura,
int aya)
throws HtmlGenerationException
- Parameters:
sura
- aya
-
- Returns:
HtmlRepository#getMixedUri(sura, aya, false);
- Throws:
HtmlGenerationException
getCustomMixedUri
public static java.lang.String getCustomMixedUri(int sura,
int aya)
throws HtmlGenerationException
- Parameters:
sura
- aya
-
- Returns:
HtmlRepository#getCustomMixedUri(sura, aya, false);
- Throws:
HtmlGenerationException
getTransUri
public static java.lang.String getTransUri(IQuranLocation location)
throws HtmlGenerationException
- Throws:
HtmlGenerationException
getMixedUri
public static java.lang.String getMixedUri(IQuranLocation loc)
throws HtmlGenerationException
- Throws:
HtmlGenerationException
getCustomMixedUri
public static java.lang.String getCustomMixedUri(IQuranLocation loc)
throws HtmlGenerationException
- Throws:
HtmlGenerationException
getQuranUri
public static java.lang.String getQuranUri(IQuranLocation loc)
throws HtmlGenerationException
- Throws:
HtmlGenerationException