Package com.rometools.rome.io.impl
Class Atom10Generator
- java.lang.Object
-
- com.rometools.rome.io.impl.BaseWireFeedGenerator
-
- com.rometools.rome.io.impl.Atom10Generator
-
- All Implemented Interfaces:
WireFeedGenerator
public class Atom10Generator extends BaseWireFeedGenerator
Feed Generator for Atom
-
-
Constructor Summary
Constructors Modifier Constructor Description Atom10Generator()protectedAtom10Generator(String type, String version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddEntries(Feed feed, org.jdom2.Element parent)protected voidaddEntry(Entry entry, org.jdom2.Element parent)protected voidaddFeed(Feed feed, org.jdom2.Element parent)protected voidcheckEntriesConstraints(org.jdom2.Element parent)protected voidcheckEntryConstraints(org.jdom2.Element eEntry)protected voidcheckFeedHeaderConstraints(org.jdom2.Element eFeed)protected org.jdom2.DocumentcreateDocument(org.jdom2.Element root)protected org.jdom2.ElementcreateRootElement(Feed feed)protected voidfillContentElement(org.jdom2.Element contentElement, Content content)protected voidfillPersonElement(org.jdom2.Element element, SyndPerson person)org.jdom2.Documentgenerate(WireFeed wFeed)Creates an XML document (JDOM) for the given feed bean.protected org.jdom2.ElementgenerateCategoryElement(Category cat)protected org.jdom2.ElementgenerateGeneratorElement(Generator generator)protected org.jdom2.ElementgenerateLinkElement(Link link)protected org.jdom2.ElementgenerateSimpleElement(String name, String value)protected org.jdom2.ElementgenerateTagLineElement(Content tagline)protected org.jdom2.NamespacegetFeedNamespace()protected StringgetVersion()protected voidpopulateEntry(Entry entry, org.jdom2.Element eEntry)protected voidpopulateFeed(Feed feed, org.jdom2.Element parent)protected voidpopulateFeedHeader(Feed feed, org.jdom2.Element eFeed)static voidserializeEntry(Entry entry, Writer writer)Utility method to serialize an entry to writer.-
Methods inherited from class com.rometools.rome.io.impl.BaseWireFeedGenerator
generateFeedModules, generateForeignMarkup, generateItemModules, generateModuleNamespaceDefs, generatePersonModules, getType, purgeUnusedNamespaceDeclarations
-
-
-
-
Method Detail
-
getVersion
protected String getVersion()
-
getFeedNamespace
protected org.jdom2.Namespace getFeedNamespace()
-
generate
public org.jdom2.Document generate(WireFeed wFeed) throws FeedException
Description copied from interface:WireFeedGeneratorCreates an XML document (JDOM) for the given feed bean.- Parameters:
wFeed- the feed bean to generate the XML document from.- Returns:
- the generated XML document (JDOM).
- Throws:
FeedException- thrown if the XML Document could not be created.
-
createDocument
protected org.jdom2.Document createDocument(org.jdom2.Element root)
-
createRootElement
protected org.jdom2.Element createRootElement(Feed feed)
-
populateFeed
protected void populateFeed(Feed feed, org.jdom2.Element parent) throws FeedException
- Throws:
FeedException
-
addFeed
protected void addFeed(Feed feed, org.jdom2.Element parent) throws FeedException
- Throws:
FeedException
-
addEntries
protected void addEntries(Feed feed, org.jdom2.Element parent) throws FeedException
- Throws:
FeedException
-
addEntry
protected void addEntry(Entry entry, org.jdom2.Element parent) throws FeedException
- Throws:
FeedException
-
populateFeedHeader
protected void populateFeedHeader(Feed feed, org.jdom2.Element eFeed) throws FeedException
- Throws:
FeedException
-
populateEntry
protected void populateEntry(Entry entry, org.jdom2.Element eEntry) throws FeedException
- Throws:
FeedException
-
checkFeedHeaderConstraints
protected void checkFeedHeaderConstraints(org.jdom2.Element eFeed) throws FeedException- Throws:
FeedException
-
checkEntriesConstraints
protected void checkEntriesConstraints(org.jdom2.Element parent) throws FeedException- Throws:
FeedException
-
checkEntryConstraints
protected void checkEntryConstraints(org.jdom2.Element eEntry) throws FeedException- Throws:
FeedException
-
generateCategoryElement
protected org.jdom2.Element generateCategoryElement(Category cat)
-
generateLinkElement
protected org.jdom2.Element generateLinkElement(Link link)
-
fillPersonElement
protected void fillPersonElement(org.jdom2.Element element, SyndPerson person)
-
generateTagLineElement
protected org.jdom2.Element generateTagLineElement(Content tagline)
-
fillContentElement
protected void fillContentElement(org.jdom2.Element contentElement, Content content) throws FeedException- Throws:
FeedException
-
generateGeneratorElement
protected org.jdom2.Element generateGeneratorElement(Generator generator)
-
serializeEntry
public static void serializeEntry(Entry entry, Writer writer) throws IllegalArgumentException, FeedException, IOException
Utility method to serialize an entry to writer.
-
-