Class Entry
- java.lang.Object
-
- org.jboss.resteasy.plugins.providers.atom.CommonAttributes
-
- org.jboss.resteasy.plugins.providers.atom.Entry
-
public class Entry extends CommonAttributes
Per RFC4287:
The "atom:entry" element represents an individual entry, acting as a container for metadata and data associated with the entry. This element can appear as a child of the atom:feed element, or it can appear as the document (i.e., top-level) element of a stand-alone Atom Entry Document. atomEntry = element atom:entry { atomCommonAttributes, (atomAuthor* & atomCategory* & atomContent? & atomContributor* & atomId & atomLink* & atomPublished? & atomRights? & atomSource? & atomSummary? & atomTitle & atomUpdated & extensionElement*) } This specification assigns no significance to the order of appearance of the child elements of atom:entry. The following child elements are defined by this specification (note that it requires the presence of some of these elements): o atom:entry elements MUST contain one or more atom:author elements, unless the atom:entry contains an atom:source element that contains an atom:author element or, in an Atom Feed Document, the atom:feed element contains an atom:author element itself. o atom:entry elements MAY contain any number of atom:category elements. o atom:entry elements MUST NOT contain more than one atom:content element. o atom:entry elements MAY contain any number of atom:contributor elements. o atom:entry elements MUST contain exactly one atom:id element. o atom:entry elements that contain no child atom:content element MUST contain at least one atom:link element with a rel attribute value of "alternate". o atom:entry elements MUST NOT contain more than one atom:link element with a rel attribute value of "alternate" that has the same combination of type and hreflang attribute values. o atom:entry elements MAY contain additional atom:link elements beyond those described above. o atom:entry elements MUST NOT contain more than one atom:published element. o atom:entry elements MUST NOT contain more than one atom:rights element. o atom:entry elements MUST NOT contain more than one atom:source element. o atom:entry elements MUST contain an atom:summary element in either of the following cases: * the atom:entry contains an atom:content that has a "src" attribute (and is thus empty). * the atom:entry contains content that is encoded in Base64; i.e., the "type" attribute of atom:content is a MIME media type [MIMEREG], but is not an XML media type [RFC3023], does not begin with "text/", and does not end with "/xml" or "+xml". o atom:entry elements MUST NOT contain more than one atom:summary element. o atom:entry elements MUST contain exactly one atom:title element. o atom:entry elements MUST contain exactly one atom:updated element.- Version:
- $Revision: 1 $
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.Object>anyOtherprivate org.w3c.dom.ElementanyOtherElementprivate java.lang.ObjectanyOtherJaxbObjectprivate java.util.List<Person>authorsprivate java.util.List<Category>categoriesprivate Contentcontentprivate java.util.List<Person>contributorsprotected JAXBContextFinderfinderprivate java.net.URIidprivate java.util.List<Link>linksprivate java.util.Datepublishedprivate Textrightsprivate Sourcesourceprivate Textsummaryprivate Texttitleprivate java.util.Dateupdated
-
Constructor Summary
Constructors Constructor Description Entry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>getAnyOther()org.w3c.dom.ElementgetAnyOtherElement()Get content as an XML Element if the content is XML.java.lang.ObjectgetAnyOtherJAXBObject()Returns previous extracted jaxbobject from a call to getJAXBObject(Classclazz) or value passed in through a previous setJAXBObject(). <T> TgetAnyOtherJAXBObject(java.lang.Class<T> clazz, java.lang.Class... otherPossibleClasses)Extract the content as the provided JAXB annotated type.java.util.List<Person>getAuthors()java.util.List<Category>getCategories()ContentgetContent()java.util.List<Person>getContributors()java.net.URIgetId()LinkgetLinkByRel(java.lang.String name)java.util.List<Link>getLinks()java.util.DategetPublished()java.lang.StringgetRights()TextgetRightsElement()SourcegetSource()java.lang.StringgetSummary()TextgetSummaryElement()java.lang.StringgetTitle()TextgetTitleElement()java.util.DategetUpdated()voidsetAnyOtherJAXBObject(java.lang.Object obj)voidsetContent(Content content)protected voidsetFinder(JAXBContextFinder finder)voidsetId(java.net.URI id)voidsetPublished(java.util.Date published)voidsetRights(java.lang.String rights)voidsetRightsElement(Text rights)voidsetSource(Source source)voidsetSummary(java.lang.String summary)voidsetSummaryElement(Text summary)voidsetTitle(java.lang.String title)voidsetTitleElement(Text title)voidsetUpdated(java.util.Date updated)-
Methods inherited from class org.jboss.resteasy.plugins.providers.atom.CommonAttributes
getBase, getExtensionAttributes, getLanguage, setBase, setLanguage
-
-
-
-
Field Detail
-
authors
private java.util.List<Person> authors
-
categories
private java.util.List<Category> categories
-
content
private Content content
-
contributors
private java.util.List<Person> contributors
-
id
private java.net.URI id
-
links
private java.util.List<Link> links
-
published
private java.util.Date published
-
title
private Text title
-
updated
private java.util.Date updated
-
rights
private Text rights
-
source
private Source source
-
summary
private Text summary
-
anyOtherElement
private org.w3c.dom.Element anyOtherElement
-
anyOther
private java.util.List<java.lang.Object> anyOther
-
anyOtherJaxbObject
private java.lang.Object anyOtherJaxbObject
-
finder
protected JAXBContextFinder finder
-
-
Method Detail
-
setFinder
protected void setFinder(JAXBContextFinder finder)
-
getId
public java.net.URI getId()
-
setId
public void setId(java.net.URI id)
-
getTitleElement
public Text getTitleElement()
-
setTitleElement
public void setTitleElement(Text title)
-
getTitle
public java.lang.String getTitle()
-
setTitle
public void setTitle(java.lang.String title)
-
getUpdated
public java.util.Date getUpdated()
-
setUpdated
public void setUpdated(java.util.Date updated)
-
getLinkByRel
public Link getLinkByRel(java.lang.String name)
-
getLinks
public java.util.List<Link> getLinks()
-
getContent
public Content getContent()
-
setContent
public void setContent(Content content)
-
getAuthors
public java.util.List<Person> getAuthors()
-
getCategories
public java.util.List<Category> getCategories()
-
getContributors
public java.util.List<Person> getContributors()
-
getPublished
public java.util.Date getPublished()
-
setPublished
public void setPublished(java.util.Date published)
-
getRightsElement
public Text getRightsElement()
-
setRightsElement
public void setRightsElement(Text rights)
-
getRights
public java.lang.String getRights()
-
setRights
public void setRights(java.lang.String rights)
-
getSource
public Source getSource()
-
setSource
public void setSource(Source source)
-
getSummaryElement
public Text getSummaryElement()
-
setSummaryElement
public void setSummaryElement(Text summary)
-
getSummary
public java.lang.String getSummary()
-
setSummary
public void setSummary(java.lang.String summary)
-
getAnyOtherElement
public org.w3c.dom.Element getAnyOtherElement()
Get content as an XML Element if the content is XML. Otherwise, this will just return null.- Returns:
-
getAnyOther
public java.util.List<java.lang.Object> getAnyOther()
-
getAnyOtherJAXBObject
public <T> T getAnyOtherJAXBObject(java.lang.Class<T> clazz, java.lang.Class... otherPossibleClasses) throws javax.xml.bind.JAXBExceptionExtract the content as the provided JAXB annotated type. This method will use a cached JAXBContext used by the Resteasy JAXB providers or, if those are not existent, it will create a new JAXBContext from scratch using the class.- Parameters:
clazz- class type you are expectingotherPossibleClasses- Other classe you want to create the JAXBContext with- Returns:
- null if there is no XML content
- Throws:
javax.xml.bind.JAXBException
-
getAnyOtherJAXBObject
public java.lang.Object getAnyOtherJAXBObject()
Returns previous extracted jaxbobject from a call to getJAXBObject(Classclazz) or value passed in through a previous setJAXBObject(). - Returns:
-
setAnyOtherJAXBObject
public void setAnyOtherJAXBObject(java.lang.Object obj)
-
-