|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.sss.search.SearchOptions
Class to encapsulate common search parameters.
| Field Summary | |
protected boolean |
dirty
This flag is set to true whenever any of the options change. |
protected int[] |
options
Field to store various options of the search. |
boolean |
verbose
For debugging purposes. |
| Constructor Summary | |
SearchOptions()
|
|
| Method Summary | |
void |
addUserComparator(MolComparator mc)
Adds the given user-defined comparator to the search. |
void |
clearChangesInUserComparators()
Used in initializing searches. |
java.lang.Object |
clone()
Makes an identical copy of this SearchObject. |
void |
clonecopy(SearchOptions other)
Copies all parameters to the other object. |
protected void |
deepCopy(SearchOptions toOther)
Deprecated. since 5.0.2 Please use clonecopy(SearchOptions) instead |
void |
deleteAllUserComparators()
|
void |
deleteUserComparator(MolComparator mc)
|
protected static boolean |
getBoolean(java.lang.String value)
Returns value as a boolean flag. |
int |
getChargeMatching()
|
java.lang.String |
getChemTermsFilter()
Gets the Chemical Terms filtering expression |
java.lang.String |
getChemTermsFilterConfig()
Gets the configuration string for Chemical Terms filter. |
int |
getDoubleBondStereoMatchingMode()
|
int |
getHCountMatching()
|
int |
getImplicitHMatching()
|
int |
getIsotopeMatching()
|
int |
getOption(int option)
Deprecated. Since 5.0 Please use getters instead. |
java.lang.String |
getOption(java.lang.String name)
Returns option value in string format. |
int[] |
getOptions()
Deprecated. since 5.0 |
int |
getRadicalMatching()
|
int |
getSearchType()
Returns the currently set global search operation mode. |
int |
getStereoModel()
|
MolComparator[] |
getUserComparators()
Because of efficiency reasons one should check hasUserComparators() before calling this method! |
int |
getVagueBondLevel()
Getter for vague bond level. |
boolean |
hasChangesInUserComparators()
Used in initializing searches. |
boolean |
hasUserComparators()
|
boolean |
isDirty()
Returns the dirty flag. |
boolean |
isExactBondMatching()
Indicates whether bond types should match exacly - looking for query bonds target. |
boolean |
isExactFragment()
|
boolean |
isExactQueryAtomMatching()
Returns whether exact matching of query atom information is set. |
boolean |
isExactStereoMatching()
Returns the exact stereo matching option. |
boolean |
isKeepQueryOrder()
|
boolean |
isMixSgroupMatching()
|
boolean |
isOrderSensitiveSearch()
Indicates whether the search is order sensitive |
boolean |
isPerfectSearchType()
|
boolean |
isReactionUnpairedMapMatching()
|
boolean |
isStereoSearch()
If true, then chirality information is
considered during searching, otherwise all stereo information is
ignored. |
protected boolean |
isSubgraphSearch()
Returns the subgraph matching option. |
boolean |
isSuperstructureSearch()
True if the current search type is superstructure search. |
boolean |
isTautomerSearch()
Indicates if tautomers of the query should be enumerated for search. |
boolean |
isValenceMatching()
|
boolean |
isVerbose()
For debugging purposes only. |
protected java.lang.String |
returnOptionString(boolean value)
|
void |
setChargeMatching(int value)
|
void |
setChemTermsFilter(java.lang.String value)
Sets the Chemical Terms filtering expression. |
void |
setChemTermsFilterConfig(java.lang.String value)
Sets the configuration string for Chemical Terms filter. |
void |
setDirty(boolean v)
Sets or clears the dirty flag. |
void |
setDoubleBondStereoMatchingMode(int value)
Sets how double bond cis/trans stereo information should match during the search. |
void |
setExactBondMatching(boolean value)
Specifies whether bond types should match exacly - looking for query bonds target. |
void |
setExactFragment(boolean value)
|
void |
setExactQueryAtomMatching(boolean isExact)
Sets whether exact query atom matching should be used or not. |
void |
setExactStereoMatching(boolean value)
If true, equality is needed in stereochemistry. |
void |
setHCountMatching(int value)
Sets the H count matching mode. |
void |
setImplicitHMatching(int value)
|
void |
setIsotopeMatching(int value)
|
void |
setKeepQueryOrder(boolean value)
|
void |
setMixSgroupMatching(boolean value)
|
void |
setOption(int option,
int value)
Deprecated. Since 5.0 Please use setters instead. |
void |
setOption(java.lang.String name,
java.lang.String value)
Sets search options. |
void |
setOptions(int[] newOptions)
Deprecated. since 5.0 |
void |
setOptions(java.lang.String optionString)
Sets search options. |
void |
setOrderSensitiveSearch(boolean value)
Specifies whether the same set of target atoms found in a different order should be considered as a different hit. |
void |
setRadicalMatching(int value)
|
void |
setReactionUnpairedMapMatching(boolean value)
|
void |
setSearchType(int searchType)
Sets different search options according to a predefined search type. |
void |
setStereoModel(int value)
|
void |
setStereoSearch(boolean value)
If true, then chirality information is
considered during searching, otherwise all stereo information is
ignored. |
protected void |
setSubgraphSearch(boolean value)
Specifies the matching mode for topology search |
void |
setSuperstructureSearch(boolean value)
Sets if the current search type is superstructure search. |
void |
setTautomerSearch(boolean value)
Sets if tautomers of the query should be enumerated for search. |
void |
setVagueBondLevel(int value)
Option for less strict evaluation of query bonds (e.g. ambiguious aromaticity). |
void |
setValenceMatching(boolean value)
|
void |
setVerbose(boolean verboseP)
For debugging purposes only. |
java.util.ArrayList |
toList()
|
java.lang.String |
toString()
Returns a string that - describes the state of the options - can be the input of setOptions(String) - doesn't contain options that have their default value |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected boolean dirty
public boolean verbose
protected int[] options
| Constructor Detail |
public SearchOptions()
| Method Detail |
public boolean isExactQueryAtomMatching()
public void setExactQueryAtomMatching(boolean isExact)
Search.isExactQueryAtomMatching.
public void setDoubleBondStereoMatchingMode(int value)
value - The following options can be used:
chemaxon.struc.StereoConstants.DBS_NONE:
No double bond cis/trans is considered.
chemaxon.struc.StereoConstants.DBS_MARKED:
(Default) Double bond cis/trans stereo is checked for double bonds designated by the
stereo search flag only.
chemaxon.struc.StereoConstants.DBS_ALL: All
double bonds are checked for cis/trans stereo matching.
public int getDoubleBondStereoMatchingMode()
setDoubleBondStereoMatchingMode(int)public void setSearchType(int searchType)
SearchConstants.NO_SCREEN,
SearchConstants.NO_ABAS,
SearchConstants.SUBSTRUCTURE
(default),
SearchConstants.SUPERSTRUCTURE
(no query features allowed),
SearchConstants.SIMILARITY, and
SearchConstants.EXACT.
SearchConstants.PERFECT.
SearchConstants.EXACT_FRAGMENT.
WARNING: This method may affect other search settings, therefore if other search options are adjusted, this method should be called first! For affected search options, see links below.
searchType - the predefined search typesetExactBondMatching(boolean),
setExactQueryAtomMatching(boolean),
setExactStereoMatching(boolean),
setStereoSearch(boolean),
setSubgraphSearch(boolean),
setOption(int, int),
SearchConstants.OPTION_CHARGE_MATCHING,
SearchConstants.OPTION_ISOTOPE_MATCHING,
SearchConstants.OPTION_RADICAL_MATCHING,
SearchConstants.OPTION_VALENCE_MATCHINGpublic int getSearchType()
setSearchType(int)public boolean isPerfectSearchType()
protected boolean isSubgraphSearch()
protected void setSubgraphSearch(boolean value)
value - true for substructure search, false for exact structure search
matchingpublic int getHCountMatching()
setHCountMatching(int),
SearchConstants.HCOUNT_MATCHING_AUTO,
SearchConstants.HCOUNT_MATCHING_EQUAL,
SearchConstants.HCOUNT_MATCHING_GREATER_OR_EQUALpublic void setHCountMatching(int value)
value - possible values:SearchConstants.HCOUNT_MATCHING_AUTO,
SearchConstants.HCOUNT_MATCHING_EQUAL,
SearchConstants.HCOUNT_MATCHING_GREATER_OR_EQUALpublic boolean isVerbose()
public void setVerbose(boolean verboseP)
public void setOption(int option,
int value)
option - Option identifier to be set.value - Value of option to be set.SearchConstants.OPTION_KEEP_QUERY_ORDER,
SearchConstants.OPTION_EXACT_FRAGMENT,
SearchConstants.OPTION_TAUTOMER_SEARCH,
SearchConstants.OPTION_ISOTOPE_MATCHING,
SearchConstants.OPTION_CHARGE_MATCHING,
SearchConstants.OPTION_VALENCE_MATCHING,
SearchConstants.OPTION_RADICAL_MATCHING,
SearchConstants.OPTION_VAGUE_BOND,
SearchConstants.OPTION_MIX_SGROUP_MATCHING,
SearchConstants.OPTION_STEREO_MODELpublic final int getOption(int option)
option - Option identifier to be asked for.
SearchConstants.OPTION_KEEP_QUERY_ORDER,
SearchConstants.OPTION_EXACT_FRAGMENT,
SearchConstants.OPTION_TAUTOMER_SEARCH,
SearchConstants.OPTION_ISOTOPE_MATCHING,
SearchConstants.OPTION_CHARGE_MATCHING,
SearchConstants.OPTION_VALENCE_MATCHING,
SearchConstants.OPTION_RADICAL_MATCHING,
SearchConstants.OPTION_VAGUE_BOND,
SearchConstants.OPTION_MIX_SGROUP_MATCHING,
SearchConstants.OPTION_STEREO_MODELpublic void setOptions(int[] newOptions)
newOptions - Option array to copy.public int[] getOptions()
public void setOptions(java.lang.String optionString)
optionString - Can set multiple options. Option names and
values (all case insensitive) are defined in JChem Query Guide: summary of search options.
Name and value of an option should be separated by ":", and
different pairs of names/values by spaces. Instead of spaces an alternative
option separator string (even more than 1 character) can be specified
at the beginning of optionString by the syntax
"sep='separator string' ...". After 'separator string' there must be
at least 1 space character!)
setOption(String,String)public boolean isSuperstructureSearch()
setSearchType(int),
SearchConstants.SUPERSTRUCTURE,
setSuperstructureSearch(boolean)public void setSuperstructureSearch(boolean value)
setSearchType(int),
SearchConstants.SUPERSTRUCTUREpublic boolean isExactStereoMatching()
By default, this setting is false for all search types except for PERFECT search, where it is true. This setting has no effect if stereoSearch == false.
isStereoSearch()public void setExactStereoMatching(boolean value)
By default, this setting is false for all search types except for PERFECT search, where it is true. This setting has no effect if stereoSearch == false.
value - the exact-stereo settingsetStereoSearch(boolean)public void setOrderSensitiveSearch(boolean value)
orderSensitiveSearch is true, both cases
are returned, otherwise only one of them (the one found first).
value - set this to true to get
results in every possible orderpublic boolean isOrderSensitiveSearch()
setOrderSensitiveSearch(boolean)public boolean isStereoSearch()
true, then chirality information is
considered during searching, otherwise all stereo information is
ignored. (Default: true)
public void setStereoSearch(boolean value)
true, then chirality information is
considered during searching, otherwise all stereo information is
ignored. (Default: true)
public boolean isExactBondMatching()
falsepublic void setExactBondMatching(boolean value)
value - if set to true, bond types must match
exactly. For example "single or double" matches only
"single or double", but matches neither "single" or
"double".
Default value is falsepublic void setVagueBondLevel(int value)
getVagueBondLevel(),
SearchConstants.VAGUE_BOND_LEVEL1,
SearchConstants.VAGUE_BOND_LEVEL2,
SearchConstants.VAGUE_BOND_LEVEL3,
SearchConstants.VAGUE_BOND_LEVEL4public int getVagueBondLevel()
setVagueBondLevel(int),
SearchConstants.VAGUE_BOND_LEVEL1,
SearchConstants.VAGUE_BOND_LEVEL2,
SearchConstants.VAGUE_BOND_LEVEL3,
SearchConstants.VAGUE_BOND_LEVEL4public boolean hasChangesInUserComparators()
true,
if there is any changes in user-defined comparators. After initializing
the search, the change flag is cleared.
public void clearChangesInUserComparators()
public boolean hasUserComparators()
public void addUserComparator(MolComparator mc)
mc - user-defined MolComparatorpublic void deleteUserComparator(MolComparator mc)
public void deleteAllUserComparators()
public MolComparator[] getUserComparators()
public boolean isDirty()
setDirty(boolean)public void setDirty(boolean v)
isDirty()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedExceptionpublic void clonecopy(SearchOptions other)
protected void deepCopy(SearchOptions toOther)
clonecopy(SearchOptions) instead
public void setTautomerSearch(boolean value)
value - set to true to enable enumeration of the
tautomers of the query for search. The default is
false.SearchConstants.OPTION_TAUTOMER_SEARCHpublic boolean isTautomerSearch()
setTautomerSearch(boolean),
SearchConstants.OPTION_TAUTOMER_SEARCH
public void setOption(java.lang.String name,
java.lang.String value)
name - Name (case insensitive) of search option (e.g. stereoSearch).value - String form (case insensitive)
of search parameter value (y, M, ef, ...).
Useable search parameters:
getOption(String)public java.lang.String getOption(java.lang.String name)
name - Name (case insensitive) of search option (e.g. stereoSearch).
Useable search parameters:
setOption(String, String)protected static boolean getBoolean(java.lang.String value)
value - String representation of boolean flag.
java.lang.IllegalArgumentException - otherwise.protected java.lang.String returnOptionString(boolean value)
public boolean isKeepQueryOrder()
public void setKeepQueryOrder(boolean value)
value - true, if search should rearrange query atoms for better
search performancepublic boolean isExactFragment()
public void setExactFragment(boolean value)
value - true, if the query should only match
to exact fragments of the target.
(No heavy atoms outside the match and each query fragment
corresponds to a target fragment.)public int getIsotopeMatching()
SearchConstants.ISOTOPE_MATCHING_DEFAULT,
SearchConstants.ISOTOPE_MATCHING_EXACT,
SearchConstants.ISOTOPE_MATCHING_IGNOREpublic void setIsotopeMatching(int value)
value - Specifies the isotope searching behaviour.
Default is ISOTOPE_MATCHING_DEFAULT (isotope query
matches only isotope target, nonisotope query matches all)SearchConstants.ISOTOPE_MATCHING_DEFAULT,
SearchConstants.ISOTOPE_MATCHING_EXACT,
SearchConstants.ISOTOPE_MATCHING_IGNOREpublic int getChargeMatching()
SearchConstants.CHARGE_MATCHING_DEFAULT,
SearchConstants.CHARGE_MATCHING_EXACT,
SearchConstants.CHARGE_MATCHING_IGNOREpublic void setChargeMatching(int value)
value - Specifies the charge searching behaviour.
Default is CHARGE_MATCHING_DEFAULT (charged query
matches only charged target, noncharged query matches all)SearchConstants.CHARGE_MATCHING_DEFAULT,
SearchConstants.CHARGE_MATCHING_EXACT,
SearchConstants.CHARGE_MATCHING_IGNOREpublic boolean isValenceMatching()
public void setValenceMatching(boolean value)
value - true, if valence should be checked during search.
Default value is true.public int getRadicalMatching()
SearchConstants.RADICAL_MATCHING_DEFAULT,
SearchConstants.RADICAL_MATCHING_EXACT,
SearchConstants.RADICAL_MATCHING_IGNOREpublic void setRadicalMatching(int value)
value - Specifies the radical searching behaviour.
Default is RADICAL_MATCHING_DEFAULT (radical query
matches only radical target, nonradical query matches all)SearchConstants.RADICAL_MATCHING_DEFAULT,
SearchConstants.RADICAL_MATCHING_EXACT,
SearchConstants.RADICAL_MATCHING_IGNOREpublic boolean isMixSgroupMatching()
public void setMixSgroupMatching(boolean value)
value - true, if COM, MIX and FOR sgroups should be
considered during search. Default value is true).public int getStereoModel()
SearchConstants.STEREO_MODEL_LOCAL,
SearchConstants.STEREO_MODEL_COMPREHENSIVE,
SearchConstants.STEREO_MODEL_GLOBAL,
SearchConstants.STEREO_MODEL_DEFAULTpublic void setStereoModel(int value)
value - Specifies the used stereo model.
Default is STEREO_MODEL_LOCAL (it may change in the future!)SearchConstants.STEREO_MODEL_LOCAL,
SearchConstants.STEREO_MODEL_COMPREHENSIVE,
SearchConstants.STEREO_MODEL_GLOBAL,
SearchConstants.STEREO_MODEL_DEFAULTpublic int getImplicitHMatching()
SearchConstants.IMPLICIT_H_MATCHING_DEFAULT,
SearchConstants.IMPLICIT_H_MATCHING_DISABLED,
SearchConstants.IMPLICIT_H_MATCHING_ENABLEDpublic void setImplicitHMatching(int value)
value - Specifies matching bahaviour between
explicit and implicit hydrogens.
Default is IMPLICIT_H_MATCHING_DEFAULT (matching depends on
the circumstances of search)SearchConstants.IMPLICIT_H_MATCHING_DEFAULT,
SearchConstants.IMPLICIT_H_MATCHING_DISABLED,
SearchConstants.IMPLICIT_H_MATCHING_ENABLEDpublic boolean isReactionUnpairedMapMatching()
public void setReactionUnpairedMapMatching(boolean value)
value - true, if in reaction search unpaired (orphan and widow)
atom maps can match any atom map.
Default value is true.public void setChemTermsFilter(java.lang.String value)
getChemTermsFilter()public java.lang.String getChemTermsFilter()
setChemTermsFilter(String)public void setChemTermsFilterConfig(java.lang.String value)
value - the configuration string. Set to
null for default configuration.getChemTermsFilterConfig()public java.lang.String getChemTermsFilterConfig()
setChemTermsFilterConfig(String)public java.lang.String toString()
setOptions(String),
toList()public java.util.ArrayList toList()
setOptions(String),
toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||