org.gcube.contentmanagement.contentmanager.smsplugin.util
Class ConversionUtil

java.lang.Object
  extended by org.gcube.contentmanagement.contentmanager.smsplugin.util.ConversionUtil

public class ConversionUtil
extends java.lang.Object

Author:
Federico De Faveri defaveri@isti.cnr.it

Constructor Summary
ConversionUtil()
           
 
Method Summary
static
<T extends SMSCreateParameters>
T
fromElement(org.w3c.dom.Element e, java.lang.Class<T> type)
          Facility to transform a DOM element into an JAXB-annotated object
static org.w3c.dom.Element toElement(SMSCreateParameters o)
          Facility to transform a JAXB-annotated object into a DOM element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionUtil

public ConversionUtil()
Method Detail

toElement

public static org.w3c.dom.Element toElement(SMSCreateParameters o)
                                     throws java.lang.Exception
Facility to transform a JAXB-annotated object into a DOM element.

Parameters:
o - the object.
Returns:
the element.
Throws:
java.lang.Exception - if the object could not be transformed.

fromElement

public static <T extends SMSCreateParameters> T fromElement(org.w3c.dom.Element e,
                                                            java.lang.Class<T> type)
                                                 throws java.lang.Exception
Facility to transform a DOM element into an JAXB-annotated object

Type Parameters:
T - the type of the object.
Parameters:
e - the element.
type - the (runtime representation) of the type of the object.
Returns:
the object.
Throws:
java.lang.Exception - if the element could not be transformed.