Skip to content
GitLab
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
Jan 07, 2025
by
Riegel
Browse files
Refactor: Add support for optional Progresslistener
parent
54673522
Changes
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/CityGmlParser.java
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
)
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
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
);
...
...
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