assertEquals(gLeanified, gLean);
}
}
@Test
public void testDec() throws IOException {
Graph prob1Graph = getGraphFromResource("prob1.rdf");
ReferenceGroundedDecomposition dec = new ReferenceGroundedDecompositionImpl(
prob1Graph);
// JenaUtil.getModelFromGraph(prob1Graph).write(System.out);
// ReferenceGroundedUtil.print(dec, new PrintWriter(System.out));
Graph prob1GraphRec = ReferenceGroundedUtil.reconstructGraph(dec);
/*
* for (FunctionallyGroundedNode fgNode :
* dec.getFunctionallyGroundedNodes()) { for (NonTerminalMolecule
* ntMolecule : fgNode.getGroundingMolecules()) {
* System.out.println("Non-Terminal Molecule");
* JenaUtil.getModelFromGraph(ntMolecule).write(System.out); } }
*/
// JenaUtil.getModelFromGraph(prob1GraphRec).write(System.out);
ReferenceGroundedDecomposition recDec = new ReferenceGroundedDecompositionImpl(
prob1GraphRec);
// ReferenceGroundedUtil.print(recDec, new PrintWriter(System.out));
Graph recDecRec2 = new NaturalizedGraph(ReferenceGroundedUtil
.reconstructGraph(recDec));
Graph recDecRec = new NaturalizedGraph(new SimpleGraph(), recDec
.getFunctionallyGroundedNodes());
// System.out.println(recDecRec2.equals(recDecRec));
// JenaUtil.getModelFromGraph(recDecRec).write(System.out);
Graph recDecRecLean = MoleculeBasedLeanifier
.getLeanVersionOf(recDecRec);
// JenaUtil.getModelFromGraph(recDecRecLean).write(System.out);
}