-
Notifications
You must be signed in to change notification settings - Fork 43
Migration guide v6.5.0
Two types of DataSources
based on files now exists:
-
DirectoryDataSource
(inherited byGzDirectoryDataSource
,Bzip2DirectoryDataSource
,ZstdDirectoryDataSource
,XZDirectoryDataSource
): considers files in a directory -
AbstractArchiveDataSource
(onlyZipArchiveDataSource
for now but aTarArchiveDataSource
could be added later): considers files in an archive.
Therefore, multiple classes have changed, please update your code if you used them directly:
Old classes | New classes |
---|---|
Bzip2FileDataSource |
Bzip2DirectoryDataSource |
FileDataSource |
DirectoryDataSource |
GzFileDataSource |
GzDirectoryDataSource |
XZFileDataSource |
XZDirectoryDataSource |
ZipFileDataSource |
ZipArchiveDataSource |
ZstdFileDataSource |
ZstdDirectoryDataSource |
Note: Their constructors are not the same so you will have to adapt your code to the new ones, depending on which DataSource you use.
Some datasource constructors have changed or have been deleted. Change accordingly:
Old constructor | New constructor |
---|---|
Bzip2DirectoryDataSource(Path directory, String baseName, DataSourceObserver observer) or Bzip2DirectoryDataSource(Path directory, String baseName)
|
Bzip2DirectoryDataSource(Path directory, String baseName, String dataExtension, DataSourceObserver observer) |
GzDirectoryDataSource(Path directory, String baseName, DataSourceObserver observer) or GzDirectoryDataSource(Path directory, String baseName)
|
GzDirectoryDataSource(Path directory, String baseName, String dataExtension, DataSourceObserver observer) |
XZDirectoryDataSource(Path directory, String baseName, DataSourceObserver observer) or XZDirectoryDataSource(Path directory, String baseName)
|
XZDirectoryDataSource(Path directory, String baseName, String dataExtension, DataSourceObserver observer) |
ZstdDirectoryDataSource(Path directory, String baseName, DataSourceObserver observer) or ZstdDirectoryDataSource(Path directory, String baseName)
|
ZstdDirectoryDataSource(Path directory, String baseName, String dataExtension, DataSourceObserver observer) |
XZDirectoryDataSource(Path directory, String baseName, DataSourceObserver observer) or XzDirectoryDataSource(Path directory, String baseName)
|
XzDirectoryDataSource(Path directory, String baseName, String dataExtension, DataSourceObserver observer) |
ZipArchiveDataSource(Path directory, String zipFileName, String baseName, DataSourceObserver observer) |
ZipArchiveDataSource(Path directory, String zipFileName, String baseName, String dataExtension, DataSourceObserver observer) |
ZipArchiveDataSource(Path directory, String zipFileName, String baseName) |
ZipArchiveDataSource(Path directory, String zipFileName, String baseName, String dataExtension) |
"Double" extensions (.iidm.xml
, .iidm.json
, .iidm.bin
) are not anymore considered by the importers. If you used them, please use those instead:
Old double extension | Extension to use |
---|---|
.iidm.xml |
.xiidm |
.iidm.json |
.jiidm |
.iidm.bin |
.biidm |
Previously, when providing a filename to a datasource method (exists
, newOutputStream
, etc.), the datasource compression format extension was always added to the filename. Now it is added to the filename only if the filename doesn't have one already.
The following methods of CgmesOnDataSource
now throw an IOException
:
public boolean exists()
public boolean existsCim14()
If you call them, you should catch or propagate this exception. To keep the same behavior as before, you can catch this exception and propagate it in a new UncheckedIOException
.
If you had define a custom CgmesMetadataModel
implementation, you need to define a new method:
CgmesMetadataModelImpl clearSupersedes()
.
This is not really a breaking change, but a TCK test was added and so, the maintainers of a custom IIDM implementation must make sure that the neutralPosition of the TapChanger is correctly updated when using a stepsReplacer on the TapChanger or this new test will fail.
Custom IIDM implementation maintainers should implement:
LoadingLimits.setTemporaryLimitValue(int acceptableDuration, double temporaryLimitValue)
Custom IIDM implementation maintainers should add the following method in their Network
implementations:
-
Network.flatten()
.