* determined automatically which is time and space
* expensive.
*/
@SuppressWarnings("unused")
private static void extractAllStatisticsFilesIn(File path, HashSet<String> changingParams) {
ParCollection params = GlobalVariables.getPrematureParameters();
params.complete();
params.setLoggingLevel(-1);
String endungGZ = "gz";
String endung = "xml";
String[] gespGrGZ = path.list(new FileNamePostfixFilter(endungGZ));
String[] gespGr;
String[] gespGrFIT;
if (gespGrGZ == null) {
StaticMethods.log(
StaticMethods.LOG_ERROR,
"Ungueltiges Verzeichnis: " + path.getAbsolutePath(),
params);
throw new RuntimeException("Ungültiges Verzeichnis.\n" + path.getAbsolutePath());
}
// Entpacke Dateien.
for (String s : gespGrGZ) {
if (!new File(path.getAbsolutePath() + File.separator + StaticMethods.datNamOhneHintErw(s)).exists()) {
StaticMethods.logInfo("Entpacken " + s + ".", params);
StaticMethods.entpackeDatei(
path.getAbsolutePath() + File.separator + s,
path.getAbsolutePath() + File.separator + StaticMethods.datNamOhneHintErw(s),
false);
} else {
params.logInfo("Datei existiert bereits: " + StaticMethods.datNamOhneHintErw(s));
}
}
gespGr = path.list(new FileNamePostfixFilter(endung));
// Find all changing parameters.
HashSet<String> differingPars;
if (changingParams != null) {
differingPars = changingParams;
} else {
differingPars = new HashSet<String>();
ArrayList<SingleParameter> allPars0 = null;
for (String s : gespGr) {
if (new File(path + "\\" + s + "-fitness.txt").exists()) {
params.logInfo("Datei existiert bereits: " + s + "-fitness.txt");
} else {
XMLAufnLesen read = new XMLAufnLesen(new File(path + "\\" + s), params);
params.logInfo("Datei gelesen: " + s);
if (allPars0 == null) {
allPars0 = read.getParams().getAllPars();
}
ParCollection parColl = read.getParams();
ArrayList<SingleParameter> allParsI = parColl.getAllPars();
for (SingleParameter par0 : allPars0) {
for (SingleParameter parI : allParsI) {
if (par0.getParameterName().equals(parI.getParameterName())) {
if (!par0.getParValue().equals(parI.getParValue())) {
differingPars.add(par0.getParameterName());