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, ValueRepresentation
- public class GYearValue
- extends DateValue
Implementation of the xs:gYear data type
- See Also:
- Serialized Form
Constructor Summary |
GYearValue()
|
GYearValue(java.lang.CharSequence value)
|
GYearValue(java.util.GregorianCalendar calendar,
boolean timezoneSpecified,
int tzoffset)
|
Methods inherited from class net.sf.saxon.value.DateValue |
add, compareTo, compareTo, convertToJava, equals, getComponent, getUTCDate, hashCode, removeTimezone, setLexicalValue, setTimezone, subtract |
Methods inherited from class net.sf.saxon.value.AtomicValue |
checkPermittedContents, convert, convert, display, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getImplementationMethod, getLength, getPrimitiveValue, getStringValueCS, getTypedValue, hasBuiltInType, iterate, process, schemaEquals, toString |
Methods inherited from class net.sf.saxon.value.Value |
asItem, asIterator, asValue, collapseWhitespace, convert, convertJavaObjectToXPath, getDependencies, getIterator, getParentExpression, getSpecialProperties, itemAt, iterateSubExpressions, makeQNameValue, normalizeWhitespace, optimize, promote, reduce, simplify, stringToNumber, trimWhitespace, typeCheck |
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
GYearValue
public GYearValue(java.util.GregorianCalendar calendar,
boolean timezoneSpecified,
int tzoffset)
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,
convertPrimitive
public AtomicValue convertPrimitive(BuiltInAtomicType requiredType,
boolean validate,
ConversionContext conversion)
- Convert to target data type
- Overrides:
convertPrimitive
in class DateValue
- Parameters:
requiredType
- an integer identifying the required atomic typeconversion
-
- Returns:
- an AtomicValue, a value of the required type; or an ErrorValue
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.