com.blogspot.applications4android.comicreader.comictypes
Class YearlyArchivedComic

java.lang.Object
  extended by com.blogspot.applications4android.comicreader.core.ComicParser
      extended by com.blogspot.applications4android.comicreader.core.Comic
          extended by com.blogspot.applications4android.comicreader.comictypes.IndexedComic
              extended by com.blogspot.applications4android.comicreader.comictypes.ArchivedComic
                  extended by com.blogspot.applications4android.comicreader.comictypes.YearlyArchivedComic
Direct Known Subclasses:
DumbingofAge, GirlswithSlingshots, LeastICouldDo, Sheldon, SomethingPositive, WapsiSquare

public abstract class YearlyArchivedComic
extends ArchivedComic

Base class for all archived comics. For a comic to be decided as archived comic, it should have a webpage containing all comic urls which have been released so far


Field Summary
 
Fields inherited from class com.blogspot.applications4android.comicreader.comictypes.ArchivedComic
mComicUrls
 
Fields inherited from class com.blogspot.applications4android.comicreader.comictypes.IndexedComic
mBound, mLatestId
 
Fields inherited from class com.blogspot.applications4android.comicreader.core.Comic
DIALOG_DATE, DIALOG_NUMBER, mFirstUid, mLatestUid, mPrevSessionUid, NAV_CURRENT, NAV_FIRST, NAV_LATEST, NAV_LATEST_FORCE, NAV_NEXT, NAV_PREV_SESSION, NAV_PREVIOUS, NAV_RANDOM, PROPS, TYPE_CACHING, TYPE_FAVORITE, TYPE_LATEST, TYPE_PREV_SESSION, TYPE_PREVIEW
 
Constructor Summary
YearlyArchivedComic()
          Constructor
 
Method Summary
protected  void fetchAllComicUrls()
          Fetch all the comic urls
protected  java.lang.String[] getAllComicUrls(java.io.BufferedReader reader)
          Main function responsible for parsing the archive url and generating the list of all comic urls.
protected abstract  java.util.ArrayList<java.lang.String> getAllComicUrls(java.io.BufferedReader reader, int year)
          Main function responsible for parsing the archive url and generating the list of all comic urls.
protected  java.lang.String getArchiveUrl()
          Return the archive url
protected abstract  java.lang.String getArchiveUrl(int year)
          Returns the archive url for the given year
protected abstract  int getFirstYear()
          Returns the first year when the comic was released
protected abstract  boolean neededReversal()
          Whether a reversal of the list is needed at each year Reversal is needed if the comic has, in each year's archive page, comics being listed in latest-first-order
 
Methods inherited from class com.blogspot.applications4android.comicreader.comictypes.ArchivedComic
getFirstId, getFrontPageUrl, getIdFromStripUrl, getLatestStripUrl, getStripUrlFromId, parseForLatestId, queryUid
 
Methods inherited from class com.blogspot.applications4android.comicreader.comictypes.IndexedComic
addException, dialogType, getBound, getCurrentId, getFirstStripUrl, getLatestId, getNextStripUrl, getPreviousStripUrl, getRandomStripUrl, urlsNotForCaching
 
Methods inherited from class com.blogspot.applications4android.comicreader.core.Comic
clearCache, clearHistory, currentHasImageText, currentTitleAsValidFilename, downloadCurrentStrip, getComicName, getComicWebPageUrl, getCurrentStrip, getDefaultZoom, getFirstStrip, getLatestStrip, getLatestStripForcefully, getLaunchType, getName, getNextStrip, getPreviousSessionStrip, getPreviousStrip, getRandomStrip, getStripFromUrl, hasPreviousSession, hasUid, isCurrentFavorite, isCurrentFirstStrip, isCurrentLatestStrip, navigateStrip, readOnlyUnread, readProperties, setCacheEnabled, setComicName, setCurrentAsFavorite, setDefaultZoom, setLaunchType, writeProperties
 
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
 

Constructor Detail

YearlyArchivedComic

public YearlyArchivedComic()
Constructor

Method Detail

fetchAllComicUrls

protected void fetchAllComicUrls()
Description copied from class: ArchivedComic
Fetch all the comic urls

Overrides:
fetchAllComicUrls in class ArchivedComic

getArchiveUrl

protected java.lang.String getArchiveUrl()
Description copied from class: ArchivedComic
Return the archive url

Specified by:
getArchiveUrl in class ArchivedComic
Returns:
url

getAllComicUrls

protected java.lang.String[] getAllComicUrls(java.io.BufferedReader reader)
                                      throws java.io.IOException
Description copied from class: ArchivedComic
Main function responsible for parsing the archive url and generating the list of all comic urls.

Specified by:
getAllComicUrls in class ArchivedComic
Parameters:
reader - buffered reader from which to parse the comic urls.
Returns:
array of comic url strings
Throws:
java.io.IOException

getAllComicUrls

protected abstract java.util.ArrayList<java.lang.String> getAllComicUrls(java.io.BufferedReader reader,
                                                                         int year)
                                                                  throws java.io.IOException
Main function responsible for parsing the archive url and generating the list of all comic urls.

Parameters:
reader - buffered reader from which to parse the comic urls.
year - current year
Returns:
array of comic url strings
Throws:
java.lang.Exception
java.io.IOException

getFirstYear

protected abstract int getFirstYear()
Returns the first year when the comic was released

Returns:
first year

getArchiveUrl

protected abstract java.lang.String getArchiveUrl(int year)
Returns the archive url for the given year

Parameters:
year - year
Returns:
archive url

neededReversal

protected abstract boolean neededReversal()
Whether a reversal of the list is needed at each year Reversal is needed if the comic has, in each year's archive page, comics being listed in latest-first-order

Returns:
true if needed