org.restlet.ext.rome
Class SyndFeedRepresentation

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.rome.SyndFeedRepresentation

public class SyndFeedRepresentation
extends WriterRepresentation

A syndicated feed representation (such as RSS or Atom) based on the ROME library. Add feed entries to SyndFeed.getEntries(), which you can access via getFeed().

Author:
Tal Liron
See Also:
ROME home

Field Summary
 
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE
 
Constructor Summary
SyndFeedRepresentation()
          Constructs a UTF8 RSS 2.0 feed.
SyndFeedRepresentation(Representation feedRepresentation)
          Constructor that parses the given feed representation.
SyndFeedRepresentation(String feedType)
          Constructs a UTF8 feed.
SyndFeedRepresentation(String feedType, CharacterSet characterSet)
          Constructs a feed.
SyndFeedRepresentation(String feedType, List<?> entries, CharacterSet characterSet)
          Constructs a feed.
SyndFeedRepresentation(com.sun.syndication.feed.synd.SyndFeed feed)
          Constructor around an existing feed.
 
Method Summary
 com.sun.syndication.feed.synd.SyndFeed getFeed()
          The wrapped feed.
 void write(Writer writer)
           
 
Methods inherited from class org.restlet.representation.WriterRepresentation
getReader, release, write
 
Methods inherited from class org.restlet.representation.CharacterRepresentation
getChannel, getStream, write
 
Methods inherited from class org.restlet.representation.Representation
checkDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDisposition, getDownloadName, getExpirationDate, getRange, getSize, getText, isAvailable, isDownloadable, isTransient, setAvailable, setDigest, setDisposition, setDownloadable, setDownloadName, setExpirationDate, 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, getIdentifier, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyndFeedRepresentation

public SyndFeedRepresentation()
Constructs a UTF8 RSS 2.0 feed.


SyndFeedRepresentation

public SyndFeedRepresentation(Representation feedRepresentation)
Constructor that parses the given feed representation.

Parameters:
feedRepresentation - The feed representation to parse.

SyndFeedRepresentation

public SyndFeedRepresentation(String feedType)
Constructs a UTF8 feed.

Parameters:
feedType - The feed type (see ROME documentation)

SyndFeedRepresentation

public SyndFeedRepresentation(String feedType,
                              CharacterSet characterSet)
Constructs a feed.

Parameters:
feedType - The feed type (see ROME documentation)
characterSet - The character set

SyndFeedRepresentation

public SyndFeedRepresentation(String feedType,
                              List<?> entries,
                              CharacterSet characterSet)
Constructs a feed.

Parameters:
feedType - The feed type (see ROME documentation)
entries - The list of entries
characterSet - The character set

SyndFeedRepresentation

public SyndFeedRepresentation(com.sun.syndication.feed.synd.SyndFeed feed)
Constructor around an existing feed.

Parameters:
feed - The feed (must have a valid feedType!)
Method Detail

getFeed

public com.sun.syndication.feed.synd.SyndFeed getFeed()
The wrapped feed.

Returns:
The feed

write

public void write(Writer writer)
           throws IOException
Specified by:
write in class Representation
Throws:
IOException


Copyright © 2005-2011 Noelios Technologies.