incubator-any23-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Mostarda (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (ANY23-89) Remove BufferRDFHandler from RDFUtils
Date Sat, 02 Jun 2012 10:16:22 GMT

     [ https://issues.apache.org/jira/browse/ANY23-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michele Mostarda resolved ANY23-89.
-----------------------------------

    Resolution: Fixed

Fixed @ r1345476.
                
> 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

        

Mime
View raw message