net.sf.saxon.value
Class GYearValue
java.lang.Object
|
+--net.sf.saxon.value.Value
|
+--net.sf.saxon.value.AtomicValue
|
+--net.sf.saxon.value.CalendarValue
|
+--net.sf.saxon.value.DateValue
|
+--net.sf.saxon.value.GYearValue
- All Implemented Interfaces:
- java.lang.Comparable, Expression, Item, java.io.Serializable
- public class GYearValue
- extends DateValue
Implementation of the xs:gYear data type
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.value.DateValue |
add, compareTo, convertToJava, equals, getComponent, getUTCDate, hashCode, removeTimezone, setDateValue, setLexicalValue, setTimezone, subtract |
Methods inherited from class net.sf.saxon.value.AtomicValue |
convert, display, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getImplementationMethod, getPrimitiveValue, getTypedValue, iterate, process, toString |
Methods inherited from class net.sf.saxon.value.Value |
analyze, asItem, asValue, collapseWhitespace, convertJavaObjectToXPath, getDependencies, getParentExpression, getSpecialProperties, inverse, iterateSubExpressions, normalizeWhitespace, promote, simplify, stringToNumber, trimWhitespace |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
GYearValue
public GYearValue()
GYearValue
public GYearValue(java.lang.CharSequence value)
throws XPathException
getItemType
public ItemType getItemType()
- Determine the data type of the expression
- Specified by:
getItemType
in interface Expression
- Overrides:
getItemType
in class DateValue
- Returns:
- Type.G_YEAR_TYPE,
convert
public AtomicValue convert(int requiredType,
XPathContext context)
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 java.lang.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.