Package org.openrdf.rio.helpers

Examples of org.openrdf.rio.helpers.ContextStatementCollector


    public Model createModelFromFile(String filename, String baseUri) throws IOException {
        Model model = new LinkedHashModel();
        if (filename != null) {
            try {
                RDFParser parser = Rio.createParser(SesameTestHelper.detectFileFormat(filename));
                parser.setRDFHandler(new ContextStatementCollector(model, ValueFactoryImpl.getInstance()));

                ParserConfig config = parser.getParserConfig();
                config.set(BasicParserSettings.PRESERVE_BNODE_IDS, true);
                config.addNonFatalError(BasicParserSettings.VERIFY_DATATYPE_VALUES);
                config.addNonFatalError(BasicParserSettings.VERIFY_LANGUAGE_TAGS);
View Full Code Here

TOP

Related Classes of org.openrdf.rio.helpers.ContextStatementCollector

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.