Package com.powsybl.iidm.network
Interface Identifiable<I extends Identifiable<I>>
- All Superinterfaces:
Extendable<I>
- All Known Subinterfaces:
Area
,AutomationSystem<I>
,Battery
,Branch<I>
,Bus
,BusbarSection
,Connectable<I>
,Container<I>
,DanglingLine
,Generator
,Ground
,HvdcConverterStation<T>
,HvdcLine
,Injection<I>
,LccConverterStation
,Line
,Load
,Network
,NetworkExt
,OverloadManagementSystem
,ShuntCompensator
,StaticVarCompensator
,Substation
,Switch
,ThreeWindingsTransformer
,TieLine
,TwoWindingsTransformer
,VoltageLevel
,VscConverterStation
- All Known Implementing Classes:
AreaImpl
,BatteryImpl
,NetworkImpl
,SubnetworkImpl
An object that is part of the network model and that is identified uniquely
by a
String
id.- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Add an alias to the object.default void
default void
Add an alias to the object.default void
Get the aliases of the object.getAliasFromType
(String aliasType) Get the alias of the object with a given alias type if it exists.getAliasType
(String alias) Get the alias type of an alias if it exists, an empty optional otherwise.getId()
Get the unique identifier of the object.default String
Get the name of the object if it exists.Get the network associated to the object.Return an optional containing the name of the object if it exists.default Network
Get the parent network, i.e. the smallest network containing the object.getProperty
(String key) Get property associated to specified key.getProperty
(String key, String defaultValue) Get property associated to specified key, with default value.Get properties key values.getType()
Get identifiable type.default boolean
Return true if identifiable has aliases.boolean
Check that this object has some properties.boolean
hasProperty
(String key) Check that this object has property with specified name.default boolean
Get the fictitious statusdefault void
removeAlias
(String alias) Remove an alias of the object.boolean
removeProperty
(String key) Remove property with specified key.default void
setFictitious
(boolean fictitious) Set the fictitious statusdefault I
Update object name.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 Details
-
getNetwork
Network getNetwork()Get the network associated to the object. -
getParentNetwork
Get the parent network, i.e. the smallest network containing the object. -
getId
String getId()Get the unique identifier of the object. -
getAliases
Get the aliases of the object. -
getAliasFromType
Get the alias of the object with a given alias type if it exists. Else return an empty optional. -
getAliasType
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
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
-
addAlias
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
-
addAlias
-
removeAlias
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
Return an optional containing the name of the object if it exists. If not, return an empty optional. -
getNameOrId
Get the name of the object if it exists. If not, get the unique identifier of the object. -
setName
Update object name.- Parameters:
name
- new name of the object (could be null to erase the name)- Returns:
- the object itself
-
hasProperty
boolean hasProperty()Check that this object has some properties. -
hasProperty
Check that this object has property with specified name. -
getProperty
Get property associated to specified key. -
getProperty
Get property associated to specified key, with default value. -
setProperty
Set property value associated to specified key. -
removeProperty
Remove property with specified key.- Parameters:
key
- the property key- Returns:
true
if property exists and has been removed,false
otherwise
-
getPropertyNames
Get properties key values. -
isFictitious
default boolean isFictitious()Get the fictitious status -
setFictitious
default void setFictitious(boolean fictitious) Set the fictitious status -
getType
IdentifiableType getType()Get identifiable type.- Returns:
- the identifiable type
-