Commit 14f49201 authored by Riegel's avatar Riegel
Browse files

Improve value-String creation of GenericAttribute

parent b706f2bf
2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 4 additions and 4 deletions
+4 -4
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment