| 1 | package de.uka.ipd.sdq.reliability.solver.reporting; |
| 2 | |
| 3 | import java.util.ArrayList; |
| 4 | import java.util.List; |
| 5 | |
| 6 | /** |
| 7 | * Generates abstract tables based on the data of a reliability analysis of a |
| 8 | * given scenario. The data encapsulated in this class can be used for later |
| 9 | * output. |
| 10 | * |
| 11 | * @author Daniel Patejdl |
| 12 | * |
| 13 | */ |
| 14 | public class MarkovReportItem { |
| 15 | |
| 16 | /** |
| 17 | * A MarkovReportItem may consist of several tables related to failure mode |
| 18 | * analysis. |
| 19 | */ |
| 20 | private List<MarkovReportingTable> failureModeTables; |
| 21 | |
| 22 | /** |
| 23 | * A MarkovReportItem may consist of several tables related to impact |
| 24 | * analysis. |
| 25 | */ |
| 26 | private List<MarkovReportingTable> impactAnalysisTables; |
| 27 | |
| 28 | /** |
| 29 | * The scenario's ID. |
| 30 | */ |
| 31 | private String scenarioId; |
| 32 | |
| 33 | /** |
| 34 | * The scenario's name. |
| 35 | */ |
| 36 | private String scenarioName; |
| 37 | |
| 38 | /** |
| 39 | * The scenario's success probability as String. |
| 40 | */ |
| 41 | private String successProbabilityAsString; |
| 42 | |
| 43 | /** |
| 44 | * Generates a new Markov report item, initialized with a scenario name, the |
| 45 | * scenario's ID and the success probability of the scenario as String. |
| 46 | * |
| 47 | * @param scenarioName |
| 48 | * the name of the scenario |
| 49 | * @param scenarioId |
| 50 | * the ID of the scenario |
| 51 | * @param successProbabilityAsString |
| 52 | * the success probability of the scenario as String |
| 53 | */ |
| 54 | public MarkovReportItem(String scenarioName, String scenarioId, |
| 55 | String successProbabilityAsString) { |
| 56 | this.scenarioName = scenarioName; |
| 57 | this.scenarioId = scenarioId; |
| 58 | this.successProbabilityAsString = successProbabilityAsString; |
| 59 | |
| 60 | failureModeTables = new ArrayList<MarkovReportingTable>(); |
| 61 | impactAnalysisTables = new ArrayList<MarkovReportingTable>(); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Adds a table to the list of failure mode tables. |
| 66 | * |
| 67 | * @param failureModeTable |
| 68 | * the table |
| 69 | */ |
| 70 | public void addFailureModeTable(MarkovReportingTable failureModeTable) { |
| 71 | failureModeTables.add(failureModeTable); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Adds a table to the list of failure mode tables. |
| 76 | * |
| 77 | * @param impactAnalysisTable |
| 78 | * the table |
| 79 | */ |
| 80 | public void addImpactAnalysisTable(MarkovReportingTable impactAnalysisTable) { |
| 81 | impactAnalysisTables.add(impactAnalysisTable); |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Returns all failure mode tables in the list. |
| 86 | * |
| 87 | * @return all tables |
| 88 | */ |
| 89 | public List<MarkovReportingTable> getFailureModeTables() { |
| 90 | return failureModeTables; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Returns all impact analysis tables in the list. |
| 95 | * |
| 96 | * @return all tables |
| 97 | */ |
| 98 | public List<MarkovReportingTable> getImpactAnalysisTables() { |
| 99 | return impactAnalysisTables; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Gets the scenario's ID. |
| 104 | * |
| 105 | * @return the scenario's ID |
| 106 | */ |
| 107 | public String getScenarioId() { |
| 108 | return scenarioId; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Gets the scenario's name. |
| 113 | * |
| 114 | * @return the scenario's name |
| 115 | */ |
| 116 | public String getScenarioName() { |
| 117 | return scenarioName; |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Gets the scenario's success probability. |
| 122 | */ |
| 123 | public String getSuccessProbabilityString() { |
| 124 | return successProbabilityAsString; |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Sets the scenario's ID. |
| 129 | * |
| 130 | * @param scenarioId |
| 131 | * the scenario's ID |
| 132 | */ |
| 133 | public void setScenarioId(String scenarioId) { |
| 134 | this.scenarioId = scenarioId; |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * Sets the scenario's name. |
| 139 | * |
| 140 | * @param scenarioName |
| 141 | * the scenario's name |
| 142 | */ |
| 143 | public void setScenarioName(String scenarioName) { |
| 144 | this.scenarioName = scenarioName; |
| 145 | } |
| 146 | } |