From 8a451d0f31191a4ee1489db470d940bd3b152f22 Mon Sep 17 00:00:00 2001 From: lisrte Date: Thu, 28 Sep 2023 11:34:27 +0200 Subject: [PATCH 1/2] Rename models prefix to internalModelPrefix Signed-off-by: lisrte --- .../com/powsybl/dynawaltz/dsl/EquipmentConfig.groovy | 8 ++++---- .../models/generators/WeccGenGroovyExtension.groovy | 4 ++-- dynawaltz-dsl/src/main/resources/models.json | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/EquipmentConfig.groovy b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/EquipmentConfig.groovy index 968cc9abf..a289b167d 100644 --- a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/EquipmentConfig.groovy +++ b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/EquipmentConfig.groovy @@ -19,18 +19,18 @@ class EquipmentConfig { static final String AUXILIARY_PROPERTY = "AUXILIARY" final String lib - final String prefix + final String internalModelPrefix final List properties - EquipmentConfig(String lib, String prefix, String... properties) { + EquipmentConfig(String lib, String internalModelPrefix, String... properties) { this.lib = lib - this.prefix = prefix + this.internalModelPrefix = internalModelPrefix this.properties = properties ? properties.collect{it.toUpperCase()} as List : [] as List } EquipmentConfig(String lib) { this.lib = lib - this.prefix = "" + this.internalModelPrefix = "" this.properties = [] } diff --git a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/WeccGenGroovyExtension.groovy b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/WeccGenGroovyExtension.groovy index 8c276c986..6a3a835ef 100644 --- a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/WeccGenGroovyExtension.groovy +++ b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/WeccGenGroovyExtension.groovy @@ -43,9 +43,9 @@ class WeccGenGroovyExtension extends AbstractEquipmentGroovyExtension Date: Thu, 28 Sep 2023 11:43:45 +0200 Subject: [PATCH 2/2] Fix JsonSlurper Signed-off-by: lisrte --- .../main/groovy/com/powsybl/dynawaltz/dsl/ModelsSlurper.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/ModelsSlurper.groovy b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/ModelsSlurper.groovy index e66ae2e2a..9752bf760 100644 --- a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/ModelsSlurper.groovy +++ b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/ModelsSlurper.groovy @@ -17,7 +17,7 @@ import org.apache.groovy.json.internal.LazyMap class ModelsSlurper { private static final String MODEL_LIB = "lib" - private static final String MODEL_PREFIX = "prefix" + private static final String MODEL_PREFIX = "internalModelPrefix" private static final String MODEL_PROPERTIES = "properties" private final slurper = new JsonSlurper()