CompositeTripleHandler compositeTH1 = new CompositeTripleHandler();
compositeTH1.addChild(cth1);
compositeTH1.addChild(ctw1);
try {
runner.extract(
new ExtractionParameters(
DefaultConfiguration.singleton(),
ValidationMode.None
),
source,
compositeTH1
);
} finally {
compositeTH1.close();
}
logger.info(baos.toString());
Assert.assertEquals("Unexpected number of triples.", EXPECTED_TRIPLES, cth1.getCount() );
baos.reset();
CountingTripleHandler cth2 = new CountingTripleHandler();
NTriplesWriter ctw2 = new NTriplesWriter(baos);
CompositeTripleHandler compositeTH2 = new CompositeTripleHandler();
compositeTH2.addChild(cth2);
compositeTH2.addChild(ctw2);
runner.extract(
new ExtractionParameters(
DefaultConfiguration.singleton(),
ValidationMode.ValidateAndFix
),
source,
compositeTH2