1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.dsexplore.analysis.simucom; |
5 | |
6 | |
7 | import org.eclipse.emf.ecore.EObject; |
8 | import org.eclipse.emf.ecore.util.EcoreUtil; |
9 | |
10 | import de.uka.ipd.sdq.dsexplore.analysis.AbstractPerformanceAttributeDeclaration; |
11 | import de.uka.ipd.sdq.dsexplore.analysis.IAnalysisQualityAttributeDeclaration; |
12 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.EvaluationAspect; |
13 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.Mean; |
14 | import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.Dimension; |
15 | import de.uka.ipd.sdq.dsexplore.qml.reader.QMLDimensionReader; |
16 | |
17 | /** |
18 | * This class declares, which {@code Dimension} and {@code EvaluationAspect} can |
19 | * be evaluated by this extension. |
20 | * |
21 | * |
22 | * @author noorshams |
23 | * |
24 | */ |
25 | public class SimuComQualityAttributeDeclaration extends AbstractPerformanceAttributeDeclaration implements IAnalysisQualityAttributeDeclaration { |
26 | |
27 | public SimuComQualityAttributeDeclaration(){ |
28 | super(); |
29 | |
30 | |
31 | } |
32 | |
33 | /* (non-Javadoc) |
34 | * @see de.uka.ipd.sdq.dsexplore.analysis.IAnalysisQualityAttribute#canEvaluateAspect(de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.EvaluationAspect) |
35 | */ |
36 | @Override |
37 | public boolean canEvaluateAspectForDimension(EvaluationAspect aspect, Dimension dimension) { |
38 | if(EcoreUtil.equals(dimension, this.responseTimeDimension) && aspect instanceof Mean) { |
39 | return true; |
40 | } |
41 | if(EcoreUtil.equals(dimension, this.throughputDimension) && aspect instanceof Mean) { |
42 | return true; |
43 | } |
44 | return false; |
45 | } |
46 | |
47 | } |