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 (type == o.type || (type != null && o.type != null && o.type
61 && (id == o.id || (id != null && o.id != null && o.id
62 .equalsIgnoreCase(id)))
63 && (chainCode == o.chainCode || (chainCode != null
64 && o.chainCode != null && o.chainCode
65 .equalsIgnoreCase(chainCode)))
66 && (properties == o.properties || (properties != null
67 && o.properties != null && properties
68 .equals(o.properties)));
80 * Constructor given file path and PDB id.
84 // public PDBEntry(String filePath, String pdbId)
86 // this.file = filePath;
90 public PDBEntry(String pdbId, String chain, PDBEntry.Type type,
94 this.chainCode = chain;
95 this.type = type == null ? null : type.toString();
104 public PDBEntry(PDBEntry entry)
109 chainCode = entry.chainCode;
110 if (entry.properties != null)
112 properties = (Hashtable) entry.properties.clone();
116 public void setFile(String file)
121 public String getFile()
126 public void setType(String t)
130 public void setType(PDBEntry.Type type)
132 this.type = type == null ? null : type.toString();
135 public String getType()
140 public void setId(String id)
145 public String getId()
150 public void setProperty(Hashtable property)
152 this.properties = property;
155 public Hashtable getProperty()
160 public String getChainCode()
165 public void setChainCode(String chainCode)
167 this.chainCode = chainCode;
170 public String toString()