本文整理了Java中org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime()
方法的一些代码示例,展示了ConverterUtil.convertToDateTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConverterUtil.convertToDateTime()
方法的具体详情如下:
包路径:org.apache.axis2.databinding.utils.ConverterUtil
类名称:ConverterUtil
方法名:convertToDateTime
[英]Code from Axis1 code base Note - We only follow the convention in the latest schema spec
[中]
代码示例来源:origin: org.apache.axis2/axis2-adb
public static Object makeCalendar(String source) {
return ConverterUtil.convertToDateTime(source);
}
代码示例来源:origin: apache/axis2-java
public static Object makeCalendar(String source) {
return ConverterUtil.convertToDateTime(source);
}
代码示例来源:origin: apache/axis2-java
public static long compare(Calendar calendar, String value) {
Calendar newCalendar = convertToDateTime(value);
return calendar.getTimeInMillis() - newCalendar.getTimeInMillis();
}
代码示例来源:origin: org.apache.axis2/axis2-adb
public static long compare(Calendar calendar, String value) {
Calendar newCalendar = convertToDateTime(value);
return calendar.getTimeInMillis() - newCalendar.getTimeInMillis();
}
代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core
/**
* 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());
}
代码示例来源:origin: org.apache.axis2/axis2-adb
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;
}
代码示例来源:origin: org.apache.axis2/axis2-adb
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;
}
代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core
/**
* 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());
}
}
}
代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.rulecep.adapters
/**
* 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);
}
}
代码示例来源:origin: org.apache.axis2/axis2-adb
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.workflow.mgt.bps.stub
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
代码示例来源:origin: org.apache.axis2/axis2-adb
org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));
代码示例来源:origin: org.apache.axis2/axis2-adb
setObject(ConverterUtil.convertToDateTime(value));
} else if ("time".equals(type)) {
setObject(ConverterUtil.convertToTime(value));
代码示例来源:origin: apache/axis2-java
setObject(ConverterUtil.convertToDateTime(value));
} else if ("time".equals(type)) {
setObject(ConverterUtil.convertToTime(value));
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.event.core
} 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)) {
代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.eventing.impl
subscription.setExpires(ConverterUtil.convertToDateTime(
resource.getProperty(EXPIRES)));
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.event.core
JavaUtil.getValue(subscriptionElement, EB_ELE_EVENT_SINK_URL));
subscription.setExpires(
ConverterUtil.convertToDateTime(
JavaUtil.getValue(subscriptionElement, EB_ELE_EXPIRES)));
if (subscription.getEventSinkURL().startsWith("sqs://")) {
代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core
} else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) {
return ConverterUtil
.convertToString(ConverterUtil.convertToDateTime(soln
.getLiteral(colName).getString()));
} else if (colType.equals(XSDDatatype.XSDtime.getURI())) {
代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core
} else if (colType.equals(XSDDatatype.XSDdateTime.getURI())) {
return ConverterUtil
.convertToString(ConverterUtil.convertToDateTime(soln
.getLiteral(colName).getString()));
} else if (colType.equals(XSDDatatype.XSDtime.getURI())) {
代码示例来源:origin: org.apache.synapse/synapse-core
} else {
synapseSubscription
.setExpires(ConverterUtil.convertToDateTime(elmExpires.getText()));
内容来源于网络,如有侵权,请联系作者删除!