org.apache.abdera.model
Interface DateTime

All Superinterfaces:
Base, java.lang.Cloneable, Element

public interface DateTime
extends Element

An element conforming to the Atom Date Construct. The data type implementation for this element is provided by the AtomDate class.


Method Summary
 java.util.Calendar getCalendar()
          Returns the content value of the element as a java.util.Calendar object
 java.util.Date getDate()
          Returns the content value of the element as a java.util.Date object
 java.lang.String getString()
          Returns the content value of the element as a string conforming to RFC-3339
 long getTime()
          Returns the content value of the element as a long (equivalent to calling DateTimeElement().getDate().getTime()
 AtomDate getValue()
          Returns the content value of the element as an AtomDate object
 void setCalendar(java.util.Calendar date)
          Sets the content value of the element
 void setDate(java.util.Date date)
          Sets the content value of the element
 void setString(java.lang.String date)
          Sets the content value of the element
 void setTime(long date)
          Sets the content value of the element
 void setValue(AtomDate dateTime)
          Sets the content value of the element
 
Methods inherited from interface org.apache.abdera.model.Element
declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setParentElement, setText
 
Methods inherited from interface org.apache.abdera.model.Base
addComment, clone, getFactory, writeTo, writeTo
 

Method Detail

getValue

AtomDate getValue()
Returns the content value of the element as an AtomDate object

Returns:
The Atom Date value of this element

getDate

java.util.Date getDate()
Returns the content value of the element as a java.util.Date object

Returns:
The java.util.Date value of this element

getCalendar

java.util.Calendar getCalendar()
Returns the content value of the element as a java.util.Calendar object

Returns:
The java.util.Calendar value of this element

getTime

long getTime()
Returns the content value of the element as a long (equivalent to calling DateTimeElement().getDate().getTime()

Returns:
The number of milliseconds since January 1, 1970, 00:00:00 GMT

getString

java.lang.String getString()
Returns the content value of the element as a string conforming to RFC-3339

Returns:
The serialized string form of this element

setValue

void setValue(AtomDate dateTime)
Sets the content value of the element

Parameters:
dateTime - the Atom Date value

setDate

void setDate(java.util.Date date)
Sets the content value of the element

Parameters:
date - The java.util.Date value

setCalendar

void setCalendar(java.util.Calendar date)
Sets the content value of the element

Parameters:
date - The java.util.Calendar value

setTime

void setTime(long date)
Sets the content value of the element

Parameters:
date - the number of milliseconds since January 1, 1970, 00:00:00 GMT

setString

void setString(java.lang.String date)
Sets the content value of the element

Parameters:
date - The serialized string value