|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.feedparser.DefaultFeedParserListener
public abstract class DefaultFeedParserListener
Default implemmentation of a FeedParserListener with noop methods. This can be used as a base class for new implementations which do not need most of the functionality of a FeedParserListener. Its recommended (but not required) that implementors extend this interface to that when new methods are added to the FeedParserListener that upgrades to this library do not break your application.
FeedParserListener| Constructor Summary | |
|---|---|
DefaultFeedParserListener()
|
|
| Method Summary | |
|---|---|
void |
finished()
Called when the feed has finished parsing. |
Object |
getContext()
|
void |
init()
Called prior to event parsing to signal the parsing of a new feed. |
void |
onAuthor(FeedParserState state,
String name,
String email,
String resource)
Provided for author information across RSS 2.0, atom, dc:creator in RSS 1.0. |
void |
onAuthorEnd()
|
void |
onChannel(FeedParserState state,
String title,
String link,
String description)
Called when a channel item is found. |
void |
onChannelEnd()
|
void |
onComments(FeedParserState state,
String resource)
|
void |
onCommentsEnd()
|
void |
onCommentsFeed(FeedParserState state,
String resource)
|
void |
onCommentsFeedEnd()
|
void |
onContent(FeedParserState state,
String type,
String format,
String encoding,
String mode,
String value,
boolean isSummary)
Called when new content is found. |
void |
onContentEncoded(FeedParserState state,
String value)
|
void |
onContentEncodedEnd()
|
void |
onContentEnd()
|
void |
onContentItem(FeedParserState state,
String format,
String encoding,
org.jdom.Element value)
|
void |
onContentItemEnd()
|
void |
onCopyright(FeedParserState state,
String content)
|
void |
onCopyrightEnd()
|
void |
onCreated(FeedParserState state,
Date date)
http://www.mnot.net/drafts/draft-nottingham-atom-format-00.html#rfc.section.3.2.8 |
void |
onCreatedEnd()
|
void |
onFeedVersion(FeedVersion version)
Called when we are first able to determine the feed version for this feed. |
void |
onGenerator(FeedParserState state,
String content)
Called when a generator contruct is found within Atom or RSS 2.0 |
void |
onGeneratorEnd()
|
void |
onGUID(FeedParserState state,
String value,
boolean isPermalink)
Used to represent RSS 2.0 GUIDs and atom:id constructs. |
void |
onGUIDEnd()
|
void |
onImage(FeedParserState state,
String title,
String link,
String url)
Called when an RSS image is found. |
void |
onImageEnd()
|
void |
onIssued(FeedParserState state,
String content)
http://www.mnot.net/drafts/draft-nottingham-atom-format-00.html#rfc.section.3.2.7 |
void |
onIssuedEnd()
|
void |
onItem(FeedParserState state,
String title,
String link,
String description,
String permalink)
Called when an RSS item or Atom entry is found. |
void |
onItemEnd()
|
void |
onLocale(FeedParserState state,
Locale locale)
Called when we've found an xml:lang or a dc:lang on Atom and RSS feeds. |
void |
onLocaleEnd()
|
void |
onSubject(FeedParserState state,
String content)
RSS 2.0 category. |
void |
onSubjectEnd()
|
void |
onXHTMLBody(FeedParserState state,
org.jdom.Element value)
|
void |
onXHTMLBodyEnd()
|
void |
setContext(Object context)
Set this context that this FeedParserListener is executing within. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFeedParserListener()
| Method Detail |
|---|
public void onFeedVersion(FeedVersion version)
throws FeedParserException
FeedParserListener
onFeedVersion in interface FeedParserListenerFeedParserException
public void init()
throws FeedParserException
FeedLifecycleListener
init in interface FeedLifecycleListenerFeedParserException
public void setContext(Object context)
throws FeedParserException
FeedLifecycleListener
setContext in interface FeedLifecycleListenerFeedParserException
public Object getContext()
throws FeedParserException
getContext in interface FeedLifecycleListenerFeedParserException
public void onChannel(FeedParserState state,
String title,
String link,
String description)
throws FeedParserException
FeedParserListener
onChannel in interface FeedParserListenerFeedParserException
public void onChannelEnd()
throws FeedParserException
onChannelEnd in interface FeedParserListenerFeedParserException
public void onImage(FeedParserState state,
String title,
String link,
String url)
throws FeedParserException
FeedParserListener
onImage in interface FeedParserListenerFeedParserException
public void onImageEnd()
throws FeedParserException
onImageEnd in interface FeedParserListenerFeedParserException
public void onItem(FeedParserState state,
String title,
String link,
String description,
String permalink)
throws FeedParserException
FeedParserListener
onItem in interface FeedParserListenerFeedParserException
public void onItemEnd()
throws FeedParserException
onItemEnd in interface FeedParserListenerFeedParserException
public void finished()
throws FeedParserException
FeedLifecycleListener
finished in interface FeedLifecycleListenerFeedParserException
public void onCopyright(FeedParserState state,
String content)
throws FeedParserException
onCopyright in interface MetaFeedParserListenerFeedParserException
public void onCopyrightEnd()
throws FeedParserException
onCopyrightEnd in interface MetaFeedParserListenerFeedParserException
public void onCreated(FeedParserState state,
Date date)
throws FeedParserException
onCreated in interface MetaFeedParserListenerFeedParserException
public void onCreatedEnd()
throws FeedParserException
onCreatedEnd in interface MetaFeedParserListenerFeedParserException
public void onSubject(FeedParserState state,
String content)
throws FeedParserException
MetaFeedParserListener
onSubject in interface MetaFeedParserListenerFeedParserException
public void onSubjectEnd()
throws FeedParserException
onSubjectEnd in interface MetaFeedParserListenerFeedParserException
public void onIssued(FeedParserState state,
String content)
throws FeedParserException
onIssued in interface MetaFeedParserListenerFeedParserException
public void onIssuedEnd()
throws FeedParserException
onIssuedEnd in interface MetaFeedParserListenerFeedParserException
public void onLocale(FeedParserState state,
Locale locale)
throws FeedParserException
MetaFeedParserListener
onLocale in interface MetaFeedParserListenerFeedParserException
public void onLocaleEnd()
throws FeedParserException
onLocaleEnd in interface MetaFeedParserListenerFeedParserException
public void onGUID(FeedParserState state,
String value,
boolean isPermalink)
throws FeedParserException
MetaFeedParserListener
onGUID in interface MetaFeedParserListenerFeedParserException
public void onGUIDEnd()
throws FeedParserException
onGUIDEnd in interface MetaFeedParserListenerFeedParserException
public void onGenerator(FeedParserState state,
String content)
throws FeedParserException
MetaFeedParserListener
onGenerator in interface MetaFeedParserListenerFeedParserException
public void onGeneratorEnd()
throws FeedParserException
onGeneratorEnd in interface MetaFeedParserListenerFeedParserException
public void onAuthor(FeedParserState state,
String name,
String email,
String resource)
throws FeedParserException
MetaFeedParserListener
onAuthor in interface MetaFeedParserListenerFeedParserException
public void onAuthorEnd()
throws FeedParserException
onAuthorEnd in interface MetaFeedParserListenerFeedParserException
public void onComments(FeedParserState state,
String resource)
throws FeedParserException
onComments in interface MetaFeedParserListenerFeedParserException
public void onCommentsEnd()
throws FeedParserException
onCommentsEnd in interface MetaFeedParserListenerFeedParserException
public void onCommentsFeed(FeedParserState state,
String resource)
throws FeedParserException
onCommentsFeed in interface MetaFeedParserListenerFeedParserException
public void onCommentsFeedEnd()
throws FeedParserException
onCommentsFeedEnd in interface MetaFeedParserListenerFeedParserException
public void onContentEncoded(FeedParserState state,
String value)
throws FeedParserException
onContentEncoded in interface ModContentFeedParserListenerFeedParserException
public void onContentEncodedEnd()
throws FeedParserException
onContentEncodedEnd in interface ModContentFeedParserListenerFeedParserException
public void onContentItem(FeedParserState state,
String format,
String encoding,
org.jdom.Element value)
throws FeedParserException
onContentItem in interface ModContentFeedParserListenerFeedParserException
public void onContentItemEnd()
throws FeedParserException
onContentItemEnd in interface ModContentFeedParserListenerFeedParserException
public void onXHTMLBody(FeedParserState state,
org.jdom.Element value)
throws FeedParserException
onXHTMLBody in interface XHTMLFeedParserListenerFeedParserException
public void onXHTMLBodyEnd()
throws FeedParserException
onXHTMLBodyEnd in interface XHTMLFeedParserListenerFeedParserException
public void onContent(FeedParserState state,
String type,
String format,
String encoding,
String mode,
String value,
boolean isSummary)
throws FeedParserException
ContentFeedParserListener
onContent in interface ContentFeedParserListenertype - (Atom) Content constructs MAY have a "type" attribute, whose
value indicates the media type of the content. When present, this attribute's
value MUST be a registered media type [RFC2045]. If not present, its value
MUST be considered to be "text/plain". 3.1.2 "mode" Attributeformat - (RSS 1.0 mod_content) Required. An empty element with an
rdf:resource attribute that points to a URI representing the format of the
content:item. Suggested best practice is to use the list of RDDL natures.encoding - (RSS 1.0 mod_content) Optional. An empty element with an
rdf:resource attribute that points to a URI representing the encoding of the
content:item. An encoding is a reversable method of including content within
the RSS file.mode - (Atom) Content constructs MAY have a "mode" attribute, whose
value indicates the method used to encode the content. When present, this
attribute's value MUST be listed below. If not present, its value MUST be
considered to be "xml".
"xml":
A mode attribute with the value "xml" indicates that the element's content is
inline xml (for example, namespace-qualified XHTML).
"escaped":
A mode attribute with the value "escaped" indicates that the element's
content is an escaped string. Processors MUST unescape the element's content
before considering it as content of the indicated media type.
"base64":
A mode attribute with the value "base64" indicates that the element's content is
base64-encoded [RFC2045]. Processors MUST decode the element's content before
considering it as content of the the indicated media type.value - String value of the found content. if this is Base64
encoded content we do NOT decode the value but return it as a string.
This is done because the content might be binary and returning as a
string would be invalid.isSummary - True if this is just a summary of the content and not
the full content. This is only known for Atom feeds.
FeedParserException
public void onContentEnd()
throws FeedParserException
onContentEnd in interface ContentFeedParserListenerFeedParserException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||