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


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



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

Constructor Summary

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

Method Summary

public java.util.Calendarcalendar()
     Retrieves the Calendar representation of the year 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 gYear 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 XSGYear
public java.lang.StringgetStringValue()
     Retrieves a String representation of the stored year
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinitiongetTypeDefinition()
    
protected booleanisGDataType(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType aat)
    
public static org.eclipse.wst.xml.xpath2.processor.internal.types.XSGYearparse_gYear(java.lang.String str)
     Parses a String representation of a year and constructs a new XSGYear 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

XSGYear

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

Initialises a representation of the supplied month


XSGYear

public XSGYear()

Initialises a representation of the current year


Methods Detail

calendar

public java.util.Calendar calendar()

Retrieves the Calendar representation of the year stored

Returns

java.util.Calendar - Calendar representation of the year 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 gYear in the supplied ResultSequence

Parameters

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

Returns

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

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 XSGYear

Parameters

arg - The XSGYear to compare with

dynamicContext

Returns

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

Throws:

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


getStringValue

public java.lang.String getStringValue()

Retrieves a String representation of the stored year

Returns

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


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


parse_gYear

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

Parses a String representation of a year and constructs a new XSGYear representation of it.

Parameters

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

Returns

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


string_type

public java.lang.String string_type()

Retrieves the datatype's full pathname

Returns

java.lang.String - "xs:gYear" 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 - "gYear" 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