Package org.restlet.ext.atom
Class Entry
- java.lang.Object
-
- All Implemented Interfaces:
javax.xml.namespace.NamespaceContext
public class Entry extends SaxRepresentation
Represents an individual entry, acting as a component for metadata and data associated with the entry.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Person>authorsThe authors of the entry.private java.util.List<Category>categoriesThe categories associated with the entry.private ContentcontentContains or links to the content of the entry.private java.util.List<Person>contributorsThe contributors to the entry.private java.lang.StringidPermanent, universally unique identifier for the entry.private java.util.List<Link>linksThe references from the entry to Web resources.private java.util.DatepublishedMoment associated with an event early in the life cycle of the entry.private TextrightsInformation about rights held in and over an entry.private SourcesourceSource feed's metadata if the entry was copied from another feed.private java.lang.StringsummaryShort summary, abstract, or excerpt of the entry.private TexttitleThe human-readable title for the entry.private java.util.DateupdatedMost recent moment when the entry was modified in a significant way.-
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 Entry()Constructor.Entry(java.lang.String entryUri)Constructor.Entry(Client clientDispatcher, java.lang.String entryUri)Constructor.Entry(Context context, java.lang.String entryUri)Constructor.Entry(Representation xmlEntry)Constructor.Entry(Representation xmlEntry, EntryReader entryReader)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Person>getAuthors()Returns the authors of the entry.java.util.List<Category>getCategories()Returns the categories associated with the entry.ContentgetContent()Returns the content of the entry or links to it.java.util.List<Person>getContributors()Returns the contributors to the entry.java.lang.StringgetId()Returns the permanent, universally unique identifier for the entry.LinkgetLink(Relation rel)Returns the first available link with a given relation type.java.util.List<Link>getLinks()Returns the references from the entry to Web resources.java.util.DategetPublished()Returns the moment associated with an event early in the life cycle of the entry.TextgetRights()Returns the information about rights held in and over an entry.SourcegetSource()Returns the source feed's metadata if the entry was copied from another feed.java.lang.StringgetSummary()Returns the short summary, abstract, or excerpt of the entry.TextgetTitle()Returns the human-readable title for the entry.java.util.DategetUpdated()Returns the most recent moment when the entry was modified in a significant way.voidsetContent(Content content)Sets the content of the entry or links to it.voidsetId(java.lang.String id)Sets the permanent, universally unique identifier for the entry.voidsetPublished(java.util.Date published)Sets the moment associated with an event early in the life cycle of the entry.voidsetRights(Text rights)Sets the information about rights held in and over an entry.voidsetSource(Source source)Sets the source feed's metadata if the entry was copied from another feed.voidsetSummary(java.lang.String summary)Sets the short summary, abstract, or excerpt of the entry.voidsetTitle(java.lang.String title)Sets the human-readable title for the entry.voidsetTitle(Text title)Sets the human-readable title for the entry.voidsetUpdated(java.util.Date updated)Sets the most recent moment when the entry 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.voidwriteInlineContent(XmlWriter writer)Allow to write extra content inside the entry.-
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
-
authors
private volatile java.util.List<Person> authors
The authors of the entry.
-
categories
private volatile java.util.List<Category> categories
The categories associated with the entry.
-
content
private volatile Content content
Contains or links to the content of the entry.
-
contributors
private volatile java.util.List<Person> contributors
The contributors to the entry.
-
id
private volatile java.lang.String id
Permanent, universally unique identifier for the entry.
-
links
private volatile java.util.List<Link> links
The references from the entry to Web resources.
-
published
private volatile java.util.Date published
Moment associated with an event early in the life cycle of the entry.
-
rights
private volatile Text rights
Information about rights held in and over an entry.
-
source
private volatile Source source
Source feed's metadata if the entry was copied from another feed.
-
summary
private volatile java.lang.String summary
Short summary, abstract, or excerpt of the entry.
-
title
private volatile Text title
The human-readable title for the entry.
-
updated
private volatile java.util.Date updated
Most recent moment when the entry was modified in a significant way.
-
-
Constructor Detail
-
Entry
public Entry()
Constructor.
-
Entry
public Entry(Client clientDispatcher, java.lang.String entryUri) throws java.io.IOException
Constructor.- Parameters:
clientDispatcher- The client HTTP dispatcher.entryUri- The entry URI.- Throws:
java.io.IOException
-
Entry
public Entry(Context context, java.lang.String entryUri) throws java.io.IOException
Constructor.- Parameters:
context- The context from which the client dispatcher will be retrieved.entryUri- The entry URI.- Throws:
java.io.IOException
-
Entry
public Entry(Representation xmlEntry) throws java.io.IOException
Constructor.- Parameters:
xmlEntry- The XML entry document.- Throws:
java.io.IOException
-
Entry
public Entry(Representation xmlEntry, EntryReader entryReader) throws java.io.IOException
Constructor.- Parameters:
xmlEntry- The XML entry document.entryReader- Custom entry reader.- Throws:
java.io.IOException
-
Entry
public Entry(java.lang.String entryUri) throws java.io.IOExceptionConstructor.- Parameters:
entryUri- The entry URI.- Throws:
java.io.IOException
-
-
Method Detail
-
getAuthors
public java.util.List<Person> getAuthors()
Returns the authors of the entry.- Returns:
- The authors of the entry.
-
getCategories
public java.util.List<Category> getCategories()
Returns the categories associated with the entry.- Returns:
- The categories associated with the entry.
-
getContent
public Content getContent()
Returns the content of the entry or links to it.- Returns:
- The content of the entry or links to it.
-
getContributors
public java.util.List<Person> getContributors()
Returns the contributors to the entry.- Returns:
- The contributors to the entry.
-
getId
public java.lang.String getId()
Returns the permanent, universally unique identifier for the entry.- Returns:
- The permanent, universally unique identifier for the entry.
-
getLink
public Link getLink(Relation rel)
Returns the first available link with a given relation type.- Parameters:
rel- The relation type to match.- Returns:
- The first available link with a given relation type.
-
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.
-
getPublished
public java.util.Date getPublished()
Returns the moment associated with an event early in the life cycle of the entry.- Returns:
- The moment associated with an event early in the life cycle of the entry.
-
getRights
public Text getRights()
Returns the information about rights held in and over an entry.- Returns:
- The information about rights held in and over an entry.
-
getSource
public Source getSource()
Returns the source feed's metadata if the entry was copied from another feed.- Returns:
- The source feed's metadata if the entry was copied from another feed.
-
getSummary
public java.lang.String getSummary()
Returns the short summary, abstract, or excerpt of the entry.- Returns:
- The short summary, abstract, or excerpt of the entry.
-
getTitle
public Text getTitle()
Returns the human-readable title for the entry.- Returns:
- The human-readable title for the entry.
-
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.
-
setContent
public void setContent(Content content)
Sets the content of the entry or links to it.- Parameters:
content- The content of the entry or links to it.
-
setId
public void setId(java.lang.String id)
Sets the permanent, universally unique identifier for the entry.- Parameters:
id- The permanent, universally unique identifier for the entry.
-
setPublished
public void setPublished(java.util.Date published)
Sets the moment associated with an event early in the life cycle of the entry.- Parameters:
published- The moment associated with an event early in the life cycle of the entry.
-
setRights
public void setRights(Text rights)
Sets the information about rights held in and over an entry.- Parameters:
rights- The information about rights held in and over an entry.
-
setSource
public void setSource(Source source)
Sets the source feed's metadata if the entry was copied from another feed.- Parameters:
source- The source feed's metadata if the entry was copied from another feed.
-
setSummary
public void setSummary(java.lang.String summary)
Sets the short summary, abstract, or excerpt of the entry.- Parameters:
summary- The short summary, abstract, or excerpt of the entry.
-
setTitle
public void setTitle(java.lang.String title)
Sets the human-readable title for the entry.- Parameters:
title- The human-readable title for the entry.
-
setTitle
public void setTitle(Text title)
Sets the human-readable title for the entry.- Parameters:
title- The human-readable title for the entry.
-
setUpdated
public void setUpdated(java.util.Date updated)
Sets the most recent moment when the entry was modified in a significant way.- Parameters:
updated- The most recent moment when the entry 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
-
writeInlineContent
public void writeInlineContent(XmlWriter writer) throws org.xml.sax.SAXException
Allow to write extra content inside the entry. The default implementation does nothing and is intended to be overridden.- Parameters:
writer- The SAX writer.- Throws:
org.xml.sax.SAXException
-
-