1 40 41 package org.dspace.app.statistics; 42 43 import org.dspace.app.statistics.Stat; 44 45 import java.util.ArrayList ; 46 import java.util.List ; 47 48 57 public class Statistics 58 { 59 61 62 private String statName = null; 63 64 65 private String resultName = null; 66 67 68 private List stats = new ArrayList (); 69 70 71 private int floor = 0; 72 73 74 private String explanation = null; 75 76 77 private String sectionHeader = null; 78 79 82 Statistics() 83 { 84 } 86 87 93 Statistics(String statName, String resultName) 94 { 95 this.statName = statName; 96 this.resultName = resultName; 97 } 98 99 105 Statistics(String statName, String resultName, int floor) 106 { 107 this.statName = statName; 108 this.resultName = resultName; 109 this.floor = floor; 110 } 111 112 117 public void add(Stat stat) 118 { 119 this.stats.add(stat); 120 return; 121 } 122 123 128 public void setStatName(String name) 129 { 130 this.statName = name; 131 } 132 133 138 public void setResultName(String name) 139 { 140 this.resultName = name; 141 } 142 143 144 149 public void setExplanation(String explanation) 150 { 151 this.explanation = explanation; 152 } 153 154 155 160 public String getExplanation() 161 { 162 return this.explanation; 163 } 164 165 166 171 public void setFloor(int floor) 172 { 173 this.floor = floor; 174 } 175 176 177 182 public int getFloor() 183 { 184 return this.floor; 185 } 186 187 188 193 public void setSectionHeader(String header) 194 { 195 this.sectionHeader = header; 196 } 197 198 199 204 public String getSectionHeader() 205 { 206 return this.sectionHeader; 207 } 208 209 214 public void add(Stat[] stats) 215 { 216 for (int i = 0; i < stats.length; i++) 217 { 218 this.stats.add(stats[i]); 219 } 220 return; 221 } 222 223 228 public Stat[] getStats() 229 { 230 Stat[] myStats = new Stat[stats.size()]; 231 myStats = (Stat[]) stats.toArray(myStats); 232 return myStats; 233 } 234 235 240 public String getStatName() 241 { 242 return statName; 243 } 244 245 250 public String getResultName() 251 { 252 return resultName; 253 } 254 } 255 | Popular Tags |