ExtractionContext extractionContext,
InputStream in,
ExtractionResult extractionResult
) throws IOException, ExtractionException {
try {
final RDFParser parser = getParser(extractionContext, extractionResult);
parser.getParserConfig().setNonFatalErrors(new HashSet<RioSetting<?>>());
// Disable verification to ensure that DBPedia is accessible, given it uses so many custom datatypes
parser.getParserConfig().set(BasicParserSettings.FAIL_ON_UNKNOWN_DATATYPES, true);
parser.getParserConfig().addNonFatalError(BasicParserSettings.FAIL_ON_UNKNOWN_DATATYPES);
parser.getParserConfig().set(BasicParserSettings.VERIFY_DATATYPE_VALUES, true);
parser.getParserConfig().addNonFatalError(BasicParserSettings.VERIFY_DATATYPE_VALUES);
parser.getParserConfig().set(BasicParserSettings.NORMALIZE_DATATYPE_VALUES, false);
parser.getParserConfig().addNonFatalError(BasicParserSettings.NORMALIZE_DATATYPE_VALUES);
parser.parse(in, extractionContext.getDocumentURI().stringValue());
} catch (RDFHandlerException ex) {
throw new IllegalStateException("Unexpected exception.", ex);
} catch (RDFParseException ex) {
// throw new ExtractionException("Error while parsing RDF document.", ex, extractionResult);
}