Commit 55b90c0f authored by Riegel's avatar Riegel
Browse files

Feat: Add getDisplayName()

Added the getDisplayName() function, which returns the filename without
the zipfile subpath prefix
2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 7 additions and 0 deletions
+7 -0
......@@ -20,6 +20,7 @@ public class CityGmlZipEntry implements Serializable {
private static final long serialVersionUID = -5732913269959043262L;
private final String fileName;
private final String displayName;
private transient CityDoctorModel model;
private CityGmlZipArchive parentArchive;
private boolean decompressed;
......@@ -85,6 +86,8 @@ public class CityGmlZipEntry implements Serializable {
protected CityGmlZipEntry(ZipEntry entry, CityGmlZipArchive parentArchive, boolean decompressed) {
this.fileName = entry.getName();
String[] nameSplits = fileName.split("/");
this.displayName = nameSplits[nameSplits.length - 1];
if (entry.getSize() != -1) {
this.fileSize = entry.getSize();
}
......@@ -105,6 +108,10 @@ public class CityGmlZipEntry implements Serializable {
return fileName;
}
public String getDisplayName() {
return displayName;
}
public ZipEntryErrorType getErrorType() {
return errorType;
}
......
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