1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.dsexplore.qml.pcm.datastructures; |
5 | |
6 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.Criterion; |
7 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.EvaluationAspect; |
8 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.GenericQMLContract; |
9 | import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.Dimension; |
10 | import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.QMLContractType; |
11 | import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.GenericQMLProfile; |
12 | import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.Requirement; |
13 | import de.uka.ipd.sdq.pcm.usagemodel.UsageModel; |
14 | |
15 | /** |
16 | * This class is used to provide necessary information on a QML {@link EvaluationAspect}, |
17 | * e.g. which dimension it refers to, which contract type it belongs to a.s.o. |
18 | * It is used to have a flat structure and easy access to the information and to |
19 | * avoid handling possibly large chunks of QML model objects. |
20 | * |
21 | * The context is derived from the QML profile the {@code EvaluationAspect} belongs to. As one |
22 | * {@code EvaluationAspect} can be used in different contexts, multiple |
23 | * {@code EvaluationAspectWithContext} objects can be possible for the same |
24 | * <em>type</em> of {@code EvaluationAspects} (e.g. the {@code Mean} of different |
25 | * {@code Dimension}s). |
26 | * |
27 | * @author noorshams |
28 | * @see EvaluationAspect |
29 | * @see Dimension |
30 | * @see Criterion |
31 | * @see Requirement |
32 | * @see UsageModel |
33 | * @see QMLContractType |
34 | * @see GenericQMLContract |
35 | * @see GenericQMLProfile |
36 | * |
37 | */ |
38 | public class EvaluationAspectWithContext { |
39 | private final QMLContractType contractType; |
40 | private final Dimension dimension; |
41 | private final Criterion criterion; |
42 | /** |
43 | * @return the criterion |
44 | */ |
45 | public Criterion getCriterion() { |
46 | return criterion; |
47 | } |
48 | |
49 | private final EvaluationAspect evaluationAspect; |
50 | private final UsageModel usageModel; |
51 | private final Requirement requirement; |
52 | |
53 | public EvaluationAspectWithContext(QMLContractType contractType, Dimension dimension, Criterion criterion, EvaluationAspect evaluationAspect, UsageModel usageModel, Requirement requirement){ |
54 | this.contractType = contractType; |
55 | this.dimension = dimension; |
56 | this.criterion = criterion; |
57 | this.evaluationAspect = evaluationAspect; |
58 | this.usageModel = usageModel; |
59 | this.requirement = requirement; |
60 | } |
61 | |
62 | /** |
63 | * @return the contractType |
64 | */ |
65 | public QMLContractType getContractType() { |
66 | return contractType; |
67 | } |
68 | |
69 | /** |
70 | * @return the dimension |
71 | */ |
72 | public Dimension getDimension() { |
73 | return dimension; |
74 | } |
75 | |
76 | /** |
77 | * @return the evaluationAspect |
78 | */ |
79 | public EvaluationAspect getEvaluationAspect() { |
80 | return evaluationAspect; |
81 | } |
82 | |
83 | /** |
84 | * @return the usageModel |
85 | */ |
86 | public UsageModel getUsageModel() { |
87 | return usageModel; |
88 | } |
89 | |
90 | /** |
91 | * @return the requirement |
92 | */ |
93 | public Requirement getRequirement() { |
94 | return requirement; |
95 | } |
96 | } |