|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deckfour.xes.util.XsDateTimeConversion
public class XsDateTimeConversion
This class serves as a provider for static xs:dateTime-related manipulation and parsing methods. Note that this class should not be static, as access to SimpleDateFormat needs to be synchronized and hence multiple threads would be holding onto each other.
Field Summary | |
---|---|
protected java.util.GregorianCalendar |
cal
Calendar instance used for calculating dates for timestamps |
protected java.text.SimpleDateFormat |
dfMillisTZone
Date/Time parsing instance with milliseconds and time zone information. |
protected static java.lang.String |
XSDATETIME_FORMAT_STRING_MILLIS_TZONE
Date/Time parsing format including milliseconds and time zone information. |
protected java.util.regex.Pattern |
xsDtPattern
Pattern used for matching the XsDateTime formatted timestamp strings. |
Constructor Summary | |
---|---|
XsDateTimeConversion()
|
Method Summary | |
---|---|
java.lang.String |
format(java.util.Date date)
Formats a given date to the xs:dateTime format of XML. |
java.util.Date |
parseXsDateTime(java.lang.String xsDateTime)
Expects an XML xs:dateTime lexical format string, as in 2005-10-24T11:57:31.000+01:00 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String XSDATETIME_FORMAT_STRING_MILLIS_TZONE
protected final java.text.SimpleDateFormat dfMillisTZone
protected final java.util.regex.Pattern xsDtPattern
protected java.util.GregorianCalendar cal
Constructor Detail |
---|
public XsDateTimeConversion()
Method Detail |
---|
public java.util.Date parseXsDateTime(java.lang.String xsDateTime)
2005-10-24T11:57:31.000+01:00
. Some bad MXML files miss
timezone or milliseconds information, thus a certain amount of tolerance
is applied towards malformed timestamp string representations. If
unparseable, this method will return null
.
xsDateTime
- Timestamp string in the XML xs:dateTime format.
public java.lang.String format(java.util.Date date)
date
- Date to be formatted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |