|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.base.text.format.DatatypeFormat
public class DatatypeFormat
DatatypeFormat
String values in ISO 8601 basic or extended
format to XML datatype instances and leaves non-String
objects as they are.String object as argument for
the marshal() method!
Duration and XMLGregorianCalendar
instances to their basic or extended ISO 8601 compliant
String representation and leaves instances of all other
classes as they are.basicFormat is
true.
| Method Summary | |
|---|---|
Object |
marshal(Object source)
Marshals an object |
static DatatypeFormat |
newInstance(boolean basicFormat)
Factory method |
XMLGregorianCalendar |
parseDate(String date)
Parse a date String |
XMLGregorianCalendar |
parseDateTime(String dateTime)
Parse a date-time String |
Duration |
parseDuration(String duration)
Parse a duration String |
Object |
unmarshal(Object source)
Unmarshals an object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DatatypeFormat newInstance(boolean basicFormat)
throws ServiceException
basicFormat - use ISO 8601 basic format if true;
ISO 8601 extended format otherwise.
ServiceException - if the DatatypeFactory
can't be acquired
public Object unmarshal(Object source)
throws ServiceException
Marshaller
unmarshal in interface Marshallersource - The marshalled object
ServiceException - MARSHAL_FAILURE: Object can't be unmarshalled
public Object marshal(Object source)
throws ServiceException
Marshaller
marshal in interface Marshallersource - The object to be marshalled
ServiceException - MARSHAL_FAILURE: Object can't be marshalledpublic Duration parseDuration(String duration)
String
duration - a duration as String
Duration instancepublic XMLGregorianCalendar parseDate(String date)
String
date - a date in the format yyyymmdd
XMLGregorianCalendar instancepublic XMLGregorianCalendar parseDateTime(String dateTime)
String
dateTime - a date in the format yyyymmddThhmmss.mmmZ
XMLGregorianCalendar instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||