private static final int DEFAULT_VALUE = 0;
private ReportBatteryXMLBind reporter = new ReportBatteryXMLBind();
public void reportIteration(Test test, StateDAOPairTO stateDAOPair, RestrictionManagerHelper manager, int iteration) throws JAXBException, DocumentBuilderException, IOException {
TestInfoReport testInfoReport = new TestInfoReport();
TestReportType report = new TestReportType();
ReportBattery reportBattery = new ReportBattery();
testInfoReport.setId(test.getId()+"_iter_"+iteration);
testInfoReport.setResources(test.getResources());
OntoSpreadConfigReport value = new OntoSpreadConfigReport();
value.setActivation(manager.getSpreadMinAct()!=null?manager.getSpreadMinAct().getMinActivationValue():DEFAULT_VALUE);
value.setContext(manager.getSpreadContext()!=null?manager.getSpreadContext().getContext():DEFAULT_STRING);
value.setRetries(manager.getSpreadContext()!=null?manager.getSpreadContext().getCurrentRetries():DEFAULT_VALUE);
value.setMaxConcepts(manager.getSpreadMaxConcepts()!=null?manager.getSpreadMaxConcepts().getMaxConceptsSpreaded():0);
value.setMinConcepts(manager.getSpreadMinConcepts()!=null?manager.getSpreadMinConcepts().getMinConceptsSpreaded():0);
value.setTime(manager.getSpreadTime()!=null?manager.getSpreadTime().getMaxTime():0);
value.setPrizePaths(test.getOntoSpreadConfig().isPrizePaths());
value.setRelations(test.getOntoSpreadConfig().getRelations());
value.setFunction(manager.getFunctionType()!=null?manager.getFunctionType():FunctionType.H_1);
testInfoReport.setOntoSpreadConfig(value);
report.setOntoSpreadStateXML(OntoSpreadStateXMLSerializer.asXML(stateDAOPair.getOntoSpreadState()));
StatTOListType stats = new StatTOListType();
StatTO[] ontoStats = stateDAOPair.getOntoDAO().getStats();
for (StatTO statTO : ontoStats) {
StatTOType statTOType = new StatTOType();
statTOType.setType(statTO.getType());
statTOType.setValue(statTO.getValue());
stats.getStatTOs().add(statTOType);
}
report.setOntologyStats(stats);
report.getTestReports().add(testInfoReport);
reportBattery.getReports().add(report);
Document doc = reporter.serializeTestReportBattery(reportBattery);
writeFile(new File(