@Test public void skipsErrorWhenFailOnNTriplesInvalidLinesSettingIsNonFatal() throws Exception { String inputString = "<http: ByteArrayInputStream inputStream = new ByteArrayInputStream(inputString.getBytes()); ParserConfig parserConfig = new ParserConfig(); parserConfig.addNonFatalError(NTriplesParserSettings.FAIL_ON_NTRIPLES_INVALID_LINES); NTuplesParser parser = new NTuplesParser(new InputStreamReader(inputStream), parserConfig); List<List<Value>> tuples = new ArrayList<>(); try { while (parser.hasNext()) { tuples.add(parser.next()); } } finally { parser.close(); } assertThat(tuples, contains((List<Value>) ImmutableList.of((Value) LDFusionToolTestUtils.createHttpUri("uri2"), LDFusionToolTestUtils.createHttpUri("uri3")))); }
@Override public void close() throws IOException { if (internalParser != null) { internalParser.close(); } }
NTuplesParser extends ThrowingAbstractIterator<List<Value>, IOException> implements Closeable<IOException> { @Override public void close() throws IOException { if (internalParser != null) { internalParser.close(); } } }
NTuplesParser extends ThrowingAbstractIterator<List<Value>, IOException> implements Closeable<IOException> { @Override public void close() throws IOException { if (internalParser != null) { internalParser.close(); } } NTuplesParser(Reader inputReader, ParserConfig parserConfig); }
NTuplesParser extends ThrowingAbstractIterator<List<Value>, IOException> implements Closeable<IOException> { @Override public void close() throws IOException { if (internalParser != null) { internalParser.close(); } } NTuplesParser(Reader inputReader, ParserConfig parserConfig); @Override void close(); }
NTuplesParser extends ThrowingAbstractIterator<List<Value>, IOException> implements Closeable<IOException> { @Override public void close() throws IOException { if (internalParser != null) { internalParser.close(); } } NTuplesParser(Reader inputReader, ParserConfig parserConfig); @Override void close();  }