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
14f49201
Commit
14f49201
authored
5 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Improve value-String creation of GenericAttribute
parent
b706f2bf
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GenericAttribute.java
+4
-4
...stuttgart/citydoctor2/datastructure/GenericAttribute.java
with
4 additions
and
4 deletions
+4
-4
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GenericAttribute.java
+
4
-
4
View file @
14f49201
...
...
@@ -26,7 +26,7 @@ public class GenericAttribute {
if
(
attributeProperty
.
getObject
()
instanceof
StringAttribute
sa
)
{
type
=
"StringAttribute"
;
value
=
sa
.
getValue
();
value
=
String
.
format
(
"\"%s\""
,
sa
.
getValue
()
)
;
}
else
if
(
attributeProperty
.
getObject
()
instanceof
IntAttribute
ia
)
{
type
=
"IntAttribute"
;
value
=
ia
.
getValue
().
toString
();
...
...
@@ -41,10 +41,10 @@ public class GenericAttribute {
value
=
ua
.
getValue
();
}
else
if
(
attributeProperty
.
getObject
()
instanceof
MeasureAttribute
ma
)
{
type
=
"MeasureAttribute"
;
value
=
ma
.
getValue
().
toString
(
);
value
=
String
.
format
(
"%s %s"
,
ma
.
getValue
().
getValue
().
toString
(),
ma
.
getValue
().
getUom
()
);
}
else
if
(
attributeProperty
.
getObject
()
instanceof
CodeAttribute
ca
)
{
type
=
"CodeAttribute"
;
value
=
ca
.
getValue
().
toString
(
);
type
=
String
.
format
(
"CodeAttribute (%s)"
,
ca
.
getValue
().
getLanguage
())
;
value
=
String
.
format
(
"'''%s''' %n CodeSpace: %s"
,
ca
.
getValue
().
getValue
(),
ca
.
getValue
().
getCodeSpace
()
);
}
else
{
logger
.
warn
(
"GenericAttribute {} is of unknown type {}"
,
attributeProperty
,
attributeProperty
.
getObject
());
value
=
attributeProperty
.
getObject
().
getValue
().
toString
();
...
...
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