com.im.commons.db 5.9.2

com.im.commons.db.util
Class JChemSearchOptionsWriter

java.lang.Object
  extended by 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


Constructor Summary
JChemSearchOptionsWriter()
           
JChemSearchOptionsWriter(String[] initOptions)
           
 
Method Summary
 String generate(JChemSearchOptions opts)
           
protected  String[] processOption(JChemSearchOptions all, String opt)
          Handle an option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JChemSearchOptionsWriter

public JChemSearchOptionsWriter()

JChemSearchOptionsWriter

public JChemSearchOptionsWriter(String[] initOptions)
Method Detail

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 option
all - 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.

com.im.commons.db 5.9.2