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 * Author: Daniel Asarnow
021 * Date:   2012-6-23
022 */
023
024package org.biojava.nbio.structure.cath;
025
026import java.io.Serializable;
027
028/** Represents a node in the CATH hierarchy.
029 *
030 * @author Daniel Asarnow
031 */
032public class CathNode implements Serializable{
033
034        public static final long serialVersionUID = 1L;
035
036        /**
037         * The CATH code of the node, e.g. "1.10.8.10".
038         */
039        String nodeId;
040
041        /**
042         * The CATH code of the parent, e.g. "1.10.8". Calculated during parsing.
043         */
044        String parentId;
045
046        /**
047         * The representative domain for this node.
048         */
049        String representative;
050
051        /**
052         * A name or description.
053         */
054        String description;
055
056        /**
057         * This node's level within the hierarchy. One of CATH, not CATHSOLID.
058         */
059        CathCategory category;
060
061        public String getNodeId() {
062                return nodeId;
063        }
064
065        public void setNodeId(String nodeId) {
066                this.nodeId = nodeId;
067                this.category = CathCategory.fromCathCode(nodeId);
068        }
069
070        public String getParentId() {
071                return parentId;
072        }
073
074        public void setParentId(String parentId) {
075                this.parentId = parentId;
076        }
077
078        public String getRepresentative() {
079                return representative;
080        }
081
082        public void setRepresentative(String representative) {
083                this.representative = representative;
084        }
085
086        public String getDescription() {
087                return description;
088        }
089
090        public void setDescription(String description) {
091                this.description = description;
092        }
093
094        public CathCategory getCategory() {
095                return category;
096        }
097
098        @Override
099        public String toString() {
100                return ""; //TODO implement
101        }
102}