use of org.calrissian.mango.types.exception.TypeEncodingException in project incubator-rya by apache.
the class DateTimeRyaTypeResolver method serializeData.
@Override
protected String serializeData(String data) throws RyaTypeResolverException {
try {
DateTime dateTime = DateTime.parse(data, XMLDATETIME_PARSER);
Date value = dateTime.toDate();
return DATE_STRING_TYPE_ENCODER.encode(value);
} catch (TypeEncodingException e) {
throw new RyaTypeResolverException("Exception occurred serializing data[" + data + "]", e);
}
}
Aggregations