Class AbstractTreeDataImporter

java.lang.Object
com.powsybl.iidm.serde.AbstractTreeDataImporter
All Implemented Interfaces:
Importer
Direct Known Subclasses:
JsonImporter, XMLImporter

public abstract class AbstractTreeDataImporter extends Object implements Importer
Author:
Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
  • Field Details

  • Constructor Details

    • AbstractTreeDataImporter

      protected AbstractTreeDataImporter()
    • AbstractTreeDataImporter

      protected AbstractTreeDataImporter(PlatformConfig platformConfig)
  • Method Details

    • getParameters

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

      protected abstract String[] getExtensions()
    • exists

      public boolean exists(ReadOnlyDataSource dataSource)
      Description copied from interface: Importer
      Check if the data source is importable
      Specified by:
      exists in interface Importer
      Parameters:
      dataSource - the data source
      Returns:
      true if the data source is importable, false otherwise
    • exists

      protected abstract boolean exists(ReadOnlyDataSource dataSource, String ext) throws IOException
      Throws:
      IOException
    • copy

      public void copy(ReadOnlyDataSource fromDataSource, DataSource toDataSource)
      Description copied from interface: Importer
      Copy data from one data source to another.
      Specified by:
      copy in interface Importer
      Parameters:
      fromDataSource - from data source
      toDataSource - destination data source
    • importData

      public Network importData(ReadOnlyDataSource dataSource, NetworkFactory networkFactory, Properties parameters, Reporter reporter)
      Description copied from interface: Importer
      Create a model.
      Specified by:
      importData in interface Importer
      Parameters:
      dataSource - data source
      networkFactory - network factory
      parameters - some properties to configure the import
      reporter - the reporter used for functional logs
      Returns:
      the model
    • createImportOptions

      protected ImportOptions createImportOptions(Properties parameters)