ByteArrayOutputStream baos = new ByteArrayOutputStream() ;
writer.write(results, baos, baseIRI) ;
InputStream in = new ByteArrayInputStream(baos.toByteArray()) ;
Model model = ModelFactory.createDefaultModel() ;
RDFReader reader = new JenaReaderRdfJson() ;
try {
if ( baseIRI != null )
{
Reader r = PeekReader.makeUTF8(in) ;
reader.read(model, r, baseIRI) ;
}
else
reader.read(model, in, null) ;
boolean b = model.isIsomorphicWith(results) ;
if ( !b )
{
write ( model, results ) ;