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 at Feb 22, 2011
021 */
022
023package org.biojava.nbio.structure.io.mmcif.model;
024
025import java.io.Serializable;
026
027
028/** Container object for _pdbx_chem_comp_descriptor
029 *
030 * @author Andreas Prlic
031 * @since 3.2
032 *
033 */
034public class ChemCompDescriptor implements Serializable {
035        /**
036         *
037         */
038        private static final long serialVersionUID = 1078685833800736278L;
039        String comp_id;
040        String type;
041        String program;
042        String program_version;
043        String descriptor;
044
045        public ChemCompDescriptor(){
046
047        }
048        public String getComp_id() {
049                return comp_id;
050        }
051        public void setComp_id(String comp_id) {
052                this.comp_id = comp_id;
053        }
054        public String getType() {
055                return type;
056        }
057        public void setType(String type) {
058                this.type = type;
059        }
060        public String getProgram() {
061                return program;
062        }
063        public void setProgram(String program) {
064                this.program = program;
065        }
066        public String getProgram_version() {
067                return program_version;
068        }
069        public void setProgram_version(String program_version) {
070                this.program_version = program_version;
071        }
072        public String getDescriptor() {
073                return descriptor;
074        }
075        public void setDescriptor(String descriptor) {
076                this.descriptor = descriptor;
077        }
078        @Override
079        public int hashCode() {
080                final int prime = 31;
081                int result = 1;
082                result = prime * result + ((comp_id == null) ? 0 : comp_id.hashCode());
083                result = prime * result
084                                + ((descriptor == null) ? 0 : descriptor.hashCode());
085                result = prime * result + ((program == null) ? 0 : program.hashCode());
086                result = prime * result
087                                + ((program_version == null) ? 0 : program_version.hashCode());
088                result = prime * result + ((type == null) ? 0 : type.hashCode());
089                return result;
090        }
091        @Override
092        public boolean equals(Object obj) {
093                if (this == obj)
094                        return true;
095                if (obj == null)
096                        return false;
097                if (getClass() != obj.getClass())
098                        return false;
099                ChemCompDescriptor other = (ChemCompDescriptor) obj;
100                if (comp_id == null) {
101                        if (other.comp_id != null)
102                                return false;
103                } else if (!comp_id.equals(other.comp_id))
104                        return false;
105                if (descriptor == null) {
106                        if (other.descriptor != null)
107                                return false;
108                } else if (!descriptor.equals(other.descriptor))
109                        return false;
110                if (program == null) {
111                        if (other.program != null)
112                                return false;
113                } else if (!program.equals(other.program))
114                        return false;
115                if (program_version == null) {
116                        if (other.program_version != null)
117                                return false;
118                } else if (!program_version.equals(other.program_version))
119                        return false;
120                if (type == null) {
121                        if (other.type != null)
122                                return false;
123                } else if (!type.equals(other.type))
124                        return false;
125                return true;
126        }
127        @Override
128        public String toString() {
129                return "ChemCompDescriptor [comp_id=" + comp_id + ", type=" + type
130                                + ", program=" + program + ", program_version="
131                                + program_version + ", descriptor=" + descriptor + "]";
132        }
133
134
135
136}