Package org.eclipse.wst.xml.xpath2.processor.internal.types


org.eclipse.wst.xml.xpath2.processor.internal.types
Class XSGYearMonth



public class XSGYearMonth
extends org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType
A representation of the YearMonth datatype

Constructor Summary

XSGYearMonth(java.util.Calendar cal , org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)
XSGYearMonth()

Method Summary

public java.util.Calendarcalendar()
     Retrieves the Calendar representation of the year and month stored
public org.eclipse.wst.xml.xpath2.api.ResultSequenceconstructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
     Creates a new ResultSequence consisting of the extractable gYearMonth in the supplied ResultSequence
public booleaneq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg , org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)
     Equality comparison between this and the supplied representation. This representation must be of type XSGYearMonth
public java.lang.StringgetStringValue()
     Retrieves a String representation of the stored year and month
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinitiongetTypeDefinition()
    
protected booleanisGDataType(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType aat)
    
public intmonth()
     Retrieves the actual month as an integer
public static org.eclipse.wst.xml.xpath2.processor.internal.types.XSGYearMonthparse_gYearMonth(java.lang.String str)
     Parses a String representation of a year and month and constructs a new XSGYearMonth representation of it.
public java.lang.Stringstring_type()
     Retrieves the datatype's full pathname
public booleantimezoned()
     Check for whether a timezone was specified at creation
public java.lang.Stringtype_name()
     Retrieves the datatype's name
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDurationtz()
     Retrieves the timezone associated with the date stored
public intyear()
     Retrieves the actual year as an integer

Constructor Detail

XSGYearMonth

public XSGYearMonth(java.util.Calendar cal , org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)

Initialises a representation of the supplied year and month


XSGYearMonth

public XSGYearMonth()

Initialises a representation of the current year and month


Methods Detail

calendar

public java.util.Calendar calendar()

Retrieves the Calendar representation of the year and month stored

Returns

java.util.Calendar - Calendar representation of the year and month stored


constructor

public org.eclipse.wst.xml.xpath2.api.ResultSequence constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)

Creates a new ResultSequence consisting of the extractable gYearMonth in the supplied ResultSequence

Parameters

arg - The ResultSequence from which the gYearMonth is to be extracted

Returns

org.eclipse.wst.xml.xpath2.api.ResultSequence - New ResultSequence consisting of the supplied year and month

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


eq

public boolean eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg , org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)

Equality comparison between this and the supplied representation. This representation must be of type XSGYearMonth

Parameters

arg - The XSGYearMonth to compare with

dynamicContext

Returns

boolean - True if the two representations are of the same year and month. False otherwise

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


getStringValue

public java.lang.String getStringValue()

Retrieves a String representation of the stored year and month

Returns

java.lang.String - String representation of the stored year and month


getTypeDefinition

public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getTypeDefinition()

Returns

org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition


isGDataType

protected boolean isGDataType(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType aat)

Parameters

aat

Returns

boolean


month

public int month()

Retrieves the actual month as an integer

Returns

int - The actual month as an integer


parse_gYearMonth

public org.eclipse.wst.xml.xpath2.processor.internal.types.XSGYearMonth parse_gYearMonth(java.lang.String str)

Parses a String representation of a year and month and constructs a new XSGYearMonth representation of it.

Parameters

str - The String representation of the year and month (and optional timezone)

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.XSGYearMonth - The XSGYearMonth representation of the supplied date


string_type

public java.lang.String string_type()

Retrieves the datatype's full pathname

Returns

java.lang.String - "xs:gYearMonth" which is the datatype's full pathname


timezoned

public boolean timezoned()

Check for whether a timezone was specified at creation

Returns

boolean - True if a timezone was specified. False otherwise


type_name

public java.lang.String type_name()

Retrieves the datatype's name

Returns

java.lang.String - "gYearMonth" which is the datatype's name


tz

public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz()

Retrieves the timezone associated with the date stored

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration - the timezone associated with the date stored


year

public int year()

Retrieves the actual year as an integer

Returns

int - The actual year as an integer