Top Description Methods
com.rometools.rome.io

public Interface WireFeedGenerator

Known Direct Implementers
com.rometools.rome.io.impl.BaseWireFeedGenerator
Imports
org.jdom2.Document, com.rometools.rome.feed.WireFeed

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

WireFeedGenerator instances must thread safe.

Todo

explain how developers can plugin their own implementations.

Method Summary

Modifier and TypeMethod and Description
public Document

Returns:

the generated XML document (JDOM).
generate
(WireFeed
the feed bean to generate the XML document from.
feed
)

Creates an XML document (JDOM) for the given feed bean.

public String

Returns:

the type of feed the generator creates.
getType
()

Returns the type of feed the generator creates.

Method Detail

generateback to summary
public Document generate(WireFeed feed) throws IllegalArgumentException, FeedException

Creates an XML document (JDOM) for the given feed bean.

Parameters
feed:WireFeed

the feed bean to generate the XML document from.

Returns:Document

the generated XML document (JDOM).

Exceptions
IllegalArgumentException:
thrown if the type of the given feed bean does not match with the type of the WireFeedGenerator.
FeedException:
thrown if the XML Document could not be created.
getTypeback to summary
public String getType()

Returns the type of feed the generator creates.

Returns:String

the type of feed the generator creates.

See Also
{@link WireFeed} for details on the format of this string.