1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.dsexplore.analysis.reliability; |
5 | |
6 | import java.util.ArrayList; |
7 | import java.util.List; |
8 | |
9 | import de.uka.ipd.sdq.dsexplore.analysis.IAnalysisQualityAttributeDeclaration; |
10 | import de.uka.ipd.sdq.dsexplore.launch.DSEConstantsContainer.QualityAttribute; |
11 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.EvaluationAspect; |
12 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.Value; |
13 | import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.Dimension; |
14 | import de.uka.ipd.sdq.dsexplore.qml.handling.QMLConstantsContainer; |
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 | * @author noorshams |
22 | * |
23 | */ |
24 | public class ReliabilitySolverQualityAttributeDeclaration implements IAnalysisQualityAttributeDeclaration { |
25 | |
26 | public static final String qualityAttribute = QMLConstantsContainer.QUALITY_ATTRIBUTE_DIMENSION_POFOD_DEFINITION_PATH; |
27 | |
28 | /* (non-Javadoc) |
29 | * @see de.uka.ipd.sdq.dsexplore.analysis.IAnalysisQualityAttribute#canEvaluateAspect(de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.EvaluationAspect) |
30 | */ |
31 | @Override |
32 | public boolean canEvaluateAspectForDimension(EvaluationAspect aspect, Dimension dimension) { |
33 | if(aspect instanceof Value) { |
34 | return true; |
35 | } |
36 | return false; |
37 | } |
38 | |
39 | /* (non-Javadoc) |
40 | * @see de.uka.ipd.sdq.dsexplore.analysis.IAnalysisQualityAttribute#getDimension() |
41 | */ |
42 | @Override |
43 | public List<Dimension> getDimensions() { |
44 | Dimension dimension = new QMLDimensionReader().getDimension(qualityAttribute); |
45 | List<Dimension> result = new ArrayList<Dimension>(1); |
46 | result.add(dimension); |
47 | return result; |
48 | } |
49 | |
50 | @Override |
51 | public QualityAttribute getQualityAttribute() { |
52 | return QualityAttribute.RELIABILITY_QUALITY; |
53 | } |
54 | |
55 | } |