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
047 * 
048
049 * @author Hanning Ni    Doubletwist Inc
050  * @author Greg Cox
051
052 */
053
054public class AGAVEQueryRegion
055
056{
057
058    private int start ;
059
060    private int end ;
061
062    private AGAVEDbId db_id ;
063
064
065
066
067
068    public void setStart(int start)
069
070    {
071
072        this.start = start ;
073
074    }
075
076
077
078    public void setEnd(int end)
079
080    {
081
082        this.end = end ;
083
084    }
085
086
087
088    public void setDbId(AGAVEDbId id)
089
090    {
091
092        this.db_id = id ;
093
094    }
095
096
097
098    public int getStart()
099
100    {
101
102        return start ;
103
104    }
105
106    public int getEnd()
107
108    {
109
110        return end ;
111
112    }
113
114    public AGAVEDbId getDbId()
115
116    {
117
118        return db_id ;
119
120    }
121
122
123
124    public String toString(String indent, String indent_unit)
125
126    {
127
128        StringBuffer sb = new StringBuffer();
129
130        sb.append( indent +"<query_region start=\"" + start + "\" end=\"" + end +"\">" + "\n");
131
132        if( db_id != null )
133
134          sb.append( db_id.toString(indent + indent_unit, indent_unit) ) ;
135
136        sb.append( indent +  "</query_region>" + "\n" );
137
138        return sb.substring(0) ;
139
140    }
141
142
143
144    public String toString()
145
146    {
147
148        return "<query_region start=\"" + start + "\" end=\"" + end +"\">" + "\n"
149
150               + db_id == null ? "" : db_id
151
152               + "</query_region>" + "\n" ;
153
154    }
155
156}
157