Examples of SinkTripleOutput


Examples of org.apache.jena.riot.out.SinkTripleOutput

        return new SerializationFactory<Triple>()
        {
            @Override
            public Sink<Triple> createSerializer(OutputStream out)
            {
                return new SinkTripleOutput(out, null, NodeToLabel.createBNodeByLabelEncoded()) ;
            }
           
            @Override
            public Iterator<Triple> createDeserializer(InputStream in)
            {
View Full Code Here

Examples of org.apache.jena.riot.out.SinkTripleOutput

    {
        String filename = "data.ttl" ;

        // This is the heart of N-triples printing ... outoput is heavily buffered
        // so the FilterSinkRDF called flush at the end of parsing.
        Sink<Triple> output = new SinkTripleOutput(System.out, null, SyntaxLabels.createNodeToLabel()) ;
        StreamRDF filtered = new FilterSinkRDF(output, FOAF.name, FOAF.knows) ;
       
        // Call the parsing process.
        RDFDataMgr.parse(filtered, filename) ;
    }
View Full Code Here

Examples of org.apache.jena.riot.out.SinkTripleOutput

        return new SerializationFactory<Triple>()
        {
            @Override
            public Sink<Triple> createSerializer(OutputStream out)
            {
                return new SinkTripleOutput(out, null, NodeToLabel.createBNodeByLabelEncoded()) ;
            }
           
            @Override
            public Iterator<Triple> createDeserializer(InputStream in)
            {
View Full Code Here

Examples of org.apache.jena.riot.out.SinkTripleOutput

       
        String filename = "data.ttl" ;

        // This is the heart of N-triples printing ... outoput is heavily buffered
        // so the FilterSinkRDF called flush at the end of parsing.
        Sink<Triple> output = new SinkTripleOutput(System.out, null, SyntaxLabels.createNodeToLabel()) ;
        StreamRDF filtered = new FilterSinkRDF(output, FOAF.name, FOAF.knows) ;
       
        // Call the parsing process.
        RDFDataMgr.parse(filtered, filename) ;
    }
View Full Code Here

Examples of org.apache.jena.riot.out.SinkTripleOutput

       
        if ( RDFLanguages.isTriples(lang) )
        {
            Sink<Triple> s = SinkNull.create() ;
            if ( ! modLangParse.toBitBucket() )
                s = new SinkTripleOutput(output, null, labels) ;
            if ( setup != null )
                s = InfFactory.infTriples(s, setup) ;
           
            SinkCounting<Triple> sink2 = new SinkCounting<Triple>(s) ;
            StreamRDF dest = StreamRDFLib.sinkTriples(sink2) ;
View Full Code Here

Examples of org.openjena.riot.out.SinkTripleOutput

        private final DataOutputStream innerOutput;
        private final SinkTripleOutput innerSink;

        public TripleRecordWriter(DataOutputStream innerOutput) {
            this.innerOutput=innerOutput;
            this.innerSink = new SinkTripleOutput(innerOutput);
        }
View Full Code Here

Examples of org.openjena.riot.out.SinkTripleOutput

        // That would change a lot (Triples came several years before Quads).
        if ( lang.isTriples() )
        {
            Sink<Triple> s = SinkNull.create() ;
            if ( ! modLangParse.toBitBucket() )
                s = new SinkTripleOutput(System.out, null, labels) ;
            if ( setup != null )
                s = InfFactory.infTriples(s, setup) ;
           
            SinkCounting<Triple> sink2 = new SinkCounting<Triple>(s) ;
           
View Full Code Here

Examples of org.openjena.riot.out.SinkTripleOutput

        return new SerializationFactory<Triple>()
        {
            @Override
            public Sink<Triple> createSerializer(OutputStream out)
            {
                return new SinkTripleOutput(out, null, NodeToLabel.createBNodeByLabelEncoded()) ;
            }
           
            @Override
            public Iterator<Triple> createDeserializer(InputStream in)
            {
View Full Code Here

Examples of org.openjena.riot.out.SinkTripleOutput

       
        if ( lang.isTriples() )
        {
            Sink<Triple> s = SinkNull.create() ;
            if ( ! modLangParse.toBitBucket() )
                s = new SinkTripleOutput(output, null, labels) ;
            if ( setup != null )
                s = InfFactory.infTriples(s, setup) ;
           
            SinkCounting<Triple> sink2 = new SinkCounting<Triple>(s) ;
           
View Full Code Here

Examples of org.openjena.riot.out.SinkTripleOutput

                    System.out.println("File field " + name + " with file name "
                                       + item.getName() + " detected.");
                    // Process the input stream
                    response.setContentType("text/plain") ;

                    Sink<Triple> sink = new SinkTripleOutput(response.getOutputStream()) ;
                    LangRIOT parser = RiotReader.createParserTurtle(stream, null, sink) ;
                    parser.parse() ;
                   
                    response.getOutputStream().println("----------------------") ;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.