Lizzy v1.1.1

christophedelory.atom
Class Entry

java.lang.Object
  extended by christophedelory.atom.Common
      extended by christophedelory.atom.Entry

public class Entry
extends Common

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 feed element, or it can appear as the document (i.e., top-level) element of a stand-alone Atom Entry Document. An Atom Entry Document represents exactly one Atom entry, outside of the context of an Atom feed.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Entry()
           
 
Method Summary
 void addAuthor(Person author)
          Adds an entry's author.
 void addCategory(Category category)
          Adds a category to this entry.
 void addContent(Content content)
          Adds a content to this entry.
 void addContributor(Person contributor)
          Adds a person or other entity who contributed to the entry.
 void addLink(Link link)
          Adds a reference from this entry to a Web resource.
 List<Person> getAuthors()
          Returns the list of entry's authors.
 List<Category> getCategories()
          Returns the list of categories associated with the entry.
 List<Content> getContents()
          Returns a list of contents.
 List<Person> getContributors()
          Returns the list of persons or other entities who contributed to the entry.
 URIContainer getId()
          Returns a permanent, universally unique identifier for the entry.
 List<Link> getLinks()
          Returns the list of references from this entry to a Web resource.
 Date getPublished()
          Returns an instant in time associated with an event early in the life cycle of the entry.
 TextContainer getRights()
          Returns information about rights held in and over this entry.
 Source getSource()
          Returns the source feed.
 TextContainer getSummary()
          Returns a short summary, abstract, or excerpt of an entry.
 TextContainer getTitle()
          Returns a human-readable title for this entry.
 Date getUpdated()
          Returns the most recent instant in time when this entry was modified in a way the publisher considers significant.
 void setId(URIContainer id)
          Initializes the permanent, universally unique identifier for the entry.
 void setPublished(Date published)
          Initializes the instant in time associated with an event early in the life cycle of the entry.
 void setRights(TextContainer rights)
          Initializes information about rights held in and over this entry.
 void setSource(Source source)
          Initializes the source feed.
 void setSummary(TextContainer summary)
          Initializes a short summary, abstract, or excerpt of an entry.
 void setTitle(TextContainer title)
          Initializes the human-readable title for this entry.
 void setUpdated(Date updated)
          Initializes the most recent instant in time when this entry was modified in a way the publisher considers significant.
 
Methods inherited from class christophedelory.atom.Common
getBaseString, getLang, setBaseString, setLang
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Entry

public Entry()
Method Detail

getAuthors

public List<Person> getAuthors()
Returns the list of entry's authors. The list is initially empty.

Returns:
a list of authors. May be empty but not null.
See Also:
addAuthor(christophedelory.atom.Person)

addAuthor

public void addAuthor(Person author)
Adds an entry's author.

Parameters:
author - an author. Shall not be null.
Throws:
NullPointerException - if author is null.
See Also:
getAuthors()

getCategories

public List<Category> getCategories()
Returns the list of categories associated with the entry. The list is initially empty.

Returns:
a list of categories. May be empty but not null.
See Also:
addCategory(christophedelory.atom.Category)

addCategory

public void addCategory(Category category)
Adds a category to this entry.

Parameters:
category - a category. Shall not be null.
Throws:
NullPointerException - if category is null.
See Also:
getCategories()

getContents

public List<Content> getContents()
Returns a list of contents. The list is initially empty.

Returns:
a list of contents. May be empty but not null.
See Also:
addContent(christophedelory.atom.Content)

addContent

public void addContent(Content content)
Adds a content to this entry.

Parameters:
content - a content. Shall not be null.
Throws:
NullPointerException - if content is null.
See Also:
getContents()

getContributors

public List<Person> getContributors()
Returns the list of persons or other entities who contributed to the entry. The list is initially empty.

Returns:
a list of contributors. May be empty but not null.
See Also:
addContributor(christophedelory.atom.Person)

addContributor

public void addContributor(Person contributor)
Adds a person or other entity who contributed to the entry.

Parameters:
contributor - a contributor. Shall not be null.
Throws:
NullPointerException - if contributor is null.
See Also:
getContributors()

getId

public URIContainer getId()
Returns a permanent, universally unique identifier for the entry.

Returns:
an URI container. May be null.
See Also:
setId(christophedelory.atom.URIContainer)

setId

public void setId(URIContainer id)
Initializes the permanent, universally unique identifier for the entry.

Parameters:
id - an URI container. Shall not be null.
Throws:
NullPointerException - if id is null.
See Also:
getId()

getLinks

public List<Link> getLinks()
Returns the list of references from this entry to a Web resource. The list is initially empty.

Returns:
a list of links. May be empty but not null.
See Also:
addLink(christophedelory.atom.Link)

addLink

public void addLink(Link link)
Adds a reference from this entry to a Web resource.

Parameters:
link - a link. Shall not be null.
Throws:
NullPointerException - if link is null.
See Also:
getLinks()

getPublished

public Date getPublished()
Returns an instant in time associated with an event early in the life cycle of the entry. Typically, will be associated with the initial creation or first availability of the resource.

Returns:
a date. May be null.
See Also:
setPublished(java.util.Date)

setPublished

public void setPublished(Date published)
Initializes the instant in time associated with an event early in the life cycle of the entry.

Parameters:
published - a date. May be null.
See Also:
getPublished()

getRights

public TextContainer getRights()
Returns information about rights held in and over this entry. This element should not be used to convey machine-readable licensing information.

Returns:
a text container. May be null.
See Also:
setRights(christophedelory.atom.TextContainer)

setRights

public void setRights(TextContainer rights)
Initializes information about rights held in and over this entry.

Parameters:
rights - a text container. May be null.
See Also:
getRights()

getSource

public Source getSource()
Returns the source feed. If an entry is copied from one feed into another feed, then the source feed's metadata (all child elements of the feed element other than the entry elements) may be preserved within the copied entry by adding a source child element, if it is not already present in the entry, and including some or all of the source feed's metadata elements as the source element's children. Such metadata should be preserved if the source feed contains any of the child elements author, contributor, rights, or category and those child elements are not present in the source entry.

Returns:
a source feed. May be null.
See Also:
setSource(christophedelory.atom.Source)

setSource

public void setSource(Source source)
Initializes the source feed.

Parameters:
source - a feed source. May be null.
See Also:
getSource()

getSummary

public TextContainer getSummary()
Returns a short summary, abstract, or excerpt of an entry. It is not advisable for this element to duplicate the title or content information because Atom processors might assume there is a useful summary when there is none.

Returns:
a text container. May be null.
See Also:
setSummary(christophedelory.atom.TextContainer)

setSummary

public void setSummary(TextContainer summary)
Initializes a short summary, abstract, or excerpt of an entry.

Parameters:
summary - a text container. May be null.
See Also:
getSummary()

getTitle

public TextContainer getTitle()
Returns a human-readable title for this entry.

Returns:
a text container. May be null if not yet initialized.
See Also:
setTitle(christophedelory.atom.TextContainer)

setTitle

public void setTitle(TextContainer title)
Initializes the human-readable title for this entry.

Parameters:
title - a text container. Shall not be null.
Throws:
NullPointerException - if title is null.
See Also:
getTitle()

getUpdated

public Date getUpdated()
Returns the most recent instant in time when this entry was modified in a way the publisher considers significant. Therefore, not all modifications necessarily result in a changed updated value.

Returns:
a date. May be null if not yet initialized.
See Also:
setUpdated(java.util.Date)

setUpdated

public void setUpdated(Date updated)
Initializes the most recent instant in time when this entry was modified in a way the publisher considers significant.

Parameters:
updated - a date. Shall not be null.
Throws:
NullPointerException - if updated is null.
See Also:
getUpdated()

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.