2 * Jalview - A Sequence Alignment Editor and Viewer
3 * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 package jalview.datamodel;
21 public class DBRefEntry
23 String source="", version="", accessionId="";
25 * maps from associated sequence to the database sequence's coordinate system
31 public DBRefEntry(String source, String version, String accessionId)
33 this(source, version, accessionId, null);
35 public DBRefEntry(String source, String version, String accessionId, Mapping map) {
37 this.version = version;
38 this.accessionId = accessionId;
41 public DBRefEntry(DBRefEntry entry)
43 this(new String(entry.source), new String(entry.version), new String(entry.accessionId), new Mapping(entry.map));
45 public boolean equals(DBRefEntry entry) {
50 if ((source!=null && entry.source!=null && source.equals(entry.source))
52 (accessionId!=null && entry.accessionId!=null && accessionId.equals(entry.accessionId))
54 (version!=null && entry.version!=null && version.equals(entry.version))
56 ((map==null && entry.map==null) || (map!=null && entry.map!=null && map.equals(entry.map)))) {
61 public String getSource()
66 public String getVersion()
71 public String getAccessionId()
76 * @param accessionId the accessionId to set
78 public void setAccessionId(String accessionId) {
79 this.accessionId = accessionId;
82 * @param source the source to set
84 public void setSource(String source) {
88 * @param version the version to set
90 public void setVersion(String version) {
91 this.version = version;
96 public Mapping getMap() {
100 * @param map the map to set
102 public void setMap(Mapping map) {