java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<XcnName,Name>
org.openehealth.ipf.commons.ihe.xds.core.metadata.jaxbadapters.NameAdapter

public class NameAdapter extends javax.xml.bind.annotation.adapters.XmlAdapter<XcnName,Name>
A JAXB XmlAdapter that allows the Name class to be serialized.

The original implementation of the Name class was concrete and had no subclasses. The XML serialization of a Name used to look like this:

 

 <name>
    <given>John</given>
    <family>Doe</family>
 </name>
 
 

When the Name class was made abstract, the XML above could no longer be serialized. This adapter allows the XML shown above to be serialized without change.

Author:
Michael Ottati
  • Constructor Details

    • NameAdapter

      public NameAdapter()
  • Method Details

    • unmarshal

      public Name unmarshal(XcnName v)
      Specified by:
      unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<XcnName,Name>
    • marshal

      public XcnName marshal(Name v)
      Specified by:
      marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<XcnName,Name>