List of utility methods to do XML Date to
Date | calendarAsDate(XMLGregorianCalendar xgc) Converts an XMLGregorianCalendar to an instance of java.util.Date if (xgc == null) { return null; } else { return xgc.toGregorianCalendar().getTime(); |
String | calendarAsString(XMLGregorianCalendar xgc) calendar As String return dateAsString(calendarAsDate(xgc));
|
Date | convertirXMLGregorianCalendarToDate(XMLGregorianCalendar fecha) Convierte una fecha tipo XMLGregorianCalendar en un objeto Date if (fecha == null) { return null; Date date = null; date = fecha.toGregorianCalendar().getTime(); return date; |
DateTime | convertSFTimeToDateTime(XMLGregorianCalendar soapTime) Convert an XMLGregorianCalendar (assumed to be in UTC) into a DateTime . return new DateTime(soapTime.getYear(), soapTime.getMonth(), soapTime.getDay(), soapTime.getHour(), soapTime.getMinute(), soapTime.getSecond(), soapTime.getMillisecond(), DateTimeZone.UTC); |
List | convertToDate(final List convert To Date if (dates == null) { return null; final List<Date> list = new ArrayList<Date>(); for (XMLGregorianCalendar date : dates) { list.add(convertToDate(date)); return list; ... |
Date | convertToDate(XMLGregorianCalendar date) Convert a XMLGregorianCalendar to a Date . return date.toGregorianCalendar().getTime();
|
DateTime | convertToDateTime(XMLGregorianCalendar calendar) convert To Date Time if (calendar == null) { return null; return convertToLocalDateTime(calendar).toDateTime(); |
LocalTime | convertToLocalTime(XMLGregorianCalendar calendar) Converts from an XMLGregorianCalendar to a LocalTime i.e. if (calendar == null) { return null; int hour = calendar.getHour() > 0 ? calendar.getHour() : 0; int minute = calendar.getMinute() > 0 ? calendar.getMinute() : 0; int second = calendar.getSecond() > 0 ? calendar.getSecond() : 0; int millisecond = calendar.getMillisecond() > 0 ? calendar.getMillisecond() : 0; return new LocalTime(hour, minute, second, millisecond); ... |
Date | convertXmlDateToDate(XMLGregorianCalendar date) Converts a javax.xml.datatype.XMLGregorianCalendar to a java.util.Date. return date.toGregorianCalendar().getTime();
|
Date | convertXmlGregCalToDate(XMLGregorianCalendar xmlCal) convert Xml Greg Cal To Date if (xmlCal == null) { return null; return xmlCal.toGregorianCalendar().getTime(); |