|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.jep.Evaluator
Evaluates chemical expressions.
Provides command line interface
or creates ChemJEP objects according to configuration.
| Field Summary | |
static java.lang.String |
DEFAULT_TAG_NAME
Default SDFile tag to store the evaluation result. |
static java.lang.String |
EVALUATOR_DEFAULTS_FILE
Default Function/Plugin settings filename. |
static java.lang.String |
EVALUATOR_NAMED_MOLS_FILE
Default named molecule set filename. |
static java.lang.String |
EVALUATOR_SCRIPT_FILE
Initial script filename. |
static java.lang.String |
JCHEM_CONFIG_DIR
Default directory under jchem directory for storing configuration files. |
| Constructor Summary | |
Evaluator()
Default constructor. |
|
Evaluator(org.dom4j.Element element)
Deprecated. for internal use only |
|
Evaluator(org.dom4j.Element element,
java.lang.String dir)
Deprecated. for internal use only |
|
Evaluator(org.dom4j.Element element,
java.lang.String dir,
Standardizer standardizer)
Deprecated. for internal use only |
|
Evaluator(java.io.File file)
Constructor. |
|
Evaluator(java.io.File file,
Standardizer standardizer)
Constructor. |
|
Evaluator(java.io.File file,
Standardizer standardizer,
MolImporter importer,
java.lang.String script)
Constructor. |
|
Evaluator(Standardizer standardizer)
Constructor. |
|
Evaluator(java.lang.String configString)
Constructor. |
|
Evaluator(java.lang.String configString,
Standardizer standardizer)
Constructor. |
|
Evaluator(java.lang.String configString,
Standardizer standardizer,
MolImporter importer,
java.lang.String script)
Constructor. |
|
| Method Summary | |
ChemJEP |
compile(java.lang.String expression)
Compiles the expression, creates ChemJEP object.
|
ChemJEP |
compile(java.lang.String expression,
java.lang.Class contextClass)
Compiles the expression, creates ChemJEP object.
|
ChemJEP |
compile(java.lang.String expression,
java.lang.Class contextClass,
chemaxon.nfunk.jep.SymbolTable stab)
Compiles the expression, creates ChemJEP object.
|
java.util.Hashtable |
getFunctionParameterData()
Returns user parameter data for each function. |
java.lang.String[] |
getPluginIDs()
Returns the plugin function IDs from the Plugins section
of the configuration XML. |
chemaxon.nfunk.jep.SymbolTable |
getSymbolTable()
Returns the symbol table of predefined constants (molecules, molecule sets and other constants defined in the built-in and the user-defined jep.script). |
static void |
main(java.lang.String[] args)
The command line version entry point. |
void |
runScript(java.lang.String script)
Runs a script, variables will be added to the base variable table and can be referenced by chemical expressions. |
void |
setFingerprintGenerator(chemaxon.sss.screen.CombinedFingerprint cf)
Sets the fingerprint generator object (needed for query strings). |
void |
setVerbose(boolean verbose)
Sets verbose mode. |
static java.lang.String |
toString(java.lang.Object o)
Returns String representation of an object using default decimal format with 2 fractional digits. |
static java.lang.String |
toString(java.lang.Object o,
java.text.DecimalFormat df)
Returns String representation of an object. |
static java.lang.String |
toString(java.lang.Object o,
int precision)
Returns String representation of an object using default decimal format with given number of fractional digits. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String EVALUATOR_DEFAULTS_FILE
public static final java.lang.String EVALUATOR_NAMED_MOLS_FILE
public static final java.lang.String JCHEM_CONFIG_DIR
public static final java.lang.String EVALUATOR_SCRIPT_FILE
public static final java.lang.String DEFAULT_TAG_NAME
| Constructor Detail |
public Evaluator()
throws chemaxon.nfunk.jep.ParseException
public Evaluator(Standardizer standardizer)
throws chemaxon.nfunk.jep.ParseException
standardizer - is the standardizer object
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(java.io.File file)
throws chemaxon.nfunk.jep.ParseException
file - is the XML configuration file
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(org.dom4j.Element element)
throws chemaxon.nfunk.jep.ParseException
element - is the configuration root element
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(java.lang.String configString)
throws chemaxon.nfunk.jep.ParseException
configString - is the XML configuration string
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(org.dom4j.Element element,
java.lang.String dir)
throws chemaxon.nfunk.jep.ParseException
element - is the configuration root elementdir - is the root directory
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(java.io.File file,
Standardizer standardizer)
throws chemaxon.nfunk.jep.ParseException
file - is the XML configuration filestandardizer - is the standardizer object
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(java.io.File file,
Standardizer standardizer,
MolImporter importer,
java.lang.String script)
throws chemaxon.nfunk.jep.ParseException
file - is the XML configuration filestandardizer - is the standardizer objectimporter - is the MolImporter object used for loading named molecule sets
(if null, then default molecule sets are loaded)script - is the initial script (Chemical Terms expression; if null, then default initial
scripts are run)
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(org.dom4j.Element element,
java.lang.String dir,
Standardizer standardizer)
throws chemaxon.nfunk.jep.ParseException
element - is the configuration root elementdir - is the root directorystandardizer - is the standardizer object
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(java.lang.String configString,
Standardizer standardizer)
throws chemaxon.nfunk.jep.ParseException
configString - is the XML configuration stringstandardizer - is the standardizer object
chemaxon.nfunk.jep.ParseException - on error
public Evaluator(java.lang.String configString,
Standardizer standardizer,
MolImporter importer,
java.lang.String script)
throws chemaxon.nfunk.jep.ParseException
configString - is the XML configuration stringstandardizer - is the standardizer objectimporter - is the MolImporter object used for loading named molecule sets
(if null, then default molecule sets are loaded)script - is the initial script (Chemical Terms expression; if null, then default initial
scripts are run)
chemaxon.nfunk.jep.ParseException - on error| Method Detail |
public void runScript(java.lang.String script)
throws chemaxon.nfunk.jep.ParseException
script - is the script (Chemical Terms expression)
chemaxon.nfunk.jep.ParseException - on error
public java.util.Hashtable getFunctionParameterData()
throws chemaxon.nfunk.jep.ParseException
UserParam sections
of the configuration XML. The keys are the function IDs, the values
are the corresponding parameter record arrays:
<function ID> -< UserParam[]
chemaxon.nfunk.jep.ParseException - on configuration error
public java.lang.String[] getPluginIDs()
throws chemaxon.nfunk.jep.ParseException
Plugins section
of the configuration XML.
chemaxon.nfunk.jep.ParseException - on configuration errorpublic chemaxon.nfunk.jep.SymbolTable getSymbolTable()
public void setFingerprintGenerator(chemaxon.sss.screen.CombinedFingerprint cf)
cf - is the fingerprint generator objectpublic void setVerbose(boolean verbose)
verbose - is true if verbose mode
public ChemJEP compile(java.lang.String expression)
throws chemaxon.nfunk.jep.ParseException
ChemJEP object.
Call ChemJEP.evaluate(ChemContext) to evaluate the expression.
expression - is the expression string
ChemJEP object
chemaxon.nfunk.jep.ParseException - on compile error
public ChemJEP compile(java.lang.String expression,
java.lang.Class contextClass)
throws chemaxon.nfunk.jep.ParseException
ChemJEP object.
Call ChemJEP.evaluate(ChemContext) to evaluate the expression.
expression - is the expression stringcontextClass - is the evaluation context class object
ChemJEP object
chemaxon.nfunk.jep.ParseException - on compile error
public ChemJEP compile(java.lang.String expression,
java.lang.Class contextClass,
chemaxon.nfunk.jep.SymbolTable stab)
throws chemaxon.nfunk.jep.ParseException
ChemJEP object.
Call ChemJEP.evaluate(ChemContext) to evaluate the expression.
expression - is the expression stringcontextClass - is the evaluation context class objectstab - is the vaiable table, null if the default varibale table
should be used
ChemJEP object
chemaxon.nfunk.jep.ParseException - on compile errorpublic static java.lang.String toString(java.lang.Object o)
2 fractional digits.
o - is the object
public static java.lang.String toString(java.lang.Object o,
int precision)
o - is the objectprecision - is the number of fractional digits
public static java.lang.String toString(java.lang.Object o,
java.text.DecimalFormat df)
o - is the objectdf - is the real-number formatter
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - the command line parameters
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||