blob: b065d36e13c990d04148a21b81b651eb7e4f56bf [file] [log] [blame]
<html><body><p><font size="+1"><strong>Package org.eclipse.wst.xml.xpath2.processor.internal.types</strong></font></p><hr><h2><font size="-1"><strong>org.eclipse.wst.xml.xpath2.processor.internal.types</strong></font><br>
Class XSTime</h2><br><hr><pre>public class <strong>XSTime</strong>
extends org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType</pre>A representation of the Time datatype<hr><table width="100%" border="1"><tr bgcolor="#CCCCFF"><td width="100%"><h2>Constructor Summary</h2></td></tr><tr><td><code><strong><a href="#con_XSTime">XSTime</a></strong>(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)</code></td></tr><tr><td><code><strong><a href="#con_XSTime">XSTime</a></strong>()</code></td></tr></table><br><table width="100%" border="1"><tr cols="2" bgcolor="#CCCCFF"><td colspan="2" width="100%"><h2>Method Summary</h2></td></tr><tr valign="top"><td width="20%" align="right"><code>public java.util.Calendar</code></td><td width="" align="left"><code><a href="#method_calendar">calendar</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves a Calendar representation of time stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.lang.Object</code></td><td width="" align="left"><code><a href="#method_clone">clone</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Creates a new copy of the time (and timezone) stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_constructor">constructor</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Creates a new ResultSequence consisting of the extractable time from the
supplied ResultSequence</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_eq">eq</a>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Equality comparison between this and the supplied XSTime representation</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_gt">gt</a>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Comparison between this and the supplied XSTime representation</td></tr><tr valign="top"><td width="20%" align="right"><code>public int</code></td><td width="" align="left"><code><a href="#method_hour">hour</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the hour stored as an integer</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_lt">lt</a>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Comparison between this and the supplied XSTime representation</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_minus">minus</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
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).</td></tr><tr valign="top"><td width="20%" align="right"><code>public int</code></td><td width="" align="left"><code><a href="#method_minute">minute</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the minute stored as an integer</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType</code></td><td width="" align="left"><code><a href="#method_parse_time">parse_time</a>(java.lang.String str)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Creates a new XSTime representing the String represented supplied time</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence</code></td><td width="" align="left"><code><a href="#method_plus">plus</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Mathematical addition between this time stored and the supplied time
duration.</td></tr><tr valign="top"><td width="20%" align="right"><code>public double</code></td><td width="" align="left"><code><a href="#method_second">second</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the seconds stored as an integer</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.lang.String</code></td><td width="" align="left"><code><a href="#method_string_type">string_type</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the datatype's full pathname</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.lang.String</code></td><td width="" align="left"><code><a href="#method_string_value">string_value</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves a String representation of the time stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public boolean</code></td><td width="" align="left"><code><a href="#method_timezoned">timezoned</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Check for whether the time stored has a timezone associated with it</td></tr><tr valign="top"><td width="20%" align="right"><code>public java.lang.String</code></td><td width="" align="left"><code><a href="#method_type_name">type_name</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the datatype's name</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration</code></td><td width="" align="left"><code><a href="#method_tz">tz</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the timezone associated with the time stored as a duration of
time</td></tr><tr valign="top"><td width="20%" align="right"><code>public double</code></td><td width="" align="left"><code><a href="#method_value">value</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves the time in milliseconds since the epoch</td></tr></table><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
Constructor Detail
</h2></td></tr></table><h2><a name="con_XSTime">XSTime</a></h2><p><code>public <strong>XSTime</strong>(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)</code></p><p>Initialises to the supplied time and timezone</p><hr><h2><a name="con_XSTime">XSTime</a></h2><p><code>public <strong>XSTime</strong>()</code></p><p>Initialises to the current time</p><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
Methods Detail
</h2></td></tr></table><h2><a name="method_calendar">calendar</a></h2><p><code>public java.util.Calendar <strong>calendar</strong>()</code></p><p>Retrieves a Calendar representation of time stored</p><h3>Returns</h3><p><code>java.util.Calendar</code> - Calendar representation of the time stored</p><hr><h2><a name="method_clone">clone</a></h2><p><code>public java.lang.Object <strong>clone</strong>()</code></p><p>Creates a new copy of the time (and timezone) stored</p><h3>Returns</h3><p><code>java.lang.Object</code> - New XSTime representing the copy of the time and timezone</p><h3>Throws:</h3><p><code>java.lang.CloneNotSupportedException</code></p><hr><h2><a name="method_constructor">constructor</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>constructor</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Creates a new ResultSequence consisting of the extractable time from the
supplied ResultSequence</p><h3>Parameters</h3><p><code>arg</code> - The ResultSequence from which to extract the time</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - New ResultSequence consisting of the supplied time</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_eq">eq</a></h2><p><code>public boolean <strong>eq</strong>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code></p><p>Equality comparison between this and the supplied XSTime representation</p><h3>Parameters</h3><p><code>arg</code> - The XSTime to compare with</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if both XSTime's represent the same time. False otherwise</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_gt">gt</a></h2><p><code>public boolean <strong>gt</strong>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code></p><p>Comparison between this and the supplied XSTime representation</p><h3>Parameters</h3><p><code>arg</code> - The XSTime to compare with</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if the supplied time represnts a point in time before that represented by the time stored. False otherwise</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_hour">hour</a></h2><p><code>public int <strong>hour</strong>()</code></p><p>Retrieves the hour stored as an integer</p><h3>Returns</h3><p><code>int</code> - The hour stored</p><hr><h2><a name="method_lt">lt</a></h2><p><code>public boolean <strong>lt</strong>(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code></p><p>Comparison between this and the supplied XSTime representation</p><h3>Parameters</h3><p><code>arg</code> - The XSTime to compare with</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if the supplied time represnts a point in time after that represented by the time stored. False otherwise</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_minus">minus</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>minus</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>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).</p><h3>Parameters</h3><p><code>arg</code> - The representation to subtract (either XSTim or XDTDayTimeDuration)</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A ResultSequence representing the result of the subtraction</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_minute">minute</a></h2><p><code>public int <strong>minute</strong>()</code></p><p>Retrieves the minute stored as an integer</p><h3>Returns</h3><p><code>int</code> - The minute stored</p><hr><h2><a name="method_parse_time">parse_time</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType <strong>parse_time</strong>(java.lang.String str)</code></p><p>Creates a new XSTime representing the String represented supplied time</p><h3>Parameters</h3><p><code>str</code> - String represented time and timezone to be stored</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType</code> - New XSTime representing the supplied time</p><hr><h2><a name="method_plus">plus</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.ResultSequence <strong>plus</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Mathematical addition between this time stored and the supplied time
duration.</p><h3>Parameters</h3><p><code>arg</code> - A XDTDayTimeDuration representation of the duration of time to add</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A XSTime representing the result of this addition.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_second">second</a></h2><p><code>public double <strong>second</strong>()</code></p><p>Retrieves the seconds stored as an integer</p><h3>Returns</h3><p><code>double</code> - The second stored</p><hr><h2><a name="method_string_type">string_type</a></h2><p><code>public java.lang.String <strong>string_type</strong>()</code></p><p>Retrieves the datatype's full pathname</p><h3>Returns</h3><p><code>java.lang.String</code> - "xs:time" which is the datatype's full pathname</p><hr><h2><a name="method_string_value">string_value</a></h2><p><code>public java.lang.String <strong>string_value</strong>()</code></p><p>Retrieves a String representation of the time stored</p><h3>Returns</h3><p><code>java.lang.String</code> - String representation of the time stored</p><hr><h2><a name="method_timezoned">timezoned</a></h2><p><code>public boolean <strong>timezoned</strong>()</code></p><p>Check for whether the time stored has a timezone associated with it</p><h3>Returns</h3><p><code>boolean</code> - True if the time has a timezone associated. False otherwise</p><hr><h2><a name="method_type_name">type_name</a></h2><p><code>public java.lang.String <strong>type_name</strong>()</code></p><p>Retrieves the datatype's name</p><h3>Returns</h3><p><code>java.lang.String</code> - "time" which is the datatype's name</p><hr><h2><a name="method_tz">tz</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration <strong>tz</strong>()</code></p><p>Retrieves the timezone associated with the time stored as a duration of
time</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration</code> - The duration of time between the time stored and the actual time after the timezone is taken into account</p><hr><h2><a name="method_value">value</a></h2><p><code>public double <strong>value</strong>()</code></p><p>Retrieves the time in milliseconds since the epoch</p><h3>Returns</h3><p><code>double</code> - time stored in milliseconds since the epoch</p><hr></body></html>