2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package uk.ac.ebi.picr.model;
23 public class UPEntry implements java.io.Serializable
25 private java.lang.String CRC64;
27 private java.lang.String UPI;
29 private uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences;
31 private uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences;
33 private java.lang.String sequence;
35 private java.util.Calendar timestamp;
41 public UPEntry(java.lang.String CRC64, java.lang.String UPI,
42 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences,
43 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences,
44 java.lang.String sequence, java.util.Calendar timestamp)
48 this.identicalCrossReferences = identicalCrossReferences;
49 this.logicalCrossReferences = logicalCrossReferences;
50 this.sequence = sequence;
51 this.timestamp = timestamp;
55 * Gets the CRC64 value for this UPEntry.
59 public java.lang.String getCRC64()
65 * Sets the CRC64 value for this UPEntry.
69 public void setCRC64(java.lang.String CRC64)
75 * Gets the UPI value for this UPEntry.
79 public java.lang.String getUPI()
85 * Sets the UPI value for this UPEntry.
89 public void setUPI(java.lang.String UPI)
95 * Gets the identicalCrossReferences value for this UPEntry.
97 * @return identicalCrossReferences
99 public uk.ac.ebi.picr.model.CrossReference[] getIdenticalCrossReferences()
101 return identicalCrossReferences;
105 * Sets the identicalCrossReferences value for this UPEntry.
107 * @param identicalCrossReferences
109 public void setIdenticalCrossReferences(
110 uk.ac.ebi.picr.model.CrossReference[] identicalCrossReferences)
112 this.identicalCrossReferences = identicalCrossReferences;
115 public uk.ac.ebi.picr.model.CrossReference getIdenticalCrossReferences(
118 return this.identicalCrossReferences[i];
121 public void setIdenticalCrossReferences(int i,
122 uk.ac.ebi.picr.model.CrossReference _value)
124 this.identicalCrossReferences[i] = _value;
128 * Gets the logicalCrossReferences value for this UPEntry.
130 * @return logicalCrossReferences
132 public uk.ac.ebi.picr.model.CrossReference[] getLogicalCrossReferences()
134 return logicalCrossReferences;
138 * Sets the logicalCrossReferences value for this UPEntry.
140 * @param logicalCrossReferences
142 public void setLogicalCrossReferences(
143 uk.ac.ebi.picr.model.CrossReference[] logicalCrossReferences)
145 this.logicalCrossReferences = logicalCrossReferences;
148 public uk.ac.ebi.picr.model.CrossReference getLogicalCrossReferences(int i)
150 return this.logicalCrossReferences[i];
153 public void setLogicalCrossReferences(int i,
154 uk.ac.ebi.picr.model.CrossReference _value)
156 this.logicalCrossReferences[i] = _value;
160 * Gets the sequence value for this UPEntry.
164 public java.lang.String getSequence()
170 * Sets the sequence value for this UPEntry.
174 public void setSequence(java.lang.String sequence)
176 this.sequence = sequence;
180 * Gets the timestamp value for this UPEntry.
184 public java.util.Calendar getTimestamp()
190 * Sets the timestamp value for this UPEntry.
194 public void setTimestamp(java.util.Calendar timestamp)
196 this.timestamp = timestamp;
199 private java.lang.Object __equalsCalc = null;
202 public synchronized boolean equals(java.lang.Object obj)
208 if (!(obj instanceof UPEntry))
212 UPEntry other = (UPEntry) obj;
217 if (__equalsCalc != null)
219 return (__equalsCalc == obj);
224 && ((this.CRC64 == null && other.getCRC64() == null) || (this.CRC64 != null && this.CRC64
225 .equals(other.getCRC64())))
226 && ((this.UPI == null && other.getUPI() == null) || (this.UPI != null && this.UPI
227 .equals(other.getUPI())))
228 && ((this.identicalCrossReferences == null && other
229 .getIdenticalCrossReferences() == null) || (this.identicalCrossReferences != null && java.util.Arrays
230 .equals(this.identicalCrossReferences,
231 other.getIdenticalCrossReferences())))
232 && ((this.logicalCrossReferences == null && other
233 .getLogicalCrossReferences() == null) || (this.logicalCrossReferences != null && java.util.Arrays
234 .equals(this.logicalCrossReferences,
235 other.getLogicalCrossReferences())))
236 && ((this.sequence == null && other.getSequence() == null) || (this.sequence != null && this.sequence
237 .equals(other.getSequence())))
238 && ((this.timestamp == null && other.getTimestamp() == null) || (this.timestamp != null && this.timestamp
239 .equals(other.getTimestamp())));
244 private boolean __hashCodeCalc = false;
247 public synchronized int hashCode()
253 __hashCodeCalc = true;
255 if (getCRC64() != null)
257 _hashCode += getCRC64().hashCode();
259 if (getUPI() != null)
261 _hashCode += getUPI().hashCode();
263 if (getIdenticalCrossReferences() != null)
265 for (int i = 0; i < java.lang.reflect.Array
266 .getLength(getIdenticalCrossReferences()); i++)
268 java.lang.Object obj = java.lang.reflect.Array.get(
269 getIdenticalCrossReferences(), i);
270 if (obj != null && !obj.getClass().isArray())
272 _hashCode += obj.hashCode();
276 if (getLogicalCrossReferences() != null)
278 for (int i = 0; i < java.lang.reflect.Array
279 .getLength(getLogicalCrossReferences()); i++)
281 java.lang.Object obj = java.lang.reflect.Array.get(
282 getLogicalCrossReferences(), i);
283 if (obj != null && !obj.getClass().isArray())
285 _hashCode += obj.hashCode();
289 if (getSequence() != null)
291 _hashCode += getSequence().hashCode();
293 if (getTimestamp() != null)
295 _hashCode += getTimestamp().hashCode();
297 __hashCodeCalc = false;