View Javadoc

1   /*--------------------------------------------------------------------------
2    *  Copyright 2010 utgenome.org
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *--------------------------------------------------------------------------*/
16  //--------------------------------------
17  // utgb-core Project
18  //
19  // ReadList.java
20  // Since: 2010/09/02
21  //
22  //--------------------------------------
23  package org.utgenome.gwt.utgb.client.bio;
24  
25  import java.util.ArrayList;
26  import java.util.List;
27  
28  /**
29   * ReadList is a list of read objects, and used to draw a sequence of blocks on genome.
30   * 
31   * @author leo
32   * 
33   */
34  public class ReadList extends Interval {
35  
36  	/**
37  	 * 
38  	 */
39  	private static final long serialVersionUID = 1L;
40  
41  	private ArrayList<OnGenome> read = new ArrayList<OnGenome>();
42  
43  	private String name;
44  
45  	public ReadList() {
46  	}
47  
48  	@Override
49  	public String getName() {
50  		return name;
51  	}
52  
53  	public void setName(String name) {
54  		this.name = name;
55  	}
56  
57  	public void addRead(OnGenome read) {
58  		this.read.add(read);
59  	}
60  
61  	public List<OnGenome> getRead() {
62  		return this.read;
63  	}
64  
65  	@Override
66  	public void accept(OnGenomeDataVisitor visitor) {
67  		visitor.visitReadList(this);
68  	}
69  }