Package com.powsybl.iidm.network
Interface Importer
- All Known Implementing Classes:
AbstractTreeDataImporter
,BinaryImporter
,CgmesImport
,IeeeCdfImporter
,Importer.ImporterWrapper
,JsonImporter
,MatpowerImporter
,PowerFactoryImporter
,PsseImporter
,UcteImporter
,XMLImporter
public interface Importer
This is the base class for all IIDM importers.
Importer
lookup is based on the ServiceLoader
architecture so do not forget to create a
META-INF/services/com.powsybl.iidm.importData.Importer
file
with the fully qualified name of your Importer
implementation.
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Importer
addPostProcessors
(Importer importer, ComputationManager computationManager, String... names) static Importer
addPostProcessors
(Importer importer, String... names) static Importer
addPostProcessors
(ImportersLoader loader, Importer importer, ComputationManager computationManager, String... names) default void
copy
(ReadOnlyDataSource fromDataSource, DataSource toDataSource) Copy data from one data source to another.boolean
exists
(ReadOnlyDataSource dataSource) Check if the data source is importablestatic Importer
find
(ReadOnlyDataSource dataSource) static Importer
find
(ReadOnlyDataSource dataSource, ComputationManager computationManager) static Importer
find
(ReadOnlyDataSource dataSource, ImportersLoader loader, ComputationManager computationManager, ImportConfig config) static Importer
find
(ImportersLoader loader, String format, ComputationManager computationManager, ImportConfig config) Find an importer for the specified format name.static Importer
Find an importer for the specified format name.static Importer
find
(String format, ComputationManager computationManager) Find an importer for the specified format name.static Importer
find
(String format, ComputationManager computationManager, ImportConfig config) Find an importer for the specified format name.Get some information about this importer.Get a unique identifier of the format.static Collection<String>
static Collection<String>
getFormats
(ImportersLoader loader) Get all supported import formats.Get a description of import parametersstatic Collection<String>
static Collection<String>
getPostProcessorNames
(ImportersLoader loader) default Network
importData
(ReadOnlyDataSource dataSource, NetworkFactory networkFactory, Properties parameters) Create a model.default Network
importData
(ReadOnlyDataSource dataSource, NetworkFactory networkFactory, Properties parameters, ReportNode reportNode) Create a model.default Network
importData
(ReadOnlyDataSource dataSource, Properties parameters) Deprecated.static Collection<Importer>
list()
static Collection<Importer>
list
(ComputationManager computationManager, ImportConfig config) static Collection<Importer>
list
(ImportersLoader loader, ComputationManager computationManager, ImportConfig config) static Importer
removePostProcessors
(Importer importer) static Importer
setPostProcessors
(Importer importer, ComputationManager computationManager, String... names) static Importer
setPostProcessors
(Importer importer, String... names) static Importer
setPostProcessors
(ImportersLoader loader, Importer importer, ComputationManager computationManager, String... names)
-
Method Details
-
getFormats
Get all supported import formats. -
getFormats
-
list
static Collection<Importer> list(ImportersLoader loader, ComputationManager computationManager, ImportConfig config) -
list
-
list
-
find
static Importer find(ImportersLoader loader, String format, @Nullable ComputationManager computationManager, ImportConfig config) Find an importer for the specified format name. The returned importer will apply configuredImportPostProcessor
s on imported networks.- Parameters:
loader
- the loader responsible for providing the list of available importers and post processorsformat
- the import formatcomputationManager
- a computation manager which may be used by configuredImportPostProcessor
sconfig
- the import configuration- Returns:
- the importer if one exists for the given format or
null
otherwise.
-
find
static Importer find(String format, @Nullable ComputationManager computationManager, ImportConfig config) Find an importer for the specified format name. The returned importer will apply configuredImportPostProcessor
s on imported networks.All declared services implementing the
Importer
interface are available.- Parameters:
format
- the import formatcomputationManager
- a computation manager which may be used by configuredImportPostProcessor
sconfig
- the import configuration- Returns:
- the importer if one exists for the given format or
null
otherwise.
-
find
Find an importer for the specified format name. The returned importer will apply configuredImportPostProcessor
s on imported networks.All declared services implementing the
Importer
interface are available. The import configuration is loaded from default platform config.- Parameters:
format
- the import formatcomputationManager
- a computation manager which may be used by configuredImportPostProcessor
s- Returns:
- the importer if one exists for the given format or
null
otherwise.
-
find
Find an importer for the specified format name. The returned importer will apply configuredImportPostProcessor
s on imported networks.All declared services implementing the
Importer
interface are available. The import configuration is loaded from default platform config. Import post processors will use the default instance ofLocalComputationManager
, as configured in default platform config.- Parameters:
format
- the import format- Returns:
- the importer if one exists for the given format or
null
otherwise.
-
getPostProcessorNames
-
getPostProcessorNames
-
addPostProcessors
static Importer addPostProcessors(ImportersLoader loader, Importer importer, ComputationManager computationManager, String... names) -
addPostProcessors
static Importer addPostProcessors(Importer importer, ComputationManager computationManager, String... names) -
addPostProcessors
-
setPostProcessors
static Importer setPostProcessors(ImportersLoader loader, Importer importer, ComputationManager computationManager, String... names) -
setPostProcessors
static Importer setPostProcessors(Importer importer, ComputationManager computationManager, String... names) -
setPostProcessors
-
removePostProcessors
-
find
static Importer find(ReadOnlyDataSource dataSource, ImportersLoader loader, ComputationManager computationManager, ImportConfig config) -
find
-
find
-
getFormat
String getFormat()Get a unique identifier of the format. -
getSupportedExtensions
-
getParameters
Get a description of import parameters- Returns:
-
getComment
String getComment()Get some information about this importer. -
exists
Check if the data source is importable- Parameters:
dataSource
- the data source- Returns:
- true if the data source is importable, false otherwise
-
importData
@Deprecated(since="2.6.0") default Network importData(ReadOnlyDataSource dataSource, Properties parameters) Deprecated. -
importData
default Network importData(ReadOnlyDataSource dataSource, NetworkFactory networkFactory, Properties parameters) Create a model.- Parameters:
dataSource
- data sourcenetworkFactory
- network factoryparameters
- some properties to configure the import- Returns:
- the model
-
importData
default Network importData(ReadOnlyDataSource dataSource, NetworkFactory networkFactory, Properties parameters, ReportNode reportNode) Create a model.- Parameters:
dataSource
- data sourcenetworkFactory
- network factoryparameters
- some properties to configure the importreportNode
- the reportNode used for functional logs- Returns:
- the model
-
copy
Copy data from one data source to another.- Parameters:
fromDataSource
- from data sourcetoDataSource
- destination data source
-
importData(ReadOnlyDataSource, NetworkFactory, Properties)
instead.