com.sun.syndication.feed.atom
Class Entry

java.lang.Object
  extended by com.sun.syndication.feed.atom.Entry
All Implemented Interfaces:
Extendable, Serializable, Cloneable

public class Entry
extends Object
implements Cloneable, Serializable, Extendable

Bean for entry elements of Atom feeds.

Author:
Alejandro Abdelnur, Dave Johnson (updated for Atom 1.0)
See Also:
Serialized Form

Constructor Summary
Entry()
          Default constructor.
 
Method Summary
 Object clone()
          Creates a deep 'bean' clone of the object.
 boolean equals(Object other)
          Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
 Link findRelatedLink(String relation)
           
 List<Link> getAlternateLinks()
          Returns the entry alternate links.
 List<SyndPerson> getAuthors()
          Returns the entry author.
 List<Category> getCategories()
          Returns the categories
 List<Content> getContents()
          Returns the entry contents.
 List<SyndPerson> getContributors()
          Returns the entry contributors.
 Date getCreated()
          Returns the entry created date (Atom 0.3 only)
 List<org.jdom2.Element> getForeignMarkup()
          Returns foreign markup found at entry level.
 String getId()
          Returns the entry ID.
 Date getIssued()
          Returns the entry issued date (Atom 0.3, maps to getPublished() ).
 Date getModified()
          Returns the entry modified date (Atom 0.3, maps to getUpdated() ).
 Module getModule(String uri)
          Returns the module identified by a given URI.
 List<Module> getModules()
          Returns the entry modules.
 List<Link> getOtherLinks()
          Returns the entry non-alternate links.
 Date getPublished()
          Returns the published
 String getRights()
          Returns the rights
 Feed getSource()
          Returns the source
 Content getSummary()
          Returns the entry summary.
 String getTitle()
          Returns the entry title.
 Content getTitleEx()
          Returns the entry title as a text construct.
 Date getUpdated()
          Returns the updated
 String getXmlBase()
          Returns the xmlBase
 int hashCode()
          Returns a hashcode value for the object.
 boolean isMediaEntry()
          Returns true if entry is a media entry, i.e. has rel="edit-media".
 void setAlternateLinks(List<Link> alternateLinks)
          Sets the entry alternate links.
 void setAuthors(List<SyndPerson> authors)
          Sets the author of the entry.
 void setCategories(List<Category> categories)
          Set the categories
 void setContents(List<Content> contents)
          Sets the entry contents.
 void setContributors(List<SyndPerson> contributors)
          Sets the entry contributors.
 void setCreated(Date created)
          Sets the entry created date (Atom 0.3 only)
 void setForeignMarkup(List<org.jdom2.Element> foreignMarkup)
          Sets foreign markup found at entry level.
 void setId(String id)
          Sets the entry ID.
 void setIssued(Date issued)
          Sets the entry issued date (Atom 0.3, maps to setPublished(java.util.Date)).
 void setModified(Date modified)
          Sets the entry modified date (Atom 0.3, maps to setUpdated(java.util.Date)).
 void setModules(List<Module> modules)
          Sets the entry modules.
 void setOtherLinks(List<Link> otherLinks)
          Sets the entry non-alternate links.
 void setPublished(Date published)
          Set the published
 void setRights(String rights)
          Set the rights
 void setSource(Feed source)
          Set the source
 void setSummary(Content summary)
          Sets the entry summary.
 void setTitle(String title)
          Sets the entry title.
 void setTitleEx(Content title)
          Sets the entry title as a text construct.
 void setUpdated(Date updated)
          Set the updated
 void setXmlBase(String xmlBase)
          Set the xmlBase
 String toString()
          Returns the String representation for the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Entry

public Entry()
Default constructor. All properties are set to null.

Method Detail

setAlternateLinks

public void setAlternateLinks(List<Link> alternateLinks)
Sets the entry alternate links.

Parameters:
alternateLinks - the list of Link elements with the entry alternate links to set, an empty list or null if none.

getAlternateLinks

public List<Link> getAlternateLinks()
Returns the entry alternate links.

Returns:
a list of Link elements with the entry alternate links, an empty list if none.

setAuthors

public void setAuthors(List<SyndPerson> authors)
Sets the author of the entry.

Parameters:
authors - the author of the entry, null if none.

getAuthors

public List<SyndPerson> getAuthors()
Returns the entry author.

Returns:
the entry author, null if none.

setCategories

public void setCategories(List<Category> categories)
Set the categories

Parameters:
categories - The categories to set.
Since:
Atom 1.0

getCategories

public List<Category> getCategories()
Returns the categories

Returns:
Returns the categories.
Since:
Atom 1.0

setContents

public void setContents(List<Content> contents)
Sets the entry contents.

Parameters:
contents - the list of Content elements with the entry contents to set, an empty list or null if none.

getContents

public List<Content> getContents()
Returns the entry contents.

Returns:
a list of Content elements with the entry contents, an empty list if none.

setContributors

public void setContributors(List<SyndPerson> contributors)
Sets the entry contributors.

Parameters:
contributors - the list of Person elements with the entry contributors to set, an empty list or null if none.

getContributors

public List<SyndPerson> getContributors()
Returns the entry contributors.

Returns:
a list of Person elements with the entry contributors, an empty list if none.

setCreated

public void setCreated(Date created)
Sets the entry created date (Atom 0.3 only)

