View Javadoc

1   /*--------------------------------------------------------------------------
2    *  Copyright 2009 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  // ReadQueryConfig.java
20  // Since: May 26, 2010
21  //
22  // $URL$ 
23  // $Author$
24  //--------------------------------------
25  package org.utgenome.gwt.utgb.client.bio;
26  
27  import java.io.Serializable;
28  
29  /**
30   * Read query configuration
31   * 
32   * @author leo
33   * 
34   */
35  public class ReadQueryConfig implements Serializable {
36  
37  	/**
38  	 * 
39  	 */
40  	private static final long serialVersionUID = 1L;
41  
42  	public static enum Layout {
43  		PILEUP, COVERAGE
44  	}
45  
46  	public boolean hasCanvasSupport;
47  	public Layout layout;
48  	public int pixelWidth;
49  	public int maxmumNumberOfReadsToDisplay = 500;
50  	/**
51  	 * Path to the WIG db file of the read depth
52  	 */
53  	public String wigPath;
54  	public GraphWindow window = GraphWindow.MAX;
55  
56  	public ReadQueryConfig() {
57  	}
58  
59  	public ReadQueryConfig(int pixelWidth, boolean hasCanvasSupport, Layout layout, int maxmumNumberOfReadsToDisplay, String wigPath) {
60  		this(pixelWidth, hasCanvasSupport, layout);
61  		this.maxmumNumberOfReadsToDisplay = maxmumNumberOfReadsToDisplay;
62  		if (wigPath != null && wigPath.trim().length() != 0)
63  			this.wigPath = wigPath;
64  	}
65  
66  	public ReadQueryConfig(int pixelWidth, boolean hasCanvasSupport, Layout layout) {
67  		this.pixelWidth = pixelWidth;
68  		this.layout = layout;
69  		this.hasCanvasSupport = hasCanvasSupport;
70  	}
71  
72  }