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
3fd5502f
Commit
3fd5502f
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Style: Rename function
parent
2f90e7f0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 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
+6
-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
+1
-1
...main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
+1
-1
...e/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+1
-2
...ava/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
with
16 additions
and
12 deletions
+16
-12
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LibraryObject.java
+
2
-
2
View file @
3fd5502f
...
...
@@ -43,7 +43,7 @@ public class LibraryObject extends Geometry {
}
public
static
LibraryObject
of
(
CityGmlZipEntry
entry
,
ParserConfiguration
config
)
{
String
fileName
=
entry
.
get
FullFileName
();
String
fileName
=
entry
.
get
EntrySubPath
();
if
(
libraryObjects
.
containsKey
(
fileName
)){
return
libraryObjects
.
get
(
fileName
);
}
...
...
@@ -90,7 +90,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
.
get
FullFileName
()));
"Encountered an error while parsing library object %s"
,
entry
.
get
EntrySubPath
()));
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 @
3fd5502f
...
...
@@ -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
.
get
FullFileName
()).
toFile
());
model
=
new
CityDoctorModel
(
config
,
Path
.
of
(
entry
.
get
EntrySubPath
()).
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 @
3fd5502f
...
...
@@ -34,7 +34,7 @@ public class ArchivePacker {
continue
;
}
CityDoctorModel
model
=
entry
.
getModel
();
Path
filePath
=
tmpDir
.
resolve
(
entry
.
get
FullFileName
());
Path
filePath
=
tmpDir
.
resolve
(
entry
.
get
EntrySubPath
());
Files
.
createDirectories
(
filePath
.
getParent
());
model
.
saveAs
(
filePath
.
toString
(),
model
.
isValidated
());
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipArchive.java
+
1
-
1
View file @
3fd5502f
...
...
@@ -90,7 +90,7 @@ public class CityGmlZipArchive implements Serializable {
public
CityGmlZipEntry
getEntry
(
String
fileName
)
{
fileName
=
stripArchivePath
(
fileName
);
for
(
CityGmlZipEntry
entry
:
entries
)
{
String
entryName
=
stripArchivePath
(
entry
.
get
FullFileName
());
String
entryName
=
stripArchivePath
(
entry
.
get
EntrySubPath
());
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
+
6
-
1
View file @
3fd5502f
...
...
@@ -111,7 +111,12 @@ public class CityGmlZipEntry implements Serializable {
return
parentArchive
;
}
public
String
getFullFileName
()
{
/**
* Gets this entry's sub-path in the archive.
*
* @return Relative sub-path from the archive root directory.
*/
public
String
getEntrySubPath
()
{
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 @
3fd5502f
...
...
@@ -16,7 +16,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
.
get
FullFileName
());
zipEntry
=
zip
.
getEntry
(
entry
.
get
EntrySubPath
());
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 @
3fd5502f
...
...
@@ -32,7 +32,7 @@ public class ZipTest {
assertEquals
(
5
,
cgmlArch
.
getEntries
().
size
());
for
(
CityGmlZipEntry
entry
:
cgmlArch
.
getEntries
())
{
assertNotNull
(
entry
);
assertTrue
(
entry
.
get
FullFileName
().
matches
(
"^mock[1-5].gml$"
));
assertTrue
(
entry
.
get
EntrySubPath
().
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
+
1
-
1
View file @
3fd5502f
...
...
@@ -787,7 +787,7 @@ public class Checker {
try
(
BufferedOutputStream
xmlBos
=
getXmlOutputMaybe
(
xmlOutput
);
BufferedOutputStream
pdfBos
=
getPdfOutputMaybe
(
pdfOutput
))
{
Checker
c
=
new
Checker
(
config
,
null
);
String
fileName
=
entry
.
get
FullFileName
();
String
fileName
=
entry
.
get
EntrySubPath
();
// 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/CityDoctorController.java
+
1
-
1
View file @
3fd5502f
...
...
@@ -1029,7 +1029,7 @@ public class CityDoctorController {
model
=
entry
.
getModel
();
if
(
model
.
isValidated
())
{
Checker
checker
=
previousCheckers
.
get
(
model
);
Files
.
createDirectories
(
tempOutput
.
resolve
(
entry
.
get
FullFileName
()).
getParent
());
Files
.
createDirectories
(
tempOutput
.
resolve
(
entry
.
get
EntrySubPath
()).
getParent
());
checker
.
writeXmlReport
(
tempOutput
.
resolve
(
entry
.
getDisplayName
()
+
"_report.xml"
).
toString
());
checker
.
writePdfReport
(
tempOutput
.
resolve
(
entry
.
getDisplayName
()
+
"_report.pdf"
).
toString
());
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+
1
-
2
View file @
3fd5502f
...
...
@@ -2,7 +2,6 @@ package de.hft.stuttgart.citydoctor2.gui;
import
de.hft.stuttgart.citydoctor2.gui.tree.ZipEntryListCell
;
import
de.hft.stuttgart.citydoctor2.gui.tree.ZipEntryNode
;
import
de.hft.stuttgart.citydoctor2.utils.ArchivePacker
;
import
de.hft.stuttgart.citydoctor2.utils.Localization
;
import
de.hft.stuttgart.citydoctor2.zip.CityGmlZipArchive
;
import
de.hft.stuttgart.citydoctor2.zip.CityGmlZipEntry
;
...
...
@@ -354,7 +353,7 @@ public class ZipEntryManager {
}
private
void
showMetadata
(
CityGmlZipEntry
entry
)
{
subpathValueTxt
.
setText
(
entry
.
get
FullFileName
());
subpathValueTxt
.
setText
(
entry
.
get
EntrySubPath
());
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