|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.jep.ChemContext
chemaxon.jep.context.ReactionContext
public class ReactionContext
Expression evaluation context to evaluate reaction conditions.
Contains reaction context elements:
reactants, products, map-to-atom correspondences for both sides.
Provides function names for accessing context elements
through the CallbackIface
.
Field Summary | |
---|---|
static java.lang.String[] |
CFNS
The context function names. |
Constructor Summary | |
---|---|
ReactionContext()
Constructor. |
|
ReactionContext(boolean copy)
Constructor. |
Method Summary | |
---|---|
java.lang.Object |
callback(java.lang.String method,
java.lang.Object arg)
Implements CallbackIface . |
void |
clear()
Clears the context. |
java.lang.String[] |
getContextFunctionNames()
Returns {"reactant", "product", "ratom", "patom"}. |
boolean |
isEmpty()
Returns true if the context is empty. |
void |
setProductAtomsByMap(MolAtom[] ma)
Sets the map -> product atom array. |
void |
setProducts(Molecule[] products)
Sets the products. |
void |
setReactantAtomsByMap(MolAtom[] ma)
Sets the map -> reactant atom array. |
void |
setReactants(Molecule[] reactants)
Sets the reactants. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String[] CFNS
Constructor Detail |
---|
public ReactionContext()
public ReactionContext(boolean copy)
copy
- is true if map arrays should be copiedMethod Detail |
---|
public java.lang.String[] getContextFunctionNames()
getContextFunctionNames
in class ChemContext
public java.lang.Object callback(java.lang.String method, java.lang.Object arg)
CallbackIface
.
Returns null
for unimplemented callbacks.
Implemented callbacks:
method | arg | return value |
---|---|---|
"reactant" | reactant index (Integer, 0-based) | the reactant |
"product" | product index (Integer, 0-based) | the ptoduct |
"ratom" | atom map (Integer) | the reactant atom |
"patom" | atom map (Integer) | the product atom |
callback
in interface chemaxon.marvin.util.CallbackIface
callback
in class ChemContext
method
- is the accessor method namearg
- is the accessor method argument (the JEP parameter stack as null
,
a single parameter object or a parameter object array depending on the number
of parameters on the stack)
public void setReactants(Molecule[] reactants)
reactants
- is the reactant arraypublic void setProducts(Molecule[] products)
products
- is the product arraypublic void setReactantAtomsByMap(MolAtom[] ma)
ma
- is the map -> reactant atom arraypublic void setProductAtomsByMap(MolAtom[] ma)
ma
- is the map -> product atom arraypublic boolean isEmpty()
true
if the context is empty.
true
if the context is emptypublic void clear()
clear
in class ChemContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |