01: /*
02: * Hammurapi
03: * Automated Java code review system.
04: * Copyright (C) 2004 Johannes Bellert
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * URL: http://www.pavelvlasov.com/pv/content/menu.show?id=products.jtaste
21: * e-Mail: Johannes.Bellert@ercgroup.com
22: *
23: * * Created on Mar 20, 2004
24: *
25: */
26:
27: /* Copyright (C) 2004 Johannes Bellert
28: * e-Mail: Johannes.Bellert@ercgroup.com
29: * Created on Mar 20, 2004
30: */
31:
32: package org.hammurapi.inspectors.metrics;
33:
34: import org.w3c.dom.Document;
35: import org.w3c.dom.Element;
36:
37: public class ArchitecturalCategoryPackage {
38:
39: public String srcCodeMarker = null;
40: public String categoryType = "";
41: public String identicator = "";
42: public String url = "";
43: public int occurance = 1;
44:
45: public ArchitecturalCategoryPackage(String _identicator,
46: String _category, String _url) {
47: super ();
48: this .categoryType = _category;
49: this .identicator = _identicator;
50: this .url = _url;
51:
52: }
53:
54: public boolean equals(ArchitecturalCategoryPackage ac) {
55: return ac.categoryType.equals(this .categoryType);
56: }
57:
58: public boolean equals(String search) {
59: return search.equals(this .categoryType);
60: }
61:
62: public Element toDom(Document document) {
63:
64: Element ret = document
65: .createElement("ArchitecturalCategoryPackage");
66: ret.setAttribute("category", this .categoryType);
67: ret.setAttribute("identicator", this .identicator);
68: ret.setAttribute("occurance", String.valueOf(this .occurance));
69: ret.setAttribute("url", this.url);
70: return ret;
71: }
72:
73: }
|