Commit 9aa68d69 authored by Riegel's avatar Riegel
Browse files

Refactor: Rename ZipEntryPicker to ZipEntryManager

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 60 additions and 59 deletions
+60 -59
...@@ -104,22 +104,23 @@ CheckDialog.schematronFileLabel=Schematron File: ...@@ -104,22 +104,23 @@ CheckDialog.schematronFileLabel=Schematron File:
CheckDialog.selectBtn=Select CheckDialog.selectBtn=Select
CheckDialog.checkBtn=Check CheckDialog.checkBtn=Check
CheckDialog.cancelBtn=Cancel CheckDialog.cancelBtn=Cancel
ZipEntryPicker.entryListTitle=Zip-entries ZipEntryManager.title=Zip-entry manager
ZipEntryPicker.metadata=Metadata ZipEntryManager.entryListTitle=Zip-entries
ZipEntryPicker.subpathLbl=Subpath: ZipEntryManager.metadata=Metadata
ZipEntryPicker.erroneousLbl=Erroneous: ZipEntryManager.subpathLbl=Subpath:
ZipEntryPicker.excessiveFileSize=Filesize exceeds memory ZipEntryManager.erroneousLbl=Erroneous:
ZipEntryPicker.invalidCityGml=Invalid CityGML file ZipEntryManager.excessiveFileSize=Filesize exceeds memory
ZipEntryPicker.ioError=Unable to access file ZipEntryManager.invalidCityGml=Invalid CityGML file
ZipEntryPicker.filesizeLbl=Filesize: ZipEntryManager.ioError=Unable to access file
ZipEntryPicker.validatedLbl=Validated: ZipEntryManager.filesizeLbl=Filesize:
ZipEntryPicker.objectCountLbl=Object count: ZipEntryManager.validatedLbl=Validated:
ZipEntryPicker.loadBtn=Load CityGML model ZipEntryManager.objectCountLbl=Object count:
ZipEntryPicker.decompressBtn=Unpack file ZipEntryManager.loadBtn=Load CityGML model
ZipEntryPicker.cancelBtn=Cancel ZipEntryManager.decompressBtn=Unpack file
ZipEntryPicker.unknownValue=N/A ZipEntryManager.cancelBtn=Cancel
ZipEntryPicker.yes=Yes ZipEntryManager.unknownValue=N/A
ZipEntryPicker.no=No ZipEntryManager.yes=Yes
ZipEntryManager.no=No
WriteReportDialog.writeBtn=Save WriteReportDialog.writeBtn=Save
WriteReportDialog.cancelBtn=Cancel WriteReportDialog.cancelBtn=Cancel
WriteReportDialog.errorStatisticsLabel=Error Statistics WriteReportDialog.errorStatisticsLabel=Error Statistics
......
...@@ -102,22 +102,23 @@ CheckDialog.schematronFileLabel=Schematron Datei ...@@ -102,22 +102,23 @@ CheckDialog.schematronFileLabel=Schematron Datei
CheckDialog.selectBtn=Ausw\u00e4hlen CheckDialog.selectBtn=Ausw\u00e4hlen
CheckDialog.checkBtn=Pr\u00fcfen CheckDialog.checkBtn=Pr\u00fcfen
CheckDialog.cancelBtn=Abbrechen CheckDialog.cancelBtn=Abbrechen
ZipEntryPicker.entryListTitle=Zipeintr\u00e4ge ZipEntryManager.title=Zipeintrag Manager
ZipEntryPicker.metadata=Metadaten ZipEntryManager.entryListTitle=Zipeintr\u00e4ge
ZipEntryPicker.subpathLbl=Unterpfad: ZipEntryManager.metadata=Metadaten
ZipEntryPicker.erroneousLbl=Fehlerhaft: ZipEntryManager.subpathLbl=Unterpfad:
ZipEntryPicker.excessiveFileSize=Datei zu gro\u00DF ZipEntryManager.erroneousLbl=Fehlerhaft:
ZipEntryPicker.invalidCityGml=Ung\u00fcltige CityGML Datei ZipEntryManager.excessiveFileSize=Datei zu gro\u00DF
ZipEntryPicker.ioError=Dateizugriff fehlgeschlagen ZipEntryManager.invalidCityGml=Ung\u00fcltige CityGML Datei
ZipEntryPicker.filesizeLbl=Dateigr\u00f6\u00DFe: ZipEntryManager.ioError=Dateizugriff fehlgeschlagen
ZipEntryPicker.validatedLbl=Validiert: ZipEntryManager.filesizeLbl=Dateigr\u00f6\u00DFe:
ZipEntryPicker.objectCountLbl=Objektanzahl: ZipEntryManager.validatedLbl=Validiert:
ZipEntryPicker.loadBtn=CityGML Modell laden ZipEntryManager.objectCountLbl=Objektanzahl:
ZipEntryPicker.decompressBtn=Datei entpacken ZipEntryManager.loadBtn=CityGML Modell laden
ZipEntryPicker.cancelBtn=Abbruch ZipEntryManager.decompressBtn=Datei entpacken
ZipEntryPicker.unknownValue=Unbekannt ZipEntryManager.cancelBtn=Abbruch
ZipEntryPicker.yes=Ja ZipEntryManager.unknownValue=Unbekannt
ZipEntryPicker.no=Nein ZipEntryManager.yes=Ja
ZipEntryManager.no=Nein
WriteReportDialog.writeBtn=Speichern WriteReportDialog.writeBtn=Speichern
WriteReportDialog.cancelBtn=Abbrechen WriteReportDialog.cancelBtn=Abbrechen
WriteReportDialog.errorStatisticsLabel=Fehler Statistik WriteReportDialog.errorStatisticsLabel=Fehler Statistik
......
...@@ -30,7 +30,6 @@ import org.xml.sax.SAXParseException; ...@@ -30,7 +30,6 @@ import org.xml.sax.SAXParseException;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function; import java.util.function.Function;
...@@ -47,7 +46,7 @@ public class CityDoctorController { ...@@ -47,7 +46,7 @@ public class CityDoctorController {
private ParserConfiguration currentConfig; private ParserConfiguration currentConfig;
private String sourceFile; private String sourceFile;
private CityGmlZipArchive zipArchive; private CityGmlZipArchive zipArchive;
private ZipEntryPicker currentZipEntryPicker; private ZipEntryManager currentZipEntryManager;
private Checker currentChecker; private Checker currentChecker;
private HighlightController highlightController; private HighlightController highlightController;
...@@ -156,8 +155,8 @@ public class CityDoctorController { ...@@ -156,8 +155,8 @@ public class CityDoctorController {
Platform.runLater(() -> { Platform.runLater(() -> {
try { try {
currentZipEntryPicker = new ZipEntryPicker(mainWindow.getMainStage(), this); currentZipEntryManager = new ZipEntryManager(mainWindow.getMainStage(), this);
currentZipEntryPicker.show(); currentZipEntryManager.show();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
...@@ -217,7 +216,7 @@ public class CityDoctorController { ...@@ -217,7 +216,7 @@ public class CityDoctorController {
} }
public void showZipManager() { public void showZipManager() {
Platform.runLater(() -> currentZipEntryPicker.show()); Platform.runLater(() -> currentZipEntryManager.show());
} }
private void setupFeatureTabs() { private void setupFeatureTabs() {
......
...@@ -31,9 +31,9 @@ import org.apache.logging.log4j.Logger; ...@@ -31,9 +31,9 @@ import org.apache.logging.log4j.Logger;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
public class ZipEntryPicker { public class ZipEntryManager {
private static final Logger logger = LogManager.getLogger(ZipEntryPicker.class); private static final Logger logger = LogManager.getLogger(ZipEntryManager.class);
private Stage stage; private Stage stage;
private CityGmlZipArchive archive; private CityGmlZipArchive archive;
...@@ -96,10 +96,10 @@ public class ZipEntryPicker { ...@@ -96,10 +96,10 @@ public class ZipEntryPicker {
private CityDoctorController controller; private CityDoctorController controller;
private int currentlyLoadedEntry = -1; private int currentlyLoadedEntry = -1;
private String unknownValueText = Localization.getText("ZipEntryPicker.unknownValue"); private String unknownValueText = Localization.getText("ZipEntryManager.unknownValue");
public ZipEntryPicker(Window parent, CityDoctorController controller) throws IOException { public ZipEntryManager(Window parent, CityDoctorController controller) throws IOException {
FXMLLoader loader = new FXMLLoader(ZipEntryPicker.class.getResource("ZipEntryPicker.fxml")); FXMLLoader loader = new FXMLLoader(ZipEntryManager.class.getResource("ZipEntryManager.fxml"));
loader.setController(this); loader.setController(this);
this.controller = controller; this.controller = controller;
archive = controller.getZipArchive(); archive = controller.getZipArchive();
...@@ -109,7 +109,7 @@ public class ZipEntryPicker { ...@@ -109,7 +109,7 @@ public class ZipEntryPicker {
stage.setScene(new Scene(box)); stage.setScene(new Scene(box));
stage.initOwner(parent); stage.initOwner(parent);
stage.initModality(Modality.APPLICATION_MODAL); stage.initModality(Modality.APPLICATION_MODAL);
stage.setTitle("Zip-Entry Picker"); stage.setTitle(Localization.getText("ZipEntryManager.title"));
stage.getScene().addEventFilter(KeyEvent.KEY_PRESSED, (KeyEvent event) -> { stage.getScene().addEventFilter(KeyEvent.KEY_PRESSED, (KeyEvent event) -> {
if (event.getCode() == KeyCode.ESCAPE) { if (event.getCode() == KeyCode.ESCAPE) {
stage.close(); stage.close();
...@@ -221,13 +221,13 @@ public class ZipEntryPicker { ...@@ -221,13 +221,13 @@ public class ZipEntryPicker {
} }
private void applyLocalization() { private void applyLocalization() {
entriesPane.setText(Localization.getText("ZipEntryPicker.entryListTitle")); entriesPane.setText(Localization.getText("ZipEntryManager.entryListTitle"));
metadataPane.setText(Localization.getText("ZipEntryPicker.metadata")); metadataPane.setText(Localization.getText("ZipEntryManager.metadata"));
subpathLbl.setText(Localization.getText("ZipEntryPicker.subpathLbl")); subpathLbl.setText(Localization.getText("ZipEntryManager.subpathLbl"));
erroneousLbl.setText(Localization.getText("ZipEntryPicker.erroneousLbl")); erroneousLbl.setText(Localization.getText("ZipEntryManager.erroneousLbl"));
filesizeLbl.setText(Localization.getText("ZipEntryPicker.filesizeLbl")); filesizeLbl.setText(Localization.getText("ZipEntryManager.filesizeLbl"));
validatedLbl.setText(Localization.getText("ZipEntryPicker.validatedLbl")); validatedLbl.setText(Localization.getText("ZipEntryManager.validatedLbl"));
objectCountLbl.setText(Localization.getText("ZipEntryPicker.objectCountLbl")); objectCountLbl.setText(Localization.getText("ZipEntryManager.objectCountLbl"));
subpathValueTxt.setText(unknownValueText); subpathValueTxt.setText(unknownValueText);
erroneousValue.setText(unknownValueText); erroneousValue.setText(unknownValueText);
...@@ -235,9 +235,9 @@ public class ZipEntryPicker { ...@@ -235,9 +235,9 @@ public class ZipEntryPicker {
validatedValue.setText(unknownValueText); validatedValue.setText(unknownValueText);
objectCountValue.setText(unknownValueText); objectCountValue.setText(unknownValueText);
loadBtn.setTooltip(new Tooltip(Localization.getText("ZipEntryPicker.loadBtn"))); loadBtn.setTooltip(new Tooltip(Localization.getText("ZipEntryManager.loadBtn")));
decompressBtn.setTooltip(new Tooltip(Localization.getText("ZipEntryPicker.decompressBtn"))); decompressBtn.setTooltip(new Tooltip(Localization.getText("ZipEntryManager.decompressBtn")));
cancelBtn.setText(Localization.getText("ZipEntryPicker.cancelBtn")); cancelBtn.setText(Localization.getText("ZipEntryManager.cancelBtn"));
} }
private void populateZipEntryList() { private void populateZipEntryList() {
...@@ -284,7 +284,7 @@ public class ZipEntryPicker { ...@@ -284,7 +284,7 @@ public class ZipEntryPicker {
loadBtn.setDisable(true); loadBtn.setDisable(true);
decompressBtn.setDisable(true); decompressBtn.setDisable(true);
} else { } else {
erroneousValue.setText(Localization.getText("ZipEntryPicker.no")); erroneousValue.setText(Localization.getText("ZipEntryManager.no"));
loadBtn.setDisable(!entry.isDecompressed()); loadBtn.setDisable(!entry.isDecompressed());
decompressBtn.setDisable(entry.isDecompressed()); decompressBtn.setDisable(entry.isDecompressed());
...@@ -294,9 +294,9 @@ public class ZipEntryPicker { ...@@ -294,9 +294,9 @@ public class ZipEntryPicker {
return; return;
} }
if (entry.getModel().isValidated()) { if (entry.getModel().isValidated()) {
validatedValue.setText(Localization.getText("ZipEntryPicker.yes")); validatedValue.setText(Localization.getText("ZipEntryManager.yes"));
} else { } else {
validatedValue.setText(Localization.getText("ZipEntryPicker.no")); validatedValue.setText(Localization.getText("ZipEntryManager.no"));
} }
objectCountValue.setText(String.valueOf(entry.getModel().getNumberOfFeatures())); objectCountValue.setText(String.valueOf(entry.getModel().getNumberOfFeatures()));
} }
...@@ -312,13 +312,13 @@ public class ZipEntryPicker { ...@@ -312,13 +312,13 @@ public class ZipEntryPicker {
private String getErrorText(ZipEntryErrorType error) { private String getErrorText(ZipEntryErrorType error) {
switch (error) { switch (error) {
case EXCESSIVE_FILESIZE -> { case EXCESSIVE_FILESIZE -> {
return Localization.getText("ZipEntryPicker.excessiveFileSize"); return Localization.getText("ZipEntryManager.excessiveFileSize");
} }
case INVALID_CITY_GML_FILE -> { case INVALID_CITY_GML_FILE -> {
return Localization.getText("ZipEntryPicker.invalidCityGml"); return Localization.getText("ZipEntryManager.invalidCityGml");
} }
default -> { default -> {
return Localization.getText("ZipEntryPicker.ioError"); return Localization.getText("ZipEntryManager.ioError");
} }
} }
} }
......
Supports Markdown
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