Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Expert Filter] - Support for StaticVarCompensator equipment type #117

Merged
merged 5 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@

<dependencies>
<!-- Compilation dependencies -->
<!-- FIXME: gridsuite-filter modules' version is overloaded in the dependencies section. The overloads and this property below have to be removed at next powsybl-ws-dependencies.version upgrade -->
<dependency>
<groupId>org.gridsuite</groupId>
<artifactId>gridsuite-filter</artifactId>
<version>1.0.8</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,20 @@ public static AbstractExpertRule entityToDto(ExpertRuleEntity filterEntity) {
case COMBINATOR -> {
return CombinatorExpertRule.builder()
.combinator(filterEntity.getCombinator())
.field(filterEntity.getField())
.operator(filterEntity.getOperator())
.rules(entitiesToDto(filterEntity.getRules()))
.build();
}
case BOOLEAN -> {
ExpertRuleValueEntity booleanFilterEntity = (ExpertRuleValueEntity) filterEntity;
return BooleanExpertRule.builder()
BooleanExpertRule.BooleanExpertRuleBuilder<?, ?> ruleBuilder = BooleanExpertRule.builder()
.field(booleanFilterEntity.getField())
.operator(booleanFilterEntity.getOperator())
.value(Boolean.parseBoolean(booleanFilterEntity.getValue()))
.build();
.operator(booleanFilterEntity.getOperator());
if (booleanFilterEntity.getValue() != null) {
ruleBuilder.value(Boolean.parseBoolean(booleanFilterEntity.getValue()));
}
return ruleBuilder.build();
}
case NUMBER -> {
ExpertRuleValueEntity numberFilterEntity = (ExpertRuleValueEntity) filterEntity;
Expand Down
Loading