|
|||||||||
| Home >> All >> joelib >> [ desc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
joelib.desc
Class ResultFactory

java.lang.Objectjoelib.data.JOEGlobalDataBase
joelib.desc.ResultFactory
- public class ResultFactory
- extends joelib.data.JOEGlobalDataBase
Factory class to get descriptor results and faciliate the parsing of descriptor entries. The definition file can be defined in the joelib.data.ResultFactory.resourceFile property in the wsi.ra.tool.PropertyHolder. The wsi.ra.tool.ResourceLoader loads the joelib.properties file for default.
Let's have a look at a knownResults.txt example file:
$JOELIB_RESULT$ joelib.desc.result.IntResult
#
# PETRA descriptors
#
E_CHARGE
E_DELTAHF
E_HASH
E_POLARIZABILITY
#
# Molconn Z 350
#
id
nvx
nrings
ncirc
nelem
$REGEXP$ nas\p{Upper}\p{Lower}*
$REGEXP$ nd\d
$REGEXP$ ne\d+
This means all descriptors of the type nd1, nd2, nd3, ..., nd9 are joelib.desc.result.IntResult
descriptors. Also the E_CHARGE, E_DELTAHF, E_HASH, E_POLARIZABILITY, id, nvx, ... descriptors.For a detailed description for regular expressions patterns have a look at the java.util.regex.Pattern class.
Speed optimization (for external descriptors):
- Use as much explicit descriptor name entries as possible. They will be stored in a look up table (java.util.Hashtable) with fast access predicates.
- Use regular expressions only if there can be a lot of descriptors described with these expressions. Still, there will be all regular expressions checked, until the first one, which matches the given descriptor, will be found. But this will be always much more expensier than getting descriptor result (representation classes for descriptor values) directly from the java.util.Hashtable.
Default:
joelib.desc.ResultFactory.resourceFile=joelib/data/plain/knownResults.txt
| Field Summary | |
private java.lang.String |
actRep
|
private static java.lang.String |
DEFAULT_RESOURCE
|
private static java.lang.String |
IDENTIFIER
|
private static ResultFactory |
instance
|
private static org.apache.log4j.Category |
logger
|
private java.util.Vector |
regExp
|
private static java.lang.String |
REGEXP
|
private java.util.Hashtable |
representation
|
| Fields inherited from class joelib.data.JOEGlobalDataBase |
initialized, resourceFile |
| Constructor Summary | |
private |
ResultFactory()
Constructor for the ResultFactory. |
| Method Summary | |
DescResult |
getDescResult(java.lang.String descName)
Gets the descResult attribute of the ResultFactory class |
protected java.lang.String |
guessDescResult(java.lang.String descName)
Get descriptor result ype by using regular expressions. |
static ResultFactory |
instance()
Description of the Method |
void |
parseLine(java.lang.String buffer)
Description of the Method |
joelib.data.JOEPairData |
parsePairData(joelib.molecule.JOEMol mol,
java.lang.String descName,
joelib.data.JOEGenericData data)
Description of the Method |
| Methods inherited from class joelib.data.JOEGlobalDataBase |
finalize, getLineCounter, init |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
logger
private static org.apache.log4j.Category logger
DEFAULT_RESOURCE
private static final java.lang.String DEFAULT_RESOURCE
- See Also:
- Constant Field Values
IDENTIFIER
private static final java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
REGEXP
private static final java.lang.String REGEXP
- See Also:
- Constant Field Values
instance
private static ResultFactory instance
representation
private java.util.Hashtable representation
actRep
private java.lang.String actRep
regExp
private java.util.Vector regExp
| Constructor Detail |
ResultFactory
private ResultFactory()
- Constructor for the ResultFactory.
| Method Detail |
instance
public static ResultFactory instance()
- Description of the Method
getDescResult
public DescResult getDescResult(java.lang.String descName) throws DescriptorException
- Gets the descResult attribute of the ResultFactory class
parseLine
public void parseLine(java.lang.String buffer)
- Description of the Method
parsePairData
public joelib.data.JOEPairData parsePairData(joelib.molecule.JOEMol mol, java.lang.String descName, joelib.data.JOEGenericData data)
- Description of the Method
guessDescResult
protected java.lang.String guessDescResult(java.lang.String descName)
- Get descriptor result ype by using regular expressions.
|
|||||||||
| Home >> All >> joelib >> [ desc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC