String csv = BiomassCSVDAO.getCSV(zone.getManipulationID());
if (csv != null) {
csv = csv.substring(0, csv.lastIndexOf("\n"));
ResponseChartBiomass responseChartBiomass = new ResponseChartBiomass();
responseChartBiomass.setType(type);
responseChartBiomass.setCSV(csv);
responses.add(responseChartBiomass);
}
}
}
}
} else if (type == 1) {
World world = client.getWorld();
if (world != null) {
for (Zone zone : world.getGameEngine().getZoneList()) {
if (zone.isEnable()) {
String csv = SpeciesCSVDAO.getCSV(zone.getManipulationID());
if (csv != null) {
csv = csv.substring(0, csv.lastIndexOf("\n"));
ResponseChartBiomass responseChartBiomass = new ResponseChartBiomass();
responseChartBiomass.setType(type);
responseChartBiomass.setCSV(csv);
responses.add(responseChartBiomass);
}
}
}
}
} else if (type == 2) {
World world = client.getWorld();
if (world != null) {
for (Zone zone : world.getGameEngine().getZoneList()) {
if (zone.isEnable()) {
String csv = ScoreCSVDAO.getCSV(zone.getID());
if (csv != null) {
ResponseChartBiomass responseChartBiomass = new ResponseChartBiomass();
responseChartBiomass.setType(type);
responseChartBiomass.setCSV(csv);
responses.add(responseChartBiomass);
}
}
}