Package org.restlet.ext.atom
Class Feed
- java.lang.Object
-
- All Implemented Interfaces:
javax.xml.namespace.NamespaceContext
public class Feed extends SaxRepresentation
Atom Feed Document, acting as a component for metadata and data associated with the feed.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATOM_NAMESPACEAtom Syndication Format namespace.private java.util.List<Person>authorsThe authors of the feed.private ReferencebaseReferenceThe base reference used to resolve relative references found within the scope of the xml:base attribute.private java.util.List<Category>categoriesThe categories associated with the feed.private java.util.List<Person>contributorsThe contributors to the feed.private java.util.List<Entry>entriesIndividual entries, acting as a components for associated metadata and data.private GeneratorgeneratorThe agent used to generate a feed.private ReferenceiconImage that provides iconic visual identification for a feed.private java.lang.StringidPermanent, universally unique identifier for the feed.private java.util.List<Link>linksThe references from the entry to Web resources.private ReferencelogoImage that provides visual identification for a feed.private TextrightsInformation about rights held in and over an feed.private TextsubtitleShort summary, abstract, or excerpt of an feed.private TexttitleThe human-readable title for the feed.private java.util.DateupdatedMost recent moment when the entry was modified in a significant way.static java.lang.StringXHTML_NAMESPACEXHTML namespace.-
Fields inherited from class org.restlet.ext.xml.SaxRepresentation
XML_SECURE_PROCESSING
-
Fields inherited from class org.restlet.ext.xml.XmlRepresentation
XML_EXPANDING_ENTITY_REFS, XML_VALIDATING_DTD
-
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE
-
-
Constructor Summary
Constructors Constructor Description Feed()Constructor.Feed(java.lang.String feedUri)Constructor.Feed(Client clientDispatcher, java.lang.String feedUri)Constructor.Feed(Context context, java.lang.String feedUri)Constructor.Feed(Representation xmlFeed)Constructor.Feed(Representation xmlFeed, FeedReader feedReader)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Person>getAuthors()Returns the authors of the feed.ReferencegetBaseReference()Returns the base reference used to resolve relative references found within the scope of the xml:base attribute.java.util.List<Category>getCategories()Returns the categories associated with the feed.java.util.List<Person>getContributors()Returns the contributors to the feed.java.util.List<Entry>getEntries()Returns the individual entries, acting as a components for associated metadata and data.GeneratorgetGenerator()Returns the agent used to generate a feed.ReferencegetIcon()Returns the image that provides iconic visual identification for a feed.java.lang.StringgetId()Returns the permanent, universally unique identifier for the feed.java.util.List<Link>getLinks()Returns the references from the entry to Web resources.ReferencegetLogo()Returns the image that provides visual identification for a feed.TextgetRights()Returns the information about rights held in and over an feed.TextgetSubtitle()Returns the short summary, abstract, or excerpt of an feed.TextgetTitle()Returns the human-readable title for the feed.java.util.DategetUpdated()Returns the most recent moment when the entry was modified in a significant way.voidsetBaseReference(java.lang.String baseUri)Sets the base URI used to resolve relative references found within the scope of the xml:base attribute.voidsetBaseReference(Reference baseReference)Sets the base reference used to resolve relative references found within the scope of the xml:base attribute.voidsetGenerator(Generator generator)Sets the agent used to generate a feed.voidsetIcon(Reference icon)Sets the image that provides iconic visual identification for a feed.voidsetId(java.lang.String id)Sets the permanent, universally unique identifier for the feed.voidsetLogo(Reference logo)Sets the image that provides visual identification for a feed.voidsetRights(java.lang.String rights)Sets the information about rights held in and over an feed.voidsetRights(Text rights)Sets the information about rights held in and over an feed.voidsetSubtitle(java.lang.String subtitle)Sets the short summary, abstract, or excerpt of an feed.voidsetSubtitle(Text subtitle)Sets the short summary, abstract, or excerpt of an feed.voidsetTitle(java.lang.String title)Sets the human-readable title for the feed.voidsetTitle(Text title)Sets the human-readable title for the feed.voidsetUpdated(java.util.Date updated)Sets the most recent moment when the feed was modified in a significant way.voidwrite(XmlWriter writer)Writes the representation to a XML writer.voidwriteElement(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
getBoolean, getDocument, getDocumentBuilder, getDomSource, getEntityResolver, getErrorHandler, getNamespaces, getNamespaceURI, getNode, getNodes, getNumber, getPrefix, getPrefixes, getSaxSource, getSchema, getStreamSource, getText, getTextContent, 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, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
-
-
-
-
Field Detail
-
ATOM_NAMESPACE
public static final java.lang.String ATOM_NAMESPACE
Atom Syndication Format namespace.- See Also:
- Constant Field Values
-
XHTML_NAMESPACE
public static final java.lang.String XHTML_NAMESPACE
XHTML namespace.- See Also:
- Constant Field Values
-
authors
private volatile java.util.List<Person> authors
The authors of the feed.
-
baseReference
private volatile Reference baseReference
The base reference used to resolve relative references found within the scope of the xml:base attribute.
-
categories
private volatile java.util.List<Category> categories
The categories associated with the feed.
-
contributors
private volatile java.util.List<Person> contributors
The contributors to the feed.
-
entries
private java.util.List<Entry> entries
Individual entries, acting as a components for associated metadata and data.
-
generator
private volatile Generator generator
The agent used to generate a feed.
-
icon
private volatile Reference icon
Image that provides iconic visual identification for a feed.
-
id
private volatile java.lang.String id
Permanent, universally unique identifier for the feed.
-
links
private volatile java.util.List<Link> links
The references from the entry to Web resources.
-
logo
private volatile Reference logo
Image that provides visual identification for a feed.
-
rights
private volatile Text rights
Information about rights held in and over an feed.
-
subtitle
private volatile Text subtitle
Short summary, abstract, or excerpt of an feed.
-
title
private volatile Text title
The human-readable title for the feed.
-
updated
private volatile java.util.Date updated
Most recent moment when the entry was modified in a significant way.
-
-
Constructor Detail
-
Feed
public Feed()
Constructor.
-
Feed
public Feed(Client clientDispatcher, java.lang.String feedUri) throws java.io.IOException
Constructor.- Parameters:
clientDispatcher- The client HTTP dispatcher.feedUri- The feed URI.- Throws:
java.io.IOException
-
Feed
public Feed(Context context, java.lang.String feedUri) throws java.io.IOException
Constructor.- Parameters:
context- The context from which the client dispatcher will be retrieved.feedUri- The feed URI.- Throws:
java.io.IOException
-
Feed
public Feed(Representation xmlFeed) throws java.io.IOException
Constructor.- Parameters:
xmlFeed- The XML feed document.- Throws:
java.io.IOException
-
Feed
public Feed(Representation xmlFeed, FeedReader feedReader) throws java.io.IOException
Constructor.- Parameters:
xmlFeed- The XML feed document.feedReader- Custom feed reader.- Throws:
java.io.IOException
-
Feed
public Feed(java.lang.String feedUri) throws java.io.IOExceptionConstructor.- Parameters:
feedUri- The feed URI.- Throws:
java.io.IOException
-
-
Method Detail
-
getAuthors
public java.util.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 java.util.List<Category> getCategories()
Returns the categories associated with the feed.- Returns:
- The categories associated with the feed.
-
getContributors
public java.util.List<Person> getContributors()
Returns the contributors to the feed.- Returns:
- The contributors to the feed.
-
getEntries
public java.util.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 java.lang.String getId()
Returns the permanent, universally unique identifier for the feed.- Returns:
- The permanent, universally unique identifier for the feed.
-
getLinks
public java.util.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 java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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 java.io.IOException
Writes the representation to a XML writer.- Overrides:
writein classSaxRepresentation- Parameters:
writer- The XML writer to write to.- Throws:
java.io.IOException
-
writeElement
public void writeElement(XmlWriter writer) throws org.xml.sax.SAXException
Writes the current object as an XML element using the given SAX writer.- Parameters:
writer- The SAX writer.- Throws:
org.xml.sax.SAXException
-
-