org.kuali.rice.core.util.jaxb
Class StringTrimmingAdapter

java.lang.Object
  extended by javax.xml.bind.annotation.adapters.XmlAdapter<String,String>
      extended by org.kuali.rice.core.util.jaxb.StringTrimmingAdapter

public class StringTrimmingAdapter
extends XmlAdapter<String,String>

An XML adapter that simply performs a null-safe trim on the value to be marshalled or unmarshalled.

Only use this adapter when it is necessary for the remaining whitespace-related characters to remain as-is.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
StringTrimmingAdapter()
           
 
Method Summary
 String marshal(String v)
           
 String unmarshal(String v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTrimmingAdapter

public StringTrimmingAdapter()
Method Detail

unmarshal

public String unmarshal(String v)
                 throws Exception
Specified by:
unmarshal in class XmlAdapter<String,String>
Throws:
Exception
See Also:
XmlAdapter.unmarshal(java.lang.Object)

marshal

public String marshal(String v)
               throws Exception
Specified by:
marshal in class XmlAdapter<String,String>
Throws:
Exception
See Also:
XmlAdapter.marshal(java.lang.Object)


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.