Package org.openjena.riot.lang

Examples of org.openjena.riot.lang.SinkQuadsToDataset


                throw new CmdException("Can't guess language for file: "+filename) ;
            InputStream input = IO.openFile(filename) ;
           
            if ( language.isQuads() )
            {
                Sink<Quad> sink = new SinkQuadsToDataset(dsg) ;
                RiotLoader.readQuads(input, language, filename, sink) ;
            }
            else
            {
                Sink<Triple> sink = new SinkTriplesToGraph(dsg.getDefaultGraph()) ;
View Full Code Here


        return new SinkTriplesToGraph(graph) ;
    }

    public static Sink<Quad> datasetSink(DatasetGraph dataset)
    {
        return new SinkQuadsToDataset(dataset) ;
    }
View Full Code Here

                throw new CmdException("Can't guess language for file: "+filename) ;
            InputStream input = IO.openFile(filename) ;
           
            if ( language.isQuads() )
            {
                Sink<Quad> sink = new SinkQuadsToDataset(dsg) ;
                RiotLoader.readQuads(input, language, filename, sink) ;
            }
            else
            {
                Sink<Triple> sink = new SinkTriplesToGraph(dsg.getDefaultGraph()) ;
View Full Code Here

        return new SinkTriplesToGraph(graph) ;
    }

    public static Sink<Quad> datasetSink(DatasetGraph dataset)
    {
        return new SinkQuadsToDataset(dataset) ;
    }
View Full Code Here

                throw new CmdException("Can't guess language for file: "+filename) ;
            InputStream input = IO.openFile(filename) ;
           
            if ( language.isQuads() )
            {
                Sink<Quad> sink = new SinkQuadsToDataset(dsg) ;
                RiotLoader.readQuads(input, language, filename, sink) ;
            }
            else
            {
                Sink<Triple> sink = new SinkTriplesToGraph(dsg.getDefaultGraph()) ;
View Full Code Here

        assertTrue( tdbloader4.dump(dsgExpected, dsgMR), tdbloader4.isomorphic(dsgExpected, dsgMR));
    }
   
    private static DatasetGraph load(String input) {
        DatasetGraph dsg = DatasetFactory.createMem().asDatasetGraph();
        Sink<Quad> sink = new SinkQuadsToDataset(dsg);
        RiotReader.parseQuads(input, sink);
       
        return dsg;
    }
View Full Code Here

        return dsg;
    }
   
    private static DatasetGraph infer(String input, String vocabulary) {
      Dataset dataset = DatasetFactory.createMem();
        Sink<Quad> sink = new SinkQuadsToDataset(dataset.asDatasetGraph());
        sink = InfFactory.infQuads(sink, FileManager.get().loadModel(vocabulary));
        LangRIOT parser = RiotReader.createParserQuads(IO.openFile(input), Lang.NQUADS, null, sink) ;
        parser.parse() ;       

      return dataset.asDatasetGraph();
View Full Code Here

TOP

Related Classes of org.openjena.riot.lang.SinkQuadsToDataset

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.