public final class MergingView extends Object implements Network, MultiVariantObject
Network.BusBreakerView, Network.BusView, Network.PrettyNetworkFactory
Modifier and Type | Method and Description |
---|---|
<E extends Extension<Network>> |
addExtension(Class<? super E> type,
E extension)
Add en extension to this extendable object.
|
void |
addListener(NetworkListener listener) |
void |
cloneVariant(String sourceVariantId,
List<String> targetVariantIds) |
static MergingView |
create(String id,
String format)
Public constructor
|
Iterable<Battery> |
getBatteries()
Get all batteries.
|
Battery |
getBattery(String id)
Get a battery.
|
int |
getBatteryCount()
Get the battery count.
|
Stream<Battery> |
getBatteryStream()
Get all batteries.
|
Branch |
getBranch(String id)
Get a branch
|
int |
getBranchCount()
Get the branch count.
|
Iterable<Branch> |
getBranches()
Get all branches
|
Stream<Branch> |
getBranchStream()
Get all branches
|
BusbarSection |
getBusbarSection(String id)
Get a busbar section from its id or an alias.
|
int |
getBusbarSectionCount()
Get the busbar section count.
|
Iterable<BusbarSection> |
getBusbarSections()
Get all busbar sections.
|
Stream<BusbarSection> |
getBusbarSectionStream()
Get all busbar sections.
|
Network.BusBreakerView |
getBusBreakerView()
Get a bus/breaker view of the network.
|
Network.BusView |
getBusView()
Get a bus view of the network.
|
org.joda.time.DateTime |
getCaseDate()
Get the date that the network represents.
|
int |
getConnectableCount()
Count the connectables of the network
|
<C extends Connectable> |
getConnectableCount(Class<C> clazz)
Count the connectables of the network for a given type
|
Iterable<Connectable> |
getConnectables()
Get all connectables of the network
|
<C extends Connectable> |
getConnectables(Class<C> clazz)
Get all connectables of the network for a given type
|
Stream<Connectable> |
getConnectableStream()
Get a stream of all connectables of the network
|
<C extends Connectable> |
getConnectableStream(Class<C> clazz)
Get a stream of all connectables of the network for a given type
|
ContainerType |
getContainerType() |
Set<Country> |
getCountries()
Get all countries.
|
int |
getCountryCount()
Get the country count.
|
DanglingLine |
getDanglingLine(String id)
Get a dangling line.
|
int |
getDanglingLineCount()
Get the dangling line count.
|
Iterable<DanglingLine> |
getDanglingLines()
Get all dangling lines.
|
Stream<DanglingLine> |
getDanglingLineStream()
Get all dangling lines.
|
<E extends Extension<Network>> |
getExtension(Class<? super E> type)
Get an extension based on its class type.
|
<E extends Extension<Network>> |
getExtensionByName(String name)
Get an extension based on its name.
|
<E extends Extension<Network>> |
getExtensions()
Get all extensions associated with this extendable object..
|
int |
getForecastDistance()
Get the forecast distance in minutes.
|
Generator |
getGenerator(String id)
Get a generator.
|
int |
getGeneratorCount()
Get the generator count.
|
Iterable<Generator> |
getGenerators()
Get all generators.
|
Stream<Generator> |
getGeneratorStream()
Get all generators.
|
HvdcConverterStation<?> |
getHvdcConverterStation(String id)
Get an HVDC converter station.
|
int |
getHvdcConverterStationCount()
Get HVDC converter stations count.
|
Iterable<HvdcConverterStation<?>> |
getHvdcConverterStations()
Get all HVDC converter stations.
|
Stream<HvdcConverterStation<?>> |
getHvdcConverterStationStream()
Get all HVDC converter stations.
|
HvdcLine |
getHvdcLine(String id)
Get an HVDC line.
|
int |
getHvdcLineCount()
Get HVDC lines count.
|
Iterable<HvdcLine> |
getHvdcLines()
Get all HVDC lines.
|
Stream<HvdcLine> |
getHvdcLineStream()
Get all HVDC lines.
|
String |
getId()
Get the unique identifier of the object.
|
Identifiable<?> |
getIdentifiable(String id)
Get an equipment by its ID or alias
|
Collection<Identifiable<?>> |
getIdentifiables()
Get all identifiables of the network.
|
String |
getImplementationName()
Returns a name that is used to find matching
ExtensionAdderProvider s
when selecting implementations of extensions in Extendable.newExtension(java.lang.Class<B>) . |
LccConverterStation |
getLccConverterStation(String id)
Get an LCC converter station.
|
int |
getLccConverterStationCount()
Get LCC converter stations count.
|
Iterable<LccConverterStation> |
getLccConverterStations()
Get all LCC converter stations.
|
Stream<LccConverterStation> |
getLccConverterStationStream()
Get all LCC converter stations.
|
Line |
getLine(String id)
Get a AC line.
|
int |
getLineCount()
Get the AC line count.
|
Iterable<Line> |
getLines()
Get all AC lines.
|
Stream<Line> |
getLineStream()
Get all AC lines.
|
Load |
getLoad(String id)
Get a load.
|
int |
getLoadCount()
Get the load count.
|
Iterable<Load> |
getLoads()
Get all loads.
|
Stream<Load> |
getLoadStream()
Get all loads.
|
String |
getNameOrId()
Get the name of the object if it exists.
|
Network |
getNetwork()
Get the network associated to the object.
|
Network |
getNetwork(String id) |
Optional<String> |
getOptionalName()
Return an optional containing the name of the object if it exists.
|
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.
|
ShuntCompensator |
getShuntCompensator(String id)
Get a compensator shunt.
|
int |
getShuntCompensatorCount()
Get the shunt count.
|
Iterable<ShuntCompensator> |
getShuntCompensators()
Get all compensator shunts.
|
Stream<ShuntCompensator> |
getShuntCompensatorStream()
Get all compensator shunts.
|
String |
getSourceFormat()
Get the source format.
|
StaticVarCompensator |
getStaticVarCompensator(String id)
Get a static var compensator.
|
int |
getStaticVarCompensatorCount()
Get the static var compensator count.
|
Iterable<StaticVarCompensator> |
getStaticVarCompensators()
Get all static var compensators.
|
Stream<StaticVarCompensator> |
getStaticVarCompensatorStream()
Get all static var compensators.
|
Substation |
getSubstation(String id)
Get a substation.
|
int |
getSubstationCount()
Get the substation count.
|
Iterable<Substation> |
getSubstations()
Get all substations.
|
Iterable<Substation> |
getSubstations(Country country,
String tsoId,
String... geographicalTags)
Get substation located in a specific county, TSO and marked with a list
of geographical tag.
|
Iterable<Substation> |
getSubstations(String country,
String tsoId,
String... geographicalTags)
Get substation located in a specific county, TSO and marked with a list
of geographical tag.
|
Stream<Substation> |
getSubstationStream()
Get all substations.
|
Switch |
getSwitch(String id)
Get a switch from its id or an alias.
|
int |
getSwitchCount()
Get the switch count.
|
Iterable<Switch> |
getSwitches()
Get all switches.
|
Stream<Switch> |
getSwitchStream()
Get all switches.
|
ThreeWindingsTransformer |
getThreeWindingsTransformer(String id)
Get a 3 windings transformer.
|
int |
getThreeWindingsTransformerCount()
Get the 3 windings transformer count.
|
Iterable<ThreeWindingsTransformer> |
getThreeWindingsTransformers()
Get all 3 windings transformers.
|
Stream<ThreeWindingsTransformer> |
getThreeWindingsTransformerStream()
Get all 3 windings transformers.
|
TwoWindingsTransformer |
getTwoWindingsTransformer(String id)
Get a two windings transformer.
|
int |
getTwoWindingsTransformerCount()
Get the two windings transformer count.
|
Iterable<TwoWindingsTransformer> |
getTwoWindingsTransformers()
Get all two windings transformers.
|
Stream<TwoWindingsTransformer> |
getTwoWindingsTransformerStream()
Get all two windings transformers.
|
VariantManager |
getVariantManager()
Get the variant manager of the network.
|
VoltageLevel |
getVoltageLevel(String id)
Get a substation voltage level.
|
int |
getVoltageLevelCount()
Get the voltage level count.
|
Iterable<VoltageLevel> |
getVoltageLevels()
Get all substation voltage levels.
|
Stream<VoltageLevel> |
getVoltageLevelStream()
Get all substation voltage levels.
|
VscConverterStation |
getVscConverterStation(String id)
Get an VSC converter station.
|
int |
getVscConverterStationCount()
Get VSC converter stations count.
|
Iterable<VscConverterStation> |
getVscConverterStations()
Get all VSC converter stations.
|
Stream<VscConverterStation> |
getVscConverterStationStream()
Get all VSC converter stations.
|
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 status
|
void |
merge(Network... others) |
void |
merge(Network other)
Merge with an other network.
|
<E extends Extension<Network>,B extends ExtensionAdder<Network,E>> |
newExtension(Class<B> type)
Returns an extensionAdder to build and add an extension for this extendable.
|
HvdcLineAdder |
newHvdcLine()
Get a builder to create a new HVDC line.
|
LineAdder |
newLine()
Get a builder to create a new AC line.
|
com.powsybl.iidm.mergingview.SubstationAdderAdapter |
newSubstation()
Get a builder to create a new substation.
|
TieLineAdder |
newTieLine()
Get a builder to create a new AC tie line.
|
<E extends Extension<Network>> |
removeExtension(Class<E> type)
Remove an extension based on its class type.
|
void |
removeListener(NetworkListener listener) |
void |
removeVariant(String variantId) |
Network |
setCaseDate(org.joda.time.DateTime date)
Set the date that the network represents.
|
void |
setFictitious(boolean fictitious)
Set the fictitious status
|
Network |
setForecastDistance(int forecastDistance) |
String |
setProperty(String key,
String value)
Set property value associated to specified key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHvdcLine, with
addAlias, addAlias, getAliases, getAliasFromType, getAliasType, getName, getProperties, hasAliases, removeAlias
public static MergingView create(String id, String format)
public void merge(Network other)
Network
public ContainerType getContainerType()
getContainerType
in interface Container<Network>
public String getId()
Identifiable
getId
in interface Identifiable<Network>
public Optional<String> getOptionalName()
Identifiable
getOptionalName
in interface Identifiable<Network>
public String getNameOrId()
Identifiable
getNameOrId
in interface Identifiable<Network>
public org.joda.time.DateTime getCaseDate()
Network
getCaseDate
in interface Network
public Network setCaseDate(org.joda.time.DateTime date)
Network
setCaseDate
in interface Network
public int getForecastDistance()
Network
Example: 0 for a snapshot, 6*60 to 30*60 for a DACF.
getForecastDistance
in interface Network
public Network setForecastDistance(int forecastDistance)
setForecastDistance
in interface Network
public Network getNetwork()
Identifiable
getNetwork
in interface Identifiable<Network>
public boolean hasProperty()
Identifiable
hasProperty
in interface Identifiable<Network>
public boolean hasProperty(String key)
Identifiable
hasProperty
in interface Identifiable<Network>
public String getProperty(String key)
Identifiable
getProperty
in interface Identifiable<Network>
public String getProperty(String key, String defaultValue)
Identifiable
getProperty
in interface Identifiable<Network>
public String setProperty(String key, String value)
Identifiable
setProperty
in interface Identifiable<Network>
public Set<String> getPropertyNames()
Identifiable
getPropertyNames
in interface Identifiable<Network>
public boolean isFictitious()
Identifiable
isFictitious
in interface Identifiable<Network>
public void setFictitious(boolean fictitious)
Identifiable
setFictitious
in interface Identifiable<Network>
public String getSourceFormat()
Network
getSourceFormat
in interface Network
public Set<Country> getCountries()
Network
getCountries
in interface Network
public int getCountryCount()
Network
getCountryCount
in interface Network
public Identifiable<?> getIdentifiable(String id)
Network
getIdentifiable
in interface Network
id
- the id or an alias of the equipmentpublic Collection<Identifiable<?>> getIdentifiables()
Network
getIdentifiables
in interface Network
public <C extends Connectable> Iterable<C> getConnectables(Class<C> clazz)
Network
getConnectables
in interface Network
clazz
- connectable type classpublic <C extends Connectable> Stream<C> getConnectableStream(Class<C> clazz)
Network
getConnectableStream
in interface Network
clazz
- connectable type classpublic <C extends Connectable> int getConnectableCount(Class<C> clazz)
Network
getConnectableCount
in interface Network
clazz
- connectable type classpublic Iterable<Connectable> getConnectables()
Network
getConnectables
in interface Network
public Stream<Connectable> getConnectableStream()
Network
getConnectableStream
in interface Network
public int getConnectableCount()
Network
getConnectableCount
in interface Network
public com.powsybl.iidm.mergingview.SubstationAdderAdapter newSubstation()
Network
newSubstation
in interface Network
public Iterable<Substation> getSubstations()
Network
getSubstations
in interface Network
public Stream<Substation> getSubstationStream()
Network
getSubstationStream
in interface Network
public int getSubstationCount()
Network
getSubstationCount
in interface Network
public Iterable<Substation> getSubstations(Country country, String tsoId, String... geographicalTags)
Network
getSubstations
in interface Network
country
- the country, if null
there is no
filtering on countriestsoId
- the id of the TSO, if null
there is no
filtering on TSOsgeographicalTags
- a list a geographical tagspublic Iterable<Substation> getSubstations(String country, String tsoId, String... geographicalTags)
Network
getSubstations
in interface Network
country
- the country name, if empty string, the filtering will be on
substations without country, if null
there is no
filtering on countriestsoId
- the id of the TSO, if null
there is no
filtering on TSOsgeographicalTags
- a list a geographical tagspublic Substation getSubstation(String id)
Network
getSubstation
in interface Network
id
- the id or an alias of the substationpublic Iterable<VoltageLevel> getVoltageLevels()
Network
getVoltageLevels
in interface Network
public Stream<VoltageLevel> getVoltageLevelStream()
Network
getVoltageLevelStream
in interface Network
public int getVoltageLevelCount()
Network
getVoltageLevelCount
in interface Network
public VoltageLevel getVoltageLevel(String id)
Network
getVoltageLevel
in interface Network
id
- the id or an alias of the substation voltage levelpublic Iterable<Battery> getBatteries()
Network
getBatteries
in interface Network
public Stream<Battery> getBatteryStream()
Network
getBatteryStream
in interface Network
public int getBatteryCount()
Network
getBatteryCount
in interface Network
public Battery getBattery(String id)
Network
getBattery
in interface Network
id
- the id or an alias of the batterypublic Iterable<VscConverterStation> getVscConverterStations()
Network
getVscConverterStations
in interface Network
public Stream<VscConverterStation> getVscConverterStationStream()
Network
getVscConverterStationStream
in interface Network
public int getVscConverterStationCount()
Network
getVscConverterStationCount
in interface Network
public VscConverterStation getVscConverterStation(String id)
Network
getVscConverterStation
in interface Network
id
- the id or an alias of the VSC converter stationpublic Iterable<TwoWindingsTransformer> getTwoWindingsTransformers()
Network
getTwoWindingsTransformers
in interface Network
public Stream<TwoWindingsTransformer> getTwoWindingsTransformerStream()
Network
getTwoWindingsTransformerStream
in interface Network
public int getTwoWindingsTransformerCount()
Network
getTwoWindingsTransformerCount
in interface Network
public TwoWindingsTransformer getTwoWindingsTransformer(String id)
Network
getTwoWindingsTransformer
in interface Network
id
- the id or an alias of the two windings transformerpublic Switch getSwitch(String id)
Network
public Iterable<Switch> getSwitches()
Network
getSwitches
in interface Network
public Stream<Switch> getSwitchStream()
Network
getSwitchStream
in interface Network
public int getSwitchCount()
Network
getSwitchCount
in interface Network
public Iterable<StaticVarCompensator> getStaticVarCompensators()
Network
getStaticVarCompensators
in interface Network
public Stream<StaticVarCompensator> getStaticVarCompensatorStream()
Network
getStaticVarCompensatorStream
in interface Network
public int getStaticVarCompensatorCount()
Network
getStaticVarCompensatorCount
in interface Network
public StaticVarCompensator getStaticVarCompensator(String id)
Network
getStaticVarCompensator
in interface Network
id
- the id or an alias of the static var compensatorpublic Iterable<ShuntCompensator> getShuntCompensators()
Network
getShuntCompensators
in interface Network
public Stream<ShuntCompensator> getShuntCompensatorStream()
Network
getShuntCompensatorStream
in interface Network
public int getShuntCompensatorCount()
Network
getShuntCompensatorCount
in interface Network
public ShuntCompensator getShuntCompensator(String id)
Network
getShuntCompensator
in interface Network
id
- the id or an alias of the compensator shuntpublic Stream<Load> getLoadStream()
Network
getLoadStream
in interface Network
public int getLoadCount()
Network
getLoadCount
in interface Network
public Iterable<Generator> getGenerators()
Network
getGenerators
in interface Network
public Stream<Generator> getGeneratorStream()
Network
getGeneratorStream
in interface Network
public int getGeneratorCount()
Network
getGeneratorCount
in interface Network
public Generator getGenerator(String id)
Network
getGenerator
in interface Network
id
- the id or an alias of the generatorpublic BusbarSection getBusbarSection(String id)
Network
getBusbarSection
in interface Network
id
- the id or an alias of the busbar sectionpublic Iterable<BusbarSection> getBusbarSections()
Network
getBusbarSections
in interface Network
public Stream<BusbarSection> getBusbarSectionStream()
Network
getBusbarSectionStream
in interface Network
public int getBusbarSectionCount()
Network
getBusbarSectionCount
in interface Network
public Iterable<LccConverterStation> getLccConverterStations()
Network
getLccConverterStations
in interface Network
public Stream<LccConverterStation> getLccConverterStationStream()
Network
getLccConverterStationStream
in interface Network
public int getLccConverterStationCount()
Network
getLccConverterStationCount
in interface Network
public LccConverterStation getLccConverterStation(String id)
Network
getLccConverterStation
in interface Network
id
- the id or an alias of the LCC converter stationpublic Iterable<HvdcConverterStation<?>> getHvdcConverterStations()
Network
getHvdcConverterStations
in interface Network
public Stream<HvdcConverterStation<?>> getHvdcConverterStationStream()
Network
getHvdcConverterStationStream
in interface Network
public int getHvdcConverterStationCount()
Network
getHvdcConverterStationCount
in interface Network
public HvdcConverterStation<?> getHvdcConverterStation(String id)
Network
getHvdcConverterStation
in interface Network
id
- the id or an alias of the HVDC converter stationpublic Branch getBranch(String id)
Network
public Iterable<Branch> getBranches()
Network
getBranches
in interface Network
public Stream<Branch> getBranchStream()
Network
getBranchStream
in interface Network
public int getBranchCount()
Network
getBranchCount
in interface Network
public Iterable<ThreeWindingsTransformer> getThreeWindingsTransformers()
Network
getThreeWindingsTransformers
in interface Network
public Stream<ThreeWindingsTransformer> getThreeWindingsTransformerStream()
Network
getThreeWindingsTransformerStream
in interface Network
public int getThreeWindingsTransformerCount()
Network
getThreeWindingsTransformerCount
in interface Network
public ThreeWindingsTransformer getThreeWindingsTransformer(String id)
Network
getThreeWindingsTransformer
in interface Network
id
- the id or an alias of the 3 windings transformerpublic LineAdder newLine()
Network
public Iterable<Line> getLines()
Network
public Stream<Line> getLineStream()
Network
getLineStream
in interface Network
public int getLineCount()
Network
getLineCount
in interface Network
public Iterable<DanglingLine> getDanglingLines()
Network
getDanglingLines
in interface Network
public Stream<DanglingLine> getDanglingLineStream()
Network
getDanglingLineStream
in interface Network
public int getDanglingLineCount()
Network
getDanglingLineCount
in interface Network
public DanglingLine getDanglingLine(String id)
Network
getDanglingLine
in interface Network
id
- the id or an alias of the dangling linepublic HvdcLineAdder newHvdcLine()
Network
newHvdcLine
in interface Network
public Iterable<HvdcLine> getHvdcLines()
Network
getHvdcLines
in interface Network
public Stream<HvdcLine> getHvdcLineStream()
Network
getHvdcLineStream
in interface Network
public int getHvdcLineCount()
Network
getHvdcLineCount
in interface Network
public HvdcLine getHvdcLine(String id)
Network
getHvdcLine
in interface Network
id
- the id or an alias of the HVDC linepublic Network.BusBreakerView getBusBreakerView()
Network
getBusBreakerView
in interface Network
public Network.BusView getBusView()
Network
getBusView
in interface Network
public <E extends Extension<Network>> void addExtension(Class<? super E> type, E extension)
Extendable
addExtension
in interface Extendable<Network>
E
- the extension typetype
- the extension class typeextension
- the extensionpublic <E extends Extension<Network>> E getExtension(Class<? super E> type)
Extendable
getExtension
in interface Extendable<Network>
E
- the extension typetype
- the extension class typepublic <E extends Extension<Network>> E getExtensionByName(String name)
Extendable
getExtensionByName
in interface Extendable<Network>
name
- the extension namepublic <E extends Extension<Network>> boolean removeExtension(Class<E> type)
Extendable
removeExtension
in interface Extendable<Network>
E
- the extension typetype
- the extension class typepublic <E extends Extension<Network>> Collection<E> getExtensions()
Extendable
getExtensions
in interface Extendable<Network>
public String getImplementationName()
Extendable
ExtensionAdderProvider
s
when selecting implementations of extensions in Extendable.newExtension(java.lang.Class<B>)
. This
is meant to be overriden by extendables when multiple implementations exist.getImplementationName
in interface Extendable<Network>
public <E extends Extension<Network>,B extends ExtensionAdder<Network,E>> B newExtension(Class<B> type)
Extendable
The extension implementation is selected at runtime based on matching the
Extendable.getImplementationName()
of this extendable to the
ExtensionAdderProvider.getImplementationName()
of a provider.
Implementations are loaded with java's ServiceLoader
using
the ExtensionAdderProvider interface.
newExtension
in interface Extendable<Network>
type
- The interface of the ExtensionAdderpublic VariantManager getVariantManager()
Network
getVariantManager
in interface Network
public void cloneVariant(String sourceVariantId, List<String> targetVariantIds)
cloneVariant
in interface MultiVariantObject
public void removeVariant(String variantId)
removeVariant
in interface MultiVariantObject
public TieLineAdder newTieLine()
Network
newTieLine
in interface Network
public void addListener(NetworkListener listener)
addListener
in interface Network
public void removeListener(NetworkListener listener)
removeListener
in interface Network
Copyright © 2020. All rights reserved.