Package org.eclipse.wst.xml.xpath2.processor.internal.types
public class XSDate extends org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarTypeRepresentation of a date of the form year-month-day and optional timezone
Constructor Summary |
XSDate(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz) |
XSDate() |
Method Summary | |
public java.util.Calendar | calendar()Retrieves the Calendar representation of the date stored |
public java.lang.Object | clone()Creates a copy of this date representation |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)Creates a new result sequence consisting of the retrievable date value in the supplied result sequence |
public int | day()Retrieve the day from the date stored |
public boolean | eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)Equality comparison on this and the supplied dates (taking timezones into account) |
public java.lang.String | getStringValue()Retrieves a String representation of the date stored |
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition | getTypeDefinition() |
public boolean | gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)Comparison on this and the supplied dates (taking timezones into account) |
public boolean | lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)Comparison on this and the supplied dates (taking timezones into account) |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)Mathematical minus operator between this XSDate and a supplied result sequence (XSDate, XSYearMonthDuration and XSDayTimeDuration are only valid ones). |
public int | month()Retrieve the month from the date stored |
public static org.eclipse.wst.xml.xpath2.processor.internal.types.XSDate | parse_date(java.lang.String str)Parses a String representation of a date (of the form year-month-day or year-month-day+timezone) and constructs a new XSDate representation of it. |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)Mathematical addition operator between this XSDate and a supplied result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only valid ones). |
public java.lang.String | string_type()Retrive the datatype full pathname |
public boolean | timezoned()Retrieves whether this date has an optional timezone associated with it |
public java.lang.String | type_name()Retrieves the datatype name |
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration | tz()Retrieves the timezone associated with the date stored |
public double | value()Currently unsupported method. Retrieves the date in milliseconds since the begining of epoch |
public int | year()Retrieve the year from the date stored |
Constructor Detail |
public XSDate(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)
Initializes a new representation of a supplied date
public XSDate()
Initializes a new representation of the current date
Methods Detail |
public java.util.Calendar calendar()
Retrieves the Calendar representation of the date stored
java.util.Calendar - Calendar representation of the date stored
public java.lang.Object clone()
Creates a copy of this date representation
java.lang.Object - A copy of this date representation
java.lang.CloneNotSupportedException
public org.eclipse.wst.xml.xpath2.api.ResultSequence constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Creates a new result sequence consisting of the retrievable date value in the supplied result sequence
arg - The result sequence from which to extract the date value.
org.eclipse.wst.xml.xpath2.api.ResultSequence - A new result sequence consisting of the date value supplied.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int day()
Retrieve the day from the date stored
int - the day value of the date stored
public boolean eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)
Equality comparison on this and the supplied dates (taking timezones into account)
arg - XSDate representation of the date to compare to
dynamicContext
boolean - True if the two dates are represent the same exact point in time. False otherwise.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.lang.String getStringValue()
Retrieves a String representation of the date stored
java.lang.String - String representation of the date stored
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getTypeDefinition()
org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition
public boolean gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison on this and the supplied dates (taking timezones into account)
arg - XSDate representation of the date to compare to
context
boolean - True if in time, this date lies after the date supplied. False otherwise.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public boolean lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison on this and the supplied dates (taking timezones into account)
arg - XSDate representation of the date to compare to
context
boolean - True if in time, this date lies before the date supplied. False otherwise.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical minus operator between this XSDate and a supplied result sequence (XSDate, XSYearMonthDuration and XSDayTimeDuration are only valid ones).
arg - The supplied ResultSequence that is on the right of the minus operator. If this is an XSDate, the result will be a XSDayTimeDuration of the duration of time between these two dates. If arg is an XSYearMonthDuration or an XSDayTimeDuration the result will be a XSDate of the result of the current date minus the duration of time supplied.
org.eclipse.wst.xml.xpath2.api.ResultSequence - New ResultSequence consisting of the result of the mathematical minus operation.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int month()
Retrieve the month from the date stored
int - the month value of the date stored
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDate parse_date(java.lang.String str)
Parses a String representation of a date (of the form year-month-day or year-month-day+timezone) and constructs a new XSDate representation of it.
str - The String representation of the date (and optional timezone)
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDate - The XSDate representation of the supplied date
public org.eclipse.wst.xml.xpath2.api.ResultSequence plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical addition operator between this XSDate and a supplied result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only valid ones).
arg - The supplied ResultSequence that is on the right of the minus operator. If arg is an XDTYearMonthDuration or an XDTDayTimeDuration the result will be a XSDate of the result of the current date minus the duration of time supplied.
org.eclipse.wst.xml.xpath2.api.ResultSequence - New ResultSequence consisting of the result of the mathematical minus operation.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.lang.String string_type()
Retrive the datatype full pathname
java.lang.String - "xs:date" which is the datatype full pathname
public boolean timezoned()
Retrieves whether this date has an optional timezone associated with it
boolean - True if there is a timezone associated with this date. False otherwise.
public java.lang.String type_name()
Retrieves the datatype name
java.lang.String - "date" which is the dataype name
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz()
Retrieves the timezone associated with the date stored
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration - the timezone associated with the date stored
public double value()
Currently unsupported method. Retrieves the date in milliseconds since the begining of epoch
double - Number of milliseconds since the begining of the epoch
public int year()
Retrieve the year from the date stored
int - the year value of the date stored