org.apache.commons.feedparser
Interface MetaFeedParserListener

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

public interface MetaFeedParserListener

Provides a MetaData event listener for RSS 0.9x, RSS 1.0, 2.0 and Atom metadata values. Each format provides mechanisms to represent copyright strings, dates, modified times, etc. This interface provides a generic implementation for each.

Version:
$Id: MetaFeedParserListener.java 373614 2006-01-30 22:31:21Z mvdb $
Author:
Kevin A. Burton (burtonator)

Method Summary
 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 onComments(FeedParserState state, String resource)
           
 void onCommentsEnd()
           
 void onCommentsFeed(FeedParserState state, String resource)
           
 void onCommentsFeedEnd()
           
 void onCopyright(FeedParserState state, String content)
           
 void onCopyrightEnd()
           
 void onCreated(FeedParserState state, Date date)
          --- ATOM SUPPORT --- The "atom:created" element's content indicates the time that the entry was created.
 void onCreatedEnd()
           
 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 onIssued(FeedParserState state, String content)
          http://www.mnot.net/drafts/draft-nottingham-atom-format-00.html#rfc.section.3.2.7
 void onIssuedEnd()
           
 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()
           
 

Method Detail

onCopyright

void onCopyright(FeedParserState state,
                 String content)
                 throws FeedParserException
Throws:
FeedParserException

onCopyrightEnd

void onCopyrightEnd()
                    throws FeedParserException
Throws:
FeedParserException

onCreated

void onCreated(FeedParserState state,
               Date date)
               throws FeedParserException
--- ATOM SUPPORT --- The "atom:created" element's content indicates the time that the entry was created. Entries MAY contain an atom:created element, but MUST NOT contain more than one. When this element is present, its content MUST be a W3C Date-Time string [[ref]]. The date SHOULD be expressed in the "UTC" time zone [[reword?]]. If atom:created is not present, CONSUMERS MUST consider its value to be the same as that of atom:modified. http://www.mnot.net/drafts/draft-nottingham-atom-format-00.html#rfc.section.3.2.8 --- RSS 2.0 SUPPORT --- is an optional sub-element of . Its value is a date, indicating when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date. Sun, 19 May 2002 15:21:36 GMT http://feedvalidator.org/docs/rss2.html#ltpubdategtSubelementOfLtitemgt --- RSS 1.0 SUPPORT --- We use dc:date which is ISO 8601 compliant. http://www.w3.org/TR/NOTE-datetime http://web.resource.org/rss/1.0/modules/dc/

Throws:
FeedParserException

onCreatedEnd

void onCreatedEnd()
                  throws FeedParserException
Throws:
FeedParserException

onIssued

void onIssued(FeedParserState state,
              String content)
              throws FeedParserException
http://www.mnot.net/drafts/draft-nottingham-atom-format-00.html#rfc.section.3.2.7

Throws:
FeedParserException

onIssuedEnd

void onIssuedEnd()
                 throws FeedParserException
Throws:
FeedParserException

onSubject

void onSubject(FeedParserState state,
               String content)
               throws FeedParserException
RSS 2.0 category. Dublin Core.

Throws:
FeedParserException

onSubjectEnd

void onSubjectEnd()
                  throws FeedParserException
Throws:
FeedParserException

onLocale

void onLocale(FeedParserState state,
              Locale locale)
              throws FeedParserException
Called when we've found an xml:lang or a dc:lang on Atom and RSS feeds.

Throws:
FeedParserException

onLocaleEnd

void onLocaleEnd()
                 throws FeedParserException
Throws:
FeedParserException

onGUID

void onGUID(FeedParserState state,
            String value,
            boolean isPermalink)
            throws FeedParserException
Used to represent RSS 2.0 GUIDs and atom:id constructs. For Atom isPermalink should be ignored.

Throws:
FeedParserException

onGUIDEnd

void onGUIDEnd()
               throws FeedParserException
Throws:
FeedParserException

onGenerator

void onGenerator(FeedParserState state,
                 String content)
                 throws FeedParserException
Called when a generator contruct is found within Atom or RSS 2.0

Throws:
FeedParserException

onGeneratorEnd

void onGeneratorEnd()
                    throws FeedParserException
Throws:
FeedParserException

onAuthor

void onAuthor(FeedParserState state,
              String name,
              String email,
              String resource)
              throws FeedParserException
Provided for author information across RSS 2.0, atom, dc:creator in RSS 1.0. Both email, and resource may be null if not specified. TODO: what does RSS 0.91, 0.9, etc provide? NOTE that this is not yet 100% compatible with FOAF person constructs. FOAF provides additional metadata including title, firstName, surname, nick, etc which we don't provide with this method. We'll probably add additional events for this in the future.

Throws:
FeedParserException

onAuthorEnd

void onAuthorEnd()
                 throws FeedParserException
Throws:
FeedParserException

onComments

void onComments(FeedParserState state,
                String resource)
                throws FeedParserException
Throws:
FeedParserException

onCommentsEnd

void onCommentsEnd()
                   throws FeedParserException
Throws:
FeedParserException

onCommentsFeed

void onCommentsFeed(FeedParserState state,
                    String resource)
                    throws FeedParserException
Throws:
FeedParserException

onCommentsFeedEnd

void onCommentsFeedEnd()
                       throws FeedParserException
Throws:
FeedParserException


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