Package com.powsybl.iidm.mergingview
Class DanglingLineAdapter
- java.lang.Object
-
- com.powsybl.iidm.mergingview.DanglingLineAdapter
-
- All Implemented Interfaces:
Extendable<DanglingLine>
,Connectable<DanglingLine>
,DanglingLine
,FlowsLimitsHolder
,Identifiable<DanglingLine>
,Injection<DanglingLine>
public class DanglingLineAdapter extends Object implements DanglingLine
- Author:
- Thomas Adam
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.iidm.network.DanglingLine
DanglingLine.Generation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAlias(String alias)
Add an alias to the object.void
addAlias(String alias, boolean ensureAliasUnicity)
void
addAlias(String alias, String aliasType)
Add an alias to the object.void
addAlias(String alias, String aliasType, boolean ensureAliasUnicity)
<E extends Extension<I>>
voidaddExtension(Class<? super E> type, E extension)
Add en extension to this extendable object.ActivePowerLimits
getActivePowerLimits()
Set<String>
getAliases()
Get the aliases of the object.Optional<String>
getAliasFromType(String aliasType)
Get the alias of the object with a given alias type if it exists.Optional<String>
getAliasType(String alias)
Get the alias type of an alias if it exists, an empty optional otherwise.ApparentPowerLimits
getApparentPowerLimits()
double
getB()
Get the shunt susceptance in S.Boundary
getBoundary()
CurrentLimits
getCurrentLimits()
protected I
getDelegate()
<E extends Extension<I>>
EgetExtension(Class<? super E> type)
Get an extension based on its class type.<E extends Extension<I>>
EgetExtensionByName(String name)
Get an extension based on its name.<E extends Extension<I>>
Collection<E>getExtensions()
Get all extensions associated with this extendable object..double
getG()
Get the shunt conductance in S.DanglingLine.Generation
getGeneration()
String
getId()
Get the unique identifier of the object.String
getImplementationName()
Returns a name that is used to find matchingExtensionAdderProvider
s when selecting implementations of extensions inExtendable.newExtension(java.lang.Class<B>)
.protected com.powsybl.iidm.mergingview.MergingViewIndex
getIndex()
String
getNameOrId()
Get the name of the object if it exists.MergingView
getNetwork()
Get the network associated to the object.Collection<OperationalLimits>
getOperationalLimits()
Optional<String>
getOptionalName()
Return an optional containing the name of the object if it exists.double
getP0()
Get the constant active power in MW.String
getProperty(String key)
Get property associated to specified key.String
getProperty(String key, String defaultValue)
Get property associated to specified key, with default value.Set<String>
getPropertyNames()
Get properties key values.double
getQ0()
Get the constant reactive power in MW.double
getR()
Get the series resistance in Ω.Terminal
getTerminal()
Get the terminal.List<? extends Terminal>
getTerminals()
ConnectableType
getType()
Get the connectable type.String
getUcteXnodeCode()
Get the UCTE Xnode code corresponding to this dangling line in the case where the line is a boundary, return null otherwise.double
getX()
Get the series reactance in Ω.boolean
hasAliases()
Return true if identifiable has aliases.boolean
hasProperty()
Check that this object has some properties.boolean
hasProperty(String key)
Check that this object has property with specified name.boolean
isFictitious()
Get the fictitious statusActivePowerLimitsAdder
newActivePowerLimits()
ApparentPowerLimitsAdder
newApparentPowerLimits()
CurrentLimitsAdder
newCurrentLimits()
<E extends Extension<I>,B extends ExtensionAdder<I,E>>
BnewExtension(Class<B> type)
Returns an extensionAdder to build and add an extension for this extendable.void
remove()
Remove the equipment.void
removeAlias(String alias)
Remove an alias of the object.<E extends Extension<I>>
booleanremoveExtension(Class<E> type)
Remove an extension based on its class type.DanglingLine
setB(double b)
Set the shunt susceptance in S.void
setFictitious(boolean fictitious)
Set the fictitious statusDanglingLine
setG(double g)
Set the shunt conductance in S.DanglingLine
setP0(double p0)
Set the constant active power in MW.String
setProperty(String key, String value)
Set property value associated to specified key.DanglingLine
setQ0(double q0)
Set the constant reactive power in MW.DanglingLine
setR(double r)
Set the series resistance in Ω.DanglingLine
setX(double x)
Set the series reactance in Ω.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.iidm.network.Connectable
getTerminals, getType, remove
-
Methods inherited from interface com.powsybl.commons.extensions.Extendable
addExtension, getExtension, getExtensionByName, getExtensions, getImplementationName, newExtension, removeExtension
-
Methods inherited from interface com.powsybl.iidm.network.Identifiable
addAlias, addAlias, addAlias, addAlias, getAliases, getAliasFromType, getAliasType, getId, getName, getNameOrId, getNetwork, getOptionalName, getProperties, getProperty, getProperty, getPropertyNames, hasAliases, hasProperty, hasProperty, isFictitious, removeAlias, setFictitious, setProperty
-
Methods inherited from interface com.powsybl.iidm.network.Injection
getTerminal
-
-
-
-
Method Detail
-
getBoundary
public Boundary getBoundary()
- Specified by:
getBoundary
in interfaceDanglingLine
-
getP0
public double getP0()
Description copied from interface:DanglingLine
Get the constant active power in MW.Depends on the working variant.
- Specified by:
getP0
in interfaceDanglingLine
- See Also:
VariantManager
-
setP0
public DanglingLine setP0(double p0)
Description copied from interface:DanglingLine
Set the constant active power in MW.Depends on the working variant.
- Specified by:
setP0
in interfaceDanglingLine
- See Also:
VariantManager
-
getQ0
public double getQ0()
Description copied from interface:DanglingLine
Get the constant reactive power in MW.Depends on the working variant.
- Specified by:
getQ0
in interfaceDanglingLine
- See Also:
VariantManager
-
setQ0
public DanglingLine setQ0(double q0)
Description copied from interface:DanglingLine
Set the constant reactive power in MW.Depends on the working variant.
- Specified by:
setQ0
in interfaceDanglingLine
- See Also:
VariantManager
-
getR
public double getR()
Description copied from interface:DanglingLine
Get the series resistance in Ω.- Specified by:
getR
in interfaceDanglingLine
-
setR
public DanglingLine setR(double r)
Description copied from interface:DanglingLine
Set the series resistance in Ω.- Specified by:
setR
in interfaceDanglingLine
-
getX
public double getX()
Description copied from interface:DanglingLine
Get the series reactance in Ω.- Specified by:
getX
in interfaceDanglingLine
-
setX
public DanglingLine setX(double x)
Description copied from interface:DanglingLine
Set the series reactance in Ω.- Specified by:
setX
in interfaceDanglingLine
-
getG
public double getG()
Description copied from interface:DanglingLine
Get the shunt conductance in S.- Specified by:
getG
in interfaceDanglingLine
-
setG
public DanglingLine setG(double g)
Description copied from interface:DanglingLine
Set the shunt conductance in S.- Specified by:
setG
in interfaceDanglingLine
-
getB
public double getB()
Description copied from interface:DanglingLine
Get the shunt susceptance in S.- Specified by:
getB
in interfaceDanglingLine
-
setB
public DanglingLine setB(double b)
Description copied from interface:DanglingLine
Set the shunt susceptance in S.- Specified by:
setB
in interfaceDanglingLine
-
getGeneration
public DanglingLine.Generation getGeneration()
- Specified by:
getGeneration
in interfaceDanglingLine
-
getUcteXnodeCode
public String getUcteXnodeCode()
Description copied from interface:DanglingLine
Get the UCTE Xnode code corresponding to this dangling line in the case where the line is a boundary, return null otherwise.- Specified by:
getUcteXnodeCode
in interfaceDanglingLine
-
getOperationalLimits
public Collection<OperationalLimits> getOperationalLimits()
- Specified by:
getOperationalLimits
in interfaceFlowsLimitsHolder
-
getCurrentLimits
public CurrentLimits getCurrentLimits()
- Specified by:
getCurrentLimits
in interfaceFlowsLimitsHolder
-
getActivePowerLimits
public ActivePowerLimits getActivePowerLimits()
- Specified by:
getActivePowerLimits
in interfaceFlowsLimitsHolder
-
getApparentPowerLimits
public ApparentPowerLimits getApparentPowerLimits()
- Specified by:
getApparentPowerLimits
in interfaceFlowsLimitsHolder
-
newCurrentLimits
public CurrentLimitsAdder newCurrentLimits()
- Specified by:
newCurrentLimits
in interfaceFlowsLimitsHolder
-
newApparentPowerLimits
public ApparentPowerLimitsAdder newApparentPowerLimits()
- Specified by:
newApparentPowerLimits
in interfaceFlowsLimitsHolder
-
newActivePowerLimits
public ActivePowerLimitsAdder newActivePowerLimits()
- Specified by:
newActivePowerLimits
in interfaceFlowsLimitsHolder
-
getTerminal
public final Terminal getTerminal()
Description copied from interface:Injection
Get the terminal.- Specified by:
getTerminal
in interfaceInjection<I extends Injection<I>>
-
getType
public final ConnectableType getType()
Description copied from interface:Connectable
Get the connectable type.- Specified by:
getType
in interfaceConnectable<I extends Connectable<I>>
-
getTerminals
public final List<? extends Terminal> getTerminals()
- Specified by:
getTerminals
in interfaceConnectable<I extends Connectable<I>>
-
remove
public final void remove()
Description copied from interface:Connectable
Remove the equipment.- Specified by:
remove
in interfaceConnectable<I extends Connectable<I>>
-
getNetwork
public MergingView getNetwork()
Description copied from interface:Identifiable
Get the network associated to the object.- Specified by:
getNetwork
in interfaceIdentifiable<I extends Identifiable<I>>
-
getId
public String getId()
Description copied from interface:Identifiable
Get the unique identifier of the object.- Specified by:
getId
in interfaceIdentifiable<I extends Identifiable<I>>
-
getOptionalName
public Optional<String> getOptionalName()
Description copied from interface:Identifiable
Return an optional containing the name of the object if it exists. If not, return an empty optional.- Specified by:
getOptionalName
in interfaceIdentifiable<I extends Identifiable<I>>
-
getNameOrId
public String getNameOrId()
Description copied from interface:Identifiable
Get the name of the object if it exists. If not, get the unique identifier of the object.- Specified by:
getNameOrId
in interfaceIdentifiable<I extends Identifiable<I>>
-
hasProperty
public boolean hasProperty()
Description copied from interface:Identifiable
Check that this object has some properties.- Specified by:
hasProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
hasProperty
public boolean hasProperty(String key)
Description copied from interface:Identifiable
Check that this object has property with specified name.- Specified by:
hasProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
getProperty
public String getProperty(String key)
Description copied from interface:Identifiable
Get property associated to specified key.- Specified by:
getProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
getProperty
public String getProperty(String key, String defaultValue)
Description copied from interface:Identifiable
Get property associated to specified key, with default value.- Specified by:
getProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
setProperty
public String setProperty(String key, String value)
Description copied from interface:Identifiable
Set property value associated to specified key.- Specified by:
setProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
getPropertyNames
public Set<String> getPropertyNames()
Description copied from interface:Identifiable
Get properties key values.- Specified by:
getPropertyNames
in interfaceIdentifiable<I extends Identifiable<I>>
-
isFictitious
public boolean isFictitious()
Description copied from interface:Identifiable
Get the fictitious status- Specified by:
isFictitious
in interfaceIdentifiable<I extends Identifiable<I>>
-
setFictitious
public void setFictitious(boolean fictitious)
Description copied from interface:Identifiable
Set the fictitious status- Specified by:
setFictitious
in interfaceIdentifiable<I extends Identifiable<I>>
-
addExtension
public <E extends Extension<I>> void addExtension(Class<? super E> type, E extension)
Description copied from interface:Extendable
Add en extension to this extendable object.- Specified by:
addExtension
in interfaceExtendable<I extends Identifiable<I>>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class typeextension
- the extension
-
getExtension
public <E extends Extension<I>> E getExtension(Class<? super E> type)
Description copied from interface:Extendable
Get an extension based on its class type.- Specified by:
getExtension
in interfaceExtendable<I extends Identifiable<I>>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class type- Returns:
- the extension mapped to the class type or null if not found
-
getExtensionByName
public <E extends Extension<I>> E getExtensionByName(String name)
Description copied from interface:Extendable
Get an extension based on its name.- Specified by:
getExtensionByName
in interfaceExtendable<I extends Identifiable<I>>
- Parameters:
name
- the extension name- Returns:
- the extension mapped to the name or null if not found
-
removeExtension
public <E extends Extension<I>> boolean removeExtension(Class<E> type)
Description copied from interface:Extendable
Remove an extension based on its class type.- Specified by:
removeExtension
in interfaceExtendable<I extends Identifiable<I>>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class type- Returns:
- true if the extension has been removed false if extension has not been found
-
getExtensions
public <E extends Extension<I>> Collection<E> getExtensions()
Description copied from interface:Extendable
Get all extensions associated with this extendable object..- Specified by:
getExtensions
in interfaceExtendable<I extends Identifiable<I>>
- Returns:
- all extensions associated to this extendable object.
-
getImplementationName
public String getImplementationName()
Description copied from interface:Extendable
Returns a name that is used to find matchingExtensionAdderProvider
s when selecting implementations of extensions inExtendable.newExtension(java.lang.Class<B>)
. This is meant to be overriden by extendables when multiple implementations exist.- Specified by:
getImplementationName
in interfaceExtendable<I extends Identifiable<I>>
- Returns:
- the name
-
newExtension
public <E extends Extension<I>,B extends ExtensionAdder<I,E>> B newExtension(Class<B> type)
Description copied from interface:Extendable
Returns an extensionAdder to build and add an extension for this extendable.The extension implementation is selected at runtime based on matching the
Extendable.getImplementationName()
of this extendable to theExtensionAdderProvider.getImplementationName()
of a provider. Implementations are loaded with java'sServiceLoader
using the ExtensionAdderProvider interface.- Specified by:
newExtension
in interfaceExtendable<I extends Identifiable<I>>
- Parameters:
type
- The interface of the ExtensionAdder- Returns:
- the adder
-
getAliases
public Set<String> getAliases()
Description copied from interface:Identifiable
Get the aliases of the object.- Specified by:
getAliases
in interfaceIdentifiable<I extends Identifiable<I>>
-
getAliasFromType
public Optional<String> getAliasFromType(String aliasType)
Description copied from interface:Identifiable
Get the alias of the object with a given alias type if it exists. Else return an empty optional.- Specified by:
getAliasFromType
in interfaceIdentifiable<I extends Identifiable<I>>
-
getAliasType
public Optional<String> getAliasType(String alias)
Description copied from interface:Identifiable
Get the alias type of an alias if it exists, an empty optional otherwise. If the alias does not exist, return an empty optional.- Specified by:
getAliasType
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias)
Description copied from interface:Identifiable
Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. No alias type is associated to this alias. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw aPowsyblException
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias, boolean ensureAliasUnicity)
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias, String aliasType)
Description copied from interface:Identifiable
Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. This alias is associated to a given alias type. If the given alias type is null or empty, no alias type is considered associated to the alias. Only one alias can be associated to a non null given alias type for one object. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw aPowsyblException
If a given non null type already has an associated alias for this object, throw aPowsyblException
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias, String aliasType, boolean ensureAliasUnicity)
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
removeAlias
public void removeAlias(String alias)
Description copied from interface:Identifiable
Remove an alias of the object. If the alias does not exist for this object, throw aPowsyblException
- Specified by:
removeAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
hasAliases
public boolean hasAliases()
Description copied from interface:Identifiable
Return true if identifiable has aliases.- Specified by:
hasAliases
in interfaceIdentifiable<I extends Identifiable<I>>
-
getDelegate
protected I getDelegate()
-
getIndex
protected com.powsybl.iidm.mergingview.MergingViewIndex getIndex()
-
-