com.googlecode.fascinator.common.jaxb
Class MapAdapter

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

public class MapAdapter
extends XmlAdapter<MapEntryListType,Map<String,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(Map<String,String> map)
           
 Map<String,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(Map<String,String> map)
                         throws Exception
Specified by:
marshal in class XmlAdapter<MapEntryListType,Map<String,String>>
Throws:
Exception

unmarshal

public Map<String,String> unmarshal(MapEntryListType entryList)
                             throws Exception
Specified by:
unmarshal in class XmlAdapter<MapEntryListType,Map<String,String>>
Throws:
Exception


Copyright © 2009-2012. All Rights Reserved.