public static Object makeDate(String source) { return ConverterUtil.convertToDate(source); }
/** * Create a Date object from the given date string. */ public static Date getDate(String value) throws DataServiceFault { /* if something goes wrong with converting the value to a date, * try with dateTime and get the date out it, this is because, * some service clients send a full date-time string for a date */ try { java.util.Date date = ConverterUtil.convertToDate(value); if (null == date) { throw new DataServiceFault("Empty string or null value was found as date."); } else { return new Date(date.getTime()); } } catch (Exception e) { java.util.Calendar calendarDate = ConverterUtil.convertToDateTime(value); if (null == calendarDate) { throw new DataServiceFault("Empty string or null value was found as date."); } else { return new Date(calendarDate.getTimeInMillis()); } } }
if (o != null) { if (o instanceof String) { array[i] = ConverterUtil.convertToDate(o.toString()); } else if (o instanceof Date) { array[i] = (Date) o;
public static Object makeDate(String source) { return ConverterUtil.convertToDate(source); }
if (o != null) { if (o instanceof String) { array[i] = ConverterUtil.convertToDate(o.toString()); } else if (o instanceof Date) { array[i] = (Date) o;
public static long compare(Date date, String value) { Date newDate = convertToDate(value); return date.getTime() - newDate.getTime(); }
setObject(new URI(value)); } else if ("date".equals(type)) { setObject(ConverterUtil.convertToDate(value)); } else if ("QName".equals(type)) { if (value.indexOf(":") > 0) {
public static long compare(Date date, String value) { Date newDate = convertToDate(value); return date.getTime() - newDate.getTime(); }
setObject(new URI(value)); } else if ("date".equals(type)) { setObject(ConverterUtil.convertToDate(value)); } else if ("QName".equals(type)) { if (value.indexOf(":") > 0) {
public static Date fromString(java.lang.String value, java.lang.String namespaceURI){ Date returnValue = new Date(); returnValue.setDate( org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(value)); return returnValue; }
} else if (colType.equals(XSDDatatype.XSDdate.getURI())) { return ConverterUtil.convertToString(ConverterUtil .convertToDate(soln.getLiteral(colName).getString())); } else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) { return ConverterUtil
public static Date fromString(java.lang.String value, java.lang.String namespaceURI){ Date returnValue = new Date(); returnValue.setDate( org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(value)); return returnValue; }
} else if (colType.equals(XSDDatatype.XSDdate.getURI())) { return ConverterUtil.convertToString(ConverterUtil .convertToDate(soln.getLiteral(colName).getString())); } else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) { return ConverterUtil
/** * Extracts data from the payload using the provided XPath and converts into a Date * * @param xpath xpath to be used to extract the data * @return <code>Date</code> if it is possible to create a date, * otherwise throws an exception */ public Date selectDate(String xpath) { Object o = select(xpath); if (o instanceof Date) { return (Date) o; } else if (o instanceof String) { return ConverterUtil.convertToDate((String) o); } else { throw new LoggedRuntimeException("Invalid XPath : " + xpath + " Can not select" + " a date from the value : " + o, log); } }
org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(content));
org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(content));
org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(content));
org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(tempAttribPaymentDate));
org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(content));
subscriptionDetails.setId(subscription.getProperty("Name")); subscriptionDetails.setOwner(subscription.getProperty("Owner")); subscriptionDetails.setCreatedTime(ConverterUtil.convertToDate(subscription.getProperty("createdTime")));