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 jalview.datamodel;
23 import java.util.Hashtable;
33 private String chainCode;
44 * @see java.lang.Object#equals(java.lang.Object)
47 public boolean equals(Object obj)
49 if (obj == null || !(obj instanceof PDBEntry))
57 PDBEntry o = (PDBEntry) obj;
59 * (file == o.file || (file != null && o.file != null && o.file
62 (type == o.type || (type != null && o.type != null && o.type
64 && (id == o.id || (id != null && o.id != null && o.id
65 .equalsIgnoreCase(id)))
66 && (chainCode == o.chainCode || (chainCode != null
67 && o.chainCode != null && o.chainCode
68 .equalsIgnoreCase(chainCode)))
69 && (properties == o.properties || (properties != null
70 && o.properties != null && properties
71 .equals(o.properties)));
82 * Constructor given file path and PDB id.
86 // public PDBEntry(String filePath, String pdbId)
88 // this.file = filePath;
92 public PDBEntry(String pdbId, String chain, PDBEntry.Type type,
96 this.chainCode = chain;
97 this.type = type.toString();
106 public PDBEntry(PDBEntry entry)
111 chainCode = entry.chainCode;
112 if (entry.properties != null)
114 properties = (Hashtable) entry.properties.clone();
118 public void setFile(String file)
123 public String getFile()
128 public void setType(PDBEntry.Type type)
130 this.type = type.toString();
133 public String getType()
138 public void setId(String id)
143 public String getId()
148 public void setProperty(Hashtable property)
150 this.properties = property;
153 public Hashtable getProperty()
158 public String getChainCode()
163 public void setChainCode(String chainCode)
165 this.chainCode = chainCode;