From 78d0e332dc1d17291501e5ec85eeff29f3468222 Mon Sep 17 00:00:00 2001 From: Emil Dinchev Date: Mon, 22 Apr 2024 15:33:55 +0200 Subject: [PATCH] Update EntityMapper.java --- .../aas4j/v3/dataformat/json/valueonly/EntityMapper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/valueonly/EntityMapper.java b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/valueonly/EntityMapper.java index 8263fc6d..b20d9406 100644 --- a/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/valueonly/EntityMapper.java +++ b/dataformat-json/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/valueonly/EntityMapper.java @@ -18,7 +18,6 @@ import java.util.Iterator; import java.util.List; -import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer; import org.eclipse.digitaltwin.aas4j.v3.model.Entity; import org.eclipse.digitaltwin.aas4j.v3.model.EntityType; import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; @@ -27,7 +26,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.TextNode; -import static org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer.serializeEnumName; +import static org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.serialization.EnumSerializer.serializeEnumName; +import static org.eclipse.digitaltwin.aas4j.v3.dataformat.core.internal.deserialization.EnumDeserializer.deserializeEnumName; + /** * Entity is serialized as named JSON object with ${Entity/idShort} as the name of the containing JSON property. The * JSON object contains three JSON properties. The first is named “statements” ${Entity/statements} and contains an @@ -102,7 +103,7 @@ public void update(JsonNode valueOnly) throws ValueOnlySerializationException { throw new ValueOnlySerializationException("Cannot update the Entity at idShort path '" + idShortPath + "', as its type is not set as string property '" + ENTITY_TYPE + "'.", idShortPath); } - element.setEntityType(EntityType.valueOf(EnumDeserializer.deserializeEnumName(entityTypeNode.textValue()))); + element.setEntityType(EntityType.valueOf(deserializeEnumName(entityTypeNode.textValue()))); } private void updateSpecificAssetIds(List specificAssetIds, ObjectNode objNode)