DBPedia uses a number of non-standard data types for e.g. http://dbpedia.org/datatype/usDollar and RDFTypes.valueOf(fragment.toUpperCase()) will return null so I added a catch for NullPointerException and assign it to RDFTypes.STRING
try {
String xsdType = objectNode.getLiteralDatatypeURI();
String fragment = new URI(xsdType).getFragment();
bindings.bind(variableName,
objectNode.getLiteralLexicalForm(),
RDFTypes.valueOf(fragment.toUpperCase()));
} catch (URISyntaxException e) {
throw new MarkLogicJenaException(
"Unrecognized binding type. Use XSD only.", e);
} catch (NullPointerException e) {
log.error("Unrecognized binding type: " + objectNode.getLiteralDatatypeURI());
bindings.bind(variableName, objectNode.getLiteralLexicalForm(),
RDFTypes.STRING); // <-- added this catch block
}
Found a bug in function bindObject() in MarkLogicDatasetGraph.java while importing Mappingbased Literals downloaded from https://wiki.dbpedia.org/downloads-2016-10
DBPedia uses a number of non-standard data types for e.g. http://dbpedia.org/datatype/usDollar and
RDFTypes.valueOf(fragment.toUpperCase())
will return null so I added a catch for NullPointerException and assign it to RDFTypes.STRING