Package net.sf.saxon.value
Class GMonthDayValue
java.lang.Object
net.sf.saxon.value.Value<AtomicValue>
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.CalendarValue
net.sf.saxon.value.GDateValue
net.sf.saxon.value.GMonthDayValue
- All Implemented Interfaces:
PullEvent
,GroundedValue<AtomicValue>
,Item<AtomicValue>
,ValueRepresentation<AtomicValue>
,ConversionResult
Implementation of the xs:gYear data type
-
Field Summary
Fields inherited from class net.sf.saxon.value.GDateValue
day, daysPerMonth, month, monthData, xsd10rules, year
Fields inherited from class net.sf.saxon.value.CalendarValue
NO_TIMEZONE
Fields inherited from class net.sf.saxon.value.AtomicValue
typeLabel
Fields inherited from class net.sf.saxon.value.Value
INDETERMINATE_ORDERING
Fields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionGMonthDayValue
(byte month, byte day, int tz) GMonthDayValue
(byte month, byte day, int tz, AtomicType type) -
Method Summary
Modifier and TypeMethodDescriptionadd
(DurationValue duration) Add a duration to this date/time valueadjustTimezone
(int tz) Return a new date, time, or dateTime with the same normalized value, but in a different timezonecopyAsSubType
(AtomicType typeLabel) Make a copy of this date, time, or dateTime valueConvert the value to a string, using the serialization rules for the primitive type.Determine the primitive type of the value.static ConversionResult
makeGMonthDayValue
(CharSequence value, ConversionRules rules) Methods inherited from class net.sf.saxon.value.GDateValue
compareTo, equals, getCalendar, getComparisonKey, getComponent, getDay, getMonth, getSchemaComparable, getYear, hashCode, isLeapYear, isValidDate, setLexicalValue, toDateTime
Methods inherited from class net.sf.saxon.value.CalendarValue
adjustTimezone, appendString, appendTimezone, appendTimezone, appendTwoDigits, getTimezoneInMinutes, getXPathComparable, hasTimezone, isIdentical, makeCalendarValue, removeTimezone, setTimezoneInMinutes, subtract
Methods inherited from class net.sf.saxon.value.AtomicValue
asAtomic, checkPermittedContents, effectiveBooleanValue, getCardinality, getItemType, getLength, getStringValue, getStringValueCS, getTypedValue, getTypeLabel, isNaN, itemAt, iterate, process, setTypeLabel, subsequence, toString
Methods inherited from class net.sf.saxon.value.Value
asItem, asItem, asIterator, asValue, convertToJava, fromItem, getCanonicalLexicalRepresentation, getIterator, getSequenceLength, reduce
-
Constructor Details
-
GMonthDayValue
public GMonthDayValue(byte month, byte day, int tz) -
GMonthDayValue
-
-
Method Details
-
makeGMonthDayValue
-
copyAsSubType
Make a copy of this date, time, or dateTime value- Specified by:
copyAsSubType
in classAtomicValue
- Parameters:
typeLabel
-- Returns:
- the copied value
-
getPrimitiveType
Determine the primitive type of the value. This delivers the same answer as getItemType().getPrimitiveItemType(). The primitive types are the 19 primitive types of XML Schema, plus xs:integer, xs:dayTimeDuration and xs:yearMonthDuration, and xs:untypedAtomic. For external objects, the result is AnyAtomicType.- Specified by:
getPrimitiveType
in classAtomicValue
- Returns:
- the primitive type
-
getPrimitiveStringValue
Description copied from class:AtomicValue
Convert the value to a string, using the serialization rules for the primitive type. This is the result of conversion to a string except that postprocessing defined by the saxon:preprocess facet is not (yet) applied.- Specified by:
getPrimitiveStringValue
in classAtomicValue
- Returns:
- the value converted to a string according to the rules for the primitive type
-
add
Add a duration to this date/time value- Specified by:
add
in classCalendarValue
- Parameters:
duration
- the duration to be added (which might be negative)- Returns:
- a new date/time value representing the result of adding the duration. The original object is not modified.
- Throws:
XPathException
-
adjustTimezone
Return a new date, time, or dateTime with the same normalized value, but in a different timezone- Specified by:
adjustTimezone
in classCalendarValue
- Parameters:
tz
- the new timezone, in minutes- Returns:
- the date/time in the new timezone
-