org.apache.commons.feedparser
Interface FeedDirectoryParserListener

All Superinterfaces:
FeedLifecycleListener, FeedParserListener
All Known Implementing Classes:
CaptureOutputFeedParserListener, DebugFeedParserListener, DefaultFeedDirectoryParserListener

public interface FeedDirectoryParserListener
extends FeedParserListener

Interface for generic feeds that support feed directory structures. These are feed such as OPML and OCS that support nested feeds. This can be used within two systems to exchange feed lists.

This interface needs to be compatible with:

FDML
http://www.intertwingly.net/wiki/fdml/
OPML (Outline Processor Markup Language)
OCS (Open Content Syndication)
XFN (XHTML Friends Network)

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

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 directory item 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 interface org.apache.commons.feedparser.FeedParserListener
onChannel, onChannelEnd, onFeedVersion, onImage, onImageEnd
 
Methods inherited from interface org.apache.commons.feedparser.FeedLifecycleListener
finished, getContext, init, setContext
 

Method Detail

onItem

void onItem(FeedParserState state,
            String title,
            String weblog,
            String description,
            String feed)
            throws FeedParserException
Called when an directory item is found. This is compatible with the FeedParserListener so that existing implementations work. This provides a mechanism to index FDML, OPML, OCS, etc with existing feed parsers.

Specified by:
onItem in interface FeedParserListener
Parameters:
weblog - The HTML URL to the root of the weblog. Example: http://www.peerfear.org
title - The title of the feed or weblog. Maybe be null when not specified.
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

void onItemEnd()
               throws FeedParserException
Specified by:
onItemEnd in interface FeedParserListener
Throws:
FeedParserException

onRelation

void onRelation(FeedParserState state,
                String value)
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.


onRelationEnd

void onRelationEnd()

onFolder

void onFolder(FeedParserState state,
              String name)
              throws FeedParserException
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.

Throws:
FeedParserException

onFolderEnd

void onFolderEnd()
                 throws FeedParserException
Throws:
FeedParserException


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