Package com.hp.hpl.jena.rdf.model.impl

Examples of com.hp.hpl.jena.rdf.model.impl.RDFWriterFImpl


    */
    public static String getCheckedLanguage( String shortLang )
        {
        String fullLang = unabbreviate.get( shortLang );
        String tryLang = (fullLang == null ? shortLang : fullLang);
        try { new RDFWriterFImpl().getWriter( tryLang ); }
        catch (NoWriterForLangException e)
            { throw new IllegalArgumentException( "'" + shortLang + "' is not recognised as a legal output format" ); }
        return tryLang;
        }
View Full Code Here


    */
    public static String getCheckedLanguage( String shortLang )
        {
        String fullLang = unabbreviate.get( shortLang );
        String tryLang = (fullLang == null ? shortLang : fullLang);
        try { new RDFWriterFImpl().getWriter( tryLang ); }
        catch (NoWriterForLangException e)
            { throw new IllegalArgumentException( "'" + shortLang + "' is not recognised as a legal output format" ); }
        return tryLang;
        }
View Full Code Here

    }

    @Test
    public void testWireIntoJena() throws Exception {
        IO_JenaWriters.wireIntoJena();
        RDFWriterFImpl writerF = new RDFWriterFImpl();
        assertEquals(Basic.class, writerF.getWriter().getClass());
        assertEquals(Basic.class, writerF.getWriter("RDF/XML").getClass());
        assertEquals(Abbreviated.class, writerF.getWriter("RDF/XML-ABBREV").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("N-TRIPLE").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("N-Triples").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("N-TRIPLE").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("NT").getClass());

        assertEquals(RDFWriterRIOT_N3.class, writerF.getWriter("N3").getClass());
        assertEquals(RDFWriterRIOT_N3_PP.class, writerF.getWriter(N3JenaWriter.n3WriterPrettyPrinter).getClass());
        assertEquals(RDFWriterRIOT_N3Plain.class, writerF.getWriter(N3JenaWriter.n3WriterPlain).getClass());
        assertEquals(RDFWriterRIOT_N3Triples.class, writerF.getWriter(N3JenaWriter.n3WriterTriples).getClass());
        assertEquals(RDFWriterRIOT_N3TriplesAlt.class, writerF.getWriter(N3JenaWriter.n3WriterTriplesAlt).getClass());
       
        assertEquals(RDFWriterRIOT_Turtle.class, writerF.getWriter(N3JenaWriter.turtleWriter).getClass());
        assertEquals(RDFWriterRIOT_Turtle1.class, writerF.getWriter(N3JenaWriter.turtleWriterAlt1).getClass());
        assertEquals(RDFWriterRIOT_Turtle2.class, writerF.getWriter(N3JenaWriter.turtleWriterAlt2).getClass());

        assertEquals(RDFWriterRIOT_RDFJSON.class, writerF.getWriter("RDF/JSON").getClass());
        assertEquals(RDFWriterRIOT_RDFJSON.class, writerF.getWriter("RDFJSON").getClass());
    }
View Full Code Here

    }

    @Test
    public void testWireIntoJena() throws Exception {
        IO_JenaWriters.wireIntoJena();
        RDFWriterFImpl writerF = new RDFWriterFImpl();
        assertEquals(Basic.class, writerF.getWriter().getClass());
        assertEquals(Basic.class, writerF.getWriter("RDF/XML").getClass());
        assertEquals(Abbreviated.class, writerF.getWriter("RDF/XML-ABBREV").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("N-TRIPLE").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("N-Triples").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("N-TRIPLE").getClass());
        assertEquals(RDFWriterRIOT_NTriples.class, writerF.getWriter("NT").getClass());

        assertEquals(RDFWriterRIOT_N3.class, writerF.getWriter("N3").getClass());
        assertEquals(RDFWriterRIOT_N3_PP.class, writerF.getWriter(N3JenaWriter.n3WriterPrettyPrinter).getClass());
        assertEquals(RDFWriterRIOT_N3Plain.class, writerF.getWriter(N3JenaWriter.n3WriterPlain).getClass());
        assertEquals(RDFWriterRIOT_N3Triples.class, writerF.getWriter(N3JenaWriter.n3WriterTriples).getClass());
        assertEquals(RDFWriterRIOT_N3TriplesAlt.class, writerF.getWriter(N3JenaWriter.n3WriterTriplesAlt).getClass());
       
        assertEquals(RDFWriterRIOT_Turtle.class, writerF.getWriter(N3JenaWriter.turtleWriter).getClass());
        assertEquals(RDFWriterRIOT_Turtle1.class, writerF.getWriter(N3JenaWriter.turtleWriterAlt1).getClass());
        assertEquals(RDFWriterRIOT_Turtle2.class, writerF.getWriter(N3JenaWriter.turtleWriterAlt2).getClass());

        assertEquals(RDFWriterRIOT_RDFJSON.class, writerF.getWriter("RDF/JSON").getClass());
        assertEquals(RDFWriterRIOT_RDFJSON.class, writerF.getWriter("RDFJSON").getClass());
    }
View Full Code Here

    */
    public static String getCheckedLanguage( String shortLang )
        {
        String fullLang = unabbreviate.get( shortLang );
        String tryLang = (fullLang == null ? shortLang : fullLang);
        try { new RDFWriterFImpl().getWriter( tryLang ); }
        catch (NoWriterForLangException e)
            { throw new IllegalArgumentException( "'" + shortLang + "' is not recognised as a legal output format" ); }
        return tryLang;
        }
View Full Code Here

    */
    public static String getCheckedLanguage( String shortLang )
        {
        String fullLang = unabbreviate.get( shortLang );
        String tryLang = (fullLang == null ? shortLang : fullLang);
        try { new RDFWriterFImpl().getWriter( tryLang ); }
        catch (NoWriterForLangException e)
            { throw new IllegalArgumentException( "'" + shortLang + "' is not recognised as a legal output format" ); }
        return tryLang;
        }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.rdf.model.impl.RDFWriterFImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.