Skip to content

Commit

Permalink
Rename remaining lib to model
Browse files Browse the repository at this point in the history
Signed-off-by: lisrte <[email protected]>
  • Loading branch information
Lisrte committed Jul 4, 2024
1 parent 2aa8922 commit 8610109
Show file tree
Hide file tree
Showing 28 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public static void reportBuilderNotFound(ReportNode reportNode, String lib) {
.add();
}

public static void reportLibNotFound(ReportNode reportNode, String builderName, String lib) {
public static void reportModelNotFound(ReportNode reportNode, String builderName, String modelName) {
reportNode.newReportNode()
.withMessageTemplate("libNotFound", "Library ${lib} not found for ${builderName}")
.withMessageTemplate("modelNotFound", "Model ${lib} not found for ${builderName}")
.withUntypedValue("builderName", builderName)
.withUntypedValue("lib", lib)
.withUntypedValue("modelName", modelName)
.withSeverity(TypedValue.INFO_SEVERITY)
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public ModelConfig getDefaultModelConfig() {
return defaultModelConfig;
}

public ModelConfig getModelConfig(String libName) {
return modelConfigMap.get(libName);
public ModelConfig getModelConfig(String modelName) {
return modelConfigMap.get(modelName);
}

public Set<ModelInfo> getModelInfos() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static TapChangerAutomationSystemBuilder of(Network network, String model
public static TapChangerAutomationSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, TapChangerAutomationSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, TapChangerAutomationSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new TapChangerAutomationSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static TapChangerBlockingAutomationSystemBuilder of(Network network, Stri
public static TapChangerBlockingAutomationSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, TapChangerBlockingAutomationSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, TapChangerBlockingAutomationSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new TapChangerBlockingAutomationSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static UnderVoltageAutomationSystemBuilder of(Network network, String mod
public static UnderVoltageAutomationSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, UnderVoltageAutomationSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, UnderVoltageAutomationSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new UnderVoltageAutomationSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static DynamicOverloadManagementSystemBuilder of(Network network, String
public static DynamicOverloadManagementSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, DynamicOverloadManagementSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, DynamicOverloadManagementSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new DynamicOverloadManagementSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network
public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, DynamicTwoLevelsOverloadManagementSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, DynamicTwoLevelsOverloadManagementSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new DynamicTwoLevelsOverloadManagementSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static PhaseShifterBlockingIAutomationSystemBuilder of(Network network, S
public static PhaseShifterBlockingIAutomationSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, PhaseShifterBlockingIAutomationSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, PhaseShifterBlockingIAutomationSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new PhaseShifterBlockingIAutomationSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static PhaseShifterIAutomationSystemBuilder of(Network network, String mo
public static PhaseShifterIAutomationSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, PhaseShifterIAutomationSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, PhaseShifterIAutomationSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new PhaseShifterIAutomationSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static PhaseShifterPAutomationSystemBuilder of(Network network, String mo
public static PhaseShifterPAutomationSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, PhaseShifterPAutomationSystemBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, PhaseShifterPAutomationSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new PhaseShifterPAutomationSystemBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static InfiniteBusBuilder of(Network network, String modelName) {
public static InfiniteBusBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, InfiniteBusBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, InfiniteBusBuilder.class.getSimpleName(), modelName);
return null;
}
return new InfiniteBusBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static StandardBusBuilder of(Network network, String modelName) {
public static StandardBusBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, StandardBusBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, StandardBusBuilder.class.getSimpleName(), modelName);
return null;
}
return new StandardBusBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static GeneratorFictitiousBuilder of(Network network, String modelName) {
public static GeneratorFictitiousBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, GeneratorFictitiousBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, GeneratorFictitiousBuilder.class.getSimpleName(), modelName);
return null;
}
return new GeneratorFictitiousBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static GridFormingConverterBuilder of(Network network, String modelName)
public static GridFormingConverterBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, GridFormingConverterBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, GridFormingConverterBuilder.class.getSimpleName(), modelName);
return null;
}
return new GridFormingConverterBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static SynchronizedGeneratorBuilder of(Network network, String modelName)
public static SynchronizedGeneratorBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, SynchronizedGeneratorBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, SynchronizedGeneratorBuilder.class.getSimpleName(), modelName);
return null;
}
return new SynchronizedGeneratorBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static SynchronousGeneratorBuilder of(Network network, String modelName)
public static SynchronousGeneratorBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, SynchronousGeneratorBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, SynchronousGeneratorBuilder.class.getSimpleName(), modelName);
return null;
}
return new SynchronousGeneratorBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static WeccBuilder of(Network network, String modelName) {
public static WeccBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, WeccBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, WeccBuilder.class.getSimpleName(), modelName);
return null;
}
return new WeccBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static HvdcPBuilder of(Network network, String modelName) {
public static HvdcPBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, HvdcPBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, HvdcPBuilder.class.getSimpleName(), modelName);
return null;
}
return new HvdcPBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static HvdcVscBuilder of(Network network, String modelName) {
public static HvdcVscBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, HvdcVscBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, HvdcVscBuilder.class.getSimpleName(), modelName);
return null;
}
return new HvdcVscBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static LineBuilder of(Network network, String modelName) {
public static LineBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, LineBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, LineBuilder.class.getSimpleName(), modelName);
return null;
}
return new LineBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static BaseLoadBuilder of(Network network, String modelName) {
public static BaseLoadBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, BaseLoadBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, BaseLoadBuilder.class.getSimpleName(), modelName);
return null;
}
return new BaseLoadBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static LoadOneTransformerBuilder of(Network network, String modelName) {
public static LoadOneTransformerBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, LoadOneTransformerBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, LoadOneTransformerBuilder.class.getSimpleName(), modelName);
return null;
}
return new LoadOneTransformerBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static LoadOneTransformerTapChangerBuilder of(Network network, String mod
public static LoadOneTransformerTapChangerBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, LoadOneTransformerTapChangerBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, LoadOneTransformerTapChangerBuilder.class.getSimpleName(), modelName);
return null;
}
return new LoadOneTransformerTapChangerBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static LoadTwoTransformersBuilder of(Network network, String modelName) {
public static LoadTwoTransformersBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, LoadTwoTransformersBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, LoadTwoTransformersBuilder.class.getSimpleName(), modelName);
return null;
}
return new LoadTwoTransformersBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static LoadTwoTransformersTapChangersBuilder of(Network network, String m
public static LoadTwoTransformersTapChangersBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, LoadTwoTransformersTapChangersBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, LoadTwoTransformersTapChangersBuilder.class.getSimpleName(), modelName);
return null;
}
return new LoadTwoTransformersTapChangersBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static BaseShuntBuilder of(Network network, String modelName) {
public static BaseShuntBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, BaseShuntBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, BaseShuntBuilder.class.getSimpleName(), modelName);
return null;
}
return new BaseShuntBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static BaseStaticVarCompensatorBuilder of(Network network, String modelNa
public static BaseStaticVarCompensatorBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, BaseStaticVarCompensatorBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, BaseStaticVarCompensatorBuilder.class.getSimpleName(), modelName);
return null;
}
return new BaseStaticVarCompensatorBuilder(network, modelConfig, reportNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static TransformerFixedRatioBuilder of(Network network, String modelName)
public static TransformerFixedRatioBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, TransformerFixedRatioBuilder.class.getSimpleName(), modelName);
BuilderReports.reportModelNotFound(reportNode, TransformerFixedRatioBuilder.class.getSimpleName(), modelName);
return null;
}
return new TransformerFixedRatioBuilder(network, modelConfig, reportNode);
Expand Down

0 comments on commit 8610109

Please sign in to comment.