org.apache.lucene.gdata.gom
Interface GOMDateConstruct

All Superinterfaces:
AtomParser, GOMElement, GOMXmlEntity
All Known Subinterfaces:
GOMPublished, GOMUpdated
All Known Implementing Classes:
GOMDateConstructImpl, GOMPublishedImpl, GOMUpdatedImpl

public interface GOMDateConstruct
extends GOMElement

GOMDateConstruct is a base interface for several concrete DateConstruct implementations like GOMUpdated or GOMPublished

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.

  atomDateConstruct = atomCommonAttributes, xsd:dateTime
 
Such date values happen to be compatible with the following specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and [W3C.REC-xmlschema-2-20041028].

Example Date constructs:

    <updated>2003-12-13T18:30:02Z</updated>
   
    <updated>2003-12-13T18:30:02.25Z</updated>
    <updated>2003-12-13T18:30:02+01:00</updated>
    <updated>2003-12-13T18:30:02.25+01:00</updated>
 
Date values SHOULD be as accurate as possible. For example, it would be generally inappropriate for a publishing system to apply the same timestamp to several entries that were published during the course of a single day.

Author:
Simon Willnauer
See Also:
GOMUpdated, GOMPublished

Field Summary
 
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
 
Method Summary
 Date getDate()
           
 void setDate(Date date)
           
 
Methods inherited from interface org.apache.lucene.gdata.gom.GOMElement
getXmlBase, getXmlLang, writeAtomOutput, 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, processElementValue, processEndElement
 

Method Detail

setDate

void setDate(Date date)
Parameters:
date - - the date to set

getDate

Date getDate()
Returns:
- the date object, if no date has been set this method will return a new Date(0) date object


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