Skip to content

Commit

Permalink
replace identical strings with variables
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Rol <nicolas.rol@rte-france.com>
  • Loading branch information
rolnico committed Apr 10, 2024
1 parent e9c775b commit 3165118
Showing 1 changed file with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
*/
public final class CgmesConformity1ModifiedCatalog {

private static final String MICROGRID_REF_SWITCH = "/MicroGrid/BaseCase/BC_BE_v2_switch_at_boundary/";
private static final String MICROGRID_REF_TRANSFORMER = "/MicroGrid/BaseCase/BC_BE_v2_transformer_at_boundary/";
private static final String MICROGRID_REF_EQBRANCH = "/MicroGrid/BaseCase/BC_BE_v2_eqbranch_at_boundary/";
private static final String MICROGRID_CONFIGURATION = "/MicroGrid/BaseCase/CGMES_v2.4.15_MicroGridTestConfiguration_BC_NL_v2/";

private CgmesConformity1ModifiedCatalog() {
}

Expand Down Expand Up @@ -397,7 +402,7 @@ public static GridModelReference microGridBaseCaseBESharedRegulatingControl() {

public static GridModelReferenceResources microGridBaseCaseBESwitchAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_switch_at_boundary/";
+ MICROGRID_REF_SWITCH;
return new GridModelReferenceResources("MicroGrid-BaseCase-BE-SwitchAtBoundary",
null,
new ResourceSet(baseModified,
Expand All @@ -411,7 +416,7 @@ public static GridModelReferenceResources microGridBaseCaseBESwitchAtBoundary()

public static GridModelReferenceResources microGridBaseCaseBETransformerAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_transformer_at_boundary/";
+ MICROGRID_REF_TRANSFORMER;
return new GridModelReferenceResources("MicroGrid-BaseCase-BE-TransformerAtBoundary",
null,
new ResourceSet(baseModified,
Expand All @@ -425,7 +430,7 @@ public static GridModelReferenceResources microGridBaseCaseBETransformerAtBounda

public static GridModelReferenceResources microGridBaseCaseBEEquivalentBranchAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_eqbranch_at_boundary/";
+ MICROGRID_REF_EQBRANCH;
return new GridModelReferenceResources("MicroGrid-BaseCase-BE-EquivalentBranchAtBoundary",
null,
new ResourceSet(baseModified,
Expand Down Expand Up @@ -601,7 +606,7 @@ public static GridModelReferenceResources microGridBaseCaseAssembledThreeLinesAt

public static GridModelReferenceResources microGridBaseCaseAssembledSwitchAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_switch_at_boundary/";
+ MICROGRID_REF_SWITCH;
return new GridModelReferenceResources("MicroGrid-BaseCase-Assembled-SwitchAtBoundary",
null,
new ResourceSet(baseModified,
Expand All @@ -618,7 +623,7 @@ public static GridModelReferenceResources microGridBaseCaseAssembledSwitchAtBoun

public static GridModelReferenceResources microGridBESwitchAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_switch_at_boundary/";
+ MICROGRID_REF_SWITCH;
return new GridModelReferenceResources("MicroGrid-BaseCase-BE-SwitchAtBoundary",
null,
new ResourceSet(baseModified,
Expand All @@ -632,7 +637,7 @@ public static GridModelReferenceResources microGridBESwitchAtBoundary() {

public static GridModelReferenceResources microGridBETransformerAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_transformer_at_boundary/";
+ MICROGRID_REF_TRANSFORMER;
return new GridModelReferenceResources("MicroGrid-BaseCase-BE-TransformerAtBoundary",
null,
new ResourceSet(baseModified,
Expand All @@ -646,7 +651,7 @@ public static GridModelReferenceResources microGridBETransformerAtBoundary() {

public static GridModelReferenceResources microGridBEEquivalentBranchAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_eqbranch_at_boundary/";
+ MICROGRID_REF_EQBRANCH;
return new GridModelReferenceResources("MicroGrid-BaseCase-BE-EquivalentBranchAtBoundary",
null,
new ResourceSet(baseModified,
Expand All @@ -660,7 +665,7 @@ public static GridModelReferenceResources microGridBEEquivalentBranchAtBoundary(

public static GridModelReferenceResources microGridBaseCaseAssembledTransformerAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_transformer_at_boundary/";
+ MICROGRID_REF_TRANSFORMER;
return new GridModelReferenceResources("MicroGrid-BaseCase-Assembled-TransformerAtBoundary",
null,
new ResourceSet(baseModified,
Expand All @@ -677,7 +682,7 @@ public static GridModelReferenceResources microGridBaseCaseAssembledTransformerA

public static GridModelReferenceResources microGridBaseCaseAssembledEquivalentBranchAtBoundary() {
String baseModified = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_BE_v2_eqbranch_at_boundary/";
+ MICROGRID_REF_EQBRANCH;
return new GridModelReferenceResources("MicroGrid-BaseCase-Assembled-EquivalentBranchAtBoundary",
null,
new ResourceSet(baseModified,
Expand Down Expand Up @@ -1475,7 +1480,7 @@ public static GridModelReference microGridBaseCaseNLShuntCompensatorGP() {
String base = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_NL_v2_shunt_compensator_g_p/";
String baseOriginal = ENTSOE_CONFORMITY_1
+ "/MicroGrid/BaseCase/CGMES_v2.4.15_MicroGridTestConfiguration_BC_NL_v2/";
+ MICROGRID_CONFIGURATION;
return new GridModelReferenceResources(
"MicroGrid-BaseCase-NL-sc-g-p",
null,
Expand All @@ -1490,7 +1495,7 @@ public static GridModelReference microGridBaseCaseNLSwitchWithoutName() {
String base = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_NL_v2_switch_without_name/";
String baseOriginal = ENTSOE_CONFORMITY_1
+ "/MicroGrid/BaseCase/CGMES_v2.4.15_MicroGridTestConfiguration_BC_NL_v2/";
+ MICROGRID_CONFIGURATION;
return new GridModelReferenceResources(
"MicroGrid-BaseCase-NL-switch-no-name",
null,
Expand All @@ -1504,7 +1509,7 @@ public static GridModelReference microGridBaseCaseNLSwitchTypePreserved() {
String base = ENTSOE_CONFORMITY_1_MODIFIED
+ "/MicroGrid/BaseCase/BC_NL_v2_switch_type_preserved/";
String baseOriginal = ENTSOE_CONFORMITY_1
+ "/MicroGrid/BaseCase/CGMES_v2.4.15_MicroGridTestConfiguration_BC_NL_v2/";
+ MICROGRID_CONFIGURATION;
return new GridModelReferenceResources(
"MicroGrid-BaseCase-NL-switch-type-preserved",
null,
Expand Down

0 comments on commit 3165118

Please sign in to comment.