|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Encapsulate a mapping between BioJava Symbol objects and some string representation.
Nested Class Summary | |
static class |
SymbolTokenization.TokenType
|
Nested classes inherited from class 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(java.lang.String token)
Returns the symbol for a single token. |
java.lang.String |
tokenizeSymbol(Symbol s)
Return a token representing a single symbol. |
java.lang.String |
tokenizeSymbolList(SymbolList sl)
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 |
public static final SymbolTokenization.TokenType CHARACTER
public static final SymbolTokenization.TokenType FIXEDWIDTH
public static final SymbolTokenization.TokenType SEPARATED
public static final SymbolTokenization.TokenType UNKNOWN
Method Detail |
public Alphabet getAlphabet()
public SymbolTokenization.TokenType getTokenType()
public Symbol parseToken(java.lang.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 tokenpublic StreamParser parseStream(SeqIOListener listener)
listener
- The listener which gets notified of parsed symbols.public java.lang.String tokenizeSymbol(Symbol s) throws IllegalSymbolException
IllegalSymbolException
- if the symbol isn't recognized.public java.lang.String tokenizeSymbolList(SymbolList sl) throws IllegalAlphabetException, IllegalSymbolException
IllegalAlphabetException
- if alphabets don't match
IllegalSymbolException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |