org.apache.commons.feedparser.locate.blogservice
Class LiveJournal
java.lang.Object
org.apache.commons.feedparser.locate.blogservice.BlogService
org.apache.commons.feedparser.locate.blogservice.LiveJournal
public class LiveJournal
- extends BlogService
Models the LiveJournal blog service, encapsulating whether a given weblog
is this type of service and where it usually keeps its feeds.
- Author:
- Brad Neuberg, bkn3@columbia.edu
Method Summary |
boolean |
followRedirects()
Returns whether we should follow HTTP redirects for this blog service. |
FeedReference[] |
getFeedLocations(String resource,
String content)
Returns an array of FeedReferences that contains information on the
usual locations this blog service contains its feed. |
boolean |
hasValidAutoDiscovery()
Returns whether we can trust the results of this blog service's
autodiscovery links. |
boolean |
isThisService(String resource,
String content)
Determines if the weblog at the given resource and with the given
content is this blog service. |
LiveJournal
public LiveJournal()
hasValidAutoDiscovery
public boolean hasValidAutoDiscovery()
- Returns whether we can trust the results of this blog service's
autodiscovery links. For example, TextAmerica returns invalid
autodiscovery results.
- Specified by:
hasValidAutoDiscovery
in class BlogService
followRedirects
public boolean followRedirects()
- Returns whether we should follow HTTP redirects for this blog service.
Some services don't implement HTTP redirects correctly, while others,
like Xanga, require it.
- Specified by:
followRedirects
in class BlogService
isThisService
public boolean isThisService(String resource,
String content)
throws FeedParserException
- Determines if the weblog at the given resource and with the given
content is this blog service.
- Specified by:
isThisService
in class BlogService
- Parameters:
resource
- A full URI to this resource, such as
"http://www.codinginparadise.org".content
- The full HTML content at the resource's URL.
- Throws:
FeedParserException
- Thrown if an error occurs while
determining the type of this weblog.
getFeedLocations
public FeedReference[] getFeedLocations(String resource,
String content)
throws FeedParserException
- Returns an array of FeedReferences that contains information on the
usual locations this blog service contains its feed. The feeds should
be ordered by quality, so that higher quality feeds come before lower
quality ones (i.e. you would want to have an Atom FeedReference
object come before an RSS 0.91 FeedReference object in this list).
- Specified by:
getFeedLocations
in class BlogService
- Parameters:
resource
- A URL to the given weblog that might be used to build
up where feeds are usually located.content
- The full content of the resource URL, which might
be useful to determine where feeds are usually located. This can be
null.
- Throws:
FeedParserException
- Thrown if an error occurs while trying
to determine the usual locations of feeds for this service.
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.