com.googlecode.fascinator.common.jaxb
Class MapAdapter

java.lang.Object
  extended by javax.xml.bind.annotation.adapters.XmlAdapter<MapEntryListType,java.util.Map<java.lang.String,java.lang.String>>
      extended by com.googlecode.fascinator.common.jaxb.MapAdapter

public class MapAdapter
extends javax.xml.bind.annotation.adapters.XmlAdapter<MapEntryListType,java.util.Map<java.lang.String,java.lang.String>>

JAXB adapter for unmarshalling the following XML structure into a map:

 <fields>
   <field name="key1">value1</elem>
   <field name="key2">value2</elem>
   <field name="key3">value3</elem>
 </fields>
 

Author:
Oliver Lucido

Constructor Summary
MapAdapter()
           
 
Method Summary
 MapEntryListType marshal(java.util.Map<java.lang.String,java.lang.String> map)
           
 java.util.Map<java.lang.String,java.lang.String> unmarshal(MapEntryListType entryList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapAdapter

public MapAdapter()
Method Detail

marshal

public MapEntryListType marshal(java.util.Map<java.lang.String,java.lang.String> map)
                         throws java.lang.Exception
Specified by:
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<MapEntryListType,java.util.Map<java.lang.String,java.lang.String>>
Throws:
java.lang.Exception

unmarshal

public java.util.Map<java.lang.String,java.lang.String> unmarshal(MapEntryListType entryList)
                                                           throws java.lang.Exception
Specified by:
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<MapEntryListType,java.util.Map<java.lang.String,java.lang.String>>
Throws:
java.lang.Exception


Copyright © 2009-2013. All Rights Reserved.