org.gcube.application.enm.service.util
Class XmlHelper

java.lang.Object
  extended by org.gcube.application.enm.service.util.XmlHelper

public class XmlHelper
extends Object

Helper class to import/export XML-binding types from/to files.

Author:
Erik Torres

Constructor Summary
XmlHelper()
           
 
Method Summary
static Duration durationUntilNow(XMLGregorianCalendar startDate)
           
static XMLGregorianCalendar now()
           
static
<E extends Serializable>
void
typeToXmlFile(E input, File file)
           
static
<E extends Serializable>
E
xmlFileToType(File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlHelper

public XmlHelper()
Method Detail

typeToXmlFile

public static <E extends Serializable> void typeToXmlFile(E input,
                                                          File file)
                          throws IOException
Throws:
IOException

xmlFileToType

public static <E extends Serializable> E xmlFileToType(File file)
                                            throws IOException
Throws:
IOException

now

public static XMLGregorianCalendar now()
                                throws DatatypeConfigurationException
Throws:
DatatypeConfigurationException

durationUntilNow

public static Duration durationUntilNow(XMLGregorianCalendar startDate)
                                 throws DatatypeConfigurationException
Throws:
DatatypeConfigurationException


Copyright © 2012. All Rights Reserved.