Package com.powsybl.iidm.network
Interface Identifiable<I extends Identifiable<I>>
-
- All Superinterfaces:
Extendable<I>
- All Known Subinterfaces:
Battery
,Branch<I>
,Bus
,BusbarSection
,Connectable<I>
,Container<I>
,DanglingLine
,Generator
,HvdcConverterStation<T>
,HvdcLine
,Injection<I>
,LccConverterStation
,Line
,Load
,Network
,ShuntCompensator
,StaticVarCompensator
,Substation
,Switch
,ThreeWindingsTransformer
,TieLine
,TwoWindingsTransformer
,VoltageLevel
,VoltageLevelAdapter
,VscConverterStation
- All Known Implementing Classes:
BatteryAdapter
,BatteryImpl
,BusbarSectionAdapter
,DanglingLineAdapter
,GeneratorAdapter
,HvdcLineAdapter
,LccConverterStationAdapter
,LineAdapter
,LoadAdapter
,MergingView
,ShuntCompensatorAdapter
,StaticVarCompensatorAdapter
,SwitchAdapter
,ThreeWindingsTransformerAdapter
,TieLineAdapter
,TwoWindingsTransformerAdapter
,VscConverterStationAdapter
public interface Identifiable<I extends Identifiable<I>> extends Extendable<I>
An object that is part of the network model and that is identified uniquely by aString
id.- Author:
- Geoffroy Jamgotchian
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
addAlias(String alias)
Add an alias to the object.default void
addAlias(String alias, boolean ensureAliasUnicity)
default void
addAlias(String alias, String aliasType)
Add an alias to the object.default void
addAlias(String alias, String aliasType, boolean ensureAliasUnicity)
default Set<String>
getAliases()
Get the aliases of the object.default Optional<String>
getAliasFromType(String aliasType)
Get the alias of the object with a given alias type if it exists.default Optional<String>
getAliasType(String alias)
Get the alias type of an alias if it exists, an empty optional otherwise.String
getId()
Get the unique identifier of the object.default String
getName()
Deprecated.UsegetNameOrId()
orgetOptionalName()
instead.default String
getNameOrId()
Get the name of the object if it exists.Network
getNetwork()
Get the network associated to the object.default Optional<String>
getOptionalName()
Return an optional containing the name of the object if it exists.default Properties
getProperties()
Deprecated.UsegetProperty(String)
&setProperty(String, String)
instead.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.default 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.default boolean
isFictitious()
Get the fictitious statusdefault void
removeAlias(String alias)
Remove an alias of the object.default void
setFictitious(boolean fictitious)
Set the fictitious statusString
setProperty(String key, String value)
Set property value associated to specified key.-
Methods inherited from interface com.powsybl.commons.extensions.Extendable
addExtension, getExtension, getExtensionByName, getExtensions, getImplementationName, newExtension, removeExtension
-
-
-
-
Method Detail
-
getNetwork
Network getNetwork()
Get the network associated to the object.
-
getId
String getId()
Get the unique identifier of the object.
-
getName
@Deprecated default String getName()
Deprecated.UsegetNameOrId()
orgetOptionalName()
instead.Get the name of the object if it exists. If not, get the unique identifier of the object.
-
getAliasFromType
default Optional<String> getAliasFromType(String aliasType)
Get the alias of the object with a given alias type if it exists. Else return an empty optional.
-
getAliasType
default Optional<String> getAliasType(String alias)
Get the alias type of an alias if it exists, an empty optional otherwise. If the alias does not exist, return an empty optional.
-
addAlias
default void addAlias(String alias)
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
-
addAlias
default void addAlias(String alias, boolean ensureAliasUnicity)
-
addAlias
default void addAlias(String alias, String aliasType)
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
-
removeAlias
default void removeAlias(String alias)
Remove an alias of the object. If the alias does not exist for this object, throw aPowsyblException
-
hasAliases
default boolean hasAliases()
Return true if identifiable has aliases.
-
getOptionalName
default Optional<String> getOptionalName()
Return an optional containing the name of the object if it exists. If not, return an empty optional.
-
getNameOrId
default String getNameOrId()
Get the name of the object if it exists. If not, get the unique identifier of the object.
-
hasProperty
boolean hasProperty()
Check that this object has some properties.
-
getProperties
@Deprecated default Properties getProperties()
Deprecated.UsegetProperty(String)
&setProperty(String, String)
instead.Get properties associated to the object.
-
hasProperty
boolean hasProperty(String key)
Check that this object has property with specified name.
-
getProperty
String getProperty(String key, String defaultValue)
Get property associated to specified key, with default value.
-
setProperty
String setProperty(String key, String value)
Set property value associated to specified key.
-
isFictitious
default boolean isFictitious()
Get the fictitious status
-
setFictitious
default void setFictitious(boolean fictitious)
Set the fictitious status
-
-