org.apache.commons.feedparser
Interface ContentFeedParserListener

All Known Implementing Classes:
CaptureOutputFeedParserListener, DebugFeedParserListener, DefaultFeedDirectoryParserListener, DefaultFeedParserListener, RSS10_OutputFeedParserListener, Test

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 373614 2006-01-30 22:31:21Z mvdb $
Author:
Kevin A. Burton (burtonator)

Method Summary
 void onContent(FeedParserState state, String type, String format, String encoding, String mode, String value, boolean isSummary)
          Called when new content is found.
 void onContentEnd()
           
 

Method Detail

onContent

void onContent(FeedParserState state,
               String type,
               String format,
               String encoding,
               String mode,
               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" Attribute
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.
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.
Throws:
FeedParserException

onContentEnd

void onContentEnd()
                  throws FeedParserException
Throws:
FeedParserException


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.