org.ucl.xpath.types
Class XSGMonthDay

java.lang.Object
  extended byorg.ucl.xpath.types.AnyType
      extended byorg.ucl.xpath.types.AnySimpleType
          extended byorg.ucl.xpath.types.AnyAtomicType
              extended byorg.ucl.xpath.types.CtrType
                  extended byorg.ucl.xpath.types.CalendarType
                      extended byorg.ucl.xpath.types.XSGMonthDay
All Implemented Interfaces:
CmpEq

public class XSGMonthDay
extends CalendarType
implements CmpEq

A representation of the MonthDay datatype


Constructor Summary
XSGMonthDay()
          Initialises a representation of the current month and day
XSGMonthDay(java.util.Calendar cal, boolean tz)
          Initialises a representation of the supplied month and day
 
Method Summary
 java.util.Calendar calendar()
          Retrieves the Calendar representation of the month and day stored
 ResultSequence constructor(ResultSequence arg)
          Creates a new ResultSequence consisting of the extractable gMonthDay in the supplied ResultSequence
 int day()
          Retrieves the actual day as an integer
 boolean eq(AnyType arg)
          Equality comparison between this and the supplied representation.
 int month()
          Retrieves the actual month as an integer
static XSGMonthDay parse_gMonthDay(java.lang.String str)
          Parses a String representation of a month and day and constructs a new XSGMonthDay representation of it.
 java.lang.String string_type()
          Retrieves the datatype's full pathname
 java.lang.String string_value()
          Retrieves a String representation of the stored month and day
 boolean timezoned()
          Check for whether a timezone was specified at creation
 java.lang.String type_name()
          Retrieves the datatype's name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSGMonthDay

public XSGMonthDay(java.util.Calendar cal,
                   boolean tz)
Initialises a representation of the supplied month and day

Parameters:
cal - Calendar representation of the month and day to be stored
tz - Timezone associated with this month and day

XSGMonthDay

public XSGMonthDay()
Initialises a representation of the current month and day

Method Detail

type_name

public java.lang.String type_name()
Retrieves the datatype's name

Specified by:
type_name in class CtrType
Returns:
"gMonthDay" which is the datatype's name

parse_gMonthDay

public static XSGMonthDay parse_gMonthDay(java.lang.String str)
Parses a String representation of a month and day and constructs a new XSGMonthDay representation of it.

Parameters:
str - The String representation of the month and day (and optional timezone)
Returns:
The XSGMonthDay representation of the supplied date

constructor

public ResultSequence constructor(ResultSequence arg)
                           throws DynamicError
Creates a new ResultSequence consisting of the extractable gMonthDay in the supplied ResultSequence

Specified by:
constructor in class CtrType
Parameters:
arg - The ResultSequence from which the gMonthDay is to be extracted
Returns:
New ResultSequence consisting of the supplied month and day
Throws:
DynamicError

month

public int month()
Retrieves the actual month as an integer

Returns:
The actual month as an integer

day

public int day()
Retrieves the actual day as an integer

Returns:
The actual day as an integer

timezoned

public boolean timezoned()
Check for whether a timezone was specified at creation

Returns:
True if a timezone was specified. False otherwise

string_value

public java.lang.String string_value()
Retrieves a String representation of the stored month and day

Specified by:
string_value in class AnyType
Returns:
String representation of the stored month and day

string_type

public java.lang.String string_type()
Retrieves the datatype's full pathname

Specified by:
string_type in class AnyType
Returns:
"xs:gMonthDay" which is the datatype's full pathname

calendar

public java.util.Calendar calendar()
Retrieves the Calendar representation of the month and day stored

Returns:
Calendar representation of the month and day stored

eq

public boolean eq(AnyType arg)
           throws DynamicError
Equality comparison between this and the supplied representation. This representation must be of type XSGMonthDay

Specified by:
eq in interface CmpEq
Parameters:
arg - The XSGMonthDay to compare with
Returns:
True if the two representations are of the same month and day. False otherwise
Throws:
DynamicError