org.exolab.castor.types

Class GDay

public class GDay extends GMonthDay

Describe an XML schema gDay type.

The format is defined by W3C XML Schema Recommendation and ISO8601 i.e ---DD(Z|(+|-)hh:mm)

Version: $Revision: 1.1.1.1 $

Author: Arnaud Blandin

Constructor Summary
GDay()
public only for the generated source code
GDay(short day)
Constructs a XML Schema GDay instance given all the values of the different fields.
GDay(int day)
Constructs a XML Schema GDay instance given all the values of the different fields.
GDay(String gday)
Constructs a GDay from a string value.
Method Summary
shortgetMonth()
static Objectparse(String str)
parse a String and convert it into an java.lang.Object
static GDayparseGDay(String str)
parse a String and convert it into a GDay.
voidsetMonth(short month)
DatetoDate()
converts this GDay into a local java Date.
StringtoString()
convert this GDay to a string The format is defined by W3C XML Schema recommendation and ISO8601 i.e ---DD(Z|(+|-)hh:mm)

Constructor Detail

GDay

public GDay()
public only for the generated source code

GDay

public GDay(short day)
Constructs a XML Schema GDay instance given all the values of the different fields. By default a GDay is not UTC and is local.

Parameters: values an array of shorts that represent the different fields of Time.

GDay

public GDay(int day)
Constructs a XML Schema GDay instance given all the values of the different fields. By default a GDay is not UTC and is local.

Parameters: values an array of shorts that represent the different fields of Time.

GDay

public GDay(String gday)
Constructs a GDay from a string value.

Parameters: gday the string representation of the GDay to instantiate

Method Detail

getMonth

public short getMonth()

parse

public static Object parse(String str)
parse a String and convert it into an java.lang.Object

Parameters: str the string to parse

Returns: an Object represented by the string

Throws: ParseException a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class)

parseGDay

public static GDay parseGDay(String str)
parse a String and convert it into a GDay.

Parameters: str the string to parse

Returns: the Date represented by the string

Throws: ParseException a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class)

setMonth

public void setMonth(short month)

toDate

public Date toDate()
converts this GDay into a local java Date.

Returns: a local date representing this Date.

toString

public String toString()
convert this GDay to a string The format is defined by W3C XML Schema recommendation and ISO8601 i.e ---DD(Z|(+|-)hh:mm)

Returns: a string representing this Date

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com