public static Object makeCalendar(String source) { return ConverterUtil.convertToDateTime(source); }
public static Object makeCalendar(String source) { return ConverterUtil.convertToDateTime(source); }
public static long compare(Calendar calendar, String value) { Calendar newCalendar = convertToDateTime(value); return calendar.getTimeInMillis() - newCalendar.getTimeInMillis(); }
public static long compare(Calendar calendar, String value) { Calendar newCalendar = convertToDateTime(value); return calendar.getTimeInMillis() - newCalendar.getTimeInMillis(); }
/** * Create a Timestamp object from the given timestamp string. */ public static Timestamp getTimestamp(String value) throws DataServiceFault, ParseException { if (value == null || value.isEmpty()){ throw new DataServiceFault("Empty string or null value was found as timeStamp."); } return new Timestamp(ConverterUtil.convertToDateTime(value).getTimeInMillis()); }
public static DateTime fromString(java.lang.String value, java.lang.String namespaceURI){ DateTime returnValue = new DateTime(); returnValue.setDateTime( org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(value)); return returnValue; }
public static DateTime fromString(java.lang.String value, java.lang.String namespaceURI){ DateTime returnValue = new DateTime(); returnValue.setDateTime( org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(value)); return returnValue; }
/** * 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()); } } }
/** * Extracts data from the payload using the provided XPath and converts into a Calendar * * @param xpath xpath to be used to extract the data * @return <code>Calendar</code> if it is possible to create a Calendar, * otherwise throws an exception */ public Calendar selectDataTime(String xpath) { Object o = select(xpath); if (o instanceof Calendar) { return (Calendar) o; } else if (o instanceof String) { return ConverterUtil.convertToDateTime((String) o); } else { throw new LoggedRuntimeException("Invalid XPath : " + xpath + ". Can not create" + " a datatime from the value : " + o, log); } }
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
setObject(ConverterUtil.convertToDateTime(value)); } else if ("time".equals(type)) { setObject(ConverterUtil.convertToTime(value));
setObject(ConverterUtil.convertToDateTime(value)); } else if ("time".equals(type)) { setObject(ConverterUtil.convertToTime(value));
} else if (EventBrokerConstants.EB_RES_EXPIRS.equals(propertyName)) { subscription.setExpires( ConverterUtil.convertToDateTime( subscriptionResource.getProperty(EventBrokerConstants.EB_RES_EXPIRS))); } else if (EventBrokerConstants.EB_RES_OWNER.equals(propertyName)) {
subscription.setExpires(ConverterUtil.convertToDateTime( resource.getProperty(EXPIRES)));
JavaUtil.getValue(subscriptionElement, EB_ELE_EVENT_SINK_URL)); subscription.setExpires( ConverterUtil.convertToDateTime( JavaUtil.getValue(subscriptionElement, EB_ELE_EXPIRES))); if (subscription.getEventSinkURL().startsWith("sqs://")) {
} else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) { return ConverterUtil .convertToString(ConverterUtil.convertToDateTime(soln .getLiteral(colName).getString())); } else if (colType.equals(XSDDatatype.XSDtime.getURI())) {
} else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) { return ConverterUtil .convertToString(ConverterUtil.convertToDateTime(soln .getLiteral(colName).getString())); } else if (colType.equals(XSDDatatype.XSDtime.getURI())) {
} else { synapseSubscription .setExpires(ConverterUtil.convertToDateTime(elmExpires.getText()));