public class CalendarModelConverter extends Object
It get's the time unit from the process or actor calendar.
All periods, which are given in the SimpleDateFormat are calculated to doubles. The time counts for the whole year.
So e.g. if it's the 17th January at 13:00:00 o'Clock it calculates into seconds: (because there were 16 days before that day: ) (16 * 24 * 60 * 60) + (13 * 60 * 60) + (0 * 60) + 0 = 1382400 + 46800 = 1429200.
| Constructor and Description |
|---|
CalendarModelConverter(ProcessCalendar calendar)
Constructor in case there is an instance of this class in
the class ProcessCalendar.
|
CalendarModelConverter(ProcessCalendar pCalendar,
ActorCalendar aCalendar)
Constructor in case there is an instance of this class in
the class ActorCalendar.
|
| Modifier and Type | Method and Description |
|---|---|
double |
calculate(double t)
Changes the time unit by calculation from
the old time unit to the new selected one.
|
void |
updateListOEM(ArrayList<ActorResource> actorList,
int y)
updates an actor which wasn't equal to the selected one.
|
void |
updateListUSM(org.palladiosimulator.pcm.usagemodel.Workload w)
updates a scenario which wasn't equal to the selected one.
|
void |
updateOEM(ArrayList<ActorResource> actorList)
updates the actors from the list, which weren't
equal to the selected one
|
void |
updateOganizationEnvironmentModel(ActorResource selectedActor,
ArrayList<ActorResource> actorList)
This method updates the model by information
from the actor calendar specification.
|
void |
updateUsageModel(ArrayList<org.palladiosimulator.pcm.usagemodel.UsageScenario> scenarioList,
org.palladiosimulator.pcm.usagemodel.UsageScenario selectedScenario)
This method updates the model by information
from the process calendar specification.
|
void |
updateUSM(ArrayList<org.palladiosimulator.pcm.usagemodel.UsageScenario> scenarioList)
Updates the scenarios from the list, which weren't
equal to the selected one
|
public CalendarModelConverter(ProcessCalendar calendar)
The time unit is set to the selectedTimeUnit from ProcessCalendar The oldTimeUnit is set to the oldTimeUnit from ProcessCalendar. The class variable is set with the variable, of the calendar which created the instance
calendar - the calendar, where the instance was createdpublic CalendarModelConverter(ProcessCalendar pCalendar, ActorCalendar aCalendar)
The time unit is set to the selectedTimeUnit from ProcessCalendar The oldTimeUnit is set to the oldTimeUnit from ProcessCalendar. The class variable is set with the variable, of the calendar which created the instance
pCalendar - the calendar, where the instance of ActorCalendar
was createdaCalendar - the calendar, where the instance of this class
was createdpublic void updateUsageModel(ArrayList<org.palladiosimulator.pcm.usagemodel.UsageScenario> scenarioList, org.palladiosimulator.pcm.usagemodel.UsageScenario selectedScenario)
scenarioList - list of all the senarios in the
selected modelselectedScenario - the selected Scenario on the
ProcessCalendar Viewpublic double calculate(double t)
t - the time which was written in the model beforepublic void updateOganizationEnvironmentModel(ActorResource selectedActor, ArrayList<ActorResource> actorList)
actorList - list of all the actors in the
selected modelselectedActor - the selected Actor on the
ActorCalendar Viewpublic void updateUSM(ArrayList<org.palladiosimulator.pcm.usagemodel.UsageScenario> scenarioList)
scenarioList - list of all the scenarios in the
selected modelpublic void updateOEM(ArrayList<ActorResource> actorList)
actorList - list of all the actors in the
selected modelpublic void updateListOEM(ArrayList<ActorResource> actorList, int y)
actorList - the list of all the actors in the
selectedModely - the index of the current actor in the
listpublic void updateListUSM(org.palladiosimulator.pcm.usagemodel.Workload w)
w - the Workload of the current scenario