Class AlgorithmEventHistorySerializer
- java.lang.Object
-
- ai.libs.jaicore.graphvisualizer.events.recorder.AlgorithmEventHistorySerializer
-
public class AlgorithmEventHistorySerializer extends java.lang.ObjectAnAlgorithmEventHistorySerializercan be used to read and storeAlgorithmEventHistorys in the form of JSON files.
-
-
Constructor Summary
Constructors Constructor Description AlgorithmEventHistorySerializer()Creates a newAlgorithmEventHistorySerializer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmEventHistorydeserializeAlgorithmEventHistory(java.lang.String serializedAlgorithmEventHistory)Deserializes the given JSONStringinto anAlgorithmEventHistoryassuming it represents such anAlgorithmEventHistory.java.lang.StringserializeAlgorithmEventHistory(AlgorithmEventHistory algorithmEventHistory)Serializes the givenAlgorithmEventHistoryinto a JSONString.
-
-
-
Constructor Detail
-
AlgorithmEventHistorySerializer
public AlgorithmEventHistorySerializer()
Creates a newAlgorithmEventHistorySerializer.
-
-
Method Detail
-
serializeAlgorithmEventHistory
public java.lang.String serializeAlgorithmEventHistory(AlgorithmEventHistory algorithmEventHistory) throws com.fasterxml.jackson.core.JsonProcessingException
Serializes the givenAlgorithmEventHistoryinto a JSONString.- Parameters:
algorithmEventHistory- TheAlgorithmEventHistoryto be serialized.- Returns:
- The JSON
Stringrepresenting the serializedAlgorithmEventHistory. - Throws:
com.fasterxml.jackson.core.JsonProcessingException- If something went wrong during the transformation to JSON.
-
deserializeAlgorithmEventHistory
public AlgorithmEventHistory deserializeAlgorithmEventHistory(java.lang.String serializedAlgorithmEventHistory) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, java.io.IOException
Deserializes the given JSONStringinto anAlgorithmEventHistoryassuming it represents such anAlgorithmEventHistory.- Parameters:
serializedAlgorithmEventHistory- A JSONStringrepresenting anAlgorithmEventHistory.- Returns:
- An
AlgorithmEventHistoryconstructed from the given serialized algorithm event history. - Throws:
com.fasterxml.jackson.core.JsonParseException- If something went wrong during the transformation to JSON.com.fasterxml.jackson.databind.JsonMappingException- If something went wrong during the transformation to JSON.java.io.IOException- If something went wrong during the transformation to JSON.
-
-