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 // Ribbon.java 20 // Since: 2010/01/26 21 // 22 // $URL$ 23 // $Author$ 24 //-------------------------------------- 25 package org.utgenome.gwt.ribbon.client.model; 26 27 import java.io.Serializable; 28 import java.util.ArrayList; 29 30 /** 31 * Ribbon for representing indels on a genome sequence 32 * 33 * @author leo 34 * 35 */ 36 public class Ribbon implements Serializable { 37 38 private static final long serialVersionUID = 1L; 39 40 /** 41 * A segment of the ribbon 42 * 43 * @author leo 44 * 45 */ 46 public static class RibbonSegment { 47 48 public static enum SegmentType { 49 GAP, FOLD, NORMAL 50 } 51 52 /** 53 * start position on the reference genome 54 */ 55 public int start; 56 /** 57 * end position on the reference genome 58 */ 59 public int end; 60 61 /** 62 * the length of this ribbon segment 63 */ 64 public int length; 65 66 /** 67 * GAP, FOLD, or NORMAL 68 */ 69 public SegmentType type; 70 /** 71 * true if this segment is visible to the user, otherwise false 72 */ 73 public boolean isVisible = true; 74 75 public RibbonSegment(int start, int end, int length, SegmentType type) { 76 this.start = start; 77 this.end = end; 78 this.type = type; 79 } 80 } 81 82 public ArrayList<RibbonSegment> segment = new ArrayList<RibbonSegment>(); 83 84 public Ribbon() { 85 } 86 87 }