Skip to content

Commit

Permalink
Fix regressions after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
  • Loading branch information
rcourtier committed Mar 22, 2024
1 parent 0da4ccd commit a902a87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ public void export(Network network, Properties params, DataSource ds, ReportNode
// Retrieve the IGM original SSH and TP model
CgmesMetadataModels originalIgmModels = subnetwork.getExtension(CgmesMetadataModels.class);
Optional<CgmesMetadataModel> originalIgmSshModel = originalIgmModels != null ?
originalIgmModels.getModelForPart(CgmesSubset.STEADY_STATE_HYPOTHESIS) :
originalIgmModels.getModelForSubset(CgmesSubset.STEADY_STATE_HYPOTHESIS) :
Optional.empty();
Optional<CgmesMetadataModel> originalIgmTpModel = originalIgmModels != null ?
originalIgmModels.getModelForPart(CgmesSubset.TOPOLOGY) :
originalIgmModels.getModelForSubset(CgmesSubset.TOPOLOGY) :
Optional.empty();
originalIgmTpModel.ifPresent(m -> originalIgmTpIds.add(m.getId()));

Expand All @@ -183,7 +183,7 @@ public void export(Network network, Properties params, DataSource ds, ReportNode
// Check for an existing CGM SV model
CgmesMetadataModels originalCgmModels = network.getExtension(CgmesMetadataModels.class);
Optional<CgmesMetadataModel> originalCgmSvModel = originalCgmModels != null ?
originalCgmModels.getModelForPart(CgmesSubset.STATE_VARIABLES) :
originalCgmModels.getModelForSubset(CgmesSubset.STATE_VARIABLES) :
Optional.empty();

// Create a new CGM SV model based on the original one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void testCgmExport() throws IOException {
}

private CgmesMetadataModel getSubsetModel(Network network, CgmesSubset subset) {
return network.getExtension(CgmesMetadataModels.class).getModelForPart(subset).orElseThrow();
return network.getExtension(CgmesMetadataModels.class).getModelForSubset(subset).orElseThrow();
}

private Set<String> getOccurrences(String xml, Pattern pattern) {
Expand Down

0 comments on commit a902a87

Please sign in to comment.