Package com.im.commons.db.util
Class JChemSearchOptionsWriter
- java.lang.Object
-
- com.im.commons.db.util.JChemSearchOptionsWriter
-
public class JChemSearchOptionsWriter extends java.lang.Object
Utility class for writing JChemSearchOptions to a String for execution e.g. by JChem cartridge. Usage: 1. Create subclass, overriding #processOption() method to provide any custom handling 2. create a new instance, specifying any additional options you want in the constructor 3. call the #generate(JChemSearchOptions) method to generate- Author:
- Tim Dudgeon
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MINIMAL_USROPID_JCC_VERSION
Minimal version of JCC which supportsusrOpID:
parameter.
-
Constructor Summary
Constructors Constructor Description JChemSearchOptionsWriter()
JChemSearchOptionsWriter(java.lang.String[] initOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
generate(chemaxon.sss.search.JChemSearchOptions opts, java.lang.String jccServerVersion)
protected java.lang.String[]
processOption(chemaxon.sss.search.JChemSearchOptions all, java.lang.String opt)
Handle an option.
-
-
-
Field Detail
-
MINIMAL_USROPID_JCC_VERSION
public static final java.lang.String MINIMAL_USROPID_JCC_VERSION
Minimal version of JCC which supportsusrOpID:
parameter.- See Also:
- Constant Field Values
-
-
Method Detail
-
generate
public java.lang.String generate(chemaxon.sss.search.JChemSearchOptions opts, java.lang.String jccServerVersion)
-
processOption
protected java.lang.String[] processOption(chemaxon.sss.search.JChemSearchOptions all, java.lang.String opt)
Handle an option. Called once with each option. Override to provide custom handling of specific options. Default is to return a single option exactly as input. Override to provide custom handling of specific options.- Parameters:
opt
- The input optionall
- The input SearchOptions. Lookup things from this, but do not modify it.- Returns:
- The options to use. If null option will be ignored. Can return multiple options if needed by using more than one item in the Array, though this is not normally needed.
-
-