|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.feedparser.DefaultFeedParserListener
org.apache.commons.feedparser.impl.DebugFeedParserListener
public class DebugFeedParserListener
| Constructor Summary | |
|---|---|
DebugFeedParserListener()
|
|
DebugFeedParserListener(PrintStream out)
|
|
| Method Summary | |
|---|---|
void |
finished()
Called when the feed has finished parsing. |
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 |
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 |
onCommentsFeed(FeedParserState state,
String resource)
|
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 |
onContentItem(FeedParserState state,
String format,
String encoding,
org.jdom.Element value)
|
void |
onCreated(FeedParserState state,
Date date)
http://www.mnot.net/drafts/draft-nottingham-atom-format-00.html#rfc.section.3.2.8 |
void |
onFeedVersion(FeedVersion version)
Called when we are first able to determine the feed version for this feed. |
void |
onFolder(FeedParserState state,
String name)
Called when a new Folder is found. |
void |
onFolderEnd()
|
void |
onGUID(FeedParserState state,
String value,
boolean isPermalink)
Used to represent RSS 2.0 GUIDs and atom:id constructs. |
void |
onImage(FeedParserState state,
String title,
String link,
String url)
Called when an RSS image is found. |
void |
onImageEnd()
|
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 |
onLink(FeedParserState state,
String rel,
String type,
String href,
String title,
long length)
|
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 |
onRelation(FeedParserState state,
String value)
Called when we've found a relation for a given item. |
void |
onRelationEnd()
|
void |
onTag(FeedParserState state,
String tag,
String tagspace)
|
void |
onTagEnd()
|
void |
setContext(Object context)
Set this context that this FeedParserListener is executing within. |
| Methods inherited from class org.apache.commons.feedparser.DefaultFeedParserListener |
|---|
getContext, onAuthorEnd, onCommentsEnd, onCommentsFeedEnd, onContentEncodedEnd, onContentEnd, onContentItemEnd, onCopyright, onCopyrightEnd, onCreatedEnd, onGenerator, onGeneratorEnd, onGUIDEnd, onIssued, onIssuedEnd, onSubject, onSubjectEnd, onXHTMLBody, onXHTMLBodyEnd |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.commons.feedparser.FeedLifecycleListener |
|---|
getContext |
| Methods inherited from interface org.apache.commons.feedparser.MetaFeedParserListener |
|---|
onAuthorEnd, onCommentsEnd, onCommentsFeedEnd, onCopyright, onCopyrightEnd, onCreatedEnd, onGenerator, onGeneratorEnd, onGUIDEnd, onIssued, onIssuedEnd, onSubject, onSubjectEnd |
| Methods inherited from interface org.apache.commons.feedparser.ModContentFeedParserListener |
|---|
onContentEncodedEnd, onContentItemEnd |
| Constructor Detail |
|---|
public DebugFeedParserListener()
public DebugFeedParserListener(PrintStream out)
| Method Detail |
|---|
public void init()
init in interface FeedLifecycleListenerinit in class DefaultFeedParserListener
public void onFeedVersion(FeedVersion version)
throws FeedParserException
FeedParserListener
onFeedVersion in interface FeedParserListeneronFeedVersion in class DefaultFeedParserListenerFeedParserExceptionpublic void setContext(Object context)
FeedLifecycleListener
setContext in interface FeedLifecycleListenersetContext in class DefaultFeedParserListener
public void onChannel(FeedParserState state,
String title,
String link,
String description)
onChannel in interface FeedParserListeneronChannel in class DefaultFeedParserListenerpublic void onChannelEnd()
onChannelEnd in interface FeedParserListeneronChannelEnd in class DefaultFeedParserListener
public void onImage(FeedParserState state,
String title,
String link,
String url)
onImage in interface FeedParserListeneronImage in class DefaultFeedParserListenerpublic void onImageEnd()
onImageEnd in interface FeedParserListeneronImageEnd in class DefaultFeedParserListener
public void onItem(FeedParserState state,
String title,
String link,
String description,
String permalink)
onItem in interface FeedDirectoryParserListeneronItem in interface FeedParserListeneronItem in class DefaultFeedParserListenertitle - The title of the feed or weblog. Maybe be null when not
specified.link - The HTML URL to the root of the weblog. Example:
http://www.peerfear.orgpermalink - The XML URL to the RSS/Atom feed for this weblog. This may
be null in some situations when we don't have a feed URLFeedParserListener.onItem(org.apache.commons.feedparser.FeedParserState, java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void onItemEnd()
onItemEnd in interface FeedDirectoryParserListeneronItemEnd in interface FeedParserListeneronItemEnd in class DefaultFeedParserListenerpublic void finished()
finished in interface FeedLifecycleListenerfinished in class DefaultFeedParserListener
public void onFolder(FeedParserState state,
String name)
throws FeedParserException
onFolder in interface FeedDirectoryParserListenerFeedParserException
public void onFolderEnd()
throws FeedParserException
onFolderEnd in interface FeedDirectoryParserListenerFeedParserException
public void onContent(FeedParserState state,
String type,
String format,
String encoding,
String mode,
String value,
boolean isSummary)
throws FeedParserException
ContentFeedParserListener
onContent in interface ContentFeedParserListeneronContent in class DefaultFeedParserListenertype - (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 onCreated(FeedParserState state,
Date date)
throws FeedParserException
DefaultFeedParserListener
onCreated in interface MetaFeedParserListeneronCreated in class DefaultFeedParserListenerFeedParserException
public void onGUID(FeedParserState state,
String value,
boolean isPermalink)
throws FeedParserException
MetaFeedParserListener
onGUID in interface MetaFeedParserListeneronGUID in class DefaultFeedParserListenerFeedParserException
public void onAuthor(FeedParserState state,
String name,
String email,
String resource)
throws FeedParserException
MetaFeedParserListener
onAuthor in interface MetaFeedParserListeneronAuthor in class DefaultFeedParserListenerFeedParserException
public void onComments(FeedParserState state,
String resource)
throws FeedParserException
onComments in interface MetaFeedParserListeneronComments in class DefaultFeedParserListenerFeedParserException
public void onCommentsFeed(FeedParserState state,
String resource)
throws FeedParserException
onCommentsFeed in interface MetaFeedParserListeneronCommentsFeed in class DefaultFeedParserListenerFeedParserException
public void onLink(FeedParserState state,
String rel,
String type,
String href,
String title,
long length)
throws FeedParserException
onLink in interface LinkFeedParserListenerlength - The length of the content or -1 if not specified.
FeedParserException
public void onLocale(FeedParserState state,
Locale locale)
throws FeedParserException
MetaFeedParserListener
onLocale in interface MetaFeedParserListeneronLocale in class DefaultFeedParserListenerFeedParserException
public void onLocaleEnd()
throws FeedParserException
onLocaleEnd in interface MetaFeedParserListeneronLocaleEnd in class DefaultFeedParserListenerFeedParserException
public void onRelation(FeedParserState state,
String value)
FeedDirectoryParserListener
onRelation in interface FeedDirectoryParserListenerpublic void onRelationEnd()
onRelationEnd in interface FeedDirectoryParserListener
public void onTag(FeedParserState state,
String tag,
String tagspace)
throws FeedParserException
onTag in interface TagFeedParserListenerFeedParserException
public void onTagEnd()
throws FeedParserException
onTagEnd in interface TagFeedParserListenerFeedParserException
public void onContentEncoded(FeedParserState state,
String value)
throws FeedParserException
onContentEncoded in interface ModContentFeedParserListeneronContentEncoded in class DefaultFeedParserListenerFeedParserException
public void onContentItem(FeedParserState state,
String format,
String encoding,
org.jdom.Element value)
throws FeedParserException
onContentItem in interface ModContentFeedParserListeneronContentItem in class DefaultFeedParserListenerFeedParserException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||