diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GenericAttribute.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GenericAttribute.java index 6262123228db8e5638098f9fe380fe576d80f4a6..041c688b98d2a2f5cd3bb1dc7479967545dd5f68 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GenericAttribute.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GenericAttribute.java @@ -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();