public abstract class WordTokenization extends Unchangeable implements SymbolTokenization, Serializable
SymbolTokenization.TokenType
Annotatable.AnnotationForwarder
CHARACTER, FIXEDWIDTH, SEPARATED, UNKNOWN
ANNOTATION
Constructor and Description |
---|
WordTokenization(Alphabet fab) |
Modifier and Type | Method and Description |
---|---|
Alphabet |
getAlphabet()
The alphabet to which this tokenization applies.
|
Annotation |
getAnnotation()
Should return the associated annotation object.
|
SymbolTokenization.TokenType |
getTokenType()
Determine the style of tokenization represented by this object.
|
StreamParser |
parseStream(SeqIOListener siol)
Return an object which can parse an arbitrary character stream into
symbols.
|
protected Symbol[] |
parseString(String s) |
protected List |
splitString(String str) |
String |
tokenizeSymbolList(SymbolList sl)
Return a string representation of a list of symbols.
|
addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parseToken, tokenizeSymbol
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public WordTokenization(Alphabet fab)
public Alphabet getAlphabet()
SymbolTokenization
getAlphabet
in interface SymbolTokenization
public SymbolTokenization.TokenType getTokenType()
SymbolTokenization
getTokenType
in interface SymbolTokenization
public Annotation getAnnotation()
Annotatable
getAnnotation
in interface Annotatable
public String tokenizeSymbolList(SymbolList sl) throws IllegalSymbolException, IllegalAlphabetException
SymbolTokenization
tokenizeSymbolList
in interface SymbolTokenization
sl
- A SymbolListIllegalAlphabetException
- if alphabets don't matchIllegalSymbolException
public StreamParser parseStream(SeqIOListener siol)
SymbolTokenization
parseStream
in interface SymbolTokenization
siol
- The listener which gets notified of parsed symbols.protected List splitString(String str) throws IllegalSymbolException
IllegalSymbolException
protected Symbol[] parseString(String s) throws IllegalSymbolException
IllegalSymbolException
Copyright © 2014 BioJava. All rights reserved.