Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
8dffaa6a
Commit
8dffaa6a
authored
3 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Refactor: Cleanup code
parent
cdc6fd14
master
dev
dev_cpp_code_conversion
dev_gui_features_zip_loading
3.17.0
archive/dev_gui_features_zip_loading
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CityDoctorParent/Extensions/CityDoctorZipLoader/src/main/java/de/hft/stuttgart/citydoctor2/ziploader/CityGmlArchive.java
+4
-8
...e/hft/stuttgart/citydoctor2/ziploader/CityGmlArchive.java
with
4 additions
and
8 deletions
+4
-8
CityDoctorParent/Extensions/CityDoctorZipLoader/src/main/java/de/hft/stuttgart/citydoctor2/ziploader/CityGmlArchive.java
+
4
-
8
View file @
8dffaa6a
...
...
@@ -27,9 +27,7 @@ public class CityGmlArchive {
@Serial
private
static
final
long
serialVersionUID
=
2168389511043362615L
;
private
List
<
CityGmlZipEntry
>
entries
;
private
boolean
validated
=
false
;
private
final
List
<
CityGmlZipEntry
>
entries
;
public
static
CityGmlArchive
fromZipFile
(
String
zipFile
,
ParserConfiguration
config
)
{
ArrayList
<
CityGmlZipEntry
>
archiveEntries
=
new
ArrayList
<>();
...
...
@@ -48,9 +46,9 @@ public class CityGmlArchive {
}
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
logger
.
error
(
e
);
}
catch
(
Exception
e
){
// Catch and rethrow Exception to ensure tmpDir deletion
// Catch and rethrow
other
Exception
s
to ensure tmpDir deletion
in finally block
throw
e
;
}
finally
{
if
(
tmpDir
!=
null
)
{
...
...
@@ -61,7 +59,7 @@ public class CityGmlArchive {
}
}
}
logger
.
info
(
"
Parsed z
ip-archive
with {} entries
"
,
archiveEntries
.
size
());
logger
.
info
(
"
Z
ip-archive
successfully uncompressed, {} CityGml files detected
"
,
archiveEntries
.
size
());
return
new
CityGmlArchive
(
archiveEntries
);
}
...
...
@@ -74,12 +72,10 @@ public class CityGmlArchive {
}
public
void
checkEntries
(){
validated
=
false
;
for
(
CityGmlZipEntry
entry
:
entries
){
Checker
checker
=
new
Checker
(
entry
.
getModel
());
checker
.
runChecks
();
}
validated
=
true
;
}
public
List
<
CityGmlZipEntry
>
getEntries
()
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets