|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.common.model.atom.AtomCommonAttributes org.apache.wink.common.model.atom.AtomEntry
public class AtomEntry
The "atom:entry" element 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.
Field Summary | |
---|---|
protected java.util.List<org.w3c.dom.Element> |
any
|
protected java.util.List<AtomPerson> |
author
|
protected java.util.List<AtomCategory> |
category
|
protected AtomContent |
content
|
protected java.util.List<AtomPerson> |
contributor
|
protected java.lang.String |
id
|
protected java.util.List<AtomLink> |
link
|
protected javax.xml.datatype.XMLGregorianCalendar |
published
|
protected AtomText |
summary
|
protected AtomText |
title
|
protected javax.xml.datatype.XMLGregorianCalendar |
updated
|
Fields inherited from class org.apache.wink.common.model.atom.AtomCommonAttributes |
---|
base, lang |
Constructor Summary | |
---|---|
AtomEntry()
|
|
AtomEntry(SyndEntry value)
|
Method Summary | |
---|---|
java.util.List<org.w3c.dom.Element> |
getAny()
Gets extension elements |
java.util.List<AtomPerson> |
getAuthors()
Gets the value of author. |
java.util.List<AtomCategory> |
getCategories()
Gets the value of category. |
AtomContent |
getContent()
Gets the content. |
java.util.List<AtomPerson> |
getContributors()
Gets the value of contributor. |
java.lang.String |
getId()
Gets the value of id. |
java.util.List<AtomLink> |
getLinks()
Gets the value of link. |
java.util.List<AtomLink> |
getLinks(java.lang.String relationPattern,
java.lang.String typePattern)
Get the list of links that match the relation and type regex patterns |
java.util.List<AtomLink> |
getLinksByRelation(java.lang.String relationPattern)
Get the list of links that match the type regex pattern |
java.util.List<AtomLink> |
getLinksByType(java.lang.String typePattern)
Get the list of links that match the relation regex pattern |
static javax.xml.bind.Marshaller |
getMarshaller()
|
JAXBNamespacePrefixMapper |
getNamespacePrefixMapper()
|
java.util.Date |
getPublished()
Gets the value of published as a Date object |
long |
getPublishedAsTime()
Gets the value of published as a long value |
AtomText |
getSummary()
Gets the value of summary. |
AtomText |
getTitle()
Gets the value of title. |
static javax.xml.bind.Unmarshaller |
getUnmarshaller()
|
java.util.Date |
getUpdated()
Gets the value of updated as a Date object |
long |
getUpdatedAsTime()
Gets the value of updated as a long value |
static void |
marshal(AtomEntry entry,
java.io.OutputStream os)
|
void |
setContent(AtomContent value)
Sets the content. |
void |
setId(java.lang.String value)
Sets the value of id. |
void |
setPublished(java.util.Date value)
Sets the value of published. |
void |
setPublished(long value)
Sets the value of published. |
void |
setPublished(javax.xml.datatype.XMLGregorianCalendar value)
Sets the value of published. |
void |
setSummary(AtomText value)
Sets the value of summary. |
void |
setTitle(AtomText value)
Sets the value of title. |
void |
setUpdated(java.util.Date value)
Sets the value of updated. |
void |
setUpdated(long value)
Sets the value of updated. |
void |
setUpdated(javax.xml.datatype.XMLGregorianCalendar value)
Sets the value of updated. |
SyndEntry |
toSynd(SyndEntry value)
|
static AtomEntry |
unmarshal(java.io.Reader reader)
Convenience method for creating an AtomEntry from xml |
Methods inherited from class org.apache.wink.common.model.atom.AtomCommonAttributes |
---|
getBase, getLang, getOtherAttributes, setBase, setLang, toSynd |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String id
protected javax.xml.datatype.XMLGregorianCalendar updated
protected AtomText title
protected AtomText summary
protected javax.xml.datatype.XMLGregorianCalendar published
protected java.util.List<AtomLink> link
protected java.util.List<AtomPerson> author
protected java.util.List<AtomPerson> contributor
protected java.util.List<AtomCategory> category
protected java.util.List<org.w3c.dom.Element> any
protected AtomContent content
Constructor Detail |
---|
public AtomEntry()
public AtomEntry(SyndEntry value)
Method Detail |
---|
public static javax.xml.bind.Marshaller getMarshaller()
public static javax.xml.bind.Unmarshaller getUnmarshaller()
public static AtomEntry unmarshal(java.io.Reader reader) throws java.io.IOException
reader
- input reader
java.io.IOException
public static void marshal(AtomEntry entry, java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public JAXBNamespacePrefixMapper getNamespacePrefixMapper()
getNamespacePrefixMapper
in interface org.apache.wink.common.internal.model.NamespacePrefixMapperProvider
public SyndEntry toSynd(SyndEntry value)
public java.lang.String getId()
public void setId(java.lang.String value)
public long getUpdatedAsTime()
public java.util.Date getUpdated()
public void setUpdated(javax.xml.datatype.XMLGregorianCalendar value)
public void setUpdated(long value)
public void setUpdated(java.util.Date value)
public AtomText getTitle()
public void setTitle(AtomText value)
public AtomText getSummary()
public void setSummary(AtomText value)
public long getPublishedAsTime()
public java.util.Date getPublished()
public void setPublished(javax.xml.datatype.XMLGregorianCalendar value)
public void setPublished(long value)
public void setPublished(java.util.Date value)
public java.util.List<AtomLink> getLinks()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the link.
For example, to add a new item, do as follows:
getLink().add(newItem);
Objects of the following type(s) are allowed in the list AtomLink
public java.util.List<AtomLink> getLinks(java.lang.String relationPattern, java.lang.String typePattern)
relationPattern
- the regex relation pattern to matchtypePattern
- the regex type pattern to match
public java.util.List<AtomLink> getLinksByType(java.lang.String typePattern)
relationPattern
- the regex relation pattern to match
null
public java.util.List<AtomLink> getLinksByRelation(java.lang.String relationPattern)
typePattern
- the regex type pattern to match
null
public java.util.List<AtomPerson> getAuthors()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the author.
For example, to add a new item, do as follows:
getAuthor().add(newItem);
Objects of the following type(s) are allowed in the list
AtomPerson
public java.util.List<AtomPerson> getContributors()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the contributor.
For example, to add a new item, do as follows:
getContributor().add(newItem);
Objects of the following type(s) are allowed in the list
AtomPerson
public java.util.List<AtomCategory> getCategories()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the category.
For example, to add a new item, do as follows:
getCategory().add(newItem);
Objects of the following type(s) are allowed in the list
AtomCategory
public java.util.List<org.w3c.dom.Element> getAny()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the any.
For example, to add a new item, do as follows:
getAny().add(newItem);
Objects of the following type(s) are allowed in the list Element
public AtomContent getContent()
public void setContent(AtomContent value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |