Class CgmesExport

java.lang.Object
com.powsybl.cgmes.conversion.CgmesExport
All Implemented Interfaces:
Exporter

@AutoService(Exporter.class) public class CgmesExport extends Object implements Exporter
Author:
Luma ZamarreƱo <zamarrenolm at aia.es>
  • Field Details

  • Constructor Details

    • CgmesExport

      public CgmesExport(PlatformConfig platformConfig)
    • CgmesExport

      public CgmesExport()
  • Method Details

    • getParameters

      public List<Parameter> getParameters()
      Description copied from interface: Exporter
      Get a description of export parameters
      Specified by:
      getParameters in interface Exporter
      Returns:
    • export

      public void export(Network network, Properties parameters, DataSource dataSource, ReportNode reportNode)
      Export the requested network to the CGMES format.
      Specified by:
      export in interface Exporter
      Parameters:
      network - The network to export.
      parameters - Optional parameters that influence the export.
      dataSource - The dataSource used by the export.
      reportNode - The reportNode used for functional logs.
    • initializeModelForExport

      public static CgmesMetadataModel initializeModelForExport(Network network, CgmesSubset subset, CgmesExportContext context, boolean mainNetwork, boolean modelUpdate)
      Initialize the model (= the metadata information) that is used by the export. If existing, the network model extension is used for the initialization. If existing, optional parameters are also used for the initialization. If both are present, the optional parameters prevail the values in the network extension.
      Parameters:
      network - The network in which to look for an existing model extension as basis for initialization.
      subset - The subset of the model to initialize.
      context - The context used by the export.
      mainNetwork - A boolean indicating whether the exported network is the main network (not a subnetwork).
      modelUpdate - A boolean indicating whether the model version and ID should be updated.
      Returns:
      A model with all necessary metadata information for the export.
    • getComment

      public String getComment()
      Description copied from interface: Exporter
      Get some information about this exporter.
      Specified by:
      getComment in interface Exporter
    • getFormat

      public String getFormat()
      Description copied from interface: Exporter
      Get a unique identifier of the format.
      Specified by:
      getFormat in interface Exporter