KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > applications > packaging > projects > PackageDepend


1 /*
2  * This software is OSI Certified Open Source Software.
3  * OSI Certified is a certification mark of the Open Source Initiative.
4  * The license (Mozilla version 1.0) can be read at the MMBase site.
5  * See http://www.MMBase.org/license
6  */

7 package org.mmbase.applications.packaging.projects;
8
9 /**
10  * @author Daniel Ockeloen
11  *
12  */

13 public class PackageDepend {
14
15     String JavaDoc name;
16     String JavaDoc type;
17     String JavaDoc maintainer;
18     String JavaDoc version;
19     String JavaDoc versionmode;
20
21
22     /**
23      * Gets the name attribute of the PackageDepend object
24      *
25      * @return The name value
26      */

27     public String JavaDoc getName() {
28         return name;
29     }
30
31
32     /**
33      * Gets the type attribute of the PackageDepend object
34      *
35      * @return The type value
36      */

37     public String JavaDoc getType() {
38         return type;
39     }
40
41
42     /**
43      * Gets the maintainer attribute of the PackageDepend object
44      *
45      * @return The maintainer value
46      */

47     public String JavaDoc getMaintainer() {
48         return maintainer;
49     }
50
51
52     /**
53      * Gets the version attribute of the PackageDepend object
54      *
55      * @return The version value
56      */

57     public String JavaDoc getVersion() {
58         return version;
59     }
60
61
62     /**
63      * Gets the versionMode attribute of the PackageDepend object
64      *
65      * @return The versionMode value
66      */

67     public String JavaDoc getVersionMode() {
68         if (versionmode == null) {
69             return "atleast";
70         }
71         return versionmode;
72     }
73
74
75     /**
76      * Sets the versionMode attribute of the PackageDepend object
77      *
78      * @param versionmode The new versionMode value
79      */

80     public void setVersionMode(String JavaDoc versionmode) {
81         this.versionmode = versionmode;
82     }
83
84
85     /**
86      * Sets the name attribute of the PackageDepend object
87      *
88      * @param name The new name value
89      */

90     public void setName(String JavaDoc name) {
91         this.name = name;
92     }
93
94
95     /**
96      * Sets the version attribute of the PackageDepend object
97      *
98      * @param version The new version value
99      */

100     public void setVersion(String JavaDoc version) {
101         this.version = version;
102     }
103
104
105     /**
106      * Sets the type attribute of the PackageDepend object
107      *
108      * @param type The new type value
109      */

110     public void setType(String JavaDoc type) {
111         this.type = type;
112     }
113
114
115     /**
116      * Gets the id attribute of the PackageDepend object
117      *
118      * @return The id value
119      */

120     public String JavaDoc getId() {
121         String JavaDoc id = name + "@" + maintainer + "_" + type;
122         id = id.replace(' ', '_');
123         id = id.replace('/', '_');
124         return id;
125     }
126
127
128     /**
129      * Sets the maintainer attribute of the PackageDepend object
130      *
131      * @param maintainer The new maintainer value
132      */

133     public void setMaintainer(String JavaDoc maintainer) {
134         this.maintainer = maintainer;
135     }
136
137 }
138
139
Popular Tags