Package com.powsybl.security.json
Class VoltageExtensionSerializer
java.lang.Object
com.powsybl.security.json.VoltageExtensionSerializer
- All Implemented Interfaces:
ExtensionJsonSerializer<LimitViolation,
,VoltageExtension> ExtensionProvider<LimitViolation,
VoltageExtension>
@AutoService(ExtensionJsonSerializer.class)
public class VoltageExtensionSerializer
extends Object
implements ExtensionJsonSerializer<LimitViolation,VoltageExtension>
- Author:
- Olivier Bretteville <olivier.bretteville at rte-france.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext deserializationContext) Deserializes the provided JSON to an extension of typeE
.Return the category of the extensions provided by this provider.Class<? super VoltageExtension>
Return the type of extensions provided by this provider.Return the name of the extensions provided by this provider.void
serialize
(VoltageExtension extension, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) Serializes the provided extension to JSON.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.powsybl.commons.extensions.ExtensionJsonSerializer
deserializeAndUpdate
-
Constructor Details
-
VoltageExtensionSerializer
public VoltageExtensionSerializer()
-
-
Method Details
-
getExtensionName
Description copied from interface:ExtensionProvider
Return the name of the extensions provided by this provider.- Specified by:
getExtensionName
in interfaceExtensionProvider<LimitViolation,
VoltageExtension> - Returns:
- the name of the extensions provided by this provider.
-
getCategoryName
Description copied from interface:ExtensionProvider
Return the category of the extensions provided by this provider.- Specified by:
getCategoryName
in interfaceExtensionProvider<LimitViolation,
VoltageExtension> - Returns:
- the category of the extensions provided by this provider.
-
getExtensionClass
Description copied from interface:ExtensionProvider
Return the type of extensions provided by this provider.- Specified by:
getExtensionClass
in interfaceExtensionProvider<LimitViolation,
VoltageExtension> - Returns:
- the type of extensions provided by this provider.
-
serialize
public void serialize(VoltageExtension extension, com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException Description copied from interface:ExtensionJsonSerializer
Serializes the provided extension to JSON.- Specified by:
serialize
in interfaceExtensionJsonSerializer<LimitViolation,
VoltageExtension> - Throws:
IOException
-
deserialize
public VoltageExtension deserialize(com.fasterxml.jackson.core.JsonParser parser, com.fasterxml.jackson.databind.DeserializationContext deserializationContext) throws IOException Description copied from interface:ExtensionJsonSerializer
Deserializes the provided JSON to an extension of typeE
.- Specified by:
deserialize
in interfaceExtensionJsonSerializer<LimitViolation,
VoltageExtension> - Throws:
IOException
-