@Test public void parsesCorrectlyAllValueTypes() throws Exception { String inputString = "<http: "<http: "<http: ByteArrayInputStream inputStream = new ByteArrayInputStream(inputString.getBytes()); ParserConfig parserConfig = new ParserConfig(); parserConfig.set(BasicParserSettings.PRESERVE_BNODE_IDS, true); NTuplesParser parser = new NTuplesParser(new InputStreamReader(inputStream), parserConfig); List<List<Value>> result = new ArrayList<>(); try { while (parser.hasNext()) { result.add(parser.next()); } } finally { parser.close(); } assertThat(result.get(0), is(Arrays.asList( VF.createURI("http: VF.createBNode("bnode1"), VF.createLiteral("literal"), VF.createLiteral(123)))); assertThat(result.get(1), is(Arrays.asList( (Value) VF.createURI("http: assertThat(result.get(2), is(Arrays.asList( (Value) VF.createURI("http: VF.createURI("http: }
@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();  }