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
8a154830
Commit
8a154830
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Refactor: Rename getFileName() function
parent
2d07018a
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
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LibraryObject.java
+2
-2
...ft/stuttgart/citydoctor2/datastructure/LibraryObject.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
+1
-1
...rt/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/ArchivePacker.java
+1
-1
...ava/de/hft/stuttgart/citydoctor2/utils/ArchivePacker.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipArchive.java
+1
-1
...a/de/hft/stuttgart/citydoctor2/zip/CityGmlZipArchive.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+1
-1
...ava/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntryFile.java
+1
-1
...de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntryFile.java
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
+1
-1
...c/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
+4
-4
...main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+1
-1
...ava/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
with
13 additions
and
13 deletions
+13
-13
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LibraryObject.java
+
2
-
2
View file @
8a154830
...
...
@@ -42,7 +42,7 @@ public class LibraryObject extends Geometry {
}
public
static
LibraryObject
of
(
CityGmlZipEntry
entry
,
ParserConfiguration
config
)
{
String
fileName
=
entry
.
getFileName
();
String
fileName
=
entry
.
getF
ullF
ileName
();
if
(
libraryObjects
.
containsKey
(
fileName
)){
return
libraryObjects
.
get
(
fileName
);
}
...
...
@@ -89,7 +89,7 @@ public class LibraryObject extends Geometry {
logger
.
error
(
e
.
getStackTrace
());
}
catch
(
CityGmlParseException
e
)
{
logger
.
error
(
String
.
format
(
"Encountered an error while parsing library object %s"
,
entry
.
getFileName
()));
"Encountered an error while parsing library object %s"
,
entry
.
getF
ullF
ileName
()));
logger
.
error
(
e
.
getStackTrace
());
}
return
geo
;
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
+
1
-
1
View file @
8a154830
...
...
@@ -96,7 +96,7 @@ public class Citygml3FeatureMapper extends ObjectWalker {
this
.
config
=
config
;
this
.
directory
=
null
;
this
.
zipEntry
=
entry
;
model
=
new
CityDoctorModel
(
config
,
Path
.
of
(
entry
.
getFileName
()).
toFile
());
model
=
new
CityDoctorModel
(
config
,
Path
.
of
(
entry
.
getF
ullF
ileName
()).
toFile
());
neighborDistance
=
1.8d
/
Math
.
pow
(
10
,
config
.
getNumberOfRoundingPlaces
());
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/ArchivePacker.java
+
1
-
1
View file @
8a154830
...
...
@@ -35,7 +35,7 @@ public class ArchivePacker {
continue
;
}
CityDoctorModel
model
=
entry
.
getModel
();
String
filename
=
tmpDir
.
toString
()
+
File
.
separator
+
entry
.
getFileName
();
String
filename
=
tmpDir
.
toString
()
+
File
.
separator
+
entry
.
getF
ullF
ileName
();
model
.
saveAs
(
filename
,
model
.
isValidated
());
}
zipDirectory
(
targetPath
,
tmpDir
.
toString
());
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipArchive.java
+
1
-
1
View file @
8a154830
...
...
@@ -89,7 +89,7 @@ public class CityGmlZipArchive implements Serializable {
public
CityGmlZipEntry
getEntry
(
String
fileName
)
{
fileName
=
stripArchivePath
(
fileName
);
for
(
CityGmlZipEntry
entry
:
entries
)
{
String
entryName
=
stripArchivePath
(
entry
.
getFileName
());
String
entryName
=
stripArchivePath
(
entry
.
getF
ullF
ileName
());
if
(
entryName
.
equals
(
fileName
))
{
return
entry
;
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntry.java
+
1
-
1
View file @
8a154830
...
...
@@ -109,7 +109,7 @@ public class CityGmlZipEntry implements Serializable {
return
parentArchive
;
}
public
String
getFileName
()
{
public
String
getF
ullF
ileName
()
{
return
fileName
;
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipEntryFile.java
+
1
-
1
View file @
8a154830
...
...
@@ -15,7 +15,7 @@ public class CityGmlZipEntryFile implements AutoCloseable {
public
CityGmlZipEntryFile
(
CityGmlZipEntry
entry
)
throws
IOException
{
CityGmlZipArchive
archive
=
entry
.
getArchive
();
zip
=
new
ZipFile
(
archive
.
getArchivePath
().
toFile
());
zipEntry
=
zip
.
getEntry
(
entry
.
getFileName
());
zipEntry
=
zip
.
getEntry
(
entry
.
getF
ullF
ileName
());
this
.
cgmlZipEntry
=
entry
;
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
+
1
-
1
View file @
8a154830
...
...
@@ -32,7 +32,7 @@ public class ZipTest {
assertEquals
(
5
,
cgmlArch
.
getEntries
().
size
());
for
(
CityGmlZipEntry
entry
:
cgmlArch
.
getEntries
())
{
assertNotNull
(
entry
);
assertTrue
(
entry
.
getFileName
().
matches
(
"^mock[1-5].gml$"
));
assertTrue
(
entry
.
getF
ullF
ileName
().
matches
(
"^mock[1-5].gml$"
));
assertNull
(
entry
.
getErrorType
());
assertNotNull
(
entry
.
getModel
());
assertEquals
(
1
,
entry
.
getModel
().
getNumberOfFeatures
());
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
+
4
-
4
View file @
8a154830
...
...
@@ -751,9 +751,9 @@ public class Checker {
for
(
CityGmlZipEntry
entry
:
archive
.
getEntries
())
{
String
xmlOutput
=
xmlDirectory
==
null
?
null
:
xmlDirectory
+
entry
.
getFileName
().
replaceFirst
(
"\\..+"
,
".xml"
);
String
pdfOutput
=
pdfDirectory
==
null
?
null
:
pdfDirectory
+
entry
.
getFileName
().
replaceFirst
(
"\\..+"
,
".pdf"
);
String
outputFile
=
outputDirectory
==
null
?
null
:
outputDirectory
+
entry
.
getFileName
();
String
xmlOutput
=
xmlDirectory
==
null
?
null
:
xmlDirectory
+
entry
.
getF
ullF
ileName
().
replaceFirst
(
"\\..+"
,
".xml"
);
String
pdfOutput
=
pdfDirectory
==
null
?
null
:
pdfDirectory
+
entry
.
getF
ullF
ileName
().
replaceFirst
(
"\\..+"
,
".pdf"
);
String
outputFile
=
outputDirectory
==
null
?
null
:
outputDirectory
+
entry
.
getF
ullF
ileName
();
streamCheck
(
entry
,
xmlOutput
,
pdfOutput
,
config
,
l
,
outputFile
);
}
if
(
outputDirectory
!=
null
)
{
...
...
@@ -772,7 +772,7 @@ public class Checker {
try
(
BufferedOutputStream
xmlBos
=
getXmlOutputMaybe
(
xmlOutput
);
BufferedOutputStream
pdfBos
=
getPdfOutputMaybe
(
pdfOutput
))
{
Checker
c
=
new
Checker
(
config
,
null
);
String
fileName
=
entry
.
getFileName
();
String
fileName
=
entry
.
getF
ullF
ileName
();
// create reporter if available
XmlStreamReporter
xmlReporter
=
getXmlReporter
(
config
,
xmlBos
,
fileName
);
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+
1
-
1
View file @
8a154830
...
...
@@ -263,7 +263,7 @@ public class ZipEntryManager {
}
private
void
showMetadata
(
CityGmlZipEntry
entry
)
{
subpathValueTxt
.
setText
(
entry
.
getFileName
());
subpathValueTxt
.
setText
(
entry
.
getF
ullF
ileName
());
if
(
entry
.
getFileSize
()
!=
-
1L
)
{
long
fileSize
=
entry
.
getFileSize
();
long
kb
=
1024L
;
...
...
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