org.apache.commons.feedparser
Interface MetaFeedParserListener

All Known Implementing Classes:
DebugFeedParserListener, DefaultFeedParserListener

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 159215 2005-03-27 23:36:16Z burton $

Method Summary
 void onAuthor(FeedParserState state, java.lang.String name, java.lang.String email, java.lang.String resource)
          Provided for author information across RSS 2.0, atom, dc:creator in RSS 1.0.
 void onAuthorEnd()
           
 void onComments(FeedParserState state, java.lang.String resource)
           
 void onCommentsEnd()
           
 void onCommentsFeed(FeedParserState state, java.lang.String resource)
           
 void onCommentsFeedEnd()
           
 void onCopyright(FeedParserState state, java.lang.String content)
           
 void onCopyrightEnd()
           
 void onCreated(FeedParserState state, java.util.Date date)
          --- ATOM SUPPORT --- The "atom:created" element's content indicates the time that the entry was created.
 void onCreatedEnd()
           
 void onGenerator(FeedParserState state, java.lang.String content)
          Called when a generator contruct is found within Atom or RSS 2.0
 void onGeneratorEnd()
           
 void onGUID(FeedParserState state, java.lang.String value, boolean isPermalink)
          Used to represent RSS 2.0 GUIDs and atom:id constructs.
 void onGUIDEnd()
           
 void onIssued(FeedParserState state, java.lang.String content)
          http://www.mnot.net/drafts/draft-nottingham-atom-format-00.html#rfc.section.3.2.7
 void onIssuedEnd()
           
 void onLocale(FeedParserState state, java.util.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, java.lang.String content)
          RSS 2.0 category.
 void onSubjectEnd()
           
 

Method Detail

onCopyright

public void onCopyright(FeedParserState state,
                        java.lang.String content)
                 throws FeedParserException
FeedParserException

onCopyrightEnd

public void onCopyrightEnd()
                    throws FeedParserException
FeedParserException

onCreated

public void onCreated(FeedParserState state,
                      java.util.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/

FeedParserException

onCreatedEnd

public void onCreatedEnd()
                  throws FeedParserException
FeedParserException

onIssued

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

FeedParserException

onIssuedEnd

public void onIssuedEnd()
                 throws FeedParserException
FeedParserException

onSubject

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

FeedParserException

onSubjectEnd

public void onSubjectEnd()
                  throws FeedParserException
FeedParserException

onLocale

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

FeedParserException

onLocaleEnd

public void onLocaleEnd()
                 throws FeedParserException
FeedParserException

onGUID

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

FeedParserException

onGUIDEnd

public void onGUIDEnd()
               throws FeedParserException
FeedParserException

onGenerator

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

FeedParserException

onGeneratorEnd

public void onGeneratorEnd()
                    throws FeedParserException
FeedParserException

onAuthor

public void onAuthor(FeedParserState state,
                     java.lang.String name,
                     java.lang.String email,
                     java.lang.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.

FeedParserException

onAuthorEnd

public void onAuthorEnd()
                 throws FeedParserException
FeedParserException

onComments

public void onComments(FeedParserState state,
                       java.lang.String resource)
                throws FeedParserException
FeedParserException

onCommentsEnd

public void onCommentsEnd()
                   throws FeedParserException
FeedParserException

onCommentsFeed

public void onCommentsFeed(FeedParserState state,
                           java.lang.String resource)
                    throws FeedParserException
FeedParserException

onCommentsFeedEnd

public void onCommentsFeedEnd()
                       throws FeedParserException
FeedParserException


Copyright © 2004-2006 Apache Software Foundation. All Rights Reserved.