org.apache.wink.common.model.atom
Class AtomEntry

java.lang.Object
  extended by org.apache.wink.common.model.atom.AtomCommonAttributes
      extended by org.apache.wink.common.model.atom.AtomEntry

public class AtomEntry
extends AtomCommonAttributes

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()
           
 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

id

protected java.lang.String id

updated

protected javax.xml.datatype.XMLGregorianCalendar updated

title

protected AtomText title

summary

protected AtomText summary

published

protected javax.xml.datatype.XMLGregorianCalendar published

link

protected java.util.List<AtomLink> link

author

protected java.util.List<AtomPerson> author

contributor

protected java.util.List<AtomPerson> contributor

category

protected java.util.List<AtomCategory> category

any

protected java.util.List<org.w3c.dom.Element> any

content

protected AtomContent content
Constructor Detail

AtomEntry

public AtomEntry()

AtomEntry

public AtomEntry(SyndEntry value)
Method Detail

getMarshaller

public static javax.xml.bind.Marshaller getMarshaller()

getUnmarshaller

public static javax.xml.bind.Unmarshaller getUnmarshaller()

unmarshal

public static AtomEntry unmarshal(java.io.Reader reader)
                           throws java.io.IOException
Convenience method for creating an AtomEntry from xml

Parameters:
reader - input reader
Returns:
AtomEntry instance from the input
Throws:
java.io.IOException

marshal

public static void marshal(AtomEntry entry,
                           java.io.OutputStream os)
                    throws java.io.IOException
Throws:
java.io.IOException

toSynd

public SyndEntry toSynd(SyndEntry value)

getId

public java.lang.String getId()
Gets the value of id.


setId

public void setId(java.lang.String value)
Sets the value of id.


getUpdatedAsTime

public long getUpdatedAsTime()
Gets the value of updated as a long value

Returns:
the updated value, or -1 if it is not set

getUpdated

public java.util.Date getUpdated()
Gets the value of updated as a Date object


setUpdated

public void setUpdated(javax.xml.datatype.XMLGregorianCalendar value)
Sets the value of updated.


setUpdated

public void setUpdated(long value)
Sets the value of updated.


setUpdated

public void setUpdated(java.util.Date value)
Sets the value of updated.


getTitle

public AtomText getTitle()
Gets the value of title.


setTitle

public void setTitle(AtomText value)
Sets the value of title.


getSummary

public AtomText getSummary()
Gets the value of summary.


setSummary

public void setSummary(AtomText value)
Sets the value of summary.


getPublishedAsTime

public long getPublishedAsTime()
Gets the value of published as a long value

Returns:
the published value, or -1 if it is not set

getPublished

public java.util.Date getPublished()
Gets the value of published as a Date object


setPublished

public void setPublished(javax.xml.datatype.XMLGregorianCalendar value)
Sets the value of published.


setPublished

public void setPublished(long value)
Sets the value of published.


setPublished

public void setPublished(java.util.Date value)
Sets the value of published.


getLinks

public java.util.List<AtomLink> getLinks()
Gets the value of link.

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


getLinks

public 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

Parameters:
relationPattern - the regex relation pattern to match
typePattern - the regex type pattern to match
Returns:
the list of links matching the given regex patterns

getLinksByType

public java.util.List<AtomLink> getLinksByType(java.lang.String typePattern)
Get the list of links that match the relation regex pattern

Parameters:
relationPattern - the regex relation pattern to match
Returns:
the link matching the given regex pattern, or null

getLinksByRelation

public java.util.List<AtomLink> getLinksByRelation(java.lang.String relationPattern)
Get the list of links that match the type regex pattern

Parameters:
typePattern - the regex type pattern to match
Returns:
the link matching the given regex pattern, or null

getAuthors

public java.util.List<AtomPerson> getAuthors()
Gets the value of author.

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


getContributors

public java.util.List<AtomPerson> getContributors()
Gets the value of contributor.

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


getCategories

public java.util.List<AtomCategory> getCategories()
Gets the value of category.

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


getAny

public java.util.List<org.w3c.dom.Element> getAny()
Gets extension elements

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


getContent

public AtomContent getContent()
Gets the content.


setContent

public void setContent(AtomContent value)
Sets the content.



Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.