org.apache.abdera.model
Class DateTimeWrapper

java.lang.Object
  extended by org.apache.abdera.model.ElementWrapper
      extended by org.apache.abdera.model.DateTimeWrapper
All Implemented Interfaces:
java.lang.Cloneable, Base, DateTime, Element

public abstract class DateTimeWrapper
extends ElementWrapper
implements DateTime


Constructor Summary
protected DateTimeWrapper(Element internal)
           
protected DateTimeWrapper(Factory factory, javax.xml.namespace.QName qname)
           
 
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 class org.apache.abdera.model.ElementWrapper
addComment, clone, declareNS, discard, equals, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDefaultWriterOptions, getDocument, getElements, getExtensionAttributes, getFactory, getFirstChild, getFirstChild, getInternal, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, hashCode, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText, toString, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.model.Element
declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getElements, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getMustPreserveWhitespace, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText
 
Methods inherited from interface org.apache.abdera.model.Base
addComment, clone, getDefaultWriterOptions, getFactory, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
 

Constructor Detail

DateTimeWrapper

protected DateTimeWrapper(Element internal)

DateTimeWrapper

protected DateTimeWrapper(Factory factory,
                          javax.xml.namespace.QName qname)
Method Detail

getValue

public AtomDate getValue()
Description copied from interface: DateTime
Returns the content value of the element as an AtomDate object

Specified by:
getValue in interface DateTime
Returns:
The Atom Date value of this element

setValue

public void setValue(AtomDate dateTime)
Description copied from interface: DateTime
Sets the content value of the element

Specified by:
setValue in interface DateTime
Parameters:
dateTime - the Atom Date value

setDate

public void setDate(java.util.Date date)
Description copied from interface: DateTime
Sets the content value of the element

Specified by:
setDate in interface DateTime
Parameters:
date - The java.util.Date value

setCalendar

public void setCalendar(java.util.Calendar date)
Description copied from interface: DateTime
Sets the content value of the element

Specified by:
setCalendar in interface DateTime
Parameters:
date - The java.util.Calendar value

setTime

public void setTime(long date)
Description copied from interface: DateTime
Sets the content value of the element

Specified by:
setTime in interface DateTime
Parameters:
date - the number of milliseconds since January 1, 1970, 00:00:00 GMT

setString

public void setString(java.lang.String date)
Description copied from interface: DateTime
Sets the content value of the element

Specified by:
setString in interface DateTime
Parameters:
date - The serialized string value

getDate

public java.util.Date getDate()
Description copied from interface: DateTime
Returns the content value of the element as a java.util.Date object

Specified by:
getDate in interface DateTime
Returns:
The java.util.Date value of this element

getCalendar

public java.util.Calendar getCalendar()
Description copied from interface: DateTime
Returns the content value of the element as a java.util.Calendar object

Specified by:
getCalendar in interface DateTime
Returns:
The java.util.Calendar value of this element

getTime

public long getTime()
Description copied from interface: DateTime
Returns the content value of the element as a long (equivalent to calling DateTimeElement().getDate().getTime()

Specified by:
getTime in interface DateTime
Returns:
The number of milliseconds since January 1, 1970, 00:00:00 GMT

getString

public java.lang.String getString()
Description copied from interface: DateTime
Returns the content value of the element as a string conforming to RFC-3339

Specified by:
getString in interface DateTime
Returns:
The serialized string form of this element