blob: f5433a2a4662f178b639b850ffe0b65e83fa4a3c [file] [log] [blame]
dacarver647c7352009-08-27 01:37:31 +00001<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>
2 Class XSDateTime</h2><br><hr><pre>public class <strong>XSDateTime</strong>
3extends org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType</pre>A representation of a date and time (and optional timezone)<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_XSDateTime">XSDateTime</a></strong>(java.util.Calendar cal
4 ,
5 org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)</code></td></tr><tr><td><code><strong><a href="#con_XSDateTime">XSDateTime</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>
6 &nbsp;&nbsp;&nbsp;&nbsp;
7 Retrieves the Calendar representation of the date 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>
8 &nbsp;&nbsp;&nbsp;&nbsp;
jmoller3a919172011-05-18 23:01:47 +00009 Creates a copy of this date and time representation</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.api.ResultSequence</code></td><td width="" align="left"><code><a href="#method_constructor">constructor</a>(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)</code><br>
dacarver647c7352009-08-27 01:37:31 +000010 &nbsp;&nbsp;&nbsp;&nbsp;
11 Creates a new result sequence consisting of the retrievable date and time
12 value in the supplied result sequence</td></tr><tr valign="top"><td width="20%" align="right"><code>public int</code></td><td width="" align="left"><code><a href="#method_day">day</a>()</code><br>
13 &nbsp;&nbsp;&nbsp;&nbsp;
dacarver67d3b162010-04-13 12:50:19 +000014 Retrieve the day from the date stored</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
15 ,
jmoller3a919172011-05-18 23:01:47 +000016 org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)</code><br>
dacarver647c7352009-08-27 01:37:31 +000017 &nbsp;&nbsp;&nbsp;&nbsp;
18 Equality comparison on this and the supplied dates and times (taking
jmoller3a919172011-05-18 23:01:47 +000019 timezones into account)</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_getStringValue">getStringValue</a>()</code><br>
20 &nbsp;&nbsp;&nbsp;&nbsp;
21 Retrieves a String representation of the date and time stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition</code></td><td width="" align="left"><code><a href="#method_getTypeDefinition">getTypeDefinition</a>()</code><br>
22 &nbsp;&nbsp;&nbsp;&nbsp;
23 </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
dacarver67d3b162010-04-13 12:50:19 +000024 ,
jmoller3a919172011-05-18 23:01:47 +000025 org.eclipse.wst.xml.xpath2.api.DynamicContext context)</code><br>
dacarver647c7352009-08-27 01:37:31 +000026 &nbsp;&nbsp;&nbsp;&nbsp;
27 Comparison on this and the supplied dates and times (taking timezones
28 into account)</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>
29 &nbsp;&nbsp;&nbsp;&nbsp;
30 Retrieve the hour from the date stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public static boolean</code></td><td width="" align="left"><code><a href="#method_is_digit">is_digit</a>(char x)</code><br>
31 &nbsp;&nbsp;&nbsp;&nbsp;
dacarver67d3b162010-04-13 12:50:19 +000032 Check to see if a character is numeric</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
33 ,
jmoller3a919172011-05-18 23:01:47 +000034 org.eclipse.wst.xml.xpath2.api.DynamicContext context)</code><br>
dacarver647c7352009-08-27 01:37:31 +000035 &nbsp;&nbsp;&nbsp;&nbsp;
36 Comparison on this and the supplied dates and times (taking timezones
jmoller3a919172011-05-18 23:01:47 +000037 into account)</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.api.ResultSequence</code></td><td width="" align="left"><code><a href="#method_minus">minus</a>(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)</code><br>
dacarver647c7352009-08-27 01:37:31 +000038 &nbsp;&nbsp;&nbsp;&nbsp;
39 Mathematical minus operator between this XSDateTime and a supplied result
40 sequence (XSDateTime, XDTYearMonthDuration and XDTDayTimeDuration are
41 only valid ones).</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>
42 &nbsp;&nbsp;&nbsp;&nbsp;
43 Retrieve the minute from the date stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public int</code></td><td width="" align="left"><code><a href="#method_month">month</a>()</code><br>
44 &nbsp;&nbsp;&nbsp;&nbsp;
45 Retrieve the month from the date stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public static java.lang.String</code></td><td width="" align="left"><code><a href="#method_pad_int">pad_int</a>(int num
46 ,
47 int len)</code><br>
48 &nbsp;&nbsp;&nbsp;&nbsp;
49 Pads the supplied number to the supplied number of digits by adding 0's
50 in front of it</td></tr><tr valign="top"><td width="20%" align="right"><code>public static int[]</code></td><td width="" align="left"><code><a href="#method_parse_date">parse_date</a>(java.lang.String str)</code><br>
51 &nbsp;&nbsp;&nbsp;&nbsp;
52 Parses a String representation of a date and time and retrieves the year,
53 month and day from it</td></tr><tr valign="top"><td width="20%" align="right"><code>public static double[]</code></td><td width="" align="left"><code><a href="#method_parse_time">parse_time</a>(java.lang.String str)</code><br>
54 &nbsp;&nbsp;&nbsp;&nbsp;
55 Parses a String representation of a date and time and retrieves the hour,
56 minute and seconds from it</td></tr><tr valign="top"><td width="20%" align="right"><code>public static int[]</code></td><td width="" align="left"><code><a href="#method_parse_timezone">parse_timezone</a>(java.lang.String str)</code><br>
57 &nbsp;&nbsp;&nbsp;&nbsp;
58 Parses a String representation of a date and time and retrieves the
59 timezone from it</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime</code></td><td width="" align="left"><code><a href="#method_parseDateTime">parseDateTime</a>(java.lang.String str)</code><br>
60 &nbsp;&nbsp;&nbsp;&nbsp;
61 Parses a String representation of a date and time and constructs a new
jmoller3a919172011-05-18 23:01:47 +000062 XSDateTime object using that information</td></tr><tr valign="top"><td width="20%" align="right"><code>public org.eclipse.wst.xml.xpath2.api.ResultSequence</code></td><td width="" align="left"><code><a href="#method_plus">plus</a>(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)</code><br>
dacarver647c7352009-08-27 01:37:31 +000063 &nbsp;&nbsp;&nbsp;&nbsp;
64 Mathematical addition operator between this XSDateTime and a supplied
65 result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only
66 valid ones).</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>
67 &nbsp;&nbsp;&nbsp;&nbsp;
68 Retrieve the seconds from the date stored</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>
69 &nbsp;&nbsp;&nbsp;&nbsp;
jmoller3a919172011-05-18 23:01:47 +000070 Retrive the datatype full pathname</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>
dacarver647c7352009-08-27 01:37:31 +000071 &nbsp;&nbsp;&nbsp;&nbsp;
72 </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>
73 &nbsp;&nbsp;&nbsp;&nbsp;
74 Retrieves the datatype 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>
75 &nbsp;&nbsp;&nbsp;&nbsp;
76 Retrieves the timezone associated with the date stored</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>
77 &nbsp;&nbsp;&nbsp;&nbsp;
78 Currently unsupported method. Retrieves the date in milliseconds since
79 the begining of epoch</td></tr><tr valign="top"><td width="20%" align="right"><code>public int</code></td><td width="" align="left"><code><a href="#method_year">year</a>()</code><br>
80 &nbsp;&nbsp;&nbsp;&nbsp;
81 Retrieve the year from the date stored</td></tr></table><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
82 Constructor Detail
83 </h2></td></tr></table><h2><a name="con_XSDateTime">XSDateTime</a></h2><p><code>public <strong>XSDateTime</strong>(java.util.Calendar cal
84 ,
85 org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)</code></p><p>Initiates a new representation of a supplied date and time</p><hr><h2><a name="con_XSDateTime">XSDateTime</a></h2><p><code>public <strong>XSDateTime</strong>()</code></p><p>Inititates a new representation of the current date and time</p><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
86 Methods Detail
jmoller3a919172011-05-18 23:01:47 +000087 </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 the Calendar representation of the date stored</p><h3>Returns</h3><p><code>java.util.Calendar</code> - Calendar representation of the date 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 copy of this date and time representation</p><h3>Returns</h3><p><code>java.lang.Object</code> - A copy of this date and time representation</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.api.ResultSequence <strong>constructor</strong>(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)</code></p><p>Creates a new result sequence consisting of the retrievable date and time
88 value in the supplied result sequence</p><h3>Parameters</h3><p><code>arg</code> - The result sequence from which to extract the date and time value.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.api.ResultSequence</code> - A new result sequence consisting of the date and time value supplied.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_day">day</a></h2><p><code>public int <strong>day</strong>()</code></p><p>Retrieve the day from the date stored</p><h3>Returns</h3><p><code>int</code> - the day value of the date stored</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
dacarver67d3b162010-04-13 12:50:19 +000089 ,
jmoller3a919172011-05-18 23:01:47 +000090 org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)</code></p><p>Equality comparison on this and the supplied dates and times (taking
91 timezones into account)</p><h3>Parameters</h3><p><code>arg</code> - XSDateTime representation of the date to compare to</p><p><code>dynamicContext</code></p><h3>Returns</h3><p><code>boolean</code> - True if the two dates and times are represent the same exact point in time. False otherwise.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></p><hr><h2><a name="method_getStringValue">getStringValue</a></h2><p><code>public java.lang.String <strong>getStringValue</strong>()</code></p><p>Retrieves a String representation of the date and time stored</p><h3>Returns</h3><p><code>java.lang.String</code> - String representation of the date and time stored</p><hr><h2><a name="method_getTypeDefinition">getTypeDefinition</a></h2><p><code>public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition <strong>getTypeDefinition</strong>()</code></p><p></p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition</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
dacarver67d3b162010-04-13 12:50:19 +000092 ,
jmoller3a919172011-05-18 23:01:47 +000093 org.eclipse.wst.xml.xpath2.api.DynamicContext context)</code></p><p>Comparison on this and the supplied dates and times (taking timezones
dacarver67d3b162010-04-13 12:50:19 +000094 into account)</p><h3>Parameters</h3><p><code>arg</code> - XSDateTime representation of the date to compare to</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if in time, this date and time lies after the date and time supplied. 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>Retrieve the hour from the date stored</p><h3>Returns</h3><p><code>int</code> - the hour value of the date stored</p><hr><h2><a name="method_is_digit">is_digit</a></h2><p><code>public boolean <strong>is_digit</strong>(char x)</code></p><p>Check to see if a character is numeric</p><h3>Parameters</h3><p><code>x</code> - Character to be tested</p><h3>Returns</h3><p><code>boolean</code> - True if the character is numeric. False otherwise.</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
95 ,
jmoller3a919172011-05-18 23:01:47 +000096 org.eclipse.wst.xml.xpath2.api.DynamicContext context)</code></p><p>Comparison on this and the supplied dates and times (taking timezones
97 into account)</p><h3>Parameters</h3><p><code>arg</code> - XSDateTime representation of the date to compare to</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if in time, this date and time lies before the date and time supplied. 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.api.ResultSequence <strong>minus</strong>(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)</code></p><p>Mathematical minus operator between this XSDateTime and a supplied result
dacarver647c7352009-08-27 01:37:31 +000098 sequence (XSDateTime, XDTYearMonthDuration and XDTDayTimeDuration are
jmoller3a919172011-05-18 23:01:47 +000099 only valid ones).</p><h3>Parameters</h3><p><code>arg</code> - The supplied ResultSequence that is on the right of the minus operator. If this is an XSDateTime, the result will be a XDTDayTimeDuration of the duration of time between these two dates. If arg is an XDTYearMonthDuration or an XDTDayTimeDuration the result will be a XSDateTime of the result of the current date minus the duration of time supplied.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.api.ResultSequence</code> - New ResultSequence consisting of the result of the mathematical minus operation.</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>Retrieve the minute from the date stored</p><h3>Returns</h3><p><code>int</code> - the minute value of the date stored</p><hr><h2><a name="method_month">month</a></h2><p><code>public int <strong>month</strong>()</code></p><p>Retrieve the month from the date stored</p><h3>Returns</h3><p><code>int</code> - the month value of the date stored</p><hr><h2><a name="method_pad_int">pad_int</a></h2><p><code>public java.lang.String <strong>pad_int</strong>(int num
dacarver647c7352009-08-27 01:37:31 +0000100 ,
101 int len)</code></p><p>Pads the supplied number to the supplied number of digits by adding 0's
102 in front of it</p><h3>Parameters</h3><p><code>num</code> - Number that si to be padded (if neccessay)</p><p><code>len</code> - Desired length after padding</p><h3>Returns</h3><p><code>java.lang.String</code> - String representation of the padded integer</p><hr><h2><a name="method_parse_date">parse_date</a></h2><p><code>public int[] <strong>parse_date</strong>(java.lang.String str)</code></p><p>Parses a String representation of a date and time and retrieves the year,
103 month and day from it</p><h3>Parameters</h3><p><code>str</code> - The String representation of the date (and optional timezone)</p><h3>Returns</h3><p><code>int[]</code> - Integer array of size 3. Element 1 is the year, element 2 is the month and element 3 is the day</p><hr><h2><a name="method_parse_time">parse_time</a></h2><p><code>public double[] <strong>parse_time</strong>(java.lang.String str)</code></p><p>Parses a String representation of a date and time and retrieves the hour,
104 minute and seconds from it</p><h3>Parameters</h3><p><code>str</code> - The String representation of the date (and optional timezone)</p><h3>Returns</h3><p><code>double[]</code> - Integer array of size 3. Element 1 is the hour, element 2 is the minute and element 3 is the seconds</p><hr><h2><a name="method_parse_timezone">parse_timezone</a></h2><p><code>public int[] <strong>parse_timezone</strong>(java.lang.String str)</code></p><p>Parses a String representation of a date and time and retrieves the
105 timezone from it</p><h3>Parameters</h3><p><code>str</code> - The String representation of the date (and optional timezone)</p><h3>Returns</h3><p><code>int[]</code> - Integer array of size 3. Element 1 represents whether the timezone is ahead or behind GMT, element 2 is the hour displacement and element 3 is the minute displacement.</p><hr><h2><a name="method_parseDateTime">parseDateTime</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime <strong>parseDateTime</strong>(java.lang.String str)</code></p><p>Parses a String representation of a date and time and constructs a new
jmoller3a919172011-05-18 23:01:47 +0000106 XSDateTime object using that information</p><h3>Parameters</h3><p><code>str</code> - The String representation of the date (and optional timezone)</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.XSDateTime</code> - The XSDateTime representation of the date and time (and optional timezone)</p><hr><h2><a name="method_plus">plus</a></h2><p><code>public org.eclipse.wst.xml.xpath2.api.ResultSequence <strong>plus</strong>(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)</code></p><p>Mathematical addition operator between this XSDateTime and a supplied
dacarver647c7352009-08-27 01:37:31 +0000107 result sequence (XDTYearMonthDuration and XDTDayTimeDuration are only
jmoller3a919172011-05-18 23:01:47 +0000108 valid ones).</p><h3>Parameters</h3><p><code>arg</code> - 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 XSDateTime of the result of the current date minus the duration of time supplied.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.api.ResultSequence</code> - New ResultSequence consisting of the result of the mathematical minus operation.</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>Retrieve the seconds from the date stored</p><h3>Returns</h3><p><code>double</code> - the seconds value of the date 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>Retrive the datatype full pathname</p><h3>Returns</h3><p><code>java.lang.String</code> - "xs:dateTime" which is the datatype full pathname</p><hr><h2><a name="method_timezoned">timezoned</a></h2><p><code>public boolean <strong>timezoned</strong>()</code></p><p></p><h3>Returns</h3><p><code>boolean</code></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 name</p><h3>Returns</h3><p><code>java.lang.String</code> - "dateTime" which is the dataype 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 date stored</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration</code> - the timezone associated with the date stored</p><hr><h2><a name="method_value">value</a></h2><p><code>public double <strong>value</strong>()</code></p><p>Currently unsupported method. Retrieves the date in milliseconds since
dacarver647c7352009-08-27 01:37:31 +0000109 the begining of epoch</p><h3>Returns</h3><p><code>double</code> - Number of milliseconds since the begining of the epoch</p><hr><h2><a name="method_year">year</a></h2><p><code>public int <strong>year</strong>()</code></p><p>Retrieve the year from the date stored</p><h3>Returns</h3><p><code>int</code> - the year value of the date stored</p><hr></body></html>