This project has retired. For details please refer to its
Attic page.
ArtifactMetadata xref
1 package org.apache.archiva.metadata.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import javax.xml.bind.annotation.XmlRootElement;
23 import java.util.Date;
24
25
26
27
28
29
30
31
32
33 @XmlRootElement ( name = "artifactMetadata" )
34 public class ArtifactMetadata
35 extends FacetedMetadata
36 {
37
38
39
40
41 private String id;
42
43
44
45
46 private String repositoryId;
47
48
49
50
51
52
53 private String namespace;
54
55
56
57
58
59
60 private String project;
61
62
63
64
65
66
67 private String projectVersion;
68
69
70
71
72
73
74 private String version;
75
76
77
78
79 private Date fileLastModified;
80
81
82
83
84 private long size;
85
86
87
88
89 private String md5;
90
91
92
93
94 private String sha1;
95
96
97
98
99 private Date whenGathered;
100
101 public String getId()
102 {
103 return id;
104 }
105
106 public void setId( String id )
107 {
108 this.id = id;
109 }
110
111 public long getSize()
112 {
113 return size;
114 }
115
116 public void setSize( long size )
117 {
118 this.size = size;
119 }
120
121 public String getVersion()
122 {
123 return version;
124 }
125
126 public void setVersion( String version )
127 {
128 this.version = version;
129 }
130
131 public String getProjectVersion()
132 {
133 return projectVersion;
134 }
135
136 public void setProjectVersion( String projectVersion )
137 {
138 this.projectVersion = projectVersion;
139 }
140
141 public void setFileLastModified( long fileLastModified )
142 {
143 this.fileLastModified = new Date( fileLastModified );
144 }
145
146 public void setWhenGathered( Date whenGathered )
147 {
148 this.whenGathered = whenGathered;
149 }
150
151 public void setMd5( String md5 )
152 {
153 this.md5 = md5;
154 }
155
156 public void setSha1( String sha1 )
157 {
158 this.sha1 = sha1;
159 }
160
161 public Date getWhenGathered()
162 {
163 return whenGathered;
164 }
165
166 public String getMd5()
167 {
168 return md5;
169 }
170
171 public String getSha1()
172 {
173 return sha1;
174 }
175
176 public Date getFileLastModified()
177 {
178
179 return fileLastModified;
180 }
181
182 public String getNamespace()
183 {
184 return namespace;
185 }
186
187 public void setNamespace( String namespace )
188 {
189 this.namespace = namespace;
190 }
191
192 public void setProject( String project )
193 {
194 this.project = project;
195 }
196
197 public String getProject()
198 {
199 return project;
200 }
201
202 public String getRepositoryId()
203 {
204 return repositoryId;
205 }
206
207 public void setRepositoryId( String repositoryId )
208 {
209 this.repositoryId = repositoryId;
210 }
211
212 @Override
213 public boolean equals( Object o )
214 {
215 if ( this == o )
216 {
217 return true;
218 }
219 if ( o == null || getClass() != o.getClass() )
220 {
221 return false;
222 }
223
224 ArtifactMetadata that = (ArtifactMetadata) o;
225
226 if ( size != that.size )
227 {
228 return false;
229 }
230 if ( fileLastModified != null
231 ? !fileLastModified.equals( that.fileLastModified )
232 : that.fileLastModified != null )
233 {
234 return false;
235 }
236 if ( !id.equals( that.id ) )
237 {
238 return false;
239 }
240 if ( md5 != null ? !md5.equals( that.md5 ) : that.md5 != null )
241 {
242 return false;
243 }
244 if ( namespace != null ? !namespace.equals( that.namespace ) : that.namespace != null )
245 {
246 return false;
247 }
248 if ( project != null ? !project.equals( that.project ) : that.project != null )
249 {
250 return false;
251 }
252 if ( projectVersion != null ? !projectVersion.equals( that.projectVersion ) : that.projectVersion != null )
253 {
254 return false;
255 }
256 if ( !repositoryId.equals( that.repositoryId ) )
257 {
258 return false;
259 }
260 if ( sha1 != null ? !sha1.equals( that.sha1 ) : that.sha1 != null )
261 {
262 return false;
263 }
264 if ( version != null ? !version.equals( that.version ) : that.version != null )
265 {
266 return false;
267 }
268 if ( whenGathered != null ? !whenGathered.equals( that.whenGathered ) : that.whenGathered != null )
269 {
270 return false;
271 }
272
273 return true;
274 }
275
276 @Override
277 public int hashCode()
278 {
279 int result = id != null ? id.hashCode() : 0;
280 result = 31 * result + ( repositoryId != null ? repositoryId.hashCode() : 0 );
281 result = 31 * result + ( namespace != null ? namespace.hashCode() : 0 );
282 result = 31 * result + ( project != null ? project.hashCode() : 0 );
283 result = 31 * result + ( projectVersion != null ? projectVersion.hashCode() : 0 );
284 result = 31 * result + ( version != null ? version.hashCode() : 0 );
285 result = 31 * result + ( fileLastModified != null ? fileLastModified.hashCode() : 0 );
286 result = 31 * result + (int) ( size ^ ( size >>> 32 ) );
287 result = 31 * result + ( md5 != null ? md5.hashCode() : 0 );
288 result = 31 * result + ( sha1 != null ? sha1.hashCode() : 0 );
289 result = 31 * result + ( whenGathered != null ? whenGathered.hashCode() : 0 );
290 return result;
291 }
292
293 @Override
294 public String toString()
295 {
296 return "ArtifactMetadata{" + "id='" + id + '\'' + ", size=" + size + ", version='" + version + '\'' +
297 ", fileLastModified=" + fileLastModified + ", whenGathered=" + whenGathered + ", md5='" + md5 + '\'' +
298 ", sha1='" + sha1 + '\'' + ", namespace='" + namespace + '\'' + ", project='" + project + '\'' +
299 ", projectVersion='" + projectVersion + '\'' + ", repositoryId='" + repositoryId + '\'' + '}';
300 }
301 }