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
59072f60
Commit
59072f60
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Refactor: Add support for optional Progresslistener
parent
54673522
master
dev
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java
+7
-1
...va/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+6
-1
...ava/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
with
13 additions
and
2 deletions
+13
-2
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java
+
7
-
1
View file @
59072f60
...
@@ -206,8 +206,14 @@ public class CityGmlParser {
...
@@ -206,8 +206,14 @@ public class CityGmlParser {
}
}
}
}
public
static
CityDoctorModel
parseCityGmlZipEntry
(
CityGmlZipEntry
entry
,
ParserConfiguration
config
)
public
static
CityDoctorModel
parseCityGmlZipEntry
(
CityGmlZipEntry
entry
,
ParserConfiguration
config
)
throws
CityGmlParseException
,
InvalidGmlFileException
,
IOException
{
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
();
CityGMLContext
context
=
getContext
();
if
(
config
.
getValidate
())
{
if
(
config
.
getValidate
())
{
...
@@ -221,7 +227,7 @@ public class CityGmlParser {
...
@@ -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
)
public
static
CityDoctorModel
decompressAndParseCityGmlEntry
(
CityGmlZipEntry
entry
,
ParserConfiguration
config
,
CityGMLContext
context
)
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+
6
-
1
View file @
59072f60
...
@@ -5,6 +5,7 @@ import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
...
@@ -5,6 +5,7 @@ import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import
de.hft.stuttgart.citydoctor2.parser.CityGmlParser
;
import
de.hft.stuttgart.citydoctor2.parser.CityGmlParser
;
import
de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException
;
import
de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
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.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
...
@@ -35,6 +36,10 @@ public class CityGmlZipEntry implements Serializable {
...
@@ -35,6 +36,10 @@ public class CityGmlZipEntry implements Serializable {
}
}
public
void
loadEntry
(
ParserConfiguration
config
)
{
public
void
loadEntry
(
ParserConfiguration
config
)
{
loadEntry
(
config
,
null
);
}
public
void
loadEntry
(
ParserConfiguration
config
,
ProgressListener
l
)
{
if
(
decompressed
)
{
if
(
decompressed
)
{
return
;
return
;
}
}
...
@@ -43,7 +48,7 @@ public class CityGmlZipEntry implements Serializable {
...
@@ -43,7 +48,7 @@ public class CityGmlZipEntry implements Serializable {
return
;
return
;
}
}
try
{
try
{
this
.
model
=
CityGmlParser
.
parseCityGmlZipEntry
(
this
,
config
);
this
.
model
=
CityGmlParser
.
parseCityGmlZipEntry
(
this
,
config
,
l
);
this
.
decompressed
=
true
;
this
.
decompressed
=
true
;
}
catch
(
CityGmlParseException
|
InvalidGmlFileException
e
)
{
}
catch
(
CityGmlParseException
|
InvalidGmlFileException
e
)
{
logger
.
error
(
e
);
logger
.
error
(
e
);
...
...
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