org.apache.lucene.gdata.gom.core
Class GOMDateConstructImpl

java.lang.Object
  extended by org.apache.lucene.gdata.gom.core.AbstractGOMElement
      extended by org.apache.lucene.gdata.gom.core.GOMDateConstructImpl
All Implemented Interfaces:
AtomParser, GOMDateConstruct, GOMElement, GOMXmlEntity
Direct Known Subclasses:
GOMPublishedImpl, GOMUpdatedImpl

public abstract class GOMDateConstructImpl
extends AbstractGOMElement
implements GOMDateConstruct

A Date construct is an element whose content MUST conform to the "date-time" production in [RFC3339]. In addition, an uppercase "T" character MUST be used to separate date and time, and an uppercase "Z" character MUST be present in the absence of a numeric time zone offset.

Author:
Simon Willnauer

Field Summary
protected  long date
           
protected  String rfc3339String
           
 
Fields inherited from class org.apache.lucene.gdata.gom.core.AbstractGOMElement
extensionAttributes, localName, nsPrefix, nsUri, qname, textValue, xmlBase, xmlLang
 
Fields inherited from interface org.apache.lucene.gdata.gom.GOMElement
XML_BASE, XML_LANG
 
Fields inherited from interface org.apache.lucene.gdata.gom.core.AtomParser
DUPLICATE_ATTRIBUTE, DUPLICATE_ELEMENT, DUPLICATE_ELEMENT_VALUE, INVALID_ATTRIBUTE, INVALID_ELEMENT_VALUE, MISSING_ELEMENT_ATTRIBUTE, MISSING_ELEMENT_CHILD, MISSING_ELEMENT_VALUE, MISSING_ELEMENT_VALUE_PLAIN, UNEXPECTED_ATTRIBUTE, UNEXPECTED_ELEMENT, UNEXPECTED_ELEMENT_CHILD, UNEXPECTED_ELEMENT_VALUE, URECOGNIZED_ELEMENT_CHILD
 
Constructor Summary
GOMDateConstructImpl()
           
 
Method Summary
 Date getDate()
           
 void processElementValue(String aValue)
          
 void processEndElement()
          
 void setDate(Date aDate)
           
 void writeAtomOutput(GOMOutputWriter aStreamWriter)
          Generates the xml element represented by this class in the ATOM 1.0 formate.
 
Methods inherited from class org.apache.lucene.gdata.gom.core.AbstractGOMElement
addAttribute, getChildParser, getLocalName, getQname, getTextValue, getXmlBase, getXmlLang, getXmlNamespaceAttributes, processAttribute, setLocalName, setNamespacePrefix, setNamespaceUri, setTextValue, writeRssOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lucene.gdata.gom.GOMElement
getXmlBase, getXmlLang, writeRssOutput, writeRssOutput
 
Methods inherited from interface org.apache.lucene.gdata.gom.GOMXmlEntity
getLocalName, getQname, getTextValue, setLocalName, setNamespacePrefix, setNamespaceUri, setTextValue
 
Methods inherited from interface org.apache.lucene.gdata.gom.core.AtomParser
getChildParser, processAttribute
 

Field Detail

date

protected long date

rfc3339String

protected String rfc3339String
Constructor Detail

GOMDateConstructImpl

public GOMDateConstructImpl()
Method Detail

setDate

public void setDate(Date aDate)
Specified by:
setDate in interface GOMDateConstruct
Parameters:
aDate - - the date to set
See Also:
GOMDateConstruct.setDate(java.util.Date)

getDate

public Date getDate()
Specified by:
getDate in interface GOMDateConstruct
Returns:
- the date object, if no date has been set this method will return a new Date(0) date object
See Also:
GOMDateConstruct.getDate()

processElementValue

public void processElementValue(String aValue)
Description copied from class: AbstractGOMElement

Specified by:
processElementValue in interface AtomParser
Overrides:
processElementValue in class AbstractGOMElement
See Also:
AbstractGOMElement.processElementValue(java.lang.String)

processEndElement

public void processEndElement()
Description copied from class: AbstractGOMElement

Specified by:
processEndElement in interface AtomParser
Overrides:
processEndElement in class AbstractGOMElement
See Also:
AbstractGOMElement.processEndElement()

writeAtomOutput

public void writeAtomOutput(GOMOutputWriter aStreamWriter)
                     throws javax.xml.stream.XMLStreamException
Description copied from interface: GOMElement
Generates the xml element represented by this class in the ATOM 1.0 formate.

Specified by:
writeAtomOutput in interface GOMElement
Parameters:
aStreamWriter - - the GOMOutputWriter implementation to write the output
Throws:
javax.xml.stream.XMLStreamException - - if the GOMOutputWriter throws an exception
See Also:
org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.