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
87fe26cc
Commit
87fe26cc
authored
Nov 11, 2025
by
Luna Riegel
Browse files
Style: Add Localization for CityDoctorValidation
parent
0b981610
Changes
3
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
View file @
87fe26cc
...
...
@@ -48,6 +48,17 @@ CityDoctorController.noSourceFile=Source file is null, no checks could be done
CityDoctorController.noZipFile
=
ZIP archive is null, no checks could be done
CityDoctorController.saveZipArchiveReports
=
Successfully exported validation reports!
CityDoctorValidation.Version
=
${versionString}
CityDoctorValidation.inputFileNotExisting
=
Input file '{}' does not exist.
CityDoctorValidation.loadingDefaultConfig
=
No configuration file given, loading default configuration
CityDoctorValidation.noConfig
=
No configuration file specified with -config [FILE]
CityDoctorValidation.noInputFile
=
No input file specified. (-in [FILE])
CityDoctorValidation.noOutputFile
=
No output file specified. (-out [FILE])
CityDoctorValidation.notExactlyOneConfigFile
=
Specify exactly one file as configuration
CityDoctorValidation.notExactlyOneInputFile
=
Specify exactly one file as input.
CityDoctorValidation.notExactlyOneOutputFile
=
Specify exactly one file as output.
CityDoctorValidation.notExactlyOnePDFOutput
=
Specify exactly one file as pdfReport
CityDoctorValidation.notExactlyOneXMLOutput
=
Specify exactly one file as xmlReport
CityDoctorValidation.wrongInputFileFormat
=
Input file '{}' does not end with .gml or .xml
CityGmlParser.chunkReadFailed
=
Failed to read GML file in chunks, falling back to reading the complete file
CityGmlParser.errorReadingGmlFile
=
Error while reading city gml file
\n
{}
CityGmlParser.errorWritingGmlFile
=
Error while writing city gml file
\n
{}
...
...
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties
View file @
87fe26cc
...
...
@@ -46,6 +46,17 @@ CityDoctorController.noDatamodel=Datenmodell ist null, keine Pr\u00fcfungen konn
CityDoctorController.noSourceFile
=
Quelldatei ist null, keine Pr
\u
00fcfungen konnten ausgef
\u
00fchrt werden
CityDoctorController.noZipFile
=
ZIP-Archiv ist null, keine Pr
\u
00fcfungen konnten ausgef
\u
00fchrt werden
CityDoctorController.saveZipArchiveReports
=
Validierungsberichte erfolgreich exportiert!
CityDoctorValidation.inputFileNotExisting
=
Eingabedatei '{}' existiert nicht.
CityDoctorValidation.loadingDefaultConfig
=
Keine Konfigurationsdatei angegeben, Standardkonfiguration wird geladen.
CityDoctorValidation.noConfig
=
Keine Konfigurationsdatei angegeben. (-config [DATEIPFAD])
CityDoctorValidation.noInputFile
=
Keine Eingabedatei angegeben. (-in [DATEIPFAD])
CityDoctorValidation.noOutputFile
=
Keinen Ausgabedateipfad angegeben. (-out [DATEIPFAD])
CityDoctorValidation.notExactlyOneConfigFile
=
Es muss exakt eine Konfigurationsdatei angegeben werden.
CityDoctorValidation.notExactlyOneInputFile
=
Es muss exakt eine Eingabedatei angegeben werden.
CityDoctorValidation.notExactlyOneOutputFile
=
Es muss exakt ein Ausgabedateipfad angegeben werden.
CityDoctorValidation.notExactlyOnePDFOutput
=
Es muss exakt ein Ausgabedateipfad fr den PDF-Bericht angegeben werden.
CityDoctorValidation.notExactlyOneXMLOutput
=
Es muss exakt ein Ausgabedateipfad fr den XML-Bericht angegeben werden.
CityDoctorValidation.wrongInputFileFormat
=
Eingabedatei '{}' ist keine .gml oder .xml Datei.
CityGmlParser.chunkReadFailed
=
Konnte Datei nicht in St
\u
00fccken lesen, versuche komplett zu lesen
CityGmlParser.errorReadingGmlFile
=
Fehler beim lesen der CityGML Datei
\n
{}
CityGmlParser.errorWritingGmlFile
=
Fehler beim schreiben der CityGML Datei
\n
{}
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/CityDoctorValidation.java
View file @
87fe26cc
...
...
@@ -23,9 +23,9 @@ import java.io.FileNotFoundException;
import
java.io.IOException
;
import
java.util.List
;
import
de.hft.stuttgart.citydoctor2.utils.Localization
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.ade.ADEException
;
import
de.hft.stuttgart.citydoctor2.check.Checker
;
import
de.hft.stuttgart.citydoctor2.check.ValidationConfiguration
;
...
...
@@ -81,12 +81,12 @@ public class CityDoctorValidation {
if
(
optional
)
{
return
null
;
}
logger
.
error
(
"No output file specified. (-out [FILE])"
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.noOutputFile"
)
);
System
.
exit
(
11
);
}
List
<
String
>
outFiles
=
argParser
.
getValues
(
"out"
);
if
(
outFiles
.
size
()
!=
1
)
{
logger
.
error
(
"Specify exactly one file as output."
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.notExactlyOneOutputFile"
)
);
System
.
exit
(
12
);
}
outputFile
=
outFiles
.
get
(
0
);
...
...
@@ -155,13 +155,13 @@ public class CityDoctorValidation {
ValidationConfiguration
config
,
String
outputFile
)
throws
CityDoctorWriteException
,
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
File
inputFile
=
new
File
(
input
);
if
(!
inputFile
.
exists
())
{
logger
.
error
(
"I
nput
f
ile
'{}' does not exist."
,
input
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.i
nput
F
ile
NotExisting"
)
,
input
);
System
.
exit
(
1
);
}
if
(
inputFile
.
getName
().
endsWith
(
".gml"
)
||
inputFile
.
getName
().
endsWith
(
".xml"
))
{
startFileValidation
(
inputFile
,
xmlOutput
,
pdfOutput
,
config
,
outputFile
);
}
else
{
logger
.
error
(
"Input file '{}' does not end with .gml or .xml and is not a zip archive."
,
input
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.wrongInputFileFormat"
)
,
input
);
System
.
exit
(
1
);
}
}
...
...
@@ -202,7 +202,7 @@ public class CityDoctorValidation {
if
(
argParser
.
containsOption
(
"pdfreport"
))
{
List
<
String
>
reportFiles
=
argParser
.
getValues
(
"pdfreport"
);
if
(
reportFiles
.
size
()
!=
1
)
{
logger
.
error
(
"Specify exactly one file as pdfRepor
t"
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.notExactlyOnePDFOutpu
t"
)
)
;
System
.
exit
(
6
);
}
return
reportFiles
.
get
(
0
);
...
...
@@ -214,7 +214,7 @@ public class CityDoctorValidation {
if
(
argParser
.
containsOption
(
"xmlreport"
))
{
List
<
String
>
reportFiles
=
argParser
.
getValues
(
"xmlreport"
);
if
(
reportFiles
.
size
()
!=
1
)
{
logger
.
error
(
"Specify exactly one file as xmlRepor
t"
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.notExactlyOneXMLOutpu
t"
)
)
;
System
.
exit
(
5
);
}
return
reportFiles
.
get
(
0
);
...
...
@@ -231,16 +231,16 @@ public class CityDoctorValidation {
if
(
argParser
.
containsOption
(
"config"
))
{
List
<
String
>
configFiles
=
argParser
.
getValues
(
"config"
);
if
(
configFiles
.
size
()
!=
1
)
{
logger
.
error
(
"Specify exactly one file as configuration"
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.notExactlyOneConfigFile"
)
);
System
.
exit
(
4
);
}
return
ValidationConfiguration
.
loadValidationConfig
(
configFiles
.
get
(
0
));
}
else
{
if
(
optional
)
{
logger
.
warn
(
"No configuration file given,
loading
d
efault
c
onfig
uration
"
);
logger
.
warn
(
Localization
.
getText
(
"CityDoctorValidation.
loading
D
efault
C
onfig"
)
);
return
ValidationConfiguration
.
loadStandardValidationConfig
();
}
else
{
logger
.
error
(
"No configuration file specified with -config [FILE]"
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.noConfig"
)
);
System
.
exit
(
7
);
return
null
;
}
...
...
@@ -252,7 +252,7 @@ public class CityDoctorValidation {
if
(
argParser
.
containsOption
(
"out"
))
{
List
<
String
>
outFiles
=
argParser
.
getValues
(
"out"
);
if
(
outFiles
.
size
()
!=
1
)
{
logger
.
error
(
"Specify exactly one file as output."
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.multipleOutputFiles"
)
);
System
.
exit
(
3
);
}
return
outFiles
.
get
(
0
);
...
...
@@ -271,12 +271,12 @@ public class CityDoctorValidation {
if
(
optional
)
{
return
null
;
}
logger
.
error
(
"No input file specified. (-in [FILE])"
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.noInputFile"
)
);
System
.
exit
(
1
);
}
List
<
String
>
inFiles
=
argParser
.
getValues
(
"in"
);
if
(
inFiles
.
size
()
!=
1
)
{
logger
.
error
(
"Specify exactly one file as input."
);
logger
.
error
(
Localization
.
getText
(
"CityDoctorValidation.notExactlyOneInputFile"
)
);
System
.
exit
(
2
);
}
inputFile
=
inFiles
.
get
(
0
);
...
...
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