updated jalview version of dasobert 1.53e client and added Das Sequence Source discov...
[jalview.git] / src / org / biojava / dasobert / feature / HistogramFeature.java
1 /*
2  *                  BioJava development code
3  *
4  * This code may be freely distributed and modified under the
5  * terms of the GNU Lesser General Public Licence.  This should
6  * be distributed with the code.  If you do not have a copy,
7  * see:
8  *
9  *      http://www.gnu.org/copyleft/lesser.html
10  *
11  * Copyright for this code is held jointly by the individual
12  * authors.  These should be listed in @author doc comments.
13  *
14  * For more information on the BioJava project and its aims,
15  * or to join the biojava-l mailing list, visit the home page
16  * at:
17  *
18  *      http://www.biojava.org/
19  * 
20  * Created on May 22, 2007
21  * 
22  */
23
24 package org.biojava.dasobert.feature;
25
26
27 import java.util.Iterator;
28
29 /** a class that represents Histogram Style features
30  * in addition to normal features they know about Max and Minimum scores for the whole line
31  * Histogram feautes have only one (Histogram) Segment, which contains the scores for each position
32  *  
33  * @author Andreas Prlic
34  *
35  */
36 public class HistogramFeature 
37         extends AbstractFeatureTrack {
38         
39         double max;
40         double min;
41         
42         public HistogramFeature() {
43                 super();
44                 // TODO Auto-generated constructor stub
45         }
46         
47         
48         
49         public double getMax() {
50                 return max;
51         }
52
53
54
55         public void setMax(double max) {
56                 this.max = max;
57         }
58
59
60
61         public double getMin() {
62                 return min;
63         }
64
65
66
67         public void setMin(double min) {
68                 this.min = min;
69         }
70
71
72
73         public Object clone() {
74                 
75                 HistogramFeature f = new HistogramFeature();
76                 
77                 f.setName(name);
78         f.setMethod(method);
79         f.setType(type);
80         f.setNote(note);
81         f.setLink(link);
82         f.setSource(source);
83         f.setScore(score);
84         
85         Iterator iter = segments.iterator();
86         
87         while (iter.hasNext()){
88                 Segment s = (Segment) iter.next();
89                 f.addSegment((Segment)s.clone());
90         }
91         
92         return f;
93                 
94                 
95         }
96         
97         
98         
99         
100         
101
102 }