TypedLiteral literal = (TypedLiteral) value;
if (literal.getDataType() == null) { // if no dataType is defined
// return a Text without a language
return valueFactory.createText(literal);
} else {
XsdDataTypeEnum mapping = RdfResourceUtils.XSD_DATATYPE_VALUE_MAPPING.get(literal.getDataType());
if (mapping != null) {
if (mapping.getMappedClass() != null) {
try {
return literalFactory.createObject(mapping.getMappedClass(), literal);
} catch (RuntimeException e){
log.info("Unable to convert Literal value {} to Java Class {} because of {} with message {}",
new Object[]{literal,mapping.getMappedClass().getSimpleName(),
e.getClass().getSimpleName(),e.getMessage()});
log.trace("Exception:",e);
//STANBOL-698: Decide what to do in such cases
//(a) throw an exception
// throw e;