Interface ValueMapper<T>
- All Known Implementing Classes:
MetadataValueMapper
public interface ValueMapper<T>
A mapping between (a) the mission-specific representation of a data type defined by a mission model (b) to a
mission-agnostic representation of that data type.
-
Method Summary
Modifier and TypeMethodDescriptiondeserializeValue
(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue serializedValue) Produces an mission model-specific domain value from a mission-agnostic representation.gov.nasa.jpl.aerie.merlin.protocol.types.ValueSchema
Gets a schema for the kind of value understood by this ValueMapper.gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue
serializeValue
(T value) Produces a mission-agnostic representation of an mission model-specific domain value.
-
Method Details
-
getValueSchema
gov.nasa.jpl.aerie.merlin.protocol.types.ValueSchema getValueSchema()Gets a schema for the kind of value understood by this ValueMapper.- Returns:
- A parameter schema.
-
deserializeValue
Result<T,String> deserializeValue(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue serializedValue) Produces an mission model-specific domain value from a mission-agnostic representation.- Parameters:
serializedValue
- A mission-agnostic representation of a domain value.- Returns:
- Either an mission model-specific domain object, or a deserialization failure.
-
serializeValue
Produces a mission-agnostic representation of an mission model-specific domain value.- Parameters:
value
- An mission model-specific domain object.- Returns:
- A mission-agnostic representation of
value
.
-