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 Details

    • getXsdAsStream

      InputStream getXsdAsStream()
      Return the XSD schema describing the extension to serialize in the latest version of its XML serialization.
    • getXsdAsStreamList

      default List<InputStream> 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

      default String getNamespaceUri(String extensionVersion)
      Return the namespace URI of the extension in a given version of its XML serialization.
    • getNamespacePrefix

      String getNamespacePrefix()
    • write

      void write(E extension, SerializerContext context)
    • read

      E read(T extendable, DeserializerContext context)
    • getName

      default String getName()
      Specified by:
      getName in interface Versionable
    • getVersion

      default String getVersion()
      Return the latest version of the serialization of the extension.
      Specified by:
      getVersion in interface Versionable
    • getVersion

      String getVersion(String namespaceUri)
      Return the version corresponding to the given namespace URI
    • getVersions

      default Set<String> getVersions()
      Return all supported versions for serializing this extension.
    • checkExtensionVersionSupported

      default void checkExtensionVersionSupported(String extensionVersion)
      Check that a given extension version exists.
    • isSerializable

      default boolean isSerializable(E extension)
      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

      default Map<String,String> 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.