|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectparser.RomeFeedParser
public class RomeFeedParser
| Constructor Summary | |
|---|---|
RomeFeedParser()
|
|
| Method Summary | |
|---|---|
private static com.sun.syndication.feed.synd.SyndFeed |
getURL(java.lang.String url)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
MakeOPMLString(java.util.List<Feed> feeds)
Given a list of feeds, creates a OPML outline that represents those feeds. |
static java.lang.String |
MakeRSSString(Feed f,
java.lang.String outputType)
Creates a syndication-feed string in the requested output format from a given feed. |
private static Feed |
ParseFeed(com.sun.syndication.feed.synd.SyndFeed feed)
Internal method: takes as input a feed to be parsed and outputs the Feed object (constructed with no id) containing all the useful information in the Rome SyndFeed object passed to it. |
private static java.util.List<java.lang.String> |
ParseOPML(com.sun.syndication.feed.opml.Opml feed)
|
static java.util.List<java.lang.String> |
ParseOPMLFile(java.lang.String filename)
Using the Rome OPML module, this method parses a user-supplied OPML file (on local drive) and returns a list of strings. |
static java.util.List<java.lang.String> |
ParseOPMLURL(java.lang.String url)
Using the Rome OPML module, this method parses a user-supplied OPML file (given its URL) and returns a list of strings. |
static Feed |
ParseURL(java.lang.String inputFeedURL)
The method ParseURL creates and returns a new feed object instantiated with article objects for each of the entries contained within the feed located at the supplied input feed URL. |
static void |
PrintRSSFeed(Feed f)
"Exports" (prints to stdout) a feed object in RSS 2.0 format. |
static void |
PrintRSSFeed(Feed f,
java.lang.String outputType)
"Exports" (prints to stdout) a feed object in a user-supplied format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RomeFeedParser()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
private static com.sun.syndication.feed.synd.SyndFeed getURL(java.lang.String url)
throws java.net.MalformedURLException,
com.sun.syndication.io.FeedException,
java.io.IOException
java.net.MalformedURLException
com.sun.syndication.io.FeedException
java.io.IOException
public static Feed ParseURL(java.lang.String inputFeedURL)
throws java.net.MalformedURLException,
java.io.IOException,
com.sun.syndication.io.FeedException
inputFeedURL - URL (as string) where feed is located.
java.net.MalformedURLException - If input URL is malformed (not a valid URL), throws this
exception.
java.io.IOException - If the parser has difficulty downloading the feed file,
throws this exception. Note that this could happen for a
variety of reasons: no Net connection, Web site doesn't
exist, file doesn't exist on site, your router ate some
packets...
com.sun.syndication.io.FeedException - If Rome can't build a feed from the given RSS feed, this
exception will be thrown.
private static Feed ParseFeed(com.sun.syndication.feed.synd.SyndFeed feed)
throws com.sun.syndication.io.FeedException
feed -
com.sun.syndication.io.FeedException
public static void PrintRSSFeed(Feed f,
java.lang.String outputType)
throws java.lang.IllegalAccessException,
com.sun.syndication.io.FeedException,
java.io.IOException
f - The Feed object to be printed to stdout.outputType - The type of output feed desired. Rome supports RSS 0.9, 0.91, 0.92, 0.93, 0.94, 1.0, 2.0, and Atom 0.3 and 1.0.
java.lang.IllegalAccessException
com.sun.syndication.io.FeedException
java.io.IOException
public static java.lang.String MakeRSSString(Feed f,
java.lang.String outputType)
throws java.lang.IllegalAccessException,
com.sun.syndication.io.FeedException,
java.io.IOException
f - The feed object which is to be created into a feed stringoutputType - Output format (a string with a limited set of options dictated by the Rome parser used.)
java.lang.IllegalAccessException - Thrown if an RSS feed's children cannot be gotten
com.sun.syndication.io.FeedException - Thrown if Rome could not generate output string from these feeds.
java.io.IOExceptionpublic static java.lang.String MakeOPMLString(java.util.List<Feed> feeds)
feeds - List of feeds to be turned into OPML outline elements.
public static void PrintRSSFeed(Feed f)
throws com.sun.syndication.io.FeedException,
java.io.IOException,
java.lang.IllegalAccessException
f - The Feed object to be printed to stdout.
com.sun.syndication.io.FeedException
java.io.IOException
java.lang.IllegalAccessException
public static java.util.List<java.lang.String> ParseOPMLURL(java.lang.String url)
throws java.net.MalformedURLException,
java.io.IOException,
com.sun.syndication.io.FeedException
filename -
java.net.MalformedURLException
java.io.IOException
com.sun.syndication.io.FeedException
public static java.util.List<java.lang.String> ParseOPMLFile(java.lang.String filename)
throws java.io.IOException,
com.sun.syndication.io.FeedException
filename -
java.net.MalformedURLException
java.io.IOException
com.sun.syndication.io.FeedExceptionprivate static java.util.List<java.lang.String> ParseOPML(com.sun.syndication.feed.opml.Opml feed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||