Package org.jrdf.parser

Examples of org.jrdf.parser.Parser


        this.mapFactory = newMapFactory;
    }

    public void parse(Graph graph, GraphPerformance performance) throws GraphException {
        InputStream stream = getResource();
        Parser parser = new RdfXmlParser(graph.getElementFactory(), mapFactory);
        long startTime = System.currentTimeMillis();
        parse(stream, parser);
        performance.outputResult(graph, startTime, "Testing Parsing Performance (" + PATH + "): ");
    }
View Full Code Here


    public static void main(String[] args) throws Exception {
        URL url = getDocumentURL(args);
        InputStream in = getInputStream(url);
        try {
            final Graph jrdfMem = JRDF_FACTORY.getNewGraph();
            Parser parser = new GraphRdfXmlParser(jrdfMem, new MemMapFactory());
            parser.parse(in, toEscapedString(url));
            ClosableIterable<Triple> triples = jrdfMem.find(ANY_SUBJECT_NODE, ANY_PREDICATE_NODE, ANY_OBJECT_NODE);
            try {
                for (Triple triple : triples) {
                    System.out.println("Graph: " + triple);
                }
View Full Code Here

TOP

Related Classes of org.jrdf.parser.Parser

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.