org.restlet.ext.atom
Class Feed

java.lang.Object
  extended by org.restlet.representation.Variant
      extended by org.restlet.representation.RepresentationInfo
          extended by org.restlet.representation.Representation
              extended by org.restlet.representation.CharacterRepresentation
                  extended by org.restlet.representation.WriterRepresentation
                      extended by org.restlet.ext.xml.XmlRepresentation
                          extended by org.restlet.ext.xml.SaxRepresentation
                              extended by org.restlet.ext.atom.Feed
All Implemented Interfaces:
NamespaceContext

public class Feed
extends SaxRepresentation

Atom Feed Document, acting as a component for metadata and data associated with the feed.

Author:
Jerome Louvel

Field Summary
static String ATOM_NAMESPACE
          Atom Syndication Format namespace.
static String XHTML_NAMESPACE
          XHTML namespace.
 
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE
 
Constructor Summary
Feed()
          Constructor.
Feed(Client clientDispatcher, String feedUri)
          Constructor.
Feed(Context context, String feedUri)
          Constructor.
Feed(Representation xmlFeed)
          Constructor.
Feed(Representation xmlFeed, FeedReader feedReader)
          Constructor.
Feed(String feedUri)
          Constructor.
 
Method Summary
 List<Person> getAuthors()
          Returns the authors of the feed.
 Reference getBaseReference()
          Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.
 List<Category> getCategories()
          Returns the categories associated with the feed.
 List<Person> getContributors()
          Returns the contributors to the feed.
 List<Entry> getEntries()
          Returns the individual entries, acting as a components for associated metadata and data.
 Generator getGenerator()
          Returns the agent used to generate a feed.
 Reference getIcon()
          Returns the image that provides iconic visual identification for a feed.
 String getId()
          Returns the permanent, universally unique identifier for the feed.
 List<Link> getLinks()
          Returns the references from the entry to Web resources.
 Reference getLogo()
          Returns the image that provides visual identification for a feed.
 Text getRights()
          Returns the information about rights held in and over an feed.
 Text getSubtitle()
          Returns the short summary, abstract, or excerpt of an feed.
 Text getTitle()
          Returns the human-readable title for the feed.
 Date getUpdated()
          Returns the most recent moment when the entry was modified in a significant way.
 void setBaseReference(Reference baseReference)
          Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.
 void setBaseReference(String baseUri)
          Sets the base URI used to resolve relative references found within the scope of the xml:base attribute.
 void setGenerator(Generator generator)
          Sets the agent used to generate a feed.
 void setIcon(Reference icon)
          Sets the image that provides iconic visual identification for a feed.
 void setId(String id)
          Sets the permanent, universally unique identifier for the feed.
 void setLogo(Reference logo)
          Sets the image that provides visual identification for a feed.
 void setRights(String rights)
          Sets the information about rights held in and over an feed.
 void setRights(Text rights)
          Sets the information about rights held in and over an feed.
 void setSubtitle(String subtitle)
          Sets the short summary, abstract, or excerpt of an feed.
 void setSubtitle(Text subtitle)
          Sets the short summary, abstract, or excerpt of an feed.
 void setTitle(String title)
          Sets the human-readable title for the feed.
 void setTitle(Text title)
          Sets the human-readable title for the feed.
 void setUpdated(Date updated)
          Sets the most recent moment when the feed was modified in a significant way.
 void write(XmlWriter writer)
          Writes the representation to a XML writer.
 void writeElement(XmlWriter writer)
          Writes the current object as an XML element using the given SAX writer.
 
Methods inherited from class org.restlet.ext.xml.SaxRepresentation
getInputSource, getSaxSource, isSecureProcessing, parse, release, setSaxSource, setSecureProcessing, write
 
Methods inherited from class org.restlet.ext.xml.XmlRepresentation
evaluate, getBoolean, getDocument, getDocumentBuilder, getDomSource, getEntityResolver, getErrorHandler, getNamespaces, getNamespaceURI, getNode, getNodes, getNumber, getPrefix, getPrefixes, getSaxSource, getSchema, getStreamSource, getText, isCoalescing, isExpandingEntityRefs, isIgnoringComments, isIgnoringExtraWhitespaces, isNamespaceAware, isValidatingDtd, isXIncludeAware, setCoalescing, setEntityResolver, setErrorHandler, setExpandingEntityRefs, setIgnoringComments, setIgnoringExtraWhitespaces, setNamespaceAware, setNamespaces, setSchema, setSchema, setValidatingDtd, setXIncludeAware, validate, validate, validate, validate
 
Methods inherited from class org.restlet.representation.WriterRepresentation
getReader
 
Methods inherited from class org.restlet.representation.CharacterRepresentation
getChannel, getStream, write, write
 
Methods inherited from class org.restlet.representation.Representation
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
 
Methods inherited from class org.restlet.representation.RepresentationInfo
getModificationDate, getTag, setModificationDate, setTag
 
Methods inherited from class org.restlet.representation.Variant
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATOM_NAMESPACE

public static final String ATOM_NAMESPACE
Atom Syndication Format namespace.

See Also:
Constant Field Values

XHTML_NAMESPACE

public static final String XHTML_NAMESPACE
XHTML namespace.

See Also:
Constant Field Values
Constructor Detail

Feed

public Feed()
Constructor.


Feed

public Feed(Client clientDispatcher,
            String feedUri)
     throws IOException
Constructor.

Parameters:
clientDispatcher - The client HTTP dispatcher.
feedUri - The feed URI.
Throws:
IOException

Feed

public Feed(Context context,
            String feedUri)
     throws IOException
Constructor.

Parameters:
context - The context from which the client dispatcher will be retrieved.
feedUri - The feed URI.
Throws:
IOException

Feed

public Feed(Representation xmlFeed)
     throws IOException
Constructor.

Parameters:
xmlFeed - The XML feed document.
Throws:
IOException

Feed

public Feed(Representation xmlFeed,
            FeedReader feedReader)
     throws IOException
Constructor.

Parameters:
xmlFeed - The XML feed document.
feedReader - Custom feed reader.
Throws:
IOException

Feed

public Feed(String feedUri)
     throws IOException
Constructor.

Parameters:
feedUri - The feed URI.
Throws:
IOException
Method Detail

getAuthors

public List<Person> getAuthors()
Returns the authors of the feed.

Returns:
The authors of the feed.

getBaseReference

public Reference getBaseReference()
Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.

Returns:
The base reference used to resolve relative references found within the scope of the xml:base attribute.

getCategories

public List<Category> getCategories()
Returns the categories associated with the feed.

Returns:
The categories associated with the feed.

getContributors

public List<Person> getContributors()
Returns the contributors to the feed.

Returns:
The contributors to the feed.

getEntries

public List<Entry> getEntries()
Returns the individual entries, acting as a components for associated metadata and data.

Returns:
The individual entries, acting as a components for associated metadata and data.

getGenerator

public Generator getGenerator()
Returns the agent used to generate a feed.

Returns:
The agent used to generate a feed.

getIcon

public Reference getIcon()
Returns the image that provides iconic visual identification for a feed.

Returns:
The image that provides iconic visual identification for a feed.

getId

public String getId()
Returns the permanent, universally unique identifier for the feed.

Returns:
The permanent, universally unique identifier for the feed.

getLinks

public List<Link> getLinks()
Returns the references from the entry to Web resources.

Returns:
The references from the entry to Web resources.

getLogo

public Reference getLogo()
Returns the image that provides visual identification for a feed.

Returns:
The image that provides visual identification for a feed.

getRights

public Text getRights()
Returns the information about rights held in and over an feed.

Returns:
The information about rights held in and over an feed.

getSubtitle

public Text getSubtitle()
Returns the short summary, abstract, or excerpt of an feed.

Returns:
The short summary, abstract, or excerpt of an feed.

getTitle

public Text getTitle()
Returns the human-readable title for the feed.

Returns:
The human-readable title for the feed.

getUpdated

public Date getUpdated()
Returns the most recent moment when the entry was modified in a significant way.

Returns:
The most recent moment when the entry was modified in a significant way.

setBaseReference

public void setBaseReference(Reference baseReference)
Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.

Parameters:
baseReference - The base reference used to resolve relative references found within the scope of the xml:base attribute.

setBaseReference

public void setBaseReference(String baseUri)
Sets the base URI used to resolve relative references found within the scope of the xml:base attribute.

Parameters:
baseUri - The base URI used to resolve relative references found within the scope of the xml:base attribute.

setGenerator

public void setGenerator(Generator generator)
Sets the agent used to generate a feed.

Parameters:
generator - The agent used to generate a feed.

setIcon

public void setIcon(Reference icon)
Sets the image that provides iconic visual identification for a feed.

Parameters:
icon - The image that provides iconic visual identification for a feed.

setId

public void setId(String id)
Sets the permanent, universally unique identifier for the feed.

Parameters:
id - The permanent, universally unique identifier for the feed.

setLogo

public void setLogo(Reference logo)
Sets the image that provides visual identification for a feed.

Parameters:
logo - The image that provides visual identification for a feed.

setRights

public void setRights(String rights)
Sets the information about rights held in and over an feed.

Parameters:
rights - The information about rights held in and over an feed.

setRights

public void setRights(Text rights)
Sets the information about rights held in and over an feed.

Parameters:
rights - The information about rights held in and over an feed.

setSubtitle

public void setSubtitle(String subtitle)
Sets the short summary, abstract, or excerpt of an feed.

Parameters:
subtitle - The short summary, abstract, or excerpt of an feed.

setSubtitle

public void setSubtitle(Text subtitle)
Sets the short summary, abstract, or excerpt of an feed.

Parameters:
subtitle - The short summary, abstract, or excerpt of an feed.

setTitle

public void setTitle(String title)
Sets the human-readable title for the feed.

Parameters:
title - The human-readable title for the feed.

setTitle

public void setTitle(Text title)
Sets the human-readable title for the feed.

Parameters:
title - The human-readable title for the feed.

setUpdated

public void setUpdated(Date updated)
Sets the most recent moment when the feed was modified in a significant way.

Parameters:
updated - The most recent moment when the feed was modified in a significant way.

write

public void write(XmlWriter writer)
           throws IOException
Writes the representation to a XML writer.

Overrides:
write in class SaxRepresentation
Parameters:
writer - The XML writer to write to.
Throws:
IOException

writeElement

public void writeElement(XmlWriter writer)
                  throws SAXException
Writes the current object as an XML element using the given SAX writer.

Parameters:
writer - The SAX writer.
Throws:
SAXException


Copyright © 2005-2013 Restlet.