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