|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.util.jobs.Job
net.sourceforge.java.feednread.backend.jobs.NewsFeedParserJob
Job which parses a NewsFeed either by a given url or a
Favorite which houses the url settings.
| Field Summary | |
protected Favorite |
favorite
The Favorite to parse the NewsFeed for
|
protected MainApplicationWindow |
mainWindow
The Feed'n Read main window |
protected String |
newsFeedUrl
The url of the NewsFeed to parse |
| Fields inherited from class net.sourceforge.java.util.jobs.Job |
|
| Fields inherited from interface net.sourceforge.java.util.jobs.IJob |
HIGH_PRIORITY, LOW_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
NewsFeedParserJob(Favorite favorite,
MainApplicationWindow mainWindow)
Creates a new NewsFeedParserJob to parse the
NewsFeed set by the specified Favorite.
|
|
NewsFeedParserJob(String newsFeedUrl,
MainApplicationWindow mainWindow)
Creates a new NewsFeedParserJob to parse the
NewsFeed at the specified url.
|
|
| Method Summary | |
protected NewsFeed |
getNewsFeedFromCache(URL feedUrl)
Gets the the cached NewsFeed or null if
the NewsFeed is not in cache
|
protected NewsFeed |
parseNewsFeed(IProgressMonitor monitor)
Parses the newsfeed into a NewsFeed representation.
|
private void |
parserFailed(LanguageResource resource)
Called in case this NewsFeedParserJob failed.
|
private void |
parserSucceeded(NewsFeed newsFeed)
Called in case this NewsFeedParserJob succeeded.
|
void |
run(IProgressMonitor monitor)
Activates the parsing process. |
| Methods inherited from class net.sourceforge.java.util.jobs.Job |
cancel, done, getException, getJobManager, getName, getPriority, getStatus, getThread, isCanceled, join, setException, setJobManager, setName, setPriority, setThread, start, started, statusChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected MainApplicationWindow mainWindow
The Feed'n Read main window
protected String newsFeedUrl
The url of the NewsFeed to parse
protected Favorite favorite
The Favorite to parse the NewsFeed for
| Constructor Detail |
public NewsFeedParserJob(String newsFeedUrl,
MainApplicationWindow mainWindow)
Creates a new NewsFeedParserJob to parse the
NewsFeed at the specified url.
newsFeedUrl - the url of the NewsFeed to parsemainWindow - the Feed'n Read main window
public NewsFeedParserJob(Favorite favorite,
MainApplicationWindow mainWindow)
Creates a new NewsFeedParserJob to parse the
NewsFeed set by the specified Favorite.
favorite - the Favorite to parse the
NewsFeed formainWindow - the Feed'n Read main window| Method Detail |
public void run(IProgressMonitor monitor)
Activates the parsing process. If the parsing completes correctly and
succesfully a new tab is added in the NewsFeedTabBar
showing the gui representation of the parsed newsfeed.
IJob.getException()
method.
monitor - the IProgressMonitor to use for reporting
the progress of this NewsFeedParserJobIRunnableWithProgress.run(org.eclipse.core.runtime.IProgressMonitor),
IJob.getException()private void parserSucceeded(NewsFeed newsFeed)
Called in case this NewsFeedParserJob succeeded.
A new tab is added to the NewsFeedTabBar showing the fetched
and parsed NewsFeed.
In addition a success message is shown in the application status line.
newsFeed - the successfully parsed NewsFeedprivate void parserFailed(LanguageResource resource)
Called in case this NewsFeedParserJob failed.
An error message is shown in the application status line.
resource - the LanguageResource used
protected NewsFeed parseNewsFeed(IProgressMonitor monitor)
throws MalformedURLException,
IOException,
FeedException,
FetcherException
Parses the newsfeed into a NewsFeed representation.
monitor - the IProgressMonitor to use for reporting
the progress of this NewsFeedParserJob
NewsFeed representation
MalformedURLException - if the newsfeed url is invalid
IOException - if an io error occured during parsing
FeedException - if the newsfeed could not be parsed correctly
FetcherException - if the newsfeed could not be fetchedprotected NewsFeed getNewsFeedFromCache(URL feedUrl)
Gets the the cached NewsFeed or null if
the NewsFeed is not in cache
feedUrl - the URL of the NewsFeed to get from the
cache
NewsFeed or null if
the NewsFeed is not in cache
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||