|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SymbolTokenization
Encapsulate a mapping between BioJava Symbol objects and some string representation.
| Nested Class Summary | |
|---|---|
static class |
SymbolTokenization.TokenType
|
| Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable |
|---|
Annotatable.AnnotationForwarder |
| Field Summary | |
|---|---|
static SymbolTokenization.TokenType |
CHARACTER
|
static SymbolTokenization.TokenType |
FIXEDWIDTH
|
static SymbolTokenization.TokenType |
SEPARATED
|
static SymbolTokenization.TokenType |
UNKNOWN
|
| Fields inherited from interface org.biojava.bio.Annotatable |
|---|
ANNOTATION |
| Method Summary | |
|---|---|
Alphabet |
getAlphabet()
The alphabet to which this tokenization applies. |
SymbolTokenization.TokenType |
getTokenType()
Determine the style of tokenization represented by this object. |
StreamParser |
parseStream(SeqIOListener listener)
Return an object which can parse an arbitrary character stream into symbols. |
Symbol |
parseToken(String token)
Returns the symbol for a single token. |
String |
tokenizeSymbol(Symbol sym)
Return a token representing a single symbol. |
String |
tokenizeSymbolList(SymbolList symList)
Return a string representation of a list of symbols. |
| Methods inherited from interface org.biojava.bio.Annotatable |
|---|
getAnnotation |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Field Detail |
|---|
static final SymbolTokenization.TokenType CHARACTER
static final SymbolTokenization.TokenType FIXEDWIDTH
static final SymbolTokenization.TokenType SEPARATED
static final SymbolTokenization.TokenType UNKNOWN
| Method Detail |
|---|
Alphabet getAlphabet()
SymbolTokenization.TokenType getTokenType()
Symbol parseToken(String token)
throws IllegalSymbolException
The Symbol will be a member of the alphabet. If the token is not recognized as mapping to a symbol, an exception will be thrown.
token - the token to retrieve a Symbol for
IllegalSymbolException - if there is no Symbol for the tokenStreamParser parseStream(SeqIOListener listener)
listener - The listener which gets notified of parsed symbols.
String tokenizeSymbol(Symbol sym)
throws IllegalSymbolException
sym - The symbol
IllegalSymbolException - if the symbol isn't recognized.
String tokenizeSymbolList(SymbolList symList)
throws IllegalAlphabetException,
IllegalSymbolException
symList - A SymbolList
IllegalAlphabetException - if alphabets don't match
IllegalSymbolException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||