01: /*
02: * Created on Jul 16, 2004
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package org.hammurapi.inspectors.metrics;
08:
09: import org.hammurapi.HammurapiException;
10: import org.w3c.dom.Element;
11:
12: /**
13: * @author MUCBJ0
14: *
15: * TODO To change the template for this generated type comment go to
16: * Window - Preferences - Java - Code Style - Code Templates
17: */
18: public class ArchitecturalComplexityMapping {
19: String name = "not defined";
20: int rate = 1;
21:
22: public ArchitecturalComplexityMapping(Element holder)
23: throws HammurapiException {
24: super ();
25: try {
26:
27: name = holder.getAttribute("name");
28: rate = Integer.valueOf(holder.getAttribute("rate"))
29: .intValue();
30:
31: } catch (Exception e) {
32: throw new HammurapiException(e);
33: }
34: }
35:
36: /**
37: * @return Returns the name.
38: */
39: public String getName() {
40: return name;
41: }
42:
43: /**
44: * @param name The name to set.
45: */
46: public void setName(String name) {
47: this .name = name;
48: }
49:
50: /**
51: * @return Returns the rate.
52: */
53: public int getRate() {
54: return rate;
55: }
56:
57: /**
58: * @param rate The rate to set.
59: */
60: public void setRate(int rate) {
61: this.rate = rate;
62: }
63: }
|