Public Member Functions | Static Public Member Functions

org.exolab.castor.types.GYear Class Reference

Inheritance diagram for org.exolab.castor.types.GYear:
org.exolab.castor.types.GYearMonth org.exolab.castor.types.Date org.exolab.castor.types.DateTimeBase

List of all members.

Public Member Functions

 GYear ()
 GYear (short century, short year)
 GYear (int year)
 GYear (short[] values)
 GYear (String gyear) throws ParseException
void setValues (short[] values)
short[] getValues ()
java.util.Date toDate ()
String toString ()
short getMonth ()
void setMonth (short month)

Static Public Member Functions

static Object parse (String str) throws ParseException
static GYear parseGYear (String str) throws ParseException

Detailed Description

Describe an XML schema gYear type.

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

Author:
Arnaud Blandin
Version:
Revision:
1.1.1.1

Constructor & Destructor Documentation

org.exolab.castor.types.GYear.GYear (  ) 

public only for the generated source code

Referenced by org.exolab.castor.types.GYear.parseGYear().

org.exolab.castor.types.GYear.GYear ( short  century,
short  year 
)

Instantiates a new gYear given the value of the month and the value of the day.

Parameters:
century the month value
year the year value

References org.exolab.castor.types.DateTimeBase.setCentury(), and org.exolab.castor.types.DateTimeBase.setYear().

org.exolab.castor.types.GYear.GYear ( int  year  ) 

Instantiates a new gYear given the value of the month and the value of the day.

Parameters:
century the month value
year the year value

References org.exolab.castor.types.DateTimeBase.setCentury(), and org.exolab.castor.types.DateTimeBase.setYear().

org.exolab.castor.types.GYear.GYear ( short[]  values  ) 

Constructs a XML Schema GYear instance given all the values of the different fields. By default a GYear is not UTC and is local.

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

References org.exolab.castor.types.GYear.setValues().

org.exolab.castor.types.GYear.GYear ( String  gyear  )  throws ParseException

Construct a GYear from a string value

Parameters:
gyear the string representation of the GYear to instantiate

Member Function Documentation

short org.exolab.castor.types.GYear.getMonth (  ) 
short [] org.exolab.castor.types.GYear.getValues (  )  [virtual]

Returns an array of short with all the fields that describe this gYear type.

Note:the time zone is not included.

Returns:
an array of short with all the fields that describe this Date type.

Reimplemented from org.exolab.castor.types.GYearMonth.

References org.exolab.castor.types.DateTimeBase.getCentury(), and org.exolab.castor.types.DateTimeBase.getYear().

static Object org.exolab.castor.types.GYear.parse ( String  str  )  throws ParseException [static]

parse a String and convert it into an java.lang.Object

Parameters:
str the string to parse
Returns:
an Object represented by the string
Exceptions:
ParseException a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class)

Reimplemented from org.exolab.castor.types.GYearMonth.

References org.exolab.castor.types.GYear.parseGYear().

static GYear org.exolab.castor.types.GYear.parseGYear ( String  str  )  throws ParseException [static]

parse a String and convert it into a gYear.

Parameters:
str the string to parse
Returns:
the Date represented by the string
Exceptions:
ParseException a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class)

References org.exolab.castor.types.GYear.GYear().

Referenced by org.exolab.castor.types.GYear.parse().

void org.exolab.castor.types.GYear.setMonth ( short  month  ) 

set the Month Field

Parameters:
month the value to set up Note 1<month<12

Reimplemented from org.exolab.castor.types.DateTimeBase.

Referenced by org.exolab.castor.types.GYear.setValues().

void org.exolab.castor.types.GYear.setValues ( short[]  values  )  [virtual]

Sets all the fields by reading the values in an array

if a Time Zone is specificied it has to be set by using setZone.

Parameters:
values an array of shorts with the values the array is supposed to be of length 2 and ordered like the following:

  • century
  • year

Reimplemented from org.exolab.castor.types.GYearMonth.

References org.exolab.castor.types.DateTimeBase.setCentury(), org.exolab.castor.types.GYear.setMonth(), and org.exolab.castor.types.DateTimeBase.setYear().

Referenced by org.exolab.castor.types.GYear.GYear().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties