-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GridDyna] Using gridsuite filter library for mapping (#95)
- Loading branch information
Showing
41 changed files
with
751 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/org/gridsuite/ds/server/dto/dynamicmapping/InputMapping.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package org.gridsuite.ds.server.dto.dynamicmapping; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import org.gridsuite.ds.server.dto.dynamicmapping.automata.Automaton; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Thang PHAM <quyet-thang.pham at rte-france.com> | ||
*/ | ||
@Schema(description = "Mapping") | ||
public record InputMapping( | ||
@Schema(description = "Name") | ||
String name, | ||
@Schema(description = "Rules") | ||
List<Rule> rules, | ||
@Schema(description = "Automata") | ||
List<Automaton> automata | ||
) { | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/org/gridsuite/ds/server/dto/dynamicmapping/ParameterFile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package org.gridsuite.ds.server.dto.dynamicmapping; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
/** | ||
* @author Thang PHAM <quyet-thang.pham at rte-france.com> | ||
*/ | ||
@Schema(description = "Parameter sets in *.par format") | ||
public record ParameterFile( | ||
@Schema(description = "Name of the parent mapping") | ||
String mappingName, | ||
|
||
@Schema(description = "Parameter file content in *.par format") | ||
String fileContent | ||
) { | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/org/gridsuite/ds/server/dto/dynamicmapping/Rule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package org.gridsuite.ds.server.dto.dynamicmapping; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import org.gridsuite.ds.server.utils.SetGroupType; | ||
import org.gridsuite.filter.expertfilter.ExpertFilter; | ||
import org.gridsuite.filter.utils.EquipmentType; | ||
|
||
/** | ||
* @author Thang PHAM <quyet-thang.pham at rte-france.com> | ||
*/ | ||
@Schema(description = "Rule") | ||
public record Rule( | ||
@Schema(description = "Equipment type") | ||
EquipmentType equipmentType, | ||
|
||
@Schema(description = "Mapped Model Instance ID") | ||
String mappedModel, | ||
|
||
@Schema(description = "Mapped Parameter Set Group ID") | ||
String setGroup, | ||
|
||
@Schema(description = "Mapped Parameter Set Group Type") | ||
SetGroupType groupType, | ||
|
||
@Schema(description = "Filter") | ||
ExpertFilter filter | ||
) { | ||
|
||
} | ||
|
36 changes: 0 additions & 36 deletions
36
src/main/java/org/gridsuite/ds/server/dto/dynamicmapping/Script.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
src/main/java/org/gridsuite/ds/server/dto/dynamicmapping/automata/Automaton.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package org.gridsuite.ds.server.dto.dynamicmapping.automata; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Thang PHAM <quyet-thang.pham at rte-france.com> | ||
*/ | ||
@Schema(description = "Automaton") | ||
public record Automaton( | ||
@Schema(description = "Mapped Model Instance ID") | ||
String model, | ||
@Schema(description = "Mapped Parameters Set Group ID") | ||
String setGroup, | ||
@Schema(description = "Properties of automaton model") | ||
List<BasicProperty> properties | ||
) { | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/org/gridsuite/ds/server/dto/dynamicmapping/automata/BasicProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package org.gridsuite.ds.server.dto.dynamicmapping.automata; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import org.gridsuite.ds.server.utils.PropertyType; | ||
|
||
/** | ||
* @author Thang PHAM <quyet-thang.pham at rte-france.com> | ||
*/ | ||
@Schema(description = "Basic property") | ||
public record BasicProperty( | ||
@Schema(description = "Property name") | ||
String name, | ||
@Schema(description = "Property value in string representation") | ||
String value, | ||
@Schema(description = "Property type") | ||
PropertyType type | ||
) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.