exp = (Experiment) KOML.read(expFile);
}
else
// XML?
if (expFile.toLowerCase().endsWith(".xml")) {
XMLExperiment xml = new XMLExperiment();
exp = (Experiment) xml.read(expFile);
}
// binary
else {
FileInputStream fi = new FileInputStream(expFile);
ObjectInputStream oi = new ObjectInputStream(
new BufferedInputStream(fi));
exp = (Experiment)oi.readObject();
oi.close();
}
// allow extra datasets to be added to pre-loaded experiment from command line
String dataName;
do {
dataName = Utils.getOption('T', args);
if (dataName.length() != 0) {
File dataset = new File(dataName);
exp.getDatasets().addElement(dataset);
}
} while (dataName.length() != 0);
}
System.err.println("Experiment:\n" + exp.toString());
if (saveFile.length() != 0) {
// KOML?
if ( (KOML.isPresent()) && (saveFile.toLowerCase().endsWith(KOML.FILE_EXTENSION)) ) {
KOML.write(saveFile, exp);
}
else
// XML?
if (saveFile.toLowerCase().endsWith(".xml")) {
XMLExperiment xml = new XMLExperiment();
xml.write(saveFile, exp);
}
// binary
else {
FileOutputStream fo = new FileOutputStream(saveFile);
ObjectOutputStream oo = new ObjectOutputStream(