org.ucl.xpath.types
Class XSGMonth

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.XSGMonth
All Implemented Interfaces:
CmpEq

public class XSGMonth
extends CalendarType
implements CmpEq

A representation of the gMonth datatype


Constructor Summary
XSGMonth()
          Initialises a representation of the current month
XSGMonth(java.util.Calendar cal, boolean tz)
          Initialises a representation of the supplied month
 
Method Summary
 java.util.Calendar calendar()
          Retrieves the Calendar representation of the month stored
 ResultSequence constructor(ResultSequence arg)
          Creates a new ResultSequence consisting of the extractable gMonth in the supplied ResultSequence
 boolean eq(AnyType arg)
          Equality comparison between this and the supplied representation.
 int month()
          Retrieves the actual month as an integer
static XSGMonth parse_gMonth(java.lang.String str)
          Parses a String representation of a month and constructs a new XSGMonth 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
 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

XSGMonth

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

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

XSGMonth

public XSGMonth()
Initialises a representation of the current month

Method Detail

type_name

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

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

parse_gMonth

public static XSGMonth parse_gMonth(java.lang.String str)
Parses a String representation of a month and constructs a new XSGMonth representation of it.

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

constructor

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

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

month

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

Returns:
The actual month 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

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

string_type

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

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

calendar

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

Returns:
Calendar representation of the month stored

eq

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

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