|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.CalendarValue
net.sf.saxon.value.GDateValue
public abstract class GDateValue
Abstract superclass for the primitive types containing date components: xs:date, xs:gYear, xs:gYearMonth, xs:gMonth, xs:gMonthDay, xs:gDay
Field Summary |
---|
Fields inherited from class net.sf.saxon.value.CalendarValue |
---|
NO_TIMEZONE |
Fields inherited from class net.sf.saxon.value.Value |
---|
EMPTY_CLASS_ARRAY, INDETERMINATE_ORDERING |
Fields inherited from interface net.sf.saxon.om.ValueRepresentation |
---|
EMPTY_VALUE_ARRAY |
Constructor Summary | |
---|---|
GDateValue()
|
Method Summary | |
---|---|
int |
compareTo(CalendarValue other,
Configuration config)
Compare this value to another value of the same type, using the supplied context object to get the implicit timezone if required. |
int |
compareTo(Object other)
Compare the value to another date value. |
Object |
convertToJava(Class target,
XPathContext context)
Convert to Java object (for passing to external functions) |
boolean |
equals(Object other)
Compare two (sequence) values for equality. |
GregorianCalendar |
getCalendar()
Get a Java Calendar object that represents this date/time value. |
ComparisonKey |
getComparisonKey(Configuration config)
Get a comparison key for this value. |
byte |
getDay()
Get the day component of the date (in local form) |
byte |
getMonth()
Get the month component of the date (in local form) |
int |
getYear()
Get the year component of the date (in local form) |
int |
hashCode()
Return a hash code to support the equals() function |
static boolean |
isLeapYear(int year)
Test whether a year is a leap year |
static boolean |
isValidDate(int year,
int month,
int day)
|
void |
setLexicalValue(CharSequence s)
Initialize the DateValue using a character string in the format yyyy-mm-dd and an optional time zone. |
DateTimeValue |
toDateTime()
Convert to DateTime |
Methods inherited from class net.sf.saxon.value.CalendarValue |
---|
add, adjustTimezone, adjustTimezone, appendTimezone, appendTimezone, getStringValue, getTimezoneInMinutes, hasTimezone, removeTimezone, setTimezoneInMinutes, subtract |
Methods inherited from class net.sf.saxon.value.AtomicValue |
---|
checkPermittedContents, convert, convert, convertPrimitive, copy, effectiveBooleanValue, getCardinality, getComponent, getItemType, getLength, getPrimitiveType, getStringValueCS, getTypedValue, getTypeLabel, getXPathComparable, hasBuiltInType, isMultiValued, itemAt, iterate, process, setTypeLabel, toString |
Methods inherited from class net.sf.saxon.value.Value |
---|
asItem, asItem, asIterator, asValue, convert, convertJavaObjectToXPath, fromItem, getCanonicalLexicalRepresentation, getIterator, getSchemaComparable, iterate, makeQNameValue, reduce, stringToNumber |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GDateValue()
Method Detail |
---|
public int getYear()
public byte getMonth()
public byte getDay()
public GregorianCalendar getCalendar()
CalendarValue
getCalendar
in class CalendarValue
public Object convertToJava(Class target, XPathContext context) throws XPathException
convertToJava
in class Value
XPathException
public void setLexicalValue(CharSequence s) throws XPathException
s
- the supplied string value
XPathException
public static boolean isValidDate(int year, int month, int day)
public static boolean isLeapYear(int year)
public int compareTo(Object other)
compareTo
in interface Comparable
compareTo
in class Value
other
- The other date value. Must be an object of class DateValue.
ClassCastException
- if the other value is not a DateValue (the parameter
is declared as Object to satisfy the Comparable interface)public int compareTo(CalendarValue other, Configuration config)
compareTo
in class CalendarValue
public DateTimeValue toDateTime()
toDateTime
in class CalendarValue
public ComparisonKey getComparisonKey(Configuration config)
getComparisonKey
in class CalendarValue
public boolean equals(Object other)
Value
equals
in class Value
public int hashCode()
Value
hashCode
in class Value
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |