diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java index 9e397799c64021b4eaacdd06fbb93f56115b6ae9..0647f15c88185dffa89ba71b080ed5171a34bf5e 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java @@ -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); + } } } diff --git a/CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModelTest.java b/CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModelTest.java index 5695a1703abfe60c71bd71b3e79b5c0b2f07813d..6d7cda6c74d6b99515e7b2f330495671c341c122 100644 --- a/CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModelTest.java +++ b/CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModelTest.java @@ -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); diff --git a/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/CityDoctorValidation.java b/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/CityDoctorValidation.java index 3d9d228963350505335d36e0dbe84ad76875a9c5..9b5e1f134d44e1facfc7a90350093ed8f103c8a8 100644 --- a/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/CityDoctorValidation.java +++ b/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/CityDoctorValidation.java @@ -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); } } }