org.apache.commons.feedparser
Class DefaultFeedDirectoryParserListener

java.lang.Object
  extended by org.apache.commons.feedparser.DefaultFeedParserListener
      extended by org.apache.commons.feedparser.DefaultFeedDirectoryParserListener
All Implemented Interfaces:
ContentFeedParserListener, FeedDirectoryParserListener, FeedLifecycleListener, FeedParserListener, MetaFeedParserListener, ModContentFeedParserListener, XHTMLFeedParserListener

public abstract class DefaultFeedDirectoryParserListener
extends DefaultFeedParserListener
implements FeedParserListener, FeedDirectoryParserListener

Default implemmentation of a FeedParserListener with noop methods. This can be used as a base class for new implementations which do not need most of the functionality of a FeedParserListener.

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

Constructor Summary
DefaultFeedDirectoryParserListener()
           
 
Method Summary
 void onFolder(FeedParserState state, String name)
          Called when a new Folder is found.
 void onFolderEnd()
           
 void onItem(FeedParserState state, String title, String weblog, String description, String feed)
          Called when an RSS item or Atom entry is found.
 void onItemEnd()
           
 void onRelation(FeedParserState state, String value)
          Called when we've found a relation for a given item.
 void onRelationEnd()
           
 
Methods inherited from class org.apache.commons.feedparser.DefaultFeedParserListener
finished, getContext, init, onAuthor, onAuthorEnd, onChannel, onChannelEnd, onComments, onCommentsEnd, onCommentsFeed, onCommentsFeedEnd, onContent, onContentEncoded, onContentEncodedEnd, onContentEnd, onContentItem, onContentItemEnd, onCopyright, onCopyrightEnd, onCreated, onCreatedEnd, onFeedVersion, onGenerator, onGeneratorEnd, onGUID, onGUIDEnd, onImage, onImageEnd, onIssued, onIssuedEnd, onLocale, onLocaleEnd, onSubject, onSubjectEnd, onXHTMLBody, onXHTMLBodyEnd, setContext
 
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.FeedParserListener
onChannel, onChannelEnd, onFeedVersion, onImage, onImageEnd
 
Methods inherited from interface org.apache.commons.feedparser.FeedLifecycleListener
finished, getContext, init, setContext
 

Constructor Detail

DefaultFeedDirectoryParserListener

public DefaultFeedDirectoryParserListener()
Method Detail

onItem

public void onItem(FeedParserState state,
                   String title,
                   String weblog,
                   String description,
                   String feed)
            throws FeedParserException
Description copied from interface: FeedParserListener
Called when an RSS item or Atom entry is found.

Specified by:
onItem in interface FeedDirectoryParserListener
Specified by:
onItem in interface FeedParserListener
Overrides:
onItem in class DefaultFeedParserListener
title - The title of the feed or weblog. Maybe be null when not specified.
weblog - The HTML URL to the root of the weblog. Example: http://www.peerfear.org
feed - 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 URL
Throws:
FeedParserException
See Also:
FeedParserListener.onItem(org.apache.commons.feedparser.FeedParserState, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

onItemEnd

public void onItemEnd()
               throws FeedParserException
Specified by:
onItemEnd in interface FeedDirectoryParserListener
Specified by:
onItemEnd in interface FeedParserListener
Overrides:
onItemEnd in class DefaultFeedParserListener
Throws:
FeedParserException

onRelation

public void onRelation(FeedParserState state,
                       String value)
Description copied from interface: FeedDirectoryParserListener
Called when we've found a relation for a given item. This way you can specify the relationship you have with a given entry in your directory. This is mostly for compatibility purposes with XFN so that the values can be 'met', 'date', 'sweetheart', 'friend'. For XFN we would call onItem() methods and then onRelation() methods with each of the relations passed.

Specified by:
onRelation in interface FeedDirectoryParserListener

onRelationEnd

public void onRelationEnd()
Specified by:
onRelationEnd in interface FeedDirectoryParserListener

onFolder

public void onFolder(FeedParserState state,
                     String name)
              throws FeedParserException
Description copied from interface: FeedDirectoryParserListener
Called when a new Folder is found. If feeds are in the default root folder this method is not called. This is mostly for OPML support but could be used within other feed formats. When this method isn't called one could assume that items are in the 'root' folder or no folder.

Specified by:
onFolder in interface FeedDirectoryParserListener
Throws:
FeedParserException

onFolderEnd

public void onFolderEnd()
                 throws FeedParserException
Specified by:
onFolderEnd in interface FeedDirectoryParserListener
Throws:
FeedParserException


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