KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hammurapi > inspectors > metrics > ArchitecturalCategoryPackage


1 /*
2  * Hammurapi
3  * Automated Java code review system.
4  * Copyright (C) 2004 Johannes Bellert
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (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 JavaDoc;
35 import org.w3c.dom.Element JavaDoc;
36
37 public class ArchitecturalCategoryPackage {
38
39     public String JavaDoc srcCodeMarker = null;
40     public String JavaDoc categoryType = "";
41     public String JavaDoc identicator = "";
42     public String JavaDoc url = "";
43     public int occurance = 1;
44
45     public ArchitecturalCategoryPackage( String JavaDoc _identicator, String JavaDoc _category, String JavaDoc _url){
46         super();
47         this.categoryType = _category;
48         this.identicator = _identicator;
49         this.url = _url;
50
51     }
52
53     public boolean equals(ArchitecturalCategoryPackage ac){
54         return ac.categoryType.equals(this.categoryType);
55     }
56
57     public boolean equals(String JavaDoc search){
58             return search.equals(this.categoryType);
59         }
60
61     public Element JavaDoc toDom(Document JavaDoc document){
62
63         Element JavaDoc ret=document.createElement("ArchitecturalCategoryPackage");
64         ret.setAttribute("category", this.categoryType );
65         ret.setAttribute("identicator", this.identicator );
66         ret.setAttribute("occurance", String.valueOf( this.occurance ) );
67         ret.setAttribute("url", this.url );
68         return ret;
69     }
70
71 }
72
Popular Tags