2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
\r
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package uk.ac.ebi.picr.model;
\r
21 public class CrossReference implements java.io.Serializable
\r
23 private java.lang.String accession;
\r
25 private java.lang.String accessionVersion;
\r
27 private java.lang.String databaseDescription;
\r
29 private java.lang.String databaseName;
\r
31 private java.util.Calendar dateAdded;
\r
33 private java.util.Calendar dateDeleted;
\r
35 private boolean deleted;
\r
37 private java.lang.String gi;
\r
39 private java.lang.String taxonId;
\r
41 public CrossReference()
\r
45 public CrossReference(java.lang.String accession,
\r
46 java.lang.String accessionVersion,
\r
47 java.lang.String databaseDescription,
\r
48 java.lang.String databaseName, java.util.Calendar dateAdded,
\r
49 java.util.Calendar dateDeleted, boolean deleted,
\r
50 java.lang.String gi, java.lang.String taxonId)
\r
52 this.accession = accession;
\r
53 this.accessionVersion = accessionVersion;
\r
54 this.databaseDescription = databaseDescription;
\r
55 this.databaseName = databaseName;
\r
56 this.dateAdded = dateAdded;
\r
57 this.dateDeleted = dateDeleted;
\r
58 this.deleted = deleted;
\r
60 this.taxonId = taxonId;
\r
64 * Gets the accession value for this CrossReference.
\r
68 public java.lang.String getAccession()
\r
74 * Sets the accession value for this CrossReference.
\r
78 public void setAccession(java.lang.String accession)
\r
80 this.accession = accession;
\r
84 * Gets the accessionVersion value for this CrossReference.
\r
86 * @return accessionVersion
\r
88 public java.lang.String getAccessionVersion()
\r
90 return accessionVersion;
\r
94 * Sets the accessionVersion value for this CrossReference.
\r
96 * @param accessionVersion
\r
98 public void setAccessionVersion(java.lang.String accessionVersion)
\r
100 this.accessionVersion = accessionVersion;
\r
104 * Gets the databaseDescription value for this CrossReference.
\r
106 * @return databaseDescription
\r
108 public java.lang.String getDatabaseDescription()
\r
110 return databaseDescription;
\r
114 * Sets the databaseDescription value for this CrossReference.
\r
116 * @param databaseDescription
\r
118 public void setDatabaseDescription(java.lang.String databaseDescription)
\r
120 this.databaseDescription = databaseDescription;
\r
124 * Gets the databaseName value for this CrossReference.
\r
126 * @return databaseName
\r
128 public java.lang.String getDatabaseName()
\r
130 return databaseName;
\r
134 * Sets the databaseName value for this CrossReference.
\r
136 * @param databaseName
\r
138 public void setDatabaseName(java.lang.String databaseName)
\r
140 this.databaseName = databaseName;
\r
144 * Gets the dateAdded value for this CrossReference.
\r
146 * @return dateAdded
\r
148 public java.util.Calendar getDateAdded()
\r
154 * Sets the dateAdded value for this CrossReference.
\r
158 public void setDateAdded(java.util.Calendar dateAdded)
\r
160 this.dateAdded = dateAdded;
\r
164 * Gets the dateDeleted value for this CrossReference.
\r
166 * @return dateDeleted
\r
168 public java.util.Calendar getDateDeleted()
\r
170 return dateDeleted;
\r
174 * Sets the dateDeleted value for this CrossReference.
\r
176 * @param dateDeleted
\r
178 public void setDateDeleted(java.util.Calendar dateDeleted)
\r
180 this.dateDeleted = dateDeleted;
\r
184 * Gets the deleted value for this CrossReference.
\r
188 public boolean isDeleted()
\r
194 * Sets the deleted value for this CrossReference.
\r
198 public void setDeleted(boolean deleted)
\r
200 this.deleted = deleted;
\r
204 * Gets the gi value for this CrossReference.
\r
208 public java.lang.String getGi()
\r
214 * Sets the gi value for this CrossReference.
\r
218 public void setGi(java.lang.String gi)
\r
224 * Gets the taxonId value for this CrossReference.
\r
228 public java.lang.String getTaxonId()
\r
234 * Sets the taxonId value for this CrossReference.
\r
238 public void setTaxonId(java.lang.String taxonId)
\r
240 this.taxonId = taxonId;
\r
243 private java.lang.Object __equalsCalc = null;
\r
245 public synchronized boolean equals(java.lang.Object obj)
\r
247 if (!(obj instanceof CrossReference))
\r
249 CrossReference other = (CrossReference) obj;
\r
254 if (__equalsCalc != null)
\r
256 return (__equalsCalc == obj);
\r
258 __equalsCalc = obj;
\r
261 && ((this.accession == null && other.getAccession() == null) || (this.accession != null && this.accession
\r
262 .equals(other.getAccession())))
\r
263 && ((this.accessionVersion == null && other
\r
264 .getAccessionVersion() == null) || (this.accessionVersion != null && this.accessionVersion
\r
265 .equals(other.getAccessionVersion())))
\r
266 && ((this.databaseDescription == null && other
\r
267 .getDatabaseDescription() == null) || (this.databaseDescription != null && this.databaseDescription
\r
268 .equals(other.getDatabaseDescription())))
\r
269 && ((this.databaseName == null && other.getDatabaseName() == null) || (this.databaseName != null && this.databaseName
\r
270 .equals(other.getDatabaseName())))
\r
271 && ((this.dateAdded == null && other.getDateAdded() == null) || (this.dateAdded != null && this.dateAdded
\r
272 .equals(other.getDateAdded())))
\r
273 && ((this.dateDeleted == null && other.getDateDeleted() == null) || (this.dateDeleted != null && this.dateDeleted
\r
274 .equals(other.getDateDeleted())))
\r
275 && this.deleted == other.isDeleted()
\r
276 && ((this.gi == null && other.getGi() == null) || (this.gi != null && this.gi
\r
277 .equals(other.getGi())))
\r
278 && ((this.taxonId == null && other.getTaxonId() == null) || (this.taxonId != null && this.taxonId
\r
279 .equals(other.getTaxonId())));
\r
280 __equalsCalc = null;
\r
284 private boolean __hashCodeCalc = false;
\r
286 public synchronized int hashCode()
\r
288 if (__hashCodeCalc)
\r
292 __hashCodeCalc = true;
\r
294 if (getAccession() != null)
\r
296 _hashCode += getAccession().hashCode();
\r
298 if (getAccessionVersion() != null)
\r
300 _hashCode += getAccessionVersion().hashCode();
\r
302 if (getDatabaseDescription() != null)
\r
304 _hashCode += getDatabaseDescription().hashCode();
\r
306 if (getDatabaseName() != null)
\r
308 _hashCode += getDatabaseName().hashCode();
\r
310 if (getDateAdded() != null)
\r
312 _hashCode += getDateAdded().hashCode();
\r
314 if (getDateDeleted() != null)
\r
316 _hashCode += getDateDeleted().hashCode();
\r
318 _hashCode += (isDeleted() ? Boolean.TRUE : Boolean.FALSE).hashCode();
\r
319 if (getGi() != null)
\r
321 _hashCode += getGi().hashCode();
\r
323 if (getTaxonId() != null)
\r
325 _hashCode += getTaxonId().hashCode();
\r
327 __hashCodeCalc = false;
\r