|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 FeedLifecycleListener
init
in class DefaultFeedParserListener
public void onFeedVersion(FeedVersion version) throws FeedParserException
FeedParserListener
onFeedVersion
in interface FeedParserListener
onFeedVersion
in class DefaultFeedParserListener
FeedParserException
public void setContext(Object context)
FeedLifecycleListener
setContext
in interface FeedLifecycleListener
setContext
in class DefaultFeedParserListener
public void onChannel(FeedParserState state, String title, String link, String description)
onChannel
in interface FeedParserListener
onChannel
in class DefaultFeedParserListener
public void onChannelEnd()
onChannelEnd
in interface FeedParserListener
onChannelEnd
in class DefaultFeedParserListener
public void onImage(FeedParserState state, String title, String link, String url)
onImage
in interface FeedParserListener
onImage
in class DefaultFeedParserListener
public void onImageEnd()
onImageEnd
in interface FeedParserListener
onImageEnd
in class DefaultFeedParserListener
public void onItem(FeedParserState state, String title, String link, String description, String permalink)
onItem
in interface FeedDirectoryParserListener
onItem
in interface FeedParserListener
onItem
in class DefaultFeedParserListener
title
- 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 FeedDirectoryParserListener
onItemEnd
in interface FeedParserListener
onItemEnd
in class DefaultFeedParserListener
public void finished()
finished
in interface FeedLifecycleListener
finished
in class DefaultFeedParserListener
public void onFolder(FeedParserState state, String name) throws FeedParserException
onFolder
in interface FeedDirectoryParserListener
FeedParserException
public void onFolderEnd() throws FeedParserException
onFolderEnd
in interface FeedDirectoryParserListener
FeedParserException
public void onContent(FeedParserState state, String type, String format, String encoding, String mode, String value, boolean isSummary) throws FeedParserException
ContentFeedParserListener
onContent
in interface ContentFeedParserListener
onContent
in class DefaultFeedParserListener
type
- (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 MetaFeedParserListener
onCreated
in class DefaultFeedParserListener
FeedParserException
public void onGUID(FeedParserState state, String value, boolean isPermalink) throws FeedParserException
MetaFeedParserListener
onGUID
in interface MetaFeedParserListener
onGUID
in class DefaultFeedParserListener
FeedParserException
public void onAuthor(FeedParserState state, String name, String email, String resource) throws FeedParserException
MetaFeedParserListener
onAuthor
in interface MetaFeedParserListener
onAuthor
in class DefaultFeedParserListener
FeedParserException
public void onComments(FeedParserState state, String resource) throws FeedParserException
onComments
in interface MetaFeedParserListener
onComments
in class DefaultFeedParserListener
FeedParserException
public void onCommentsFeed(FeedParserState state, String resource) throws FeedParserException
onCommentsFeed
in interface MetaFeedParserListener
onCommentsFeed
in class DefaultFeedParserListener
FeedParserException
public void onLink(FeedParserState state, String rel, String type, String href, String title, long length) throws FeedParserException
onLink
in interface LinkFeedParserListener
length
- The length of the content or -1 if not specified.
FeedParserException
public void onLocale(FeedParserState state, Locale locale) throws FeedParserException
MetaFeedParserListener
onLocale
in interface MetaFeedParserListener
onLocale
in class DefaultFeedParserListener
FeedParserException
public void onLocaleEnd() throws FeedParserException
onLocaleEnd
in interface MetaFeedParserListener
onLocaleEnd
in class DefaultFeedParserListener
FeedParserException
public void onRelation(FeedParserState state, String value)
FeedDirectoryParserListener
onRelation
in interface FeedDirectoryParserListener
public void onRelationEnd()
onRelationEnd
in interface FeedDirectoryParserListener
public void onTag(FeedParserState state, String tag, String tagspace) throws FeedParserException
onTag
in interface TagFeedParserListener
FeedParserException
public void onTagEnd() throws FeedParserException
onTagEnd
in interface TagFeedParserListener
FeedParserException
public void onContentEncoded(FeedParserState state, String value) throws FeedParserException
onContentEncoded
in interface ModContentFeedParserListener
onContentEncoded
in class DefaultFeedParserListener
FeedParserException
public void onContentItem(FeedParserState state, String format, String encoding, org.jdom.Element value) throws FeedParserException
onContentItem
in interface ModContentFeedParserListener
onContentItem
in class DefaultFeedParserListener
FeedParserException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |