001/*
002
003 *                    BioJava development code
004
005 *
006
007 * This code may be freely distributed and modified under the
008
009 * terms of the GNU Lesser General Public Licence.  This should
010
011 * be distributed with the code.  If you do not have a copy,
012
013 * see:
014
015 *
016
017 *      http://www.gnu.org/copyleft/lesser.html
018
019 *
020
021 * Copyright for this code is held jointly by the individual
022
023 * authors.  These should be listed in @author doc comments.
024
025 *
026
027 * For more information on the BioJava project and its aims,
028
029 * or to join the biojava-l mailing list, visit the home page
030
031 * at:
032
033 *
034
035 *      http://www.biojava.org/
036
037 *
038
039 */
040
041package org.biojava.bio.seq.io.agave;
042
043
044/**
045
046 * @author Hanning Ni    Doubletwist Inc
047  * @author Greg Cox
048
049 */
050
051public class AGAVEDbId {
052
053   private String id ;
054
055   private String version;
056
057   private String db_code ;
058
059   public String getId(){
060
061      return id ;
062
063   }
064
065   public String getVersion()
066
067   {
068
069      return version ;
070
071   }
072
073   public String getDbCode()
074
075   {
076
077      return db_code ;
078
079   }
080
081   public void setId(String id )
082
083   {
084
085      this.id = id ;
086
087   }
088
089   public void setVersion(String version)
090
091   {
092
093      this.version = version ;
094
095   }
096
097   public void setDbCode(String code)
098
099   {
100
101      this.db_code = code ;
102
103   }
104
105   public String toString(String indent, String indent_unit)
106
107   {
108
109      StringBuffer tmp = new StringBuffer() ;
110
111      tmp.append(indent + "<db_id id=\"" + id +   "\" db_code=\"" + db_code +"\" " ) ;
112
113      if( version != null )
114
115          tmp.append(  " version=\"" + version + "\"") ;
116
117      tmp.append("/>" + "\n");
118
119      return tmp.substring(0) ;
120
121
122
123   }
124
125   public String toString()
126
127   {
128
129      StringBuffer tmp = new StringBuffer() ;
130
131      tmp.append("<db_id id=\"" + id +   "\" db_code=\"" + db_code +"\" " ) ;
132
133      if( version != null )
134
135          tmp.append(  " version=\"" + version + "\"") ;
136
137      tmp.append("/>" + "\n");
138
139      return tmp.substring(0) ;
140
141
142
143   }
144
145}
146