2 * BioJava development code
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,
9 * http://www.gnu.org/copyleft/lesser.html
11 * Copyright for this code is held jointly by the individual
12 * authors. These should be listed in @author doc comments.
14 * For more information on the BioJava project and its aims,
15 * or to join the biojava-l mailing list, visit the home page
18 * http://www.biojava.org/
20 * Created on Feb 9, 2005
23 package org.biojava.dasobert.feature;
25 import java.util.List;
28 * A feature corresponds to a track in Ensembl
30 * @author Andreas Prlic
33 public interface FeatureTrack {
36 public Object clone();
38 /** returns true if the specified sequence position is within the range of this Feature
40 * @param seqPosition the position to check
41 * @return true if the position is within the ranges of the segments of this feature
43 public boolean overlaps(int seqPosition);
45 public String toString();
47 public void setSource(String s);
49 public String getSource();
51 public void setName(String nam);
53 public String getName();
55 public void setMethod(String methd);
57 public String getMethod();
59 public void setType(String typ);
61 public String getType();
63 public void setNote(String nte);
65 public String getNote();
67 public void setLink(String lnk);
69 public String getLink();
71 public void setScore(String score);
73 public String getScore();
75 public void setOrientation(String orientation);
77 public String getOrientation();
79 /** test if two features are equivalent
81 * @param feat feature to compare with
82 * @return true if equivalend
84 public abstract boolean equals(FeatureTrack feat);
86 /** add a segment to this feature
88 * @param start position
90 * @param name of feature
92 public abstract void addSegment(int start, int end, String name);
94 public abstract void addSegment(Segment s);
96 public abstract List getSegments();
98 /** set the data from the DAS - type - id field
99 * (used for Ontology support)
102 public void setTypeID(String typeID);
104 /** set the data from the DAS - type - category field
105 * (used for Ontology support)
106 * @param typeCategory
108 public void setTypeCategory(String typeCategory);
110 public String getTypeID();
111 public String getTypeCategory();