Class ModelAccessor
java.lang.Object
org.palladiosimulator.measurementsui.fileaccess.ModelAccessor
Class for accessing all Palladio models of a Modelling Project (.aird file available)
Offers access to each model.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMeasuringPointRepository
(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPointRepository measuringPointRepository) Adds a MeasuringPointRepository to the MeasuringPointRepository listprotected void
addMonitorRepository
(org.palladiosimulator.monitorrepository.MonitorRepository monitorRepository) Adds a MonitorRepository to the MonitorRepository listprotected void
addSloRepository
(org.palladiosimulator.servicelevelobjective.ServiceLevelObjectiveRepository sloRepository) Adds a ServiceLevelObjectiveRepository to the sloRepository listvoid
checkIfRepositoriesExist
(IProject project) This method checks if the monitor- and measuringPointRepository exists and if not it creates default versions of them.List<org.palladiosimulator.pcm.allocation.Allocation>
Returns the list of AllocationsList<org.palladiosimulator.edp2.models.measuringpoint.MeasuringPointRepository>
Returns the list of MeasuringPointRepositorysList<org.palladiosimulator.monitorrepository.MonitorRepository>
Returns the list of MonitorRepositorysList<org.palladiosimulator.pcm.repository.Repository>
Returns the list RepositoriesList<org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment>
Returns the list of ResourceEnvironmentsList<org.palladiosimulator.servicelevelobjective.ServiceLevelObjectiveRepository>
Returns the list of SloRepositorysReturns the list of SloRepositoryNamesList<org.palladiosimulator.pcm.subsystem.SubSystem>
Returns the list of SubSystemsList<org.palladiosimulator.pcm.system.System>
Returns the list of SystemsEList<org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint>
This method returns a list of all MeasuringPoints which are not assigned to any Monitor.List<org.palladiosimulator.pcm.usagemodel.UsageModel>
Returns the list of UsageModelsvoid
initializeModels
(org.eclipse.sirius.business.api.session.Session session) Given a sirius session this Method initializes all five palladio component models(+SubSystems), monitor- and measuringPoint-Repositories that are found in this session.boolean
Checks whether there exists a MonitorRepositoryboolean
Checks whether any Palladio core models existboolean
Checks whether there exists a MonitorRepositorystatic <T> Predicate<T>
Method to negate a given predicate NOTE: with java 11 this will be implemented in the java.util.function package so Predicate.not(Predicatet) will be usable from there boolean
Checks whether there exists a SLO Repository
-
Constructor Details
-
ModelAccessor
public ModelAccessor()Constructor initiliazes the list for all models
-
-
Method Details
-
not
Method to negate a given predicate NOTE: with java 11 this will be implemented in the java.util.function package so Predicate.not(Predicatet) will be usable from there - Type Parameters:
T
-- Parameters:
t
- predicate to negate- Returns:
- negated Predicate
-
getUnassignedMeasuringPoints
public EList<org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint> getUnassignedMeasuringPoints()This method returns a list of all MeasuringPoints which are not assigned to any Monitor.- Returns:
- EList of unassigned MeasuringPoints
-
initializeModels
public void initializeModels(org.eclipse.sirius.business.api.session.Session session) Given a sirius session this Method initializes all five palladio component models(+SubSystems), monitor- and measuringPoint-Repositories that are found in this session.- Parameters:
session
- the session to which all models should be loaded
-
checkIfRepositoriesExist
This method checks if the monitor- and measuringPointRepository exists and if not it creates default versions of them.- Parameters:
project
- current Project
-
modelsExist
public boolean modelsExist()Checks whether any Palladio core models exist- Returns:
- boolean whether models exist or not
-
monitorRepositoryExists
public boolean monitorRepositoryExists()Checks whether there exists a MonitorRepository- Returns:
- boolean whether a monitorRepository exists
-
measuringPointRepositoryExists
public boolean measuringPointRepositoryExists()Checks whether there exists a MonitorRepository- Returns:
- boolean whether a monitorRepository exists
-
sloRepositoryExists
public boolean sloRepositoryExists()Checks whether there exists a SLO Repository- Returns:
-
addMonitorRepository
protected void addMonitorRepository(org.palladiosimulator.monitorrepository.MonitorRepository monitorRepository) Adds a MonitorRepository to the MonitorRepository list- Parameters:
monitorRepository
- to add
-
addMeasuringPointRepository
protected void addMeasuringPointRepository(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPointRepository measuringPointRepository) Adds a MeasuringPointRepository to the MeasuringPointRepository list- Parameters:
measuringPointRepository
- to add
-
addSloRepository
protected void addSloRepository(org.palladiosimulator.servicelevelobjective.ServiceLevelObjectiveRepository sloRepository) Adds a ServiceLevelObjectiveRepository to the sloRepository list- Parameters:
sloRepository
-
-
getResourceEnvironmenList
public List<org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment> getResourceEnvironmenList()Returns the list of ResourceEnvironments- Returns:
- list of ResourceEnvironments
-
getSystemList
Returns the list of Systems- Returns:
- list of Systems
-
getAllocationList
Returns the list of Allocations- Returns:
- list of Allocations
-
getRepositoryList
Returns the list Repositories- Returns:
- list of Repositories
-
getUsageModelList
Returns the list of UsageModels- Returns:
- list of UsageModels
-
getSubSystemList
Returns the list of SubSystems- Returns:
- list of SubSystems
-
getMeasuringPointRepositoryList
public List<org.palladiosimulator.edp2.models.measuringpoint.MeasuringPointRepository> getMeasuringPointRepositoryList()Returns the list of MeasuringPointRepositorys- Returns:
- list of MeasuringPointRepositorys
-
getMonitorRepositoryList
Returns the list of MonitorRepositorys- Returns:
- list of MonitorRepositorys
-
getSLORepositoryList
public List<org.palladiosimulator.servicelevelobjective.ServiceLevelObjectiveRepository> getSLORepositoryList()Returns the list of SloRepositorys- Returns:
- list of SloRepositorys
-
getSLORepositoryNameList
Returns the list of SloRepositoryNames- Returns:
- list of SloRepositoryNames
-