(JAL-1016) noted position where race condition occurs
[jalview.git] / src / org / biojava / dasobert / feature / FeatureTrack.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 Feb 9, 2005
21  *
22  */
23 package org.biojava.dasobert.feature;
24
25 import java.util.List;
26
27 /**
28  * A feature corresponds to a track in Ensembl
29  * 
30  * @author Andreas Prlic
31  * 
32  */
33 public interface FeatureTrack
34 {
35
36   public Object clone();
37
38   /**
39    * returns true if the specified sequence position is within the range of this
40    * Feature
41    * 
42    * @param seqPosition
43    *                the position to check
44    * @return true if the position is within the ranges of the segments of this
45    *         feature
46    */
47   public boolean overlaps(int seqPosition);
48
49   public String toString();
50
51   public void setSource(String s);
52
53   public String getSource();
54
55   public void setName(String nam);
56
57   public String getName();
58
59   public void setMethod(String methd);
60
61   public String getMethod();
62
63   public void setType(String typ);
64
65   public String getType();
66
67   public void setNote(String nte);
68
69   public String getNote();
70
71   public void setLink(String lnk);
72
73   public String getLink();
74
75   public void setScore(String score);
76
77   public String getScore();
78
79   public void setOrientation(String orientation);
80
81   public String getOrientation();
82
83   /**
84    * test if two features are equivalent
85    * 
86    * @param feat
87    *                feature to compare with
88    * @return true if equivalend
89    */
90   public abstract boolean equals(FeatureTrack feat);
91
92   /**
93    * add a segment to this feature
94    * 
95    * @param start
96    *                position
97    * @param end
98    *                position
99    * @param name
100    *                of feature
101    */
102   public abstract void addSegment(int start, int end, String name);
103
104   public abstract void addSegment(Segment s);
105
106   public abstract List getSegments();
107
108   /**
109    * set the data from the DAS - type - id field (used for Ontology support)
110    * 
111    * @param typeID
112    */
113   public void setTypeID(String typeID);
114
115   /**
116    * set the data from the DAS - type - category field (used for Ontology
117    * support)
118    * 
119    * @param typeCategory
120    */
121   public void setTypeCategory(String typeCategory);
122
123   public String getTypeID();
124
125   public String getTypeCategory();
126
127 }