001/**
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 * Created on Feb 22, 2012
021 * Created by Andreas Prlic
022 *
023 * @since 3.0.2
024 */
025package org.biojava.nbio.structure.io.sifts;
026
027import java.io.Serializable;
028
029public class SiftsResidue implements Serializable{
030
031        /**
032         *
033         */
034        private static final long serialVersionUID = 3425769737629800828L;
035        String pdbResNum;
036        String pdbResName;
037        String chainId;
038        String uniProtResName;
039        Integer uniProtPos;
040        Integer naturalPos;
041        String seqResName;
042        String pdbId;
043        String uniProtAccessionId;
044        Boolean notObserved;
045
046        public String getPdbResNum() {
047                return pdbResNum;
048        }
049        public void setPdbResNum(String pdbResNum) {
050                this.pdbResNum = pdbResNum;
051        }
052        public String getPdbResName() {
053                return pdbResName;
054        }
055        public void setPdbResName(String pdbResName) {
056                this.pdbResName = pdbResName;
057        }
058        public String getChainId() {
059                return chainId;
060        }
061        public void setChainId(String chainId) {
062                this.chainId = chainId;
063        }
064        public String getUniProtResName() {
065                return uniProtResName;
066        }
067        public void setUniProtResName(String uniProtResName) {
068                this.uniProtResName = uniProtResName;
069        }
070        public Integer getUniProtPos() {
071                return uniProtPos;
072        }
073        public void setUniProtPos(Integer uniProtPos) {
074                this.uniProtPos = uniProtPos;
075        }
076
077        public void setPdbId(String dbAccessionId) {
078                this.pdbId = dbAccessionId;
079        }
080        public String getPdbId(){
081                return pdbId;
082        }
083        public void setUniProtAccessionId(String dbAccessionId) {
084                this.uniProtAccessionId = dbAccessionId;
085        }
086        public String getUniProtAccessionId(){
087                return uniProtAccessionId;
088        }
089        public Integer getNaturalPos() {
090                return naturalPos;
091        }
092        public void setNaturalPos(Integer naturalPos) {
093                this.naturalPos = naturalPos;
094        }
095        public Boolean getNotObserved() {
096                return notObserved;
097        }
098        public void setNotObserved(Boolean notObserved) {
099                this.notObserved = notObserved;
100        }
101        public String getSeqResName() {
102                return seqResName;
103        }
104        public void setSeqResName(String seqResName) {
105                this.seqResName = seqResName;
106        }
107        @Override
108        public String toString() {
109                return "SiftsResidue [pdbResNum=" + pdbResNum + ", pdbResName="
110                                + pdbResName + ", chainName=" + chainId + ", uniProtResName="
111                                + uniProtResName + ", uniProtPos=" + uniProtPos
112                                + ", naturalPos=" + naturalPos + ", seqResName=" + seqResName
113                                + ", pdbId=" + pdbId + ", uniProtAccessionId="
114                                + uniProtAccessionId + ", notObserved=" + notObserved + "]";
115        }
116        @Override
117        public int hashCode() {
118                final int prime = 31;
119                int result = 1;
120                result = prime * result + ((chainId == null) ? 0 : chainId.hashCode());
121                result = prime * result + ((naturalPos == null) ? 0 : naturalPos.hashCode());
122                result = prime * result + ((notObserved == null) ? 0 : notObserved.hashCode());
123                result = prime * result + ((pdbId == null) ? 0 : pdbId.hashCode());
124                result = prime * result + ((pdbResName == null) ? 0 : pdbResName.hashCode());
125                result = prime * result + ((pdbResNum == null) ? 0 : pdbResNum.hashCode());
126                result = prime * result + ((seqResName == null) ? 0 : seqResName.hashCode());
127                result = prime * result + ((uniProtAccessionId == null) ? 0 : uniProtAccessionId.hashCode());
128                result = prime * result + ((uniProtPos == null) ? 0 : uniProtPos.hashCode());
129                result = prime * result + ((uniProtResName == null) ? 0 : uniProtResName.hashCode());
130                return result;
131        }
132        @Override
133        public boolean equals(Object obj) {
134                if (this == obj) return true;
135                if (obj == null) return false;
136                if (getClass() != obj.getClass()) return false;
137                SiftsResidue other = (SiftsResidue) obj;
138                if (chainId == null) {
139                        if (other.chainId != null) return false;
140                } else if (!chainId.equals(other.chainId)) return false;
141                if (naturalPos == null) {
142                        if (other.naturalPos != null) return false;
143                } else if (!naturalPos.equals(other.naturalPos)) return false;
144                if (notObserved == null) {
145                        if (other.notObserved != null) return false;
146                } else if (!notObserved.equals(other.notObserved)) return false;
147                if (pdbId == null) {
148                        if (other.pdbId != null) return false;
149                } else if (!pdbId.equals(other.pdbId)) return false;
150                if (pdbResName == null) {
151                        if (other.pdbResName != null) return false;
152                } else if (!pdbResName.equals(other.pdbResName)) return false;
153                if (pdbResNum == null) {
154                        if (other.pdbResNum != null) return false;
155                } else if (!pdbResNum.equals(other.pdbResNum)) return false;
156                if (seqResName == null) {
157                        if (other.seqResName != null) return false;
158                } else if (!seqResName.equals(other.seqResName)) return false;
159                if (uniProtAccessionId == null) {
160                        if (other.uniProtAccessionId != null) return false;
161                } else if (!uniProtAccessionId.equals(other.uniProtAccessionId)) return false;
162                if (uniProtPos == null) {
163                        if (other.uniProtPos != null) return false;
164                } else if (!uniProtPos.equals(other.uniProtPos)) return false;
165                if (uniProtResName == null) {
166                        if (other.uniProtResName != null) return false;
167                } else if (!uniProtResName.equals(other.uniProtResName)) return false;
168                return true;
169        }
170
171}