Package org.apache.clerezza.rdf.core.impl

Examples of org.apache.clerezza.rdf.core.impl.SimpleMGraph.toArray()


        ParsingProvider parsingProvider = new RdfJsonParsingProvider();
        ByteArrayInputStream jsonIn = new ByteArrayInputStream(serializedGraph.toByteArray());
        MGraph parsedMGraph = new SimpleMGraph();
        parsingProvider.parse(parsedMGraph, jsonIn, "application/rdf+json", null);
        Assert.assertEquals(originalSize, parsedMGraph.size());
        sortedTriples = parsedMGraph.toArray(new Triple[parsedMGraph.size()]);
        Arrays.sort(sortedTriples, RdfJsonSerializingProvider.SUBJECT_COMPARATOR);
        Assert.assertEquals(mGraph.getGraph(), parsedMGraph.getGraph());
  }
}
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.