JAL-1432 updated copyright notices
[jalview.git] / src / uk / ac / ebi / picr / model / CrossReference.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package uk.ac.ebi.picr.model;
20
21 public class CrossReference implements java.io.Serializable
22 {
23   private java.lang.String accession;
24
25   private java.lang.String accessionVersion;
26
27   private java.lang.String databaseDescription;
28
29   private java.lang.String databaseName;
30
31   private java.util.Calendar dateAdded;
32
33   private java.util.Calendar dateDeleted;
34
35   private boolean deleted;
36
37   private java.lang.String gi;
38
39   private java.lang.String taxonId;
40
41   public CrossReference()
42   {
43   }
44
45   public CrossReference(java.lang.String accession,
46           java.lang.String accessionVersion,
47           java.lang.String databaseDescription,
48           java.lang.String databaseName, java.util.Calendar dateAdded,
49           java.util.Calendar dateDeleted, boolean deleted,
50           java.lang.String gi, java.lang.String taxonId)
51   {
52     this.accession = accession;
53     this.accessionVersion = accessionVersion;
54     this.databaseDescription = databaseDescription;
55     this.databaseName = databaseName;
56     this.dateAdded = dateAdded;
57     this.dateDeleted = dateDeleted;
58     this.deleted = deleted;
59     this.gi = gi;
60     this.taxonId = taxonId;
61   }
62
63   /**
64    * Gets the accession value for this CrossReference.
65    * 
66    * @return accession
67    */
68   public java.lang.String getAccession()
69   {
70     return accession;
71   }
72
73   /**
74    * Sets the accession value for this CrossReference.
75    * 
76    * @param accession
77    */
78   public void setAccession(java.lang.String accession)
79   {
80     this.accession = accession;
81   }
82
83   /**
84    * Gets the accessionVersion value for this CrossReference.
85    * 
86    * @return accessionVersion
87    */
88   public java.lang.String getAccessionVersion()
89   {
90     return accessionVersion;
91   }
92
93   /**
94    * Sets the accessionVersion value for this CrossReference.
95    * 
96    * @param accessionVersion
97    */
98   public void setAccessionVersion(java.lang.String accessionVersion)
99   {
100     this.accessionVersion = accessionVersion;
101   }
102
103   /**
104    * Gets the databaseDescription value for this CrossReference.
105    * 
106    * @return databaseDescription
107    */
108   public java.lang.String getDatabaseDescription()
109   {
110     return databaseDescription;
111   }
112
113   /**
114    * Sets the databaseDescription value for this CrossReference.
115    * 
116    * @param databaseDescription
117    */
118   public void setDatabaseDescription(java.lang.String databaseDescription)
119   {
120     this.databaseDescription = databaseDescription;
121   }
122
123   /**
124    * Gets the databaseName value for this CrossReference.
125    * 
126    * @return databaseName
127    */
128   public java.lang.String getDatabaseName()
129   {
130     return databaseName;
131   }
132
133   /**
134    * Sets the databaseName value for this CrossReference.
135    * 
136    * @param databaseName
137    */
138   public void setDatabaseName(java.lang.String databaseName)
139   {
140     this.databaseName = databaseName;
141   }
142
143   /**
144    * Gets the dateAdded value for this CrossReference.
145    * 
146    * @return dateAdded
147    */
148   public java.util.Calendar getDateAdded()
149   {
150     return dateAdded;
151   }
152
153   /**
154    * Sets the dateAdded value for this CrossReference.
155    * 
156    * @param dateAdded
157    */
158   public void setDateAdded(java.util.Calendar dateAdded)
159   {
160     this.dateAdded = dateAdded;
161   }
162
163   /**
164    * Gets the dateDeleted value for this CrossReference.
165    * 
166    * @return dateDeleted
167    */
168   public java.util.Calendar getDateDeleted()
169   {
170     return dateDeleted;
171   }
172
173   /**
174    * Sets the dateDeleted value for this CrossReference.
175    * 
176    * @param dateDeleted
177    */
178   public void setDateDeleted(java.util.Calendar dateDeleted)
179   {
180     this.dateDeleted = dateDeleted;
181   }
182
183   /**
184    * Gets the deleted value for this CrossReference.
185    * 
186    * @return deleted
187    */
188   public boolean isDeleted()
189   {
190     return deleted;
191   }
192
193   /**
194    * Sets the deleted value for this CrossReference.
195    * 
196    * @param deleted
197    */
198   public void setDeleted(boolean deleted)
199   {
200     this.deleted = deleted;
201   }
202
203   /**
204    * Gets the gi value for this CrossReference.
205    * 
206    * @return gi
207    */
208   public java.lang.String getGi()
209   {
210     return gi;
211   }
212
213   /**
214    * Sets the gi value for this CrossReference.
215    * 
216    * @param gi
217    */
218   public void setGi(java.lang.String gi)
219   {
220     this.gi = gi;
221   }
222
223   /**
224    * Gets the taxonId value for this CrossReference.
225    * 
226    * @return taxonId
227    */
228   public java.lang.String getTaxonId()
229   {
230     return taxonId;
231   }
232
233   /**
234    * Sets the taxonId value for this CrossReference.
235    * 
236    * @param taxonId
237    */
238   public void setTaxonId(java.lang.String taxonId)
239   {
240     this.taxonId = taxonId;
241   }
242
243   private java.lang.Object __equalsCalc = null;
244
245   public synchronized boolean equals(java.lang.Object obj)
246   {
247     if (!(obj instanceof CrossReference))
248       return false;
249     CrossReference other = (CrossReference) obj;
250     if (obj == null)
251       return false;
252     if (this == obj)
253       return true;
254     if (__equalsCalc != null)
255     {
256       return (__equalsCalc == obj);
257     }
258     __equalsCalc = obj;
259     boolean _equals;
260     _equals = true
261             && ((this.accession == null && other.getAccession() == null) || (this.accession != null && this.accession
262                     .equals(other.getAccession())))
263             && ((this.accessionVersion == null && other
264                     .getAccessionVersion() == null) || (this.accessionVersion != null && this.accessionVersion
265                     .equals(other.getAccessionVersion())))
266             && ((this.databaseDescription == null && other
267                     .getDatabaseDescription() == null) || (this.databaseDescription != null && this.databaseDescription
268                     .equals(other.getDatabaseDescription())))
269             && ((this.databaseName == null && other.getDatabaseName() == null) || (this.databaseName != null && this.databaseName
270                     .equals(other.getDatabaseName())))
271             && ((this.dateAdded == null && other.getDateAdded() == null) || (this.dateAdded != null && this.dateAdded
272                     .equals(other.getDateAdded())))
273             && ((this.dateDeleted == null && other.getDateDeleted() == null) || (this.dateDeleted != null && this.dateDeleted
274                     .equals(other.getDateDeleted())))
275             && this.deleted == other.isDeleted()
276             && ((this.gi == null && other.getGi() == null) || (this.gi != null && this.gi
277                     .equals(other.getGi())))
278             && ((this.taxonId == null && other.getTaxonId() == null) || (this.taxonId != null && this.taxonId
279                     .equals(other.getTaxonId())));
280     __equalsCalc = null;
281     return _equals;
282   }
283
284   private boolean __hashCodeCalc = false;
285
286   public synchronized int hashCode()
287   {
288     if (__hashCodeCalc)
289     {
290       return 0;
291     }
292     __hashCodeCalc = true;
293     int _hashCode = 1;
294     if (getAccession() != null)
295     {
296       _hashCode += getAccession().hashCode();
297     }
298     if (getAccessionVersion() != null)
299     {
300       _hashCode += getAccessionVersion().hashCode();
301     }
302     if (getDatabaseDescription() != null)
303     {
304       _hashCode += getDatabaseDescription().hashCode();
305     }
306     if (getDatabaseName() != null)
307     {
308       _hashCode += getDatabaseName().hashCode();
309     }
310     if (getDateAdded() != null)
311     {
312       _hashCode += getDateAdded().hashCode();
313     }
314     if (getDateDeleted() != null)
315     {
316       _hashCode += getDateDeleted().hashCode();
317     }
318     _hashCode += (isDeleted() ? Boolean.TRUE : Boolean.FALSE).hashCode();
319     if (getGi() != null)
320     {
321       _hashCode += getGi().hashCode();
322     }
323     if (getTaxonId() != null)
324     {
325       _hashCode += getTaxonId().hashCode();
326     }
327     __hashCodeCalc = false;
328     return _hashCode;
329   }
330
331 }