Commit 30f13b06 authored by Riegel's avatar Riegel
Browse files

Docs: Add Javadoc

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 13 additions and 6 deletions
+13 -6
......@@ -42,7 +42,7 @@ public class CityGmlZipEntryFile implements AutoCloseable {
*/
public InputStream getInputStream() throws IOException {
if (closed){
throw new IOException("Stream closed");
throw new IOException("CityGmlZipEntryFile closed");
}
return zip.getInputStream(zipEntry);
}
......@@ -54,7 +54,7 @@ public class CityGmlZipEntryFile implements AutoCloseable {
*/
public long getFileSize() throws IOException {
if (closed){
throw new IOException("Stream closed");
throw new IOException("CityGmlZipEntryFile closed");
}
if (cgmlZipEntry.getFileSize() == -1L) {
if (zipEntry.getSize() == -1) {
......
......@@ -2,6 +2,9 @@ package de.hft.stuttgart.citydoctor2.zip;
import java.util.zip.ZipException;
/**
* Signals that a ZIP-file is corrupted and couldn't be parsed.
*/
public class MalformedZipFileException extends ZipException {
public MalformedZipFileException() {
......
......@@ -316,6 +316,11 @@ public class CheckDialog {
showZipArchiveOptions(false);
}
/**
* Shows the option panel for ZIP-Archive checking and enables the ZIP-Archive checking mode for this dialog.
*
* @param enabled
*/
public void showZipArchiveOptions(boolean enabled) {
zipArchiveOptionsVBox.setDisable(!enabled);
zipArchiveOptionsVBox.setVisible(enabled);
......
......@@ -34,6 +34,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.function.Predicate;
/**
* This class implements a GUI for managing a loaded {@link CityGmlZipArchive} in CityDoctor.
*/
public class ZipEntryManager {
private static final Logger logger = LogManager.getLogger(ZipEntryManager.class);
......@@ -217,10 +220,6 @@ public class ZipEntryManager {
}
CityGmlZipEntry entry = entryList.getSelectionModel().getSelectedItem().getEntry();
if (entry.getErrorType() != null) {
/**
* Button should be disabled when an erroneous entry gets selected.
* Silently fail in case an erroneous entry is somehow selected on Action.
*/
logger.debug("IllegalState: loadBtn was pressed while an erroneous entry was selected");
populateZipEntryList(selectedIndex);
return;
......
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