You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Peter Ansell (JIRA)" <ji...@apache.org> on 2012/05/31 08:28:22 UTC

[jira] [Commented] (ANY23-101) Use RDFFormat.NQUADS in nquads module

    [ https://issues.apache.org/jira/browse/ANY23-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286362#comment-13286362 ] 

Peter Ansell commented on ANY23-101:
------------------------------------

It may be useful to add the following test to the test or integration-test suites to check that the META-INF/services entries for the NQuadsParserFactory and NQuadsWriterFactory are being picked up correctly and accessible.

    /**
     * Tests that the NQuads module is being picked up using the Service Provider 
     * Interface using RDFFormat.NQUADS
     */
    @Test
    public void testRio()
    {
        RDFParser parser2 = Rio.createParser(RDFFormat.NQUADS);
        
        Assert.assertNotNull(parser2);
        
        RDFWriter writer = Rio.createWriter(RDFFormat.NQUADS, new ByteArrayOutputStream());
        
        Assert.assertNotNull(writer);
        
        RDFWriter writer2 = Rio.createWriter(RDFFormat.NQUADS, new StringWriter());
        
        Assert.assertNotNull(writer2);
    }
    

                
> Use RDFFormat.NQUADS in nquads module
> -------------------------------------
>
>                 Key: ANY23-101
>                 URL: https://issues.apache.org/jira/browse/ANY23-101
>             Project: Apache Any23
>          Issue Type: Improvement
>          Components: core
>            Reporter: Peter Ansell
>
> Sesame 2.6.6 was released today with a new format for NQuads in the Rio RDFFormat class as a constant, ie, RDFFormat.NQUADS.
> If the NQuads classes in Any23 use this constant people can use the static methods in the Rio class to create an NQuads parser and writer without hardcoding references to the any23 parser or writer or their factories into their files, as RDFFormat is provided in the compact sesame-rio-api.jar module, and the nquads module would then be detected at runtime if it was available.
> For example, the following will link into the new constant where we currently use a local constant:
>     @Override
>     public RDFFormat getRDFFormat() {
>         return RDFFormat.NQUADS;
>     }
> This is the first partial step in eventually getting the NQuads parser into the normal sesame distribution.

--
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