Parameters:
created - the entry created date, null if none.

getCreated

public Date getCreated()
Returns the entry created date (Atom 0.3 only)

Returns:
the entry created date, null if none.

setForeignMarkup

public void setForeignMarkup(List<org.jdom2.Element> foreignMarkup)
Sets foreign markup found at entry level.

Parameters:
foreignMarkup - Opaque object to discourage use

getForeignMarkup

public List<org.jdom2.Element> getForeignMarkup()
Returns foreign markup found at entry level.

Returns:
list of Opaque object to discourage use

setId

public void setId(String id)
Sets the entry ID.

Parameters:
id - the entry ID, null if none.

getId

public String getId()
Returns the entry ID.

Returns:
the entry ID, null if none.

setIssued

public void setIssued(Date issued)
Sets the entry issued date (Atom 0.3, maps to setPublished(java.util.Date)).

Parameters:
issued - the entry issued date, null if none.

getIssued

public Date getIssued()
Returns the entry issued date (Atom 0.3, maps to getPublished() ).

Returns:
the entry issued date, null if none.

isMediaEntry

public boolean isMediaEntry()
Returns true if entry is a media entry, i.e. has rel="edit-media".

Returns:
true if entry is a media entry

setModified

public void setModified(Date modified)
Sets the entry modified date (Atom 0.3, maps to setUpdated(java.util.Date)).

Parameters:
modified - the entry modified date, null if none.

getModified

public Date getModified()
Returns the entry modified date (Atom 0.3, maps to getUpdated() ).

Returns:
the entry modified date, null if none.

getModule

public Module getModule(String uri)
Returns the module identified by a given URI.

Specified by:
getModule in interface Extendable
Parameters:
uri - the URI of the ModuleImpl.
Returns:
The module with the given URI, null if none.

setModules

public void setModules(List<Module> modules)
Sets the entry modules.

Specified by:
setModules in interface Extendable
Parameters:
modules - the list of ModuleImpl elements with the entry modules to set, an empty list or null if none.

getModules

public List<Module> getModules()
Returns the entry modules.

Specified by:
getModules in interface Extendable
Returns:
a list of ModuleImpl elements with the entry modules, an emtpy list if none.

setOtherLinks

public void setOtherLinks(List<Link> otherLinks)
Sets the entry non-alternate links.

Parameters:
otherLinks - the list Link elements with the entry non-alternate links to set, an empty list or null if none.

getOtherLinks

public List<Link> getOtherLinks()
Returns the entry non-alternate links.

Returns:
the list of Link elements with the entry non-alternate links to set, an empty list if none.

setPublished

public void setPublished(Date published)
Set the published

Parameters:
published - The published to set.
Since:
Atom 1.0

getPublished

public Date getPublished()
Returns the published

Returns:
Returns the published.
Since:
Atom 1.0

setRights

public void setRights(String rights)
Set the rights

Parameters:
rights - The rights to set.
Since:
Atom 1.0

getRights

public String getRights()
Returns the rights

Returns:
Returns the rights.
Since:
Atom 1.0

setSource

public void setSource(Feed source)
Set the source

Parameters:
source - The source to set.

getSource

public Feed getSource()
Returns the source

Returns:
Returns the source.

setSummary

public void setSummary(Content summary)
Sets the entry summary.

Parameters:
summary - the entry summary, null if none.

getSummary

public Content getSummary()
Returns the entry summary.

Returns:
the entry summary, null if none.

setTitle

public void setTitle(String title)
Sets the entry title.

Parameters:
title - the entry title, null if none.

getTitle

public String getTitle()
Returns the entry title.

Returns:
the entry title, null if none.

setTitleEx

public void setTitleEx(Content title)
Sets the entry title as a text construct.

Parameters:
title - the entry title, null if none.

getTitleEx

public Content getTitleEx()
Returns the entry title as a text construct.

Returns:
the entry title, null if none.

setUpdated

public void setUpdated(Date updated)
Set the updated

Parameters:
updated - The updated to set.
Since:
Atom 1.0

getUpdated

public Date getUpdated()
Returns the updated

Returns:
Returns the updated.
Since:
Atom 1.0

setXmlBase

public void setXmlBase(String xmlBase)
Set the xmlBase

Parameters:
xmlBase - The xmlBase to set.
Since:
Atom 1.0

getXmlBase

public String getXmlBase()
Returns the xmlBase

Returns:
Returns the xmlBase.
Since:
Atom 1.0

clone

public Object clone()
             throws CloneNotSupportedException
Creates a deep 'bean' clone of the object.

Overrides:
clone in class Object
Returns:
a clone of the object.
Throws:
CloneNotSupportedException - thrown if an element of the object cannot be cloned.

equals

public boolean equals(Object other)
Indicates whether some other object is "equal to" this one as defined by the Object equals() method.

Overrides:
equals in class Object
Parameters:
other - he reference object with which to compare.
Returns:
true if 'this' object is equal to the 'other' object.

hashCode

public int hashCode()
Returns a hashcode value for the object.

It follows the contract defined by the Object hashCode() method.

Overrides:
hashCode in class Object
Returns:
the hashcode of the bean object.

toString

public String toString()
Returns the String representation for the object.

Overrides:
toString in class Object
Returns:
String representation for the object.

findRelatedLink

public Link findRelatedLink(String relation)


Copyright © 2004–2013 ROME Project. All rights reserved.