Skip to content

Commit

Permalink
Update EntityMapper.java
Browse files Browse the repository at this point in the history
  • Loading branch information
emildinchev committed Apr 22, 2024
1 parent 13492b4 commit d72908b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.List;

import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer;
import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer;
import org.eclipse.digitaltwin.aas4j.v3.model.Entity;
import org.eclipse.digitaltwin.aas4j.v3.model.EntityType;
import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId;
Expand All @@ -28,6 +27,7 @@
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;
/**
* 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
Expand Down Expand Up @@ -65,7 +65,7 @@ public JsonNode toJson() throws ValueOnlySerializationException {
}
node.set(SPECIFIC_ASSET_ID, assetIdNode);
}
node.set(ENTITY_TYPE, new TextNode(EnumSerializer.serializeEnumName(element.getEntityType().name())));
node.set(ENTITY_TYPE, new TextNode(serializeEnumName(element.getEntityType().name())));
return asValueNode(node);
}

Expand Down

0 comments on commit d72908b

Please sign in to comment.