Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

joelib.desc
Class ResultFactory  view ResultFactory download ResultFactory.java

java.lang.Object
  extended byjoelib.data.JOEGlobalDataBase
      extended byjoelib.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):

External descriptors will be descriptors, which are known in JOELib, but can not be calculated. All internal descriptor result classes will be always stored explicitly.

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.