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

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

public class AtomFeed
extends AtomCommonAttributes

The "atom:feed" element Per RFC4287

 The "atom:feed" element is the document (i.e., top-level) element of
 an Atom Feed Document, acting as a container for metadata and data
 associated with the feed.  Its element children consist of metadata
 elements followed by zero or more atom:entry child elements.
 
 atomFeed =
   element atom:feed {
       atomCommonAttributes,
       (atomAuthor*
        & atomCategory*
        & atomContributor*
        & atomGenerator?
        & atomIcon?
        & atomId
        & atomLink*
        & atomLogo?
        & atomRights?
        & atomSubtitle?
        & atomTitle
        & atomUpdated
        & extensionElement*),
       atomEntry*
   }
 
 This specification assigns no significance to the order of atom:entry
 elements within the feed.
 
 The following child elements are defined by this specification (note
 that the presence of some of these elements is required):
 
 o  atom:feed elements MUST contain one or more atom:author elements,
    unless all of the atom:feed element's child atom:entry elements
    contain at least one atom:author element.
 o  atom:feed elements MAY contain any number of atom:category
    elements.
 o  atom:feed elements MAY contain any number of atom:contributor
    elements.
 o  atom:feed elements MUST NOT contain more than one atom:generator
    element.
 o  atom:feed elements MUST NOT contain more than one atom:icon
    element.
 o  atom:feed elements MUST NOT contain more than one atom:logo
    element.
 o  atom:feed elements MUST contain exactly one atom:id element.
 o  atom:feed elements SHOULD contain one atom:link element with a rel
    attribute value of "self".  This is the preferred URI for
    retrieving Atom Feed Documents representing this Atom feed.
 o  atom:feed 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:feed elements MAY contain additional atom:link elements
    beyond those described above.
 o  atom:feed elements MUST NOT contain more than one atom:rights
    element.
 o  atom:feed elements MUST NOT contain more than one atom:subtitle
    element.
 o  atom:feed elements MUST contain exactly one atom:title element.
 o  atom:feed elements MUST contain exactly one atom:updated element.
 
 If multiple atom:entry elements with the same atom:id value appear in
 an Atom Feed Document, they represent the same entry.  Their
 atom:updated timestamps SHOULD be different.  If an Atom Feed
 Document contains multiple entries with the same atom:id, Atom
 Processors MAY choose to display all of them or some subset of them.
 One typical behavior would be to display only the entry with the
 latest atom:updated timestamp.
 


Field Summary
protected  java.util.List<java.lang.Object> any
           
protected  java.util.List<AtomPerson> author
           
protected  java.util.List<AtomCategory> category
           
protected  java.util.List<AtomPerson> contributor
           
protected  java.util.List<AtomEntry> entry
           
protected  AtomGenerator generator
           
protected  java.lang.String icon
           
protected  java.lang.String id
           
protected  java.math.BigInteger itemsPerPage
           
protected  java.util.List<AtomLink> link
           
protected  java.lang.String logo
           
protected  ObjectFactory opensearchFactory
           
protected  java.util.List<OpenSearchQuery> opensearchQuery
           
protected  AtomText rights
           
protected  java.math.BigInteger startIndex
           
protected  AtomText subtitle
           
protected  AtomText title
           
protected  java.math.BigInteger totalResults
           
protected  javax.xml.datatype.XMLGregorianCalendar updated
           
 
Fields inherited from class org.apache.wink.common.model.atom.AtomCommonAttributes
base, lang
 
Constructor Summary
AtomFeed()
           
AtomFeed(SyndFeed value)
           
 
Method Summary
 void addOpenSearchQuery(OpenSearchQuery query)
          Adds an opensearch Query element
 java.util.List<java.lang.Object> getAny()
          Gets extension elements
 java.util.List<AtomPerson> getAuthors()
          Gets the value of author.
 java.util.List<AtomCategory> getCategories()
          Gets the value of category.
 java.util.List<AtomPerson> getContributors()
          Gets the value of contributor.
 java.util.List<AtomEntry> getEntries()
          Gets the value of entry.
 AtomGenerator getGenerator()
          Gets the value of generator.
 java.lang.String getIcon()
          Gets the value of icon.
 java.lang.String getId()
          Gets the value of id.
 long getItemsPerPage()
          Gets the value of opensearch itemsPerPage.
 java.util.List<AtomLink> getLinks()
          Gets the value of link.
 java.lang.String getLogo()
          Gets the value of logo.
static javax.xml.bind.Marshaller getMarshaller()
           
 java.util.List<OpenSearchQuery> getOpenSearchQueries()
          Gets the list of opensearch Query elements
 AtomText getRights()
          Gets the value of rights.
 long getStartIndex()
          Gets the value of opensearch startIndex.
 AtomText getSubtitle()
          Gets the value of subtitle.
 AtomText getTitle()
          Gets the value of title.
 long getTotalResults()
          Gets the value of opensearch totalResults.
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(AtomFeed feed, java.io.OutputStream os)
           
 void setGenerator(AtomGenerator value)
          Sets the value of generator.
 void setIcon(java.lang.String value)
          Sets the value of icon.
 void setId(java.lang.String value)
          Sets the value of id.
 void setItemsPerPage(long itemsPerPage)
          Sets the value of opensearch itemsPerPage.
 void setLogo(java.lang.String value)
          Sets the value of logo.
 void setOpenSearchQueries(java.util.List<OpenSearchQuery> queries)
          Sets the list of opensearch Query elements
 void setRights(AtomText value)
          Sets the value of rights.
 void setStartIndex(long startIndex)
          Sets the value of opensearch startIndex.
 void setSubtitle(AtomText value)
          Sets the value of subtitle.
 void setTitle(AtomText value)
          Sets the value of title.
 void setTotalResults(long totalResults)
          Sets the value of opensearch totalResults.
 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.
 SyndFeed toSynd(SyndFeed value)
           
static AtomFeed unmarshal(java.io.Reader reader)
          Convenience method for creating an AtomFeed 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

subtitle

protected AtomText subtitle

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

generator

protected AtomGenerator generator

icon

protected java.lang.String icon

logo

protected java.lang.String logo

rights

protected AtomText rights

any

protected java.util.List<java.lang.Object> any

entry

protected java.util.List<AtomEntry> entry

totalResults

protected java.math.BigInteger totalResults

itemsPerPage

protected java.math.BigInteger itemsPerPage

startIndex

protected java.math.BigInteger startIndex

opensearchQuery

protected java.util.List<OpenSearchQuery> opensearchQuery

opensearchFactory

protected ObjectFactory opensearchFactory
Constructor Detail

AtomFeed

public AtomFeed()

AtomFeed

public AtomFeed(SyndFeed value)
Method Detail

toSynd

public SyndFeed toSynd(SyndFeed value)

getMarshaller

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

getUnmarshaller

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

unmarshal

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

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

marshal

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

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.


getSubtitle

public AtomText getSubtitle()
Gets the value of subtitle.


setSubtitle

public void setSubtitle(AtomText value)
Sets the value of subtitle.


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


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


getGenerator

public AtomGenerator getGenerator()
Gets the value of generator.


setGenerator

public void setGenerator(AtomGenerator value)
Sets the value of generator.


getIcon

public java.lang.String getIcon()
Gets the value of icon.


setIcon

public void setIcon(java.lang.String value)
Sets the value of icon.


getLogo

public java.lang.String getLogo()
Gets the value of logo.


setLogo

public void setLogo(java.lang.String value)
Sets the value of logo.


getRights

public AtomText getRights()
Gets the value of rights.


setRights

public void setRights(AtomText value)
Sets the value of rights.


getAny

public java.util.List<java.lang.Object> 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


getEntries

public java.util.List<AtomEntry> getEntries()
Gets the value of entry.

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 entry.

For example, to add a new item, do as follows:

 getEntry().add(newItem);
 

Objects of the following type(s) are allowed in the list AtomEntry


getTotalResults

public long getTotalResults()
Gets the value of opensearch totalResults.


setTotalResults

public void setTotalResults(long totalResults)
Sets the value of opensearch totalResults.


getStartIndex

public long getStartIndex()
Gets the value of opensearch startIndex.


setStartIndex

public void setStartIndex(long startIndex)
Sets the value of opensearch startIndex.


getItemsPerPage

public long getItemsPerPage()
Gets the value of opensearch itemsPerPage.


setItemsPerPage

public void setItemsPerPage(long itemsPerPage)
Sets the value of opensearch itemsPerPage.


getOpenSearchQueries

public java.util.List<OpenSearchQuery> getOpenSearchQueries()
Gets the list of opensearch Query elements


setOpenSearchQueries

public void setOpenSearchQueries(java.util.List<OpenSearchQuery> queries)
Sets the list of opensearch Query elements


addOpenSearchQuery

public void addOpenSearchQuery(OpenSearchQuery query)
Adds an opensearch Query element



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