org.intabulas.sandler
Class SyndicationFactory

java.lang.Object
  extended by org.intabulas.sandler.SyndicationFactory
All Implemented Interfaces:
AtomElement

public class SyndicationFactory
extends Object
implements AtomElement

SyndicationFactory

Author:
lussiema

Field Summary
 
Fields inherited from interface org.intabulas.sandler.elements.AtomElement
ATOM_NAMESPACE, ATOM_VERSION, ATTRIBUTE_HREF, ATTRIBUTE_LANG, ATTRIBUTE_LANG_NP, ATTRIBUTE_MODE, ATTRIBUTE_NAME, ATTRIBUTE_REL, ATTRIBUTE_TITLE, ATTRIBUTE_TYPE, ATTRIBUTE_URL, ATTRIBUTE_VERSION, ATTRIBUTE_XMLNS, CDATA_END, CDATA_START, ELEMENT_AUTHOR, ELEMENT_CONTENT, ELEMENT_CONTRIBUTOR, ELEMENT_COPYRIGHT, ELEMENT_CREATED, ELEMENT_EMAIL, ELEMENT_ENTRY, ELEMENT_FEED, ELEMENT_GENERATOR, ELEMENT_HOMEPAGE, ELEMENT_ID, ELEMENT_INFO, ELEMENT_ISSUED, ELEMENT_LINK, ELEMENT_MODIFIED, ELEMENT_NAME, ELEMENT_SUMMARY, ELEMENT_TAGLINE, ELEMENT_TITLE, ELEMENT_URL, FORMAT_COMMENT, FORMAT_ENDELEMENT, FORMAT_FEEDATTRIBUTES, FORMAT_NAMEATTRIBUTE, FORMAT_STARTELEMENT, FORMAT_STRINGELEMENT, HTMLTAG_BEGIN, HTMLTAG_CLOSE, HTMLTAG_END, HTMLTAG_START, SPACE, XML_STARTDOC
 
Constructor Summary
SyndicationFactory()
          Allow override
 
Method Summary
static Link createAlternateLink(String href)
          Convenience method for building the oft-needed "alternate" link
static Link createAlternateLink(String href, String title)
          Convenience method for building the oft-needed "alternate" link
static Entry createEntry(Content content, String title, String id, Link alternate, Date issued, Date modified)
          Construct a valid Atom Entry with some content
static Entry createEntry(String title, String id, Link alternate, Date issued, Date modified)
          Construct a valid Atom Entry without any content
static Content createEscapedContent(String body)
          Create text/plain escaped Content
static Feed createFeed(Person author, String title, Link alternate, Date modified)
          Construct a valid Atom Feed
static Person createPerson(String name, String email, String url)
          Create new instance of an Person type
static Content createTextXmlContent(String body)
          Create text/xml Content (does not validate!)
static Entry newSyndicationEntry()
          Create a new/empty Atom Entry instance
static Entry newSyndicationEntry(String entry)
          Create a new/empty Atom Entry instance from a String representation of an Entry
static Feed newSyndicationFeed()
          Create a new/empty Atom Feed instance
static Feed newSyndicationFeed(String feed)
          Create a new/empty Atom Feed instance from a String representation of a Feed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyndicationFactory

public SyndicationFactory()
Allow override

Method Detail

newSyndicationFeed

public static Feed newSyndicationFeed()
Create a new/empty Atom Feed instance

Returns:
a Feed instance

newSyndicationFeed

public static Feed newSyndicationFeed(String feed)
                               throws FeedMarshallException
Create a new/empty Atom Feed instance from a String representation of a Feed

Parameters:
feed - a String containing a Atom Feed document
Returns:
a Feed instance
Throws:
FeedMarshallException

newSyndicationEntry

public static Entry newSyndicationEntry()
Create a new/empty Atom Entry instance

Returns:
an Entry instance

newSyndicationEntry

public static Entry newSyndicationEntry(String entry)
                                 throws FeedMarshallException
Create a new/empty Atom Entry instance from a String representation of an Entry

Parameters:
entry - a String containinh a Atom Entry document
Returns:
an Entry instance
Throws:
FeedMarshallException

createPerson

public static Person createPerson(String name,
                                  String email,
                                  String url)
Create new instance of an Person type


createEscapedContent

public static Content createEscapedContent(String body)
Create text/plain escaped Content


createTextXmlContent

public static Content createTextXmlContent(String body)
Create text/xml Content (does not validate!)


createAlternateLink

public static Link createAlternateLink(String href,
                                       String title)
Convenience method for building the oft-needed "alternate" link


createAlternateLink

public static Link createAlternateLink(String href)
Convenience method for building the oft-needed "alternate" link


createFeed

public static Feed createFeed(Person author,
                              String title,
                              Link alternate,
                              Date modified)
Construct a valid Atom Feed


createEntry

public static Entry createEntry(String title,
                                String id,
                                Link alternate,
                                Date issued,
                                Date modified)
Construct a valid Atom Entry without any content


createEntry

public static Entry createEntry(Content content,
                                String title,
                                String id,
                                Link alternate,
                                Date issued,
                                Date modified)
Construct a valid Atom Entry with some content



Copyright © 2003-2004 Mark Lussier. All Rights Reserved.