org.ucl.xpath.types
Class XSGDay

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

public class XSGDay
extends CalendarType
implements CmpEq

A representation of the Day datatype


Constructor Summary
XSGDay()
          Initialises a representation of the current day
XSGDay(java.util.Calendar cal, boolean tz)
          Initialises a representation of the supplied day
 
Method Summary
 java.util.Calendar calendar()
          Retrieves the Calendar representation of the day stored
 ResultSequence constructor(ResultSequence arg)
          Creates a new ResultSequence consisting of the extractable gDay 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.
static XSGDay parse_gDay(java.lang.String str)
          Parses a String representation of a day and constructs a new XSGDay 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 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

XSGDay

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

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

XSGDay

public XSGDay()
Initialises a representation of the current day

Method Detail

type_name

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

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

parse_gDay

public static XSGDay parse_gDay(java.lang.String str)
Parses a String representation of a day and constructs a new XSGDay representation of it.

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

constructor

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

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

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 day

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

string_type

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

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

calendar

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

Returns:
Calendar representation of the day stored

eq

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

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