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  List<Object> any
           
protected  List<AtomPerson> author
           
protected  List<AtomCategory> category
           
protected  List<AtomPerson> contributor
           
protected  List<AtomEntry> entry
           
protected  AtomGenerator generator
           
protected  String icon
           
protected  String id
           
protected  BigInteger itemsPerPage
           
protected  List<AtomLink> link
           
protected  String logo
           
protected  ObjectFactory opensearchFactory
           
protected  List<OpenSearchQuery> opensearchQuery
           
protected  AtomText rights
           
protected  BigInteger startIndex
           
protected  AtomText subtitle
           
protected  AtomText title
           
protected  BigInteger totalResults
           
protected  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
 List<Object> getAny()
          Gets extension elements
 List<AtomPerson> getAuthors()
          Gets the value of author.
 List<AtomCategory> getCategories()
          Gets the value of category.
 List<AtomPerson> getContributors()
          Gets the value of contributor.
 List<AtomEntry> getEntries()
          Gets the value of entry.
 AtomGenerator getGenerator()
          Gets the value of generator.
 String getIcon()
          Gets the value of icon.
 String getId()
          Gets the value of id.
 long getItemsPerPage()
          Gets the value of opensearch itemsPerPage.
 List<AtomLink> getLinks()
          Gets the value of link.
 String getLogo()
          Gets the value of logo.
static javax.xml.bind.Marshaller getMarshaller()
           
 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()
           
 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, OutputStream os)
           
 void setGenerator(AtomGenerator value)
          Sets the value of generator.
 void setIcon(String value)
          Sets the value of icon.
 void setId(String value)
          Sets the value of id.
 void setItemsPerPage(long itemsPerPage)
          Sets the value of opensearch itemsPerPage.
 void setLogo(String value)
          Sets the value of logo.
 void setOpenSearchQueries(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(Date value)
          Sets the value of updated.
 void setUpdated(long value)
          Sets the value of updated.
 void setUpdated(XMLGregorianCalendar value)
          Sets the value of updated.
 SyndFeed toSynd(SyndFeed value)
           
static AtomFeed unmarshal(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 String id

updated

protected XMLGregorianCalendar updated

title

protected AtomText title

subtitle

protected AtomText subtitle

link

protected List<AtomLink> link

author

protected List<AtomPerson> author

contributor

protected List<AtomPerson> contributor

category

protected List<AtomCategory> category

generator

protected AtomGenerator generator

icon

protected String icon

logo

protected String logo

rights

protected AtomText rights

any

protected List<Object> any

entry

protected List<AtomEntry> entry

totalResults

protected BigInteger totalResults

itemsPerPage

protected BigInteger itemsPerPage

startIndex

protected BigInteger startIndex

opensearchQuery

protected 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(Reader reader)
                          throws IOException
Convenience method for creating an AtomFeed from xml

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

marshal

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

getId

public String getId()
Gets the value of id.


setId

public void setId(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 Date getUpdated()
Gets the value of updated as a Date object


setUpdated

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


setUpdated

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


setUpdated

public void setUpdated(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 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 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 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 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 String getIcon()
Gets the value of icon.


setIcon

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


getLogo

public String getLogo()
Gets the value of logo.


setLogo

public void setLogo(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 List<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 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 List<OpenSearchQuery> getOpenSearchQueries()
Gets the list of opensearch Query elements


setOpenSearchQueries

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


addOpenSearchQuery

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



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