Class GFFEntrySet
- java.lang.Object
- 
- org.biojava.bio.program.gff.GFFEntrySet
 
- 
 public class GFFEntrySet extends Object A set of entries and comments as a representation of a GFF file.This is an intermediate storage solution for GFF stuff. It lets you collect together an arbitrary set of GFF records and comments, and then do something with them later. - Author:
- Matthew Pocock, Keith James (docs), Len Trigg
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringPROPERTY_GFF_SCORE
 - 
Constructor SummaryConstructors Constructor Description GFFEntrySet()Make an empty GFFEntrySet.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String comment)Add a comment to the end of this set.voidadd(GFFRecord record)Add a GFFRecord to the end of this set.GFFEntrySetfilter(GFFRecordFilter filter)Filter this entry set into another set.GFFDocumentHandlergetAddHandler()Get the GFFDocumentHandler for adding to this set.SequenceAnnotatorgetAnnotator()Get an annotator that can add GFF features to a Sequence using the features in this GFFEntrySet.SequenceAnnotatorgetAnnotator(boolean checkSeqName)Get an annotator that can add GFF features to a Sequence using the features in this GFFEntrySet.IteratorlineIterator()Loop over all lines in the set.intsize()Return how many lines are in this set.voidstreamRecords(GFFDocumentHandler handler)Write all records in this set out to a handler.
 
- 
- 
- 
Field Detail- 
PROPERTY_GFF_SCOREpublic static final String PROPERTY_GFF_SCORE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
GFFEntrySetpublic GFFEntrySet() Make an empty GFFEntrySet.
 
- 
 - 
Method Detail- 
lineIteratorpublic Iterator lineIterator() Loop over all lines in the set.The Iterator will return String and GFFRecord objects in the order that they were added to this set. It is your responsibility to check the type of hasNext() before casting it. 
 - 
addpublic void add(String comment) Add a comment to the end of this set.This should be the text of the comment, without the leading ' #'.- Parameters:
- comment- a String giving the comment
 
 - 
addpublic void add(GFFRecord record) Add a GFFRecord to the end of this set.- Parameters:
- record- a GFFRecord to append
 
 - 
sizepublic int size() Return how many lines are in this set.- Returns:
- the size
 
 - 
getAnnotatorpublic SequenceAnnotator getAnnotator() Get an annotator that can add GFF features to a Sequence using the features in this GFFEntrySet. The SequenceAnnotator returned by this method currently adds new features to an existing sequence (assuming it implements MutableFeatureHolder).Sequences are only annotated if their getName() method returns a name equal to the sequence name field of one or more records in this GFFEntrySet. - Returns:
- an SequenceAnnotator that adds GFF features
 
 - 
getAnnotatorpublic SequenceAnnotator getAnnotator(boolean checkSeqName) Get an annotator that can add GFF features to a Sequence using the features in this GFFEntrySet. The SequenceAnnotator returned by this method currently adds new features to an existing sequence (assuming it implements MutableFeatureHolder).If checkSeqName is set to true, Sequences are only annotated if their getName() method returns a name equal to the sequence name field of one or more records in this GFFEntrySet. If checkSeqName is false, then all features are added to the sequence regardless of name. - Parameters:
- checkSeqName- boolean to indicate if only records with names matching the sequences name should be added
- Returns:
- an SequenceAnnotator that adds GFF featur es
 
 - 
filterpublic GFFEntrySet filter(GFFRecordFilter filter) Filter this entry set into another set.- Parameters:
- filter- the GFFRecordFilter to filter with
- Returns:
- a new GFFEntrySet containing only the items filtered in by the filter
 
 - 
getAddHandlerpublic GFFDocumentHandler getAddHandler() Get the GFFDocumentHandler for adding to this set.- Returns:
- a GFFDocumentHandler that adds everything that it recieves to this set
 
 - 
streamRecordspublic void streamRecords(GFFDocumentHandler handler) Write all records in this set out to a handler.- Parameters:
- handler- the GFFDocumentHandler to inform of the records
 
 
- 
 
-