Package org.restlet.ext.atom
Class Feed
- java.lang.Object
-
- org.restlet.representation.Variant
-
- org.restlet.representation.RepresentationInfo
-
- org.restlet.representation.Representation
-
- org.restlet.representation.CharacterRepresentation
-
- org.restlet.representation.WriterRepresentation
-
- org.restlet.ext.xml.XmlRepresentation
-
- org.restlet.ext.xml.SaxRepresentation
-
- org.restlet.ext.atom.Feed
-
- 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.- Author:
- Jerome Louvel
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATOM_NAMESPACEAtom Syndication Format namespace.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
-
-
Constructor Summary
Constructors Constructor Description Feed()Constructor.Feed(java.lang.String feedUri)Constructor.Feed(org.restlet.Client clientDispatcher, java.lang.String feedUri)Constructor.Feed(org.restlet.Context context, java.lang.String feedUri)Constructor.Feed(org.restlet.representation.Representation xmlFeed)Constructor.Feed(org.restlet.representation.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.org.restlet.data.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.org.restlet.data.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.org.restlet.data.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(org.restlet.data.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(org.restlet.data.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(org.restlet.data.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, 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.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
-
-
-
-
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
-
-
Constructor Detail
-
Feed
public Feed()
Constructor.
-
Feed
public Feed(org.restlet.Client clientDispatcher, java.lang.String feedUri) throws java.io.IOExceptionConstructor.- Parameters:
clientDispatcher- The client HTTP dispatcher.feedUri- The feed URI.- Throws:
java.io.IOException
-
Feed
public Feed(org.restlet.Context context, java.lang.String feedUri) throws java.io.IOExceptionConstructor.- Parameters:
context- The context from which the client dispatcher will be retrieved.feedUri- The feed URI.- Throws:
java.io.IOException
-
Feed
public Feed(org.restlet.representation.Representation xmlFeed) throws java.io.IOExceptionConstructor.- Parameters:
xmlFeed- The XML feed document.- Throws:
java.io.IOException
-
Feed
public Feed(org.restlet.representation.Representation xmlFeed, FeedReader feedReader) throws java.io.IOExceptionConstructor.- 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 org.restlet.data.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 org.restlet.data.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 org.restlet.data.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(org.restlet.data.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(org.restlet.data.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(org.restlet.data.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
-
-