JAL-1620 version bump and release notes
[jalview.git] / src / jalview / datamodel / PDBEntry.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
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
10  * of the License, or (at your option) any later version.
11  *  
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.
16  * 
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.
20  */
21 package jalview.datamodel;
22
23 import java.util.*;
24
25 public class PDBEntry
26 {
27   String file;
28
29   String type;
30
31   String id;
32
33   Hashtable properties;
34
35   /*
36    * (non-Javadoc)
37    * 
38    * @see java.lang.Object#equals(java.lang.Object)
39    */
40   public boolean equals(Object obj)
41   {
42     if (obj == null || !(obj instanceof PDBEntry))
43     {
44       return false;
45     }
46     if (obj == this)
47       return true;
48     PDBEntry o = (PDBEntry) obj;
49     return (file == o.file || (file != null && o.file != null && o.file
50             .equals(file)))
51             && (type == o.type || (type != null && o.type != null && o.type
52                     .equals(type)))
53             && (id == o.id || (id != null && o.id != null && o.id
54                     .equalsIgnoreCase(id)))
55             && (properties == o.properties || (properties != null
56                     && o.properties != null && properties
57                       .equals(o.properties)));
58   }
59
60   public PDBEntry()
61   {
62   }
63
64   public PDBEntry(PDBEntry entry)
65   {
66     file = entry.file;
67     type = entry.type;
68     id = entry.id;
69     if (entry.properties != null)
70     {
71       properties = (Hashtable) entry.properties.clone();
72     }
73   }
74
75   public void setFile(String file)
76   {
77     this.file = file;
78   }
79
80   public String getFile()
81   {
82     return file;
83   }
84
85   public void setType(String type)
86   {
87     this.type = type;
88   }
89
90   public String getType()
91   {
92     return type;
93   }
94
95   public void setId(String id)
96   {
97     this.id = id;
98   }
99
100   public String getId()
101   {
102     return id;
103   }
104
105   public void setProperty(Hashtable property)
106   {
107     this.properties = property;
108   }
109
110   public Hashtable getProperty()
111   {
112     return properties;
113   }
114
115 }