* @throws org.openrdf.rio.RDFHandlerException If the configured statement handler has encountered an
* unrecoverable error.
*/
@Override
public void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException {
LineIterator it = IOUtils.lineIterator(in, RDFFormat.RDFXML.getCharset());
try {
while(it.hasNext()) {
lineNumber++;
String line = it.nextLine();
if(lineNumber % 2 == 0) {
// only odd line numbers contain triples
StringReader buffer = new StringReader(line);
lineParser.parse(buffer, baseURI);
}
}
} finally {
it.close();
}
}