diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java index 03e0544050e3687525159a1b1a5eb4c20f1b91c9..231c549730dc3bb627e075f7163cb853d5d0a6ef 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java @@ -206,8 +206,14 @@ public class CityGmlParser { } } + public static CityDoctorModel parseCityGmlZipEntry(CityGmlZipEntry entry, ParserConfiguration config) throws CityGmlParseException, InvalidGmlFileException, IOException { + return parseCityGmlZipEntry(entry, config, null); + } + + public static CityDoctorModel parseCityGmlZipEntry(CityGmlZipEntry entry, ParserConfiguration config, ProgressListener l) + throws CityGmlParseException, InvalidGmlFileException, IOException { CityGMLContext context = getContext(); if (config.getValidate()) { @@ -221,7 +227,7 @@ public class CityGmlParser { } } - return decompressAndParseCityGmlEntry(entry, config, context); + return decompressAndParseCityGmlEntry(entry, config, l, context); } public static CityDoctorModel decompressAndParseCityGmlEntry(CityGmlZipEntry entry, ParserConfiguration config, CityGMLContext context) diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java index c0375890c4799d93b5b46df0e46fa9b7e9bcbe89..bada4da7fba3c2d6374a486e7e086e0cee22313e 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java @@ -5,6 +5,7 @@ import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException; import de.hft.stuttgart.citydoctor2.parser.CityGmlParser; import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException; import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration; +import de.hft.stuttgart.citydoctor2.parser.ProgressListener; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -35,6 +36,10 @@ public class CityGmlZipEntry implements Serializable { } public void loadEntry(ParserConfiguration config) { + loadEntry(config, null); + } + + public void loadEntry(ParserConfiguration config, ProgressListener l) { if (decompressed) { return; } @@ -43,7 +48,7 @@ public class CityGmlZipEntry implements Serializable { return; } try { - this.model = CityGmlParser.parseCityGmlZipEntry(this, config); + this.model = CityGmlParser.parseCityGmlZipEntry(this, config, l); this.decompressed = true; } catch (CityGmlParseException | InvalidGmlFileException e) { logger.error(e);