Package com.powsybl.commons.extensions
Interface ExtensionSerDe<T extends Extendable,E extends Extension<T>>
- All Superinterfaces:
ExtensionProvider<T,
,E> Versionable
- All Known Implementing Classes:
AbstractExtensionSerDe
,AbstractVersionableNetworkExtensionSerDe
,ActivePowerControlSerDe
,BaseVoltageMappingSerDe
,BranchObservabilitySerDe
,BranchStatusSerDe
,BusbarSectionPositionSerDe
,CgmesControlAreasSerDe
,CgmesDanglingLineBoundaryNodeSerDe
,CgmesLineBoundaryNodeSerDe
,CgmesSshMetadataSerDe
,CgmesSvMetadataSerDe
,CgmesTapChangersSerDe
,CimCharacteristicsSerDe
,ConnectablePositionSerDe
,CoordinatedReactiveControlSerDe
,DiscreteMeasurementsSerDe
,EntsoeAreaSerDe
,GeneratorEntsoeCategorySerDe
,GeneratorFortescueSerDe
,GeneratorShortCircuitSerDe
,GeneratorStartupSerDe
,HvdcAngleDroopActivePowerControlSerDe
,HvdcOperatorActivePowerRangeSerDe
,IdentifiableShortCircuitSerDe
,InjectionObservabilitySerDe
,LineFortescueSerDe
,LinePositionSerDe
,LoadAsymmetricalSerDe
,LoadDetailSerDe
,MeasurementsSerDe
,OperatingStatusSerDe
,ReferencePrioritiesSerDe
,ReferenceTerminalsSerDe
,RemoteReactivePowerControlSerDe
,SecondaryVoltageControlSerDe
,SlackTerminalSerDe
,StandbyAutomatonSerDe
,SubstationPositionSerDe
,ThreeWindingsTransformerFortescueSerDe
,ThreeWindingsTransformerPhaseAngleClockSerDe
,ThreeWindingsTransformerToBeEstimatedSerDe
,TwoWindingsTransformerFortescueSerDe
,TwoWindingsTransformerPhaseAngleClockSerDe
,TwoWindingsTransformerToBeEstimatedSerDe
,VoltagePerReactivePowerControlSerDe
public interface ExtensionSerDe<T extends Extendable,E extends Extension<T>>
extends ExtensionProvider<T,E>, Versionable
An ExtensionProvider able to serialize/deserialize extensions from XML.
An ExtensionSerializer can have several versions with one XSD schema per version: the XML serialization/deserialization of an extension is versionable.
- Author:
- Mathieu Bague <mathieu.bague at rte-france.com>
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
checkExtensionVersionSupported
(String extensionVersion) Check that a given extension version exists.Provides the map whose keys are the array field names and whose values are the single element field names.default String
getName()
Return the namespace URI of the extension in the latest version of its XML serialization.default String
getNamespaceUri
(String extensionVersion) Return the namespace URI of the extension in a given version of its XML serialization.default String
Return the latest version of the serialization of the extension.getVersion
(String namespaceUri) Return the version corresponding to the given namespace URIReturn all supported versions for serializing this extension.Return the XSD schema describing the extension to serialize in the latest version of its XML serialization.default List<InputStream>
Return the list of all XSD schemas describing the extension to serialize.default boolean
isSerializable
(E extension) Check if an extension can be serialized or not.read
(T extendable, DeserializerContext context) void
write
(E extension, SerializerContext context) Methods inherited from interface com.powsybl.commons.extensions.ExtensionProvider
getCategoryName, getExtensionClass, getExtensionName
-
Method Details
-
getXsdAsStream
InputStream getXsdAsStream()Return the XSD schema describing the extension to serialize in the latest version of its XML serialization. -
getXsdAsStreamList
Return the list of all XSD schemas describing the extension to serialize.
There is a distinct XSD schema for each version of its XML serialization. -
getNamespaceUri
String getNamespaceUri()Return the namespace URI of the extension in the latest version of its XML serialization. -
getNamespaceUri
Return the namespace URI of the extension in a given version of its XML serialization. -
getNamespacePrefix
String getNamespacePrefix() -
write
-
read
-
getName
- Specified by:
getName
in interfaceVersionable
-
getVersion
Return the latest version of the serialization of the extension.- Specified by:
getVersion
in interfaceVersionable
-
getVersion
Return the version corresponding to the given namespace URI -
getVersions
Return all supported versions for serializing this extension. -
checkExtensionVersionSupported
Check that a given extension version exists. -
isSerializable
Check if an extension can be serialized or not.- Parameters:
extension
- the extension to check- Returns:
- true if the extension can be serialized, false otherwise
-
getArrayNameToSingleNameMap
Provides the map whose keys are the array field names and whose values are the single element field names. This is used to deduce the name of an element inside and array.
-