|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.blogspot.applications4android.comicreader.core.ComicParser
com.blogspot.applications4android.comicreader.core.Comic
public abstract class Comic
Base class for all comic series
Field Summary | |
---|---|
static int |
DIALOG_DATE
use date picker dialog |
static int |
DIALOG_NUMBER
use number picker dialog |
protected java.lang.String |
mFirstUid
uid for first comic |
protected java.lang.String |
mLatestUid
uid for latest comic |
protected java.lang.String |
mPrevSessionUid
uid for the previous session comic |
static int |
NAV_CURRENT
navigate to current strip |
static int |
NAV_FIRST
navigate to first strip |
static int |
NAV_LATEST
navigate to latest strip |
static int |
NAV_LATEST_FORCE
navigate to latest strip forcefully |
static int |
NAV_NEXT
navigate to next strip |
static int |
NAV_PREV_SESSION
navigate to previous session |
static int |
NAV_PREVIOUS
navigate to previous strip |
static int |
NAV_RANDOM
navigate to random strip |
static java.lang.String |
PROPS
properties folder name |
static int |
TYPE_CACHING
background caching |
static int |
TYPE_FAVORITE
favorite comics |
static int |
TYPE_LATEST
latest comics |
static int |
TYPE_PREV_SESSION
previous session |
static int |
TYPE_PREVIEW
preview comics |
Constructor Summary | |
---|---|
Comic()
Constructor |
Method Summary | |
---|---|
void |
clearCache()
Helper function to clear the cache |
void |
clearHistory()
Clears all the history associated with this comic |
boolean |
currentHasImageText()
Whether the current comic has image text or not |
java.lang.String |
currentTitleAsValidFilename()
Creates a valid file name out of the strip's title |
abstract int |
dialogType()
Type of dialog to be used for choosing comics |
void |
downloadCurrentStrip()
Download the current strip |
abstract Bound |
getBound()
Returns the bound for the current comic |
java.lang.String |
getComicName()
Get the english name for this comic |
abstract java.lang.String |
getComicWebPageUrl()
Get the main page url for the current comic series |
Strip |
getCurrentStrip()
Gets the current strip |
float |
getDefaultZoom()
Returns the default value of zoom |
Strip |
getFirstStrip()
Gets the first strip |
protected abstract java.lang.String |
getFirstStripUrl()
Gets the url for the first strip |
Strip |
getLatestStrip()
Gets latest strip |
Strip |
getLatestStripForcefully()
Gets latest strip forcefully (used during background caching) |
protected abstract java.lang.String |
getLatestStripUrl()
Gets the url for the latest strip |
int |
getLaunchType()
get the launch type |
java.lang.String |
getName()
Get the comic name |
Strip |
getNextStrip()
Gets the next strip |
protected abstract java.lang.String |
getNextStripUrl()
Gets the url for the next strip |
Strip |
getPreviousSessionStrip()
Gets the previous session strip |
Strip |
getPreviousStrip()
Gets the previous strip |
protected abstract java.lang.String |
getPreviousStripUrl()
Gets the url for the previous strip |
Strip |
getRandomStrip()
Gets the random strip |
protected abstract java.lang.String |
getRandomStripUrl()
Gets the url for the previous strip |
Strip |
getStripFromUrl(java.lang.String url)
Gets the strip from the given url |
boolean |
hasPreviousSession()
Tells whether the comic has any previous sessions or not |
protected boolean |
hasUid(java.lang.String uid)
Query whether the uid already exists in the history |
boolean |
isCurrentFavorite()
Whether the current comic is favorite or not |
protected boolean |
isCurrentFirstStrip()
Checks whether the current strip is first strip or not |
protected boolean |
isCurrentLatestStrip()
Checks whether the current strip is latest strip or not |
Strip |
navigateStrip(int type)
Helper function to provide unified interface for navigation among the strips |
protected Strip |
queryUid(java.lang.String uid)
Helper function to query for a strip and create if it doesn't exist |
int |
readOnlyUnread()
Reads unread strips count for the current comic |
void |
readProperties()
Helper function to read the properties of this comic from its json file |
void |
setCacheEnabled(boolean cache)
Tell to this comic whether caching is enabled or not. |
void |
setComicName(java.lang.String name)
Set the english name for this comic |
void |
setCurrentAsFavorite(boolean val)
Sets the current strip as favorite or not |
void |
setDefaultZoom(float zoom)
Set the default value of zoom |
void |
setLaunchType(int type)
Set the launch type for this comic |
protected abstract java.lang.String[] |
urlsNotForCaching()
Gives out the list of urls (can be regexes) which are not supposed to be cached using 'mStrips' |
void |
writeProperties()
Helper function to write the properties of this comic into its json file |
Methods inherited from class com.blogspot.applications4android.comicreader.core.ComicParser |
---|
htmlNeeded, parse, parse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPS
public static final int TYPE_PREV_SESSION
public static final int TYPE_LATEST
public static final int TYPE_FAVORITE
public static final int TYPE_PREVIEW
public static final int TYPE_CACHING
public static final int NAV_LATEST
public static final int NAV_LATEST_FORCE
public static final int NAV_FIRST
public static final int NAV_NEXT
public static final int NAV_PREVIOUS
public static final int NAV_RANDOM
public static final int NAV_CURRENT
public static final int NAV_PREV_SESSION
public static final int DIALOG_DATE
public static final int DIALOG_NUMBER
protected java.lang.String mLatestUid
protected java.lang.String mFirstUid
protected java.lang.String mPrevSessionUid
Constructor Detail |
---|
public Comic()
Method Detail |
---|
public void setCacheEnabled(boolean cache)
cache
- true if it is, else falsepublic void setLaunchType(int type)
type
- launch typepublic int getLaunchType()
public java.lang.String getName()
public Strip getCurrentStrip()
public java.lang.String getComicName()
public void setComicName(java.lang.String name)
name
- name to be setpublic int readOnlyUnread() throws java.io.FileNotFoundException, java.io.IOException, JSONException
java.io.FileNotFoundException
java.io.IOException
JSONException
public void readProperties() throws java.io.FileNotFoundException, java.io.IOException, JSONException
java.io.FileNotFoundException
java.io.IOException
JSONException
public void writeProperties() throws java.io.IOException, ComicSDCardFull
java.io.IOException
ComicSDCardFull
public float getDefaultZoom()
public void setDefaultZoom(float zoom)
zoom
- zoom valuepublic boolean hasPreviousSession()
public void setCurrentAsFavorite(boolean val)
val
- true if it is to be set as favoritepublic boolean isCurrentFavorite()
public boolean currentHasImageText()
public java.lang.String currentTitleAsValidFilename()
public void clearCache()
public void clearHistory()
public Strip navigateStrip(int type) throws ComicException
type
- navigation type
ComicException
public Strip getLatestStrip()
public Strip getLatestStripForcefully()
public Strip getFirstStrip()
public Strip getRandomStrip()
public Strip getNextStrip()
public Strip getPreviousStrip()
public Strip getPreviousSessionStrip()
public Strip getStripFromUrl(java.lang.String url) throws ClientProtocolException, java.net.URISyntaxException, java.io.IOException, ComicSDCardFull
url
- url
ComicSDCardFull
java.io.IOException
java.net.URISyntaxException
ClientProtocolException
public void downloadCurrentStrip() throws ClientProtocolException, java.net.URISyntaxException, java.io.IOException, ComicSDCardFull
ClientProtocolException
java.net.URISyntaxException
java.io.IOException
ComicSDCardFull
public abstract java.lang.String getComicWebPageUrl()
public abstract Bound getBound()
public abstract int dialogType()
protected abstract java.lang.String getLatestStripUrl()
protected abstract java.lang.String getFirstStripUrl()
protected abstract java.lang.String getNextStripUrl()
protected abstract java.lang.String getPreviousStripUrl()
protected abstract java.lang.String getRandomStripUrl()
protected abstract java.lang.String[] urlsNotForCaching()
protected boolean isCurrentLatestStrip()
protected boolean isCurrentFirstStrip()
protected boolean hasUid(java.lang.String uid)
uid
- uid
protected Strip queryUid(java.lang.String uid)
uid
- key to be queried
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |