com.im.commons.db.util
Class JChemSearchOptionsWriter
java.lang.Object
com.im.commons.db.util.JChemSearchOptionsWriter
public class JChemSearchOptionsWriter
- extends 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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JChemSearchOptionsWriter
public JChemSearchOptionsWriter()
JChemSearchOptionsWriter
public JChemSearchOptionsWriter(String[] initOptions)
generate
public String generate(JChemSearchOptions opts)
processOption
protected String[] processOption(JChemSearchOptions all,
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.