Package org.eclipse.wst.xml.xpath2.processor.internal.types
public class XSTime extends org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarTypeA representation of the Time datatype
Constructor Summary |
XSTime(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz) |
XSTime() |
Method Summary | |
public java.util.Calendar | calendar() Retrieves a Calendar representation of time stored |
public java.lang.Object | clone() Creates a new copy of the time (and timezone) stored |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Creates a new ResultSequence consisting of the extractable time from the supplied ResultSequence |
public boolean | eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext) Equality comparison between this and the supplied XSTime representation |
public java.lang.Object | getNativeValue() |
public java.lang.String | getStringValue() Retrieves a String representation of the time 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 between this and the supplied XSTime representation |
public int | hour() Retrieves the hour stored as an integer |
public boolean | lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context) Comparison between this and the supplied XSTime representation |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical subtraction between this time stored and the supplied representation. This supplied representation must be of either type XSTime (in which case the result is the duration of time between these two times) or a XSDayTimeDuration (in which case the result is the time when this duration is subtracted from the time stored). |
public int | minute() Retrieves the minute stored as an integer |
public static org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType | parse_time(java.lang.String str) Creates a new XSTime representing the String represented supplied time |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical addition between this time stored and the supplied time duration. |
public double | second() Retrieves the seconds stored as an integer |
public java.lang.String | string_type() Retrieves the datatype's full pathname |
public boolean | timezoned() Check for whether the time stored has a timezone associated with it |
public java.lang.String | type_name() Retrieves the datatype's name |
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration | tz() Retrieves the timezone associated with the time stored as a duration of time |
public double | value() Retrieves the time in milliseconds since the epoch |
Constructor Detail |
public XSTime(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)
Initialises to the supplied time and timezone
public XSTime()
Initialises to the current time
Methods Detail |
public java.util.Calendar calendar()
Retrieves a Calendar representation of time stored
java.util.Calendar
- Calendar representation of the time stored
public java.lang.Object clone()
Creates a new copy of the time (and timezone) stored
java.lang.Object
- New XSTime representing the copy of the time and timezone
java.lang.CloneNotSupportedException
public org.eclipse.wst.xml.xpath2.api.ResultSequence constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Creates a new ResultSequence consisting of the extractable time from the supplied ResultSequence
arg
- The ResultSequence from which to extract the time
org.eclipse.wst.xml.xpath2.api.ResultSequence
- New ResultSequence consisting of the supplied time
org.eclipse.wst.xml.xpath2.processor.DynamicError
public boolean eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)
Equality comparison between this and the supplied XSTime representation
arg
- The XSTime to compare with
dynamicContext
boolean
- True if both XSTime's represent the same time. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.lang.Object getNativeValue()
java.lang.Object
public java.lang.String getStringValue()
Retrieves a String representation of the time stored
java.lang.String
- String representation of the time 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 between this and the supplied XSTime representation
arg
- The XSTime to compare with
context
boolean
- True if the supplied time represnts a point in time before that represented by the time stored. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int hour()
Retrieves the hour stored as an integer
int
- The hour stored
public boolean lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison between this and the supplied XSTime representation
arg
- The XSTime to compare with
context
boolean
- True if the supplied time represnts a point in time after that represented by the time stored. 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 subtraction between this time stored and the supplied representation. This supplied representation must be of either type XSTime (in which case the result is the duration of time between these two times) or a XSDayTimeDuration (in which case the result is the time when this duration is subtracted from the time stored).
arg
- The representation to subtract (either XSTim or XDTDayTimeDuration)
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A ResultSequence representing the result of the subtraction
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int minute()
Retrieves the minute stored as an integer
int
- The minute stored
public org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType parse_time(java.lang.String str)
Creates a new XSTime representing the String represented supplied time
str
- String represented time and timezone to be stored
org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType
- New XSTime representing the supplied time
public org.eclipse.wst.xml.xpath2.api.ResultSequence plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical addition between this time stored and the supplied time duration.
arg
- A XDTDayTimeDuration representation of the duration of time to add
org.eclipse.wst.xml.xpath2.api.ResultSequence
- A XSTime representing the result of this addition.
org.eclipse.wst.xml.xpath2.processor.DynamicError
public double second()
Retrieves the seconds stored as an integer
double
- The second stored
public java.lang.String string_type()
Retrieves the datatype's full pathname
java.lang.String
- "xs:time" which is the datatype's full pathname
public boolean timezoned()
Check for whether the time stored has a timezone associated with it
boolean
- True if the time has a timezone associated. False otherwise
public java.lang.String type_name()
Retrieves the datatype's name
java.lang.String
- "time" which is the datatype's name
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz()
Retrieves the timezone associated with the time stored as a duration of time
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration
- The duration of time between the time stored and the actual time after the timezone is taken into account
public double value()
Retrieves the time in milliseconds since the epoch
double
- time stored in milliseconds since the epoch