|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.rssowl.dao.Importer
public class Importer
This class is used to import categories and favorites from external ressources (for example OPML documents).
| Field Summary | |
|---|---|
private java.lang.String |
categoryTitle
|
private org.jdom.Document |
document
|
private java.lang.String |
opmlFilePath
|
private Category |
targetCategory
|
| Constructor Summary | |
|---|---|
Importer(java.lang.String opmlFilePath,
Category targetCategory)
Instantiate a new Importer |
|
Importer(java.lang.String opmlFilePath,
java.lang.String categoryTitle,
Category targetCategory)
Instantiate a new Importer |
|
| Method Summary | |
|---|---|
private void |
importFromOPML(org.jdom.Element element,
Category rssOwlCategory,
boolean fromBlogroll)
Recursivly import categorys / favorits from the OPML file |
void |
importNewsfeeds(boolean fromBlogroll)
Import all newsfeeds from the OPML document into the target category. |
private boolean |
isCategory(org.jdom.Element e)
Check if the given Element is to be interpreted as a Category. |
private void |
loadDocument(boolean forceDefaultEncoding)
Load the OPML XML document from the given path / URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String categoryTitle
private org.jdom.Document document
private java.lang.String opmlFilePath
private Category targetCategory
| Constructor Detail |
|---|
public Importer(java.lang.String opmlFilePath,
Category targetCategory)
opmlFilePath - The path or URL to the OPML filetargetCategory - The Category to import the newsfeeds into
public Importer(java.lang.String opmlFilePath,
java.lang.String categoryTitle,
Category targetCategory)
opmlFilePath - The path or URL to the OPML filecategoryTitle - The Title of the root category of this importtargetCategory - The Category to import the newsfeeds into| Method Detail |
|---|
public void importNewsfeeds(boolean fromBlogroll)
throws java.io.FileNotFoundException,
org.jdom.JDOMException,
java.io.IOException
fromBlogroll - If TRUE, the import is from a Blogroll
java.io.FileNotFoundException - If an error occurs
org.jdom.JDOMException - If an error occurs
java.io.IOException - If an error occurs
private void importFromOPML(org.jdom.Element element,
Category rssOwlCategory,
boolean fromBlogroll)
element - Current outline elementrssOwlCategory - Current rssOwlCategoryfromBlogroll - If TRUE, the import is from a Blogrollprivate boolean isCategory(org.jdom.Element e)
e - The Element from the XML Document to check.
private void loadDocument(boolean forceDefaultEncoding)
throws java.io.FileNotFoundException,
org.jdom.JDOMException,
java.io.IOException
forceDefaultEncoding - If TRUE, use OS default encoding and not UTF-8
java.io.IOException - If an error occurs
org.jdom.JDOMException - If an error occurs
java.io.FileNotFoundException - If an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||