net.sf.saxon.value
Class GYearValue

java.lang.Object
  extended by net.sf.saxon.value.Value
      extended by net.sf.saxon.value.AtomicValue
          extended by net.sf.saxon.value.CalendarValue
              extended by net.sf.saxon.value.DateValue
                  extended by net.sf.saxon.value.GYearValue
All Implemented Interfaces:
Serializable, Comparable, Expression, Item

public class GYearValue
extends DateValue

Implementation of the xs:gYear data type

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.value.DateValue
tzOffset
 
Fields inherited from class net.sf.saxon.value.CalendarValue
calendar, zoneSpecified
 
Constructor Summary
GYearValue()
           
GYearValue(CharSequence value)
           
 
Method Summary
 AtomicValue convert(int requiredType)
          Convert to target data type
 String getStringValue()
          Convert to string
 
Methods inherited from class net.sf.saxon.value.DateValue
add, compareTo, conversionPreference, convertToJava, display, equals, getComponent, getItemType, getUTCDate, hashCode, removeTimezone, setDateValue, setLexicalValue, setTimezone, subtract
 
Methods inherited from class net.sf.saxon.value.AtomicValue
convert, convert, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getPrimitiveValue, getTypedValue, iterate
 
Methods inherited from class net.sf.saxon.value.Value
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GYearValue

public GYearValue()

GYearValue

public GYearValue(CharSequence value)
           throws XPathException
Throws:
XPathException
Method Detail

convert

public AtomicValue convert(int requiredType)
                    throws XPathException
Convert to target data type

Overrides:
convert in class DateValue
Parameters:
requiredType - an integer identifying the required atomic type
Returns:
an AtomicValue, a value of the required type
Throws:
XPathException - if the conversion is not possible

getStringValue

public String getStringValue()
Description copied from class: DateValue
Convert to string

Specified by:
getStringValue in interface Item
Overrides:
getStringValue in class DateValue
Returns:
ISO 8601 representation.