-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to powsybl-ws-dependencies 2.7.0
Signed-off-by: BOUHOURS Antoine <[email protected]>
- Loading branch information
1 parent
f000d41
commit 34cb6c5
Showing
10 changed files
with
125 additions
and
155 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
46 changes: 46 additions & 0 deletions
46
src/main/java/com/powsybl/network/conversion/server/GeneratorActivePowerControlSerDe.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,46 @@ | ||
/** | ||
* Copyright (c) 2022, 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 com.powsybl.network.conversion.server; | ||
|
||
import com.google.auto.service.AutoService; | ||
import com.powsybl.commons.extensions.AbstractExtensionSerDe; | ||
import com.powsybl.commons.extensions.ExtensionSerDe; | ||
import com.powsybl.commons.io.DeserializerContext; | ||
import com.powsybl.commons.io.SerializerContext; | ||
import com.powsybl.commons.io.TreeDataReader; | ||
import com.powsybl.iidm.network.Injection; | ||
import com.powsybl.iidm.network.extensions.ActivePowerControl; | ||
import com.powsybl.iidm.network.extensions.ActivePowerControlAdder; | ||
|
||
/** | ||
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com> | ||
*/ | ||
@AutoService(ExtensionSerDe.class) | ||
public class GeneratorActivePowerControlSerDe<T extends Injection<T>> extends AbstractExtensionSerDe<T, ActivePowerControl<T>> { | ||
|
||
public GeneratorActivePowerControlSerDe() { | ||
super("generatorActivePowerControl", "network", ActivePowerControl.class, "generatorActivePowerControl.xsd", "http://www.itesla_project.eu/schema/iidm/ext/generator_active_power_control/1_0", "gapc"); | ||
} | ||
|
||
@Override | ||
public void write(ActivePowerControl activePowerControl, SerializerContext serializerContext) { | ||
throw new IllegalStateException("Should never be called"); | ||
} | ||
|
||
@Override | ||
public ActivePowerControl<T> read(T identifiable, DeserializerContext deserializerContext) { | ||
TreeDataReader reader = deserializerContext.getReader(); | ||
boolean participate = reader.readBooleanAttribute("participate"); | ||
float droop = reader.readFloatAttribute("droop"); | ||
reader.readEndNode(); | ||
identifiable.newExtension(ActivePowerControlAdder.class) | ||
.withParticipate(participate) | ||
.withDroop(droop) | ||
.add(); | ||
return identifiable.getExtension(ActivePowerControl.class); | ||
} | ||
} |
79 changes: 0 additions & 79 deletions
79
.../java/com/powsybl/network/conversion/server/GeneratorActivePowerControlXmlSerializer.java
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
src/main/java/com/powsybl/network/conversion/server/GeneratorShortCircuitsSerDe.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,46 @@ | ||
/** | ||
* Copyright (c) 2023, 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 com.powsybl.network.conversion.server; | ||
|
||
import com.google.auto.service.AutoService; | ||
import com.powsybl.commons.extensions.AbstractExtensionSerDe; | ||
import com.powsybl.commons.extensions.ExtensionSerDe; | ||
import com.powsybl.commons.io.DeserializerContext; | ||
import com.powsybl.commons.io.SerializerContext; | ||
import com.powsybl.commons.io.TreeDataReader; | ||
import com.powsybl.iidm.network.Generator; | ||
import com.powsybl.iidm.network.extensions.GeneratorShortCircuit; | ||
import com.powsybl.iidm.network.extensions.GeneratorShortCircuitAdder; | ||
|
||
/** | ||
* @author Miora Vedelago <miora.ralambotiana at rte-france.com> | ||
*/ | ||
@AutoService(ExtensionSerDe.class) | ||
public class GeneratorShortCircuitsSerDe extends AbstractExtensionSerDe<Generator, GeneratorShortCircuit> { | ||
|
||
public GeneratorShortCircuitsSerDe() { | ||
super("generatorShortCircuits", "network", GeneratorShortCircuit.class, "generatorShortCircuits.xsd", "http://www.itesla_project.eu/schema/iidm/ext/generator_short_circuits/1_0", | ||
"gsc"); | ||
} | ||
|
||
@Override | ||
public void write(GeneratorShortCircuit extension, SerializerContext serializerContext) { | ||
throw new IllegalStateException("Should not happen"); | ||
} | ||
|
||
@Override | ||
public GeneratorShortCircuit read(Generator extendable, DeserializerContext deserializerContext) { | ||
TreeDataReader reader = deserializerContext.getReader(); | ||
float transientReactance = reader.readFloatAttribute("transientReactance"); | ||
float stepUpTransformerReactance = reader.readFloatAttribute("stepUpTransformerReactance"); | ||
reader.readEndNode(); | ||
return extendable.newExtension(GeneratorShortCircuitAdder.class) | ||
.withDirectTransX(transientReactance) | ||
.withStepUpTransformerX(stepUpTransformerReactance) | ||
.add(); | ||
} | ||
} |
44 changes: 0 additions & 44 deletions
44
src/main/java/com/powsybl/network/conversion/server/GeneratorShortCircuitsXmlSerializer.java
This file was deleted.
Oops, something went wrong.
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
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