Package de.fzi.power.interpreter
Class PowerModelUpdaterSwitch
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- de.fzi.power.infrastructure.util.InfrastructureSwitch<Void>
-
- de.fzi.power.interpreter.PowerModelUpdaterSwitch
-
public class PowerModelUpdaterSwitch extends InfrastructureSwitch<Void>
Switch used by an interpreter to update the power models for elements depending on the {@see PowerAssemblyContext} that has been set for them.
-
-
Field Summary
-
Fields inherited from class de.fzi.power.infrastructure.util.InfrastructureSwitch
modelPackage
-
-
Constructor Summary
Constructors Constructor Description PowerModelUpdaterSwitch(PowerModelRegistry registry, CalculatorInstantiator calcInstantiator)Creates the switch for updating the power models registered in thePowerModelRegistryof an interpreted power infrastructure model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VoidcaseMountedPowerDistributionUnit(MountedPowerDistributionUnit mountedPdu)Update the power model for aMountedPowerDistributionUnit.VoidcasePowerConsumingResourceSet(PowerConsumingResourceSet powerConsumingResource)Update the power model for a power-consuming resource (PowerConsumingResource) such as a CPU, HDD etc.VoidcasePowerDistributionUnit(PowerDistributionUnit powerDistributionUnit)Update the power model for aPowerDistributionUnit.VoidcasePowerInfrastructureRepository(PowerInfrastructureRepository repo)Returns the result of interpreting the object as an instance of 'Power Infrastructure Repository'.VoidcasePowerProvidingEntity(PowerProvidingEntity ppe)Update the power model for aPowerProvidingEntity.VoidcaseStatefulPowerConsumingResourceSet(StatefulPowerConsumingResourceSet powerConsumingResource)Returns the result of interpreting the object as an instance of 'Stateful Power Consuming Resource Set'.-
Methods inherited from class de.fzi.power.infrastructure.util.InfrastructureSwitch
caseAbstractPowerConsumingResource, caseEntity, caseIdentifier, caseNamedElement, casePowerConsumingEntity, casePowerConsumingProvidingEntity, defaultCase, doSwitch, isSwitchFor
-
-
-
-
Constructor Detail
-
PowerModelUpdaterSwitch
public PowerModelUpdaterSwitch(PowerModelRegistry registry, CalculatorInstantiator calcInstantiator)
Creates the switch for updating the power models registered in thePowerModelRegistryof an interpreted power infrastructure model.- Parameters:
registry- The registry onto which the power models are registered.calcInstantiator- The factory used for instantiating the respective updated elements.
-
-
Method Detail
-
casePowerInfrastructureRepository
public Void casePowerInfrastructureRepository(PowerInfrastructureRepository repo)
Description copied from class:InfrastructureSwitchReturns the result of interpreting the object as an instance of 'Power Infrastructure Repository'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
casePowerInfrastructureRepositoryin classInfrastructureSwitch<Void>- Parameters:
repo- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Power Infrastructure Repository'.
- See Also:
doSwitch(EObject)
-
casePowerDistributionUnit
public Void casePowerDistributionUnit(PowerDistributionUnit powerDistributionUnit)
Update the power model for aPowerDistributionUnit.- Overrides:
casePowerDistributionUnitin classInfrastructureSwitch<Void>- Parameters:
The- updated PDU.- Returns:
- Nothing.
- See Also:
doSwitch(EObject)
-
casePowerProvidingEntity
public Void casePowerProvidingEntity(PowerProvidingEntity ppe)
Update the power model for aPowerProvidingEntity.- Overrides:
casePowerProvidingEntityin classInfrastructureSwitch<Void>- Parameters:
The- updatedPowerProvidingEntityentity.- Returns:
- Nothing.
- See Also:
doSwitch(EObject)
-
caseMountedPowerDistributionUnit
public Void caseMountedPowerDistributionUnit(MountedPowerDistributionUnit mountedPdu)
Update the power model for aMountedPowerDistributionUnit.- Overrides:
caseMountedPowerDistributionUnitin classInfrastructureSwitch<Void>- Parameters:
The- updated mounted PDU.- Returns:
- Nothing.
- See Also:
doSwitch(EObject)
-
casePowerConsumingResourceSet
public Void casePowerConsumingResourceSet(PowerConsumingResourceSet powerConsumingResource)
Update the power model for a power-consuming resource (PowerConsumingResource) such as a CPU, HDD etc.- Overrides:
casePowerConsumingResourceSetin classInfrastructureSwitch<Void>- Parameters:
powerConsumingResource- The resource for which the power model is updated.- Returns:
- Nothing.
- See Also:
doSwitch(EObject)
-
caseStatefulPowerConsumingResourceSet
public Void caseStatefulPowerConsumingResourceSet(StatefulPowerConsumingResourceSet powerConsumingResource)
Description copied from class:InfrastructureSwitchReturns the result of interpreting the object as an instance of 'Stateful Power Consuming Resource Set'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseStatefulPowerConsumingResourceSetin classInfrastructureSwitch<Void>- Parameters:
powerConsumingResource- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Stateful Power Consuming Resource Set'.
- See Also:
doSwitch(EObject)
-
-