public class IsoDateAdapter
extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,javax.xml.datatype.XMLGregorianCalendar>
This implementation is applied in the model with the @XmlJavaTypeAdapter(IsoDateAdapter.class) annotation to all schema elements with type "ISODate".
It is implemented as wrapper to inject your own instances when calling the different write/read methods in the model.
| Constructor and Description |
|---|
IsoDateAdapter()
Default constructor for jaxb when non is set via API
|
IsoDateAdapter(javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,javax.xml.datatype.XMLGregorianCalendar> customAdapterImpl)
Creates a date adapter injecting a custom implementation
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
marshal(javax.xml.datatype.XMLGregorianCalendar cal)
Invokes the wrapped adapter implementation of the marshal method.
|
javax.xml.datatype.XMLGregorianCalendar |
unmarshal(java.lang.String value)
Invokes the wrapped adapter implementation of the unmarshal method.
|
public IsoDateAdapter()
throws javax.xml.datatype.DatatypeConfigurationException
javax.xml.datatype.DatatypeConfigurationExceptionpublic IsoDateAdapter(javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,javax.xml.datatype.XMLGregorianCalendar> customAdapterImpl)
public javax.xml.datatype.XMLGregorianCalendar unmarshal(java.lang.String value)
throws java.lang.Exception
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,javax.xml.datatype.XMLGregorianCalendar>value - the XML date time value to convertjava.lang.Exceptionpublic java.lang.String marshal(javax.xml.datatype.XMLGregorianCalendar cal)
throws java.lang.Exception
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,javax.xml.datatype.XMLGregorianCalendar>cal - the model calendar to marshaljava.lang.Exception