Package org.jrdf.writer.rdfxml

Examples of org.jrdf.writer.rdfxml.RdfXmlWriter


        throws Exception {
        long startTime = System.currentTimeMillis();
        Writer out = new FileWriter(new File(dirHandler.getDir(), "foo.rdf"));
        try {
            registry.clear();
            RdfWriter writer = new RdfXmlWriter(registry, new RdfNamespaceMapImpl());
            writer.write(graph, out);
        } finally {
            out.close();
        }
        performance.outputResult(graph, startTime, "Testing RDF/XML Write Performance:");
    }
View Full Code Here


    }

    private static void tryWriteRdfXml(File file, Graph graph) throws Exception {
        final BlankNodeRegistry nodeRegistry = new MemBlankNodeRegistryImpl();
        final RdfNamespaceMap map = new RdfNamespaceMapImpl();
        final RdfWriter writer = new RdfXmlWriter(nodeRegistry, map);
        final OutputStream fileOutputStream = new FileOutputStream(file);
        try {
            writer.write(graph, fileOutputStream);
        } finally {
            fileOutputStream.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.jrdf.writer.rdfxml.RdfXmlWriter

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.