blob: eae78bfb286dd2b5c6f914af75faa6f74a9cd7f3 [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 XSDate</h2><br><hr><pre>public class <strong>XSDate</strong>
extends org.eclipse.wst.xml.xpath2.processor.internal.types.CalendarType</pre>Representation of a date of the form year-month-day 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_XSDate">XSDate</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_XSDate">XSDate</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 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>
&nbsp;&nbsp;&nbsp;&nbsp;
Creates a copy of this date 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_constructor">constructor</a>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Creates a new result sequence consisting of the retrievable date 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>
&nbsp;&nbsp;&nbsp;&nbsp;
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
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Equality comparison on this and the supplied dates (taking timezones into
account)</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 on this and the supplied dates (taking timezones into account)</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 on this and the supplied dates (taking timezones into account)</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 minus operator between this XSDate and a supplied result
sequence (XSDate, XSYearMonthDuration and XSDayTimeDuration are 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_month">month</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieve the month from the date stored</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.eclipse.wst.xml.xpath2.processor.internal.types.XSDate</code></td><td width="" align="left"><code><a href="#method_parse_date">parse_date</a>(java.lang.String str)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
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.</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 operator between this XSDate and a supplied result
sequence (XDTYearMonthDuration and XDTDayTimeDuration are only valid
ones).</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;
Retrive the datatype 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 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_timezoned">timezoned</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Retrieves whether this date has an optional 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 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 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>
&nbsp;&nbsp;&nbsp;&nbsp;
Currently unsupported method. Retrieves the date in milliseconds since
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>
&nbsp;&nbsp;&nbsp;&nbsp;
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>
Constructor Detail
</h2></td></tr></table><h2><a name="con_XSDate">XSDate</a></h2><p><code>public <strong>XSDate</strong>(java.util.Calendar cal
,
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration tz)</code></p><p>Initializes a new representation of a supplied date</p><hr><h2><a name="con_XSDate">XSDate</a></h2><p><code>public <strong>XSDate</strong>()</code></p><p>Initializes a new representation of the current date</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 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 representation</p><h3>Returns</h3><p><code>java.lang.Object</code> - A copy of this date 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.processor.ResultSequence <strong>constructor</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Creates a new result sequence consisting of the retrievable date value in
the supplied result sequence</p><h3>Parameters</h3><p><code>arg</code> - The result sequence from which to extract the date value.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.ResultSequence</code> - A new result sequence consisting of the date 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
,
org.eclipse.wst.xml.xpath2.processor.DynamicContext context)</code></p><p>Equality comparison on this and the supplied dates (taking timezones into
account)</p><h3>Parameters</h3><p><code>arg</code> - XSDate representation of the date to compare to</p><p><code>context</code></p><h3>Returns</h3><p><code>boolean</code> - True if the two dates 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_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 on this and the supplied dates (taking timezones into account)</p><h3>Parameters</h3><p><code>arg</code> - XSDate 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 lies after the date supplied. False otherwise.</p><h3>Throws:</h3><p><code>org.eclipse.wst.xml.xpath2.processor.DynamicError</code></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 on this and the supplied dates (taking timezones into account)</p><h3>Parameters</h3><p><code>arg</code> - XSDate 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 lies before the date 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.processor.ResultSequence <strong>minus</strong>(org.eclipse.wst.xml.xpath2.processor.ResultSequence arg)</code></p><p>Mathematical minus operator between this XSDate and a supplied result
sequence (XSDate, XSYearMonthDuration and XSDayTimeDuration are 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 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.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.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_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_parse_date">parse_date</a></h2><p><code>public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDate <strong>parse_date</strong>(java.lang.String str)</code></p><p>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.</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.XSDate</code> - The XSDate representation of the supplied date</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 operator between this XSDate and a supplied result
sequence (XDTYearMonthDuration and XDTDayTimeDuration are only 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 XSDate of the result of the current date minus the duration of time supplied.</p><h3>Returns</h3><p><code>org.eclipse.wst.xml.xpath2.processor.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_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:date" which is the datatype 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 date stored</p><h3>Returns</h3><p><code>java.lang.String</code> - String representation of the date stored</p><hr><h2><a name="method_timezoned">timezoned</a></h2><p><code>public boolean <strong>timezoned</strong>()</code></p><p>Retrieves whether this date has an optional timezone associated with it</p><h3>Returns</h3><p><code>boolean</code> - True if there is a timezone associated with this date. 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 name</p><h3>Returns</h3><p><code>java.lang.String</code> - "date" 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
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>