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:
Cloneable, Iterable<Element>, Base, DateTime, Element

public abstract class DateTimeWrapper
extends ElementWrapper
implements DateTime

An ElementWrapper implementation that can serve as the basis for Atom Date Construct based extensions.


Constructor Summary
protected DateTimeWrapper(Element internal)
           
protected DateTimeWrapper(Factory factory, QName qname)
           
 
Method Summary
 Calendar getCalendar()
          Returns the content value of the element as a java.util.Calendar object
 Date getDate()
          Returns the content value of the element as a java.util.Date object
 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
 DateTime setCalendar(Calendar date)
          Sets the content value of the element
 DateTime setDate(Date date)
          Sets the content value of the element
 DateTime setString(String date)
          Sets the content value of the element
 DateTime setTime(long date)
          Sets the content value of the element
 DateTime setValue(AtomDate dateTime)
          Sets the content value of the element
 
Methods inherited from class org.apache.abdera.model.ElementWrapper
addComment, clone, complete, 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, iterator, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText, toString, writeTo, writeTo, writeTo, writeTo, 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, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setMustPreserveWhitespace, setParentElement, setText, setText
 
Methods inherited from interface org.apache.abdera.model.Base
addComment, clone, complete, getDefaultWriterOptions, getFactory, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

DateTimeWrapper

protected DateTimeWrapper(Element internal)

DateTimeWrapper

protected DateTimeWrapper(Factory factory,
                          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 DateTime 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 DateTime setDate(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 DateTime setCalendar(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 DateTime 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 DateTime setString(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 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 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 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


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.