de.jstacs.data.sequences.annotation
Interface SequenceAnnotationParser

All Known Implementing Classes:
MotifAnnotationParser, NullSequenceAnnotationParser, ReferenceSequenceAnnotationParser, SimpleSequenceAnnotationParser, SplitSequenceAnnotationParser

public interface SequenceAnnotationParser

This interface declares the methods which are used by AbstractStringExtractor to annotate a String which will be parsed to a Sequence.

Author:
Jens Keilwagen

Method Summary
 void addToAnnotation(String unparsed)
          This method adds the unparsed String in some way to the SequenceAnnotation.
 void clearAnnotation()
          This method reset the current SequenceAnnotation.
 SequenceAnnotation[] getCurrentAnnotation()
          This method returns the current SequenceAnnotation.
 String parseAnnotationToComment(char commentChar, SequenceAnnotation... annotations)
          This method returns a String representation of the given SequenceAnnotations that can be used as comment line in a file.
 

Method Detail

getCurrentAnnotation

SequenceAnnotation[] getCurrentAnnotation()
This method returns the current SequenceAnnotation.

Returns:
the current SequenceAnnotation

addToAnnotation

void addToAnnotation(String unparsed)
This method adds the unparsed String in some way to the SequenceAnnotation.

Parameters:
unparsed - the String containing the annotation

clearAnnotation

void clearAnnotation()
This method reset the current SequenceAnnotation.


parseAnnotationToComment

String parseAnnotationToComment(char commentChar,
                                SequenceAnnotation... annotations)
This method returns a String representation of the given SequenceAnnotations that can be used as comment line in a file.
Normally, the method should do the opposite of addToAnnotation(String).

Parameters:
commentChar - the char at the beginning of comment lines
annotations - the SequenceAnnotations to be parsed
Returns:
a String representing the given SequenceAnnotations
See Also:
DataSet.save(java.io.OutputStream, char, SequenceAnnotationParser)