com.sun.syndication.io
Interface FeedGenerator

All Known Implementing Classes:
Atom03Generator, RSS090Generator, RSS091Generator

public interface FeedGenerator

Generates an XML document (JDOM) out of a feed for a specific real feed type.

FeedGenerator instances must thread safe.

TODO: explain how developers can plugin their own implementations.

Author:
Alejandro Abdelnur

Method Summary
 org.jdom.Document generate(AbstractFeed feed)
          Creates an XML document (JDOM) for the given feed bean.
 java.lang.String getType()
          Returns the type of feed the generator creates.
 

Method Detail

getType

public java.lang.String getType()
Returns the type of feed the generator creates.

Returns:
the type of feed the generator creates.
See Also:
for details on the format of this string.


generate

public org.jdom.Document generate(AbstractFeed feed)
                           throws java.lang.IllegalArgumentException,
                                  FeedException
Creates an XML document (JDOM) for the given feed bean.

Parameters:
feed - the feed bean to generate the XML document from.
Returns:
the generated XML document (JDOM).
Throws:
java.lang.IllegalArgumentException - thrown if the type of the given feed bean does not match with the type of the FeedGenerator.
FeedException - thrown if the XML Document could not be created.


Copyright © 2004 Sun Microsystems. All Rights Reserved.