update author list in license for (JAL-826)
[jalview.git] / src / jalview / datamodel / PDBEntry.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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  */
18 package jalview.datamodel;
19
20 import java.util.*;
21
22 public class PDBEntry
23 {
24   String file;
25
26   String type;
27
28   String id;
29
30   Hashtable properties;
31
32   /*
33    * (non-Javadoc)
34    * 
35    * @see java.lang.Object#equals(java.lang.Object)
36    */
37   public boolean equals(Object obj)
38   {
39     if (obj == null || !(obj instanceof PDBEntry))
40     {
41       return false;
42     }
43     if (obj == this)
44       return true;
45     PDBEntry o = (PDBEntry) obj;
46     return (file == o.file || (file != null && o.file != null && o.file
47             .equals(file)))
48             && (type == o.type || (type != null && o.type != null && o.type
49                     .equals(type)))
50             && (id == o.id || (id != null && o.id != null && o.id
51                     .equalsIgnoreCase(id)))
52             && (properties == o.properties || (properties != null
53                     && o.properties != null && properties
54                     .equals(o.properties)));
55   }
56
57   public PDBEntry()
58   {
59   }
60
61   public PDBEntry(PDBEntry entry)
62   {
63     file = entry.file;
64     type = entry.type;
65     id = entry.id;
66     if (entry.properties != null)
67     {
68       properties = (Hashtable) entry.properties.clone();
69     }
70   }
71
72   public void setFile(String file)
73   {
74     this.file = file;
75   }
76
77   public String getFile()
78   {
79     return file;
80   }
81
82   public void setType(String type)
83   {
84     this.type = type;
85   }
86
87   public String getType()
88   {
89     return type;
90   }
91
92   public void setId(String id)
93   {
94     this.id = id;
95   }
96
97   public String getId()
98   {
99     return id;
100   }
101
102   public void setProperty(Hashtable property)
103   {
104     this.properties = property;
105   }
106
107   public Hashtable getProperty()
108   {
109     return properties;
110   }
111
112 }