|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.data.sequences.annotation.SplitSequenceAnnotationParser
public class SplitSequenceAnnotationParser
This class implements a simple SequenceAnnotationParser which simply splits the comments by specific delimiters.
| Field Summary | |
|---|---|
protected LinkedList<SequenceAnnotation> |
annot
The internal list of current SequenceAnnotations. |
protected String |
annotationDelimiter
The delimiter between different annotations |
protected String |
keyValueDelimiter
The delimiter between key and value |
| Constructor Summary | |
|---|---|
SplitSequenceAnnotationParser()
Creates a new SplitSequenceAnnotationParser with specific delimiters, i.e., key value
delimiter "=" and annotation delimiter ";". |
|
SplitSequenceAnnotationParser(String keyValueDelimiter,
String annotationDelimiter)
Creates a new SplitSequenceAnnotationParser with user-specified delimiters. |
|
| Method Summary | |
|---|---|
protected void |
add(String type,
String identifier)
This method actually adds a SequenceAnnotation to the internal list. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String keyValueDelimiter
protected String annotationDelimiter
protected LinkedList<SequenceAnnotation> annot
SequenceAnnotations.
| Constructor Detail |
|---|
public SplitSequenceAnnotationParser()
SplitSequenceAnnotationParser with specific delimiters, i.e., key value
delimiter "=" and annotation delimiter ";".
SplitSequenceAnnotationParser(String, String)
public SplitSequenceAnnotationParser(String keyValueDelimiter,
String annotationDelimiter)
SplitSequenceAnnotationParser with user-specified delimiters.
keyValueDelimiter - the delimiter between key and corresponding valueannotationDelimiter - the delimiter between different SequenceAnnotations
IllegalArgumentException - if the delimiters are identical| Method Detail |
|---|
public void addToAnnotation(String unparsed)
SequenceAnnotationParserunparsed String in some way to
the SequenceAnnotation.
addToAnnotation in interface SequenceAnnotationParserunparsed - the String containing the annotation
protected void add(String type,
String identifier)
SequenceAnnotation to the internal list.
type - the type of the SequenceAnnotationidentifier - the identifier of the SequenceAnnotationpublic void clearAnnotation()
SequenceAnnotationParserSequenceAnnotation.
clearAnnotation in interface SequenceAnnotationParserpublic SequenceAnnotation[] getCurrentAnnotation()
SequenceAnnotationParserSequenceAnnotation.
getCurrentAnnotation in interface SequenceAnnotationParserSequenceAnnotation
public String parseAnnotationToComment(char commentChar,
SequenceAnnotation... annotations)
SequenceAnnotationParserString representation of the given
SequenceAnnotations that can be used as comment line in a file.
SequenceAnnotationParser.addToAnnotation(String).
parseAnnotationToComment in interface SequenceAnnotationParsercommentChar - the char at the beginning of comment linesannotations - the SequenceAnnotations to be parsed
SequenceAnnotationsDataSet.save(java.io.OutputStream, char, SequenceAnnotationParser)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||