}
});
for (int i = 0; i < files.length; i++) {
File leanFile = files[i];
Model leanModel = ModelFactory.createDefaultModel();
Graph leanGraph = JenaUtil.getGraphFromModel(leanModel, ontology);
try {
leanModel.read(leanFile.toURL().toString(), "N3");
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
Model leanModelOrig = ModelFactory.createDefaultModel();
Graph leanGraphOrig = JenaUtil.getGraphFromModel(leanModelOrig,
ontology);
try {
leanModelOrig.read(leanFile.toURL().toString(), "N3");
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
leanGraph = makeLean(leanGraph);
// leanModel.write(System.out, "N3");
/*
* if (!leanGraphOrig.equals(leanGraph)) { Map mapping =
* SubGraphMatcher.getValidMapping(leanGraph, leanGraphOrig);
* leanGraphOrig.removeAll(org.wymiwyg.rdf.graphs.matcher.GraphMatcher.applyMapping(leanGraph,mapping));
* JenaUtil.getModelFromGraph(leanGraphOrig).write(System.out,
* "N3"); }
*/
// System.out.println("orig:");
// JenaUtil.getModelFromGraph(leanGraphOrig).write(System.out);
// System.out.println();
// System.out.println("lean:");
// JenaUtil.getModelFromGraph(leanGraph).write(System.out);
assertTrue("checking" + leanFile + " remains unmodified",
leanGraphOrig.equals(leanGraph));
}
}