|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecore.xml.type.internal.XMLCalendar
Representation for the W3C XML Schema 1.0 dateTime, time, date, gYearMonth, gYear, gMonthDay, gDay, gMonth datatypes. NOTE: this class is for internal use only. Later this class will be replaced by JAXP 1.3 javax.xml.datatype.XMLGregorianCalendar class. This class is based on Apache Xerces2 2.6.2 parser implementation of date/time validation.
Field Summary | |
protected static int |
CY
|
protected static int |
D
|
static short |
DATE
|
static short |
DATETIME
|
protected static int |
DAY
|
protected static DateFormat[] |
EDATE_FORMATS
|
static int |
EQUALS
|
static short |
GDAY
|
static short |
GMONTH
|
static short |
GMONTHDAY
|
static int |
GREATER_THAN
|
static short |
GYEAR
|
static short |
GYEARMONTH
|
protected static int |
h
|
protected static int |
hh
|
static int |
INDETERMINATE
|
static int |
LESS_THAN
|
protected static int |
m
|
protected static int |
M
|
protected static int |
mm
|
protected static int |
MONTH
|
protected static int |
ms
|
protected static int |
msp
|
protected static int |
s
|
static short |
TIME
|
protected static int |
TOTAL_SIZE
|
protected static int |
utc
|
protected static int |
YEAR
|
Constructor Summary | |
XMLCalendar(Date date,
short dataType)
|
|
XMLCalendar(String value,
short datatype)
|
Method Summary | |
static int |
compare(XMLCalendar value1,
XMLCalendar value2)
|
protected static short |
compareOrder(int[] date1,
int[] date2)
Given normalized values, determines order-relation between give date/time objects. |
boolean |
equals(Object obj)
|
protected static int |
fQuotient(int a,
int b)
|
protected static int |
fQuotient(int temp,
int low,
int high)
|
Date |
getDate()
|
protected static int |
getDate(String buffer,
int start,
int end,
int[] date)
Parses date CCYY-MM-DD |
protected int[] |
getDateValue()
|
protected static void |
getTime(String buffer,
int start,
int end,
int[] data,
int[] timeZone)
Parses time hh:mm:ss.sss and time zone if any |
protected static void |
getTimeZone(String buffer,
int[] data,
int sign,
int end,
int[] timeZone)
Parses time zone: 'Z' or {+,-} followed by hh:mm |
protected static int |
getYearMonth(String buffer,
int start,
int end,
int[] date)
Parses date CCYY-MM |
int |
hashCode()
|
protected static int |
indexOf(String buffer,
int start,
int end,
char ch)
Computes index of given char within StringBuffer |
protected static int |
maxDayInMonthFor(int year,
int month)
Given {year,month} computes maximum number of days for given month |
protected static int |
mod(int a,
int b,
int quotient)
|
protected static int |
modulo(int temp,
int low,
int high)
|
protected static void |
normalize(int[] date,
int[] timeZone)
If timezone present - normalize dateTime [E Adding durations to dateTimes] |
protected static int |
parseInt(String buffer,
int start,
int end)
Given start and end position, parses string value |
protected static int |
parseIntYear(String buffer,
int end)
|
protected static void |
parseTimeZone(String buffer,
int start,
int end,
int[] date,
int[] timeZone)
Shared code from Date and YearMonth datatypes. |
protected static void |
resetDateObj(int[] data)
Resets object representation of date/time |
String |
toString()
|
protected static void |
validateDateTime(int[] data,
int[] timeZone)
Validates given date/time object accoring to W3C PR Schema [D.1 ISO 8601 Conventions] |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final short DATETIME
public static final short TIME
public static final short DATE
public static final short GYEARMONTH
public static final short GYEAR
public static final short GMONTHDAY
public static final short GDAY
public static final short GMONTH
public static final int EQUALS
public static final int LESS_THAN
public static final int GREATER_THAN
public static final int INDETERMINATE
protected static final int CY
protected static final int M
protected static final int D
protected static final int h
protected static final int m
protected static final int s
protected static final int ms
protected static final int msp
protected static final int utc
protected static final int hh
protected static final int mm
protected static final int TOTAL_SIZE
protected static final int YEAR
protected static final int MONTH
protected static final int DAY
protected static final DateFormat[] EDATE_FORMATS
Constructor Detail |
public XMLCalendar(String value, short datatype)
public XMLCalendar(Date date, short dataType)
Method Detail |
public boolean equals(Object obj)
public int hashCode()
public String toString()
public static int compare(XMLCalendar value1, XMLCalendar value2)
protected int[] getDateValue()
public Date getDate()
protected static short compareOrder(int[] date1, int[] date2)
date1
- date/time objectdate2
- date/time object
protected static void getTime(String buffer, int start, int end, int[] data, int[] timeZone)
protected static int getDate(String buffer, int start, int end, int[] date)
start
- end
- date
- protected static int getYearMonth(String buffer, int start, int end, int[] date)
start
- end
- date
- protected static void parseTimeZone(String buffer, int start, int end, int[] date, int[] timeZone)
end
- date
- protected static void getTimeZone(String buffer, int[] data, int sign, int end, int[] timeZone)
data
- sign
- protected static int indexOf(String buffer, int start, int end, char ch)
start
- end
- ch
- character to look for in StringBuffer
protected static void validateDateTime(int[] data, int[] timeZone)
data
- protected static int parseInt(String buffer, int start, int end) throws NumberFormatException
buffer
- string to parsestart
- Start positionend
- end position
NumberFormatException
protected static int parseIntYear(String buffer, int end)
protected static void normalize(int[] date, int[] timeZone)
date
- CCYY-MM-DDThh:mm:ss+03
protected static void resetDateObj(int[] data)
data
- date/time objectprotected static int maxDayInMonthFor(int year, int month)
year
- month
-
protected static int mod(int a, int b, int quotient)
protected static int fQuotient(int a, int b)
protected static int modulo(int temp, int low, int high)
protected static int fQuotient(int temp, int low, int high)
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |