public interface SymbolTokenization extends Annotatable
Modifier and Type | Interface and Description |
---|---|
static class |
SymbolTokenization.TokenType |
Annotatable.AnnotationForwarder
Modifier and Type | Field and Description |
---|---|
static SymbolTokenization.TokenType |
CHARACTER |
static SymbolTokenization.TokenType |
FIXEDWIDTH |
static SymbolTokenization.TokenType |
SEPARATED |
static SymbolTokenization.TokenType |
UNKNOWN |
ANNOTATION
Modifier and Type | Method and Description |
---|---|
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.
|
getAnnotation
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
static final SymbolTokenization.TokenType CHARACTER
static final SymbolTokenization.TokenType FIXEDWIDTH
static final SymbolTokenization.TokenType SEPARATED
static final SymbolTokenization.TokenType UNKNOWN
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 forIllegalSymbolException
- 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 symbolIllegalSymbolException
- if the symbol isn't recognized.String tokenizeSymbolList(SymbolList symList) throws IllegalAlphabetException, IllegalSymbolException
symList
- A SymbolListIllegalAlphabetException
- if alphabets don't matchIllegalSymbolException
Copyright © 2014 BioJava. All rights reserved.