|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.expasy.jpl.core.mol.AbstractMolecularSymbolManager<T>
public abstract class AbstractMolecularSymbolManager<T extends Molecule>
This abstract class proposes a mechanism to map a Symbol
to its
Molecule
by coupling a table of molecular symbols with the molecular
pool.
Each subclasses symbol manager will have to implement 3 methods:
createSymbols()
where a tree of symbols will be defined.loadMolecularMap()
where all molecules linked to their symbol
character representation are loaded.getMolecule(char symChar)
to access the Molecule
mapped
by symChar
.
ChemicalFacade
,
Serialized FormField Summary | |
---|---|
protected Map<Character,T> |
molecularMap
data molecular map |
protected static org.expasy.jpl.commons.collection.symbol.SymbolTable |
SYMBOL_TABLE
the table of molecular symbols |
protected Map<org.expasy.jpl.commons.collection.symbol.Symbol<T>,T> |
symbol2molecules
map molecular symbols to their (pooled) molecule instance |
Constructor Summary | |
---|---|
protected |
AbstractMolecularSymbolManager(org.expasy.jpl.commons.collection.symbol.Symbol.SymbolType<T> type)
Sole constructor. |
Method Summary | ||
---|---|---|
Set<Character> |
getLetters()
|
|
String |
getRegEx()
|
|
int |
getSymbolNumber()
|
|
static
|
getSymbolType(String name)
|
|
boolean |
hasSymbol(char name)
|
|
void |
link(org.expasy.jpl.commons.collection.symbol.Symbol<T> symbol,
T molecule)
|
|
T |
lookupData(char name)
|
|
T |
lookupData(org.expasy.jpl.commons.collection.symbol.Symbol<T> symbol)
Get the T-data linked to terminal symbol. |
|
Set<T> |
lookUpDataFromSymbols(Set<org.expasy.jpl.commons.collection.symbol.Symbol<T>> symbols)
|
|
String |
lookUpRegex(char name)
|
|
org.expasy.jpl.commons.collection.symbol.Symbol<T> |
lookupSymbol(char name)
|
|
org.expasy.jpl.commons.collection.tree.TreeView<? extends org.expasy.jpl.commons.collection.symbol.Symbol<T>> |
lookupSymbolNode(char name)
|
|
protected static byte |
toByte(char c)
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.expasy.jpl.commons.collection.symbol.DataSymbolRegister |
---|
createDataMap |
Field Detail |
---|
protected static org.expasy.jpl.commons.collection.symbol.SymbolTable SYMBOL_TABLE
protected Map<org.expasy.jpl.commons.collection.symbol.Symbol<T extends Molecule>,T extends Molecule> symbol2molecules
protected Map<Character,T extends Molecule> molecularMap
Constructor Detail |
---|
protected AbstractMolecularSymbolManager(org.expasy.jpl.commons.collection.symbol.Symbol.SymbolType<T> type)
type
- the type of molecular symbol.Method Detail |
---|
public static <T extends Molecule> org.expasy.jpl.commons.collection.symbol.Symbol.SymbolType<T> getSymbolType(String name)
public Set<Character> getLetters()
getLetters
in interface org.expasy.jpl.commons.collection.symbol.AlphabetView<T extends Molecule>
public final void link(org.expasy.jpl.commons.collection.symbol.Symbol<T> symbol, T molecule)
link
in interface org.expasy.jpl.commons.collection.symbol.DataSymbolRegister<T extends Molecule>
public final T lookupData(org.expasy.jpl.commons.collection.symbol.Symbol<T> symbol)
lookupData
in interface org.expasy.jpl.commons.collection.symbol.DataSymbolRegister<T extends Molecule>
symbol
- the terminal symbol.public final Set<T> lookUpDataFromSymbols(Set<org.expasy.jpl.commons.collection.symbol.Symbol<T>> symbols)
public final T lookupData(char name)
lookupData
in interface org.expasy.jpl.commons.collection.symbol.DataSymbolRegister<T extends Molecule>
public final org.expasy.jpl.commons.collection.tree.TreeView<? extends org.expasy.jpl.commons.collection.symbol.Symbol<T>> lookupSymbolNode(char name)
lookupSymbolNode
in interface org.expasy.jpl.commons.collection.symbol.AlphabetView<T extends Molecule>
public String getRegEx()
getRegEx
in interface org.expasy.jpl.commons.collection.symbol.AlphabetView<T extends Molecule>
public final String lookUpRegex(char name)
public final org.expasy.jpl.commons.collection.symbol.Symbol<T> lookupSymbol(char name)
lookupSymbol
in interface org.expasy.jpl.commons.collection.symbol.AlphabetView<T extends Molecule>
public final boolean hasSymbol(char name)
hasSymbol
in interface org.expasy.jpl.commons.collection.symbol.AlphabetView<T extends Molecule>
public final int getSymbolNumber()
getSymbolNumber
in interface org.expasy.jpl.commons.collection.symbol.AlphabetView<T extends Molecule>
protected static final byte toByte(char c)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |