org.gcube.common.vremanagement.deployer.impl.operators.common
Class ProfileDate
java.lang.Object
org.gcube.common.vremanagement.deployer.impl.operators.common.ProfileDate
public final class ProfileDate
- extends Object
Transforms from Date to a valid string representation for the xs:dateAndTime XML Schema data type and vice versa.
It can be used to write/read a Date object to/from a profile.
- Author:
- Manuele Simi (ISTI-CNR)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProfileDate
public ProfileDate()
toXMLDateAndTime
public static String toXMLDateAndTime(Date date)
- Transforms the input
Date in a valid string representation for the xs:dateAndTime XML Schema data type
- Parameters:
date - the Date object to tranform
- Returns:
- the
String object
fromXMLDateAndTime
public static Date fromXMLDateAndTime(String date)
throws ParseException
- Transforms the input xs:dateAndTime representation in a
Date object
- Parameters:
date - the string representation of xs:dateAndTime (e.g. " 2009-05-12T16:46:03+02:00 ")
- Returns:
- the
Date object
- Throws:
ParseException - if the input date is not in an valid format
Copyright © 2013. All Rights Reserved.