org.apache.commons.feedparser
Interface ContentFeedParserListener
- All Known Implementing Classes:
- DefaultFeedParserListener
- public interface ContentFeedParserListener
Generic content module designed to be compatible with xhtml:body, Atom
content, as well as RSS 1.0 mod_content module.
- Version:
- $Id: ContentFeedParserListener.java 159212 2005-03-27 23:31:07Z burton $
|
Method Summary |
void |
onContent(FeedParserState state,
java.lang.String type,
java.lang.String format,
java.lang.String encoding,
java.lang.String mode,
java.lang.String value,
boolean isSummary)
Called when new content is found. |
void |
onContentEnd()
|
onContent
public void onContent(FeedParserState state,
java.lang.String type,
java.lang.String format,
java.lang.String encoding,
java.lang.String mode,
java.lang.String value,
boolean isSummary)
throws FeedParserException
- Called when new content is found.
- Parameters:
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" Attributemode - (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.format - (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.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
onContentEnd
public void onContentEnd()
throws FeedParserException
FeedParserException
Copyright © 2004-2006 Apache Software Foundation. All Rights Reserved.