Commit 358dfea5 authored by Matthias Betz's avatar Matthias Betz
Browse files

Add option to not store quality ade

parent 63f5261a
......@@ -123,11 +123,18 @@ public class CityDoctorModel {
water.stream()).flatMap(co -> co);
}
public void saveAs(String file) throws CityDoctorWriteException {
public void saveAs(String file, boolean saveQualityAde) throws CityDoctorWriteException {
if (file.endsWith(".off")) {
exportAsOff(file);
} else {
ValidationPlan tempPlan = plan;
if (!saveQualityAde) {
setValidated(null);
}
exportAsGML(file);
if (!saveQualityAde) {
setValidated(tempPlan);
}
}
}
......
......@@ -140,7 +140,7 @@ public class CityDoctorModelTest {
b.setGmlObject(gmlBuilding);
model.addBuilding(b);
File saveFile = folder.newFile();
model.saveAs(saveFile.getAbsolutePath());
model.saveAs(saveFile.getAbsolutePath(), true);
assertTrue(saveFile.exists());
assertTrue(saveFile.length() > 0);
......@@ -206,7 +206,7 @@ public class CityDoctorModelTest {
b.setGmlObject(gmlBuilding);
model.addBuilding(b);
File saveFile = folder.newFile();
model.saveAs(saveFile.getAbsolutePath());
model.saveAs(saveFile.getAbsolutePath(), true);
assertTrue(saveFile.exists());
assertTrue(saveFile.length() > 0);
......
......@@ -176,7 +176,7 @@ public class CityDoctorValidation {
Checker c = new Checker(config, model);
c.runChecks(xmlOutput, pdfOutput, null);
if (outputFile != null) {
model.saveAs(outputFile);
model.saveAs(outputFile, true);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment