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
ac539686
Commit
ac539686
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Fix: Parsing of LibraryObjects in CityGmlZipArchive
parent
0a152a4c
master
dev
dev_gui_features_zip_loading
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/mapper/citygml3/Citygml3FeatureMapper.java
+2
-1
...rt/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+8
-2
...ava/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
with
10 additions
and
3 deletions
+10
-3
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
+
2
-
1
View file @
ac539686
...
...
@@ -823,7 +823,8 @@ public class Citygml3FeatureMapper extends ObjectWalker {
libObj
=
LibraryObject
.
of
(
libraryObjectPath
,
config
);
}
else
{
String
libraryObjectPath
=
ig
.
getLibraryObject
();
CityGmlZipEntry
libEntry
=
zipEntry
.
getArchive
().
getEntry
(
libraryObjectPath
);
Path
loPath
=
zipEntry
.
resolveLibraryObjectPath
(
libraryObjectPath
);
CityGmlZipEntry
libEntry
=
zipEntry
.
getArchive
().
getEntry
(
loPath
.
toString
());
libObj
=
LibraryObject
.
of
(
libEntry
,
config
);
}
if
(
libObj
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+
8
-
2
View file @
ac539686
...
...
@@ -12,6 +12,7 @@ import org.apache.logging.log4j.Logger;
import
java.io.IOException
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.nio.file.Path
;
import
java.util.zip.ZipEntry
;
public
class
CityGmlZipEntry
implements
Serializable
{
...
...
@@ -20,6 +21,7 @@ public class CityGmlZipEntry implements Serializable {
@Serial
private
static
final
long
serialVersionUID
=
-
5732913269959043262L
;
private
final
Path
filePath
;
private
final
String
fileName
;
private
final
String
displayName
;
private
transient
CityDoctorModel
model
;
...
...
@@ -91,8 +93,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
]
;
this
.
filePath
=
Path
.
of
(
entry
.
getName
()
);
this
.
displayName
=
filePath
.
getFileName
().
toString
()
;
if
(
entry
.
getSize
()
!=
-
1
)
{
this
.
fileSize
=
entry
.
getSize
();
}
...
...
@@ -129,6 +131,10 @@ public class CityGmlZipEntry implements Serializable {
fileSize
=
size
;
}
public
Path
resolveLibraryObjectPath
(
String
libraryObjectPath
)
{
return
filePath
.
getParent
().
resolve
(
libraryObjectPath
);
}
public
boolean
isDecompressed
()
{
return
decompressed
;
}
...
...
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