|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.feednread.backend.importer.OPMLImport
net.sourceforge.java.feednread.backend.importer.NewsFeedFavoritesTreeOPMLImport
Imports a NewsFeedFavoritesTree from an extended OPML 1.1 File into an
arbitrary Category.
NewsFeedFavoritesTreeOPMLExport| Field Summary | |
private Map |
elements
Maps guids to IMutableTreeElements |
private MainApplicationWindow |
mainWindow
The Feed'n Read main window |
private IProgressMonitor |
monitor
The IProgressMonitor to report the progress of the import
to
|
private ThreadPool |
pool
The ThreadPool to use for synchronizing
NewsFeeds associated to Favoites with cache
and archive
|
| Fields inherited from class net.sourceforge.java.feednread.backend.importer.OPMLImport |
|
| Constructor Summary | |
NewsFeedFavoritesTreeOPMLImport(Category targetCategory,
MainApplicationWindow mainWindow)
Creates a new NewsFeedFavoritesTreeOPMLImport bound to the
specified Category.
|
|
NewsFeedFavoritesTreeOPMLImport(Category targetCategory,
MainApplicationWindow mainWindow,
IProgressMonitor monitor)
Creates a new NewsFeedFavoritesTreeOPMLImport bound to the
specified Category.
|
|
| Method Summary | |
void |
doImport(String fileName)
Imports the OPML Document from the File with the
specified fileName.
|
Map |
getElements()
Gets the imported IMutableTreeElements backed up by a
Map. |
private int |
getFavoriteCount(Element element)
Recursively determines the number of Favorites in the
specified Element.
|
protected NewsFeed |
getNewsFeedFromCache(String url)
Gets the the cached NewsFeed or null if
the NewsFeed is not in cache.
|
protected void |
importCategory(Element outline,
Category parent)
Recursively imports the specified outline
Element into the the specified Category.
|
private void |
importExtendedCategorySettings(Element outline,
Category category)
Imports the extended settings from the specified outline
Element
into the specified Category.
|
private void |
importExtendedFavoriteSettings(Element outline,
Favorite favorite)
Imports the extended settings from the specified outline
Element into the specified Favorite.
|
protected void |
importFavorite(Element outline,
Category parent)
Imports the specified outline Element
as Favorite into the specified parent
Category.
|
private void |
reportProgress(String title)
Reports progress of this import operation. |
private void |
scheduleFavoriteUpdate(Favorite favorite)
Creates and schedules a ScheduledJob for the specified
Favorite.
|
private void |
synchronizeWithArchive(Favorite favorite)
|
| Methods inherited from class net.sourceforge.java.feednread.backend.importer.OPMLImport |
getCreationDate, getTitle, isCategory, parseDocument |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private MainApplicationWindow mainWindow
The Feed'n Read main window
private IProgressMonitor monitor
The IProgressMonitor to report the progress of the import
to
private ThreadPool pool
The ThreadPool to use for synchronizing
NewsFeeds associated to Favoites with cache
and archive
private Map elements
Maps guids to IMutableTreeElements
| Constructor Detail |
public NewsFeedFavoritesTreeOPMLImport(Category targetCategory,
MainApplicationWindow mainWindow)
Creates a new NewsFeedFavoritesTreeOPMLImport bound to the
specified Category.
targetCategory - the Category to import intomainWindow - the Feed'n Read main window
public NewsFeedFavoritesTreeOPMLImport(Category targetCategory,
MainApplicationWindow mainWindow,
IProgressMonitor monitor)
Creates a new NewsFeedFavoritesTreeOPMLImport bound to the
specified Category.
targetCategory - the Category to import intomainWindow - the Feed'n Read main windowmonitor - the progress monitor to report the progress of the import to| Method Detail |
public Map getElements()
Gets the imported IMutableTreeElements backed up by a
Map. A single IMutableTreeElement can be
accessed in the Map via its guid.
IMutableTreeElements
public void doImport(String fileName)
throws JDOMException,
IOException
Imports the OPML Document from the File with the
specified fileName.
doImport in class OPMLImportfileName - the name of the file to import from
IOException - if the import failed due to an IO error
JDOMException
protected void importCategory(Element outline,
Category parent)
Recursively imports the specified outline
Element into the the specified Category.
importCategory in class OPMLImportoutline - the outline Element to importparent - the Category to import into
protected void importFavorite(Element outline,
Category parent)
Imports the specified outline Element
as Favorite into the specified parent
Category.
importFavorite in class OPMLImportoutline - the outline Element to importparent - the Category to import intoprotected NewsFeed getNewsFeedFromCache(String url)
Gets the the cached NewsFeed or null if
the NewsFeed is not in cache.
url - the url of the NewsFeed to get from the
cache
NewsFeed or null if
the NewsFeed is not in cacheprivate void synchronizeWithArchive(Favorite favorite)
favorite -
private void importExtendedCategorySettings(Element outline,
Category category)
Imports the extended settings from the specified outline
Element
into the specified Category.
outline - the outline Element to importcategory - the target Category to import the extended
settings in
private void importExtendedFavoriteSettings(Element outline,
Favorite favorite)
Imports the extended settings from the specified outline
Element into the specified Favorite.
outline - the outline Element to importfavorite - the target Favorite to import the extended
settings inprivate void scheduleFavoriteUpdate(Favorite favorite)
Creates and schedules a ScheduledJob for the specified
Favorite.
favorite - the Favorite to schedule the update forprivate int getFavoriteCount(Element element)
Recursively determines the number of Favorites in the
specified Element.
element - the Element to determine the Favorite
count for
Favoritesprivate void reportProgress(String title)
Reports progress of this import operation.
title - the title of the Favorite or
Category to report progress for
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||