You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Lewis John McGibbney (JIRA)" <ji...@apache.org> on 2012/06/25 18:53:46 UTC
[jira] [Closed] (ANY23-89) Remove BufferRDFHandler from RDFUtils
[ https://issues.apache.org/jira/browse/ANY23-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lewis John McGibbney closed ANY23-89.
-------------------------------------
Bulk close for 0.7.0-incubating release
> Remove BufferRDFHandler from RDFUtils
> -------------------------------------
>
> Key: ANY23-89
> URL: https://issues.apache.org/jira/browse/ANY23-89
> Project: Apache Any23
> Issue Type: Improvement
> Components: core
> Reporter: Peter Ansell
>
> Sesame provides an implementation of RDFHandler, similar to BufferRDFHandler, in sesame-rio-api.jar. The only difference from StatementCollector to BufferRDFHandler is that StatementCollector also collects namespaces, which in most cases should not incur too much of a memory or performance cost. BufferRDFHandler is a private inner class so there are no repercussions to the API or other classes.
> It is a simple switch out with the following two lines affected after removing BufferRDFHandler.
> public static Statement[] parseRDF(RDFFormat p, InputStream is, String baseURI)
> throws RDFHandlerException, IOException, RDFParseException {
> - final BufferRDFHandler handler = new BufferRDFHandler();
> + final StatementCollector handler = new StatementCollector();
> parser.setVerifyData(true);
> parser.setStopAtFirstError(true);
> parser.setPreserveBNodeIDs(true);
> parser.setRDFHandler(handler);
> parser.parse(is, baseURI);
> - return handler.statements.toArray( new Statement[handler.statements.size()] );
> + return handler.getStatements().toArray( new Statement[handler.getStatements().size()] );
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira