Class 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 supports usrOpID: parameter.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MINIMAL_USROPID_JCC_VERSION

        public static final java.lang.String MINIMAL_USROPID_JCC_VERSION
        Minimal version of JCC which supports usrOpID: parameter.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JChemSearchOptionsWriter

        public JChemSearchOptionsWriter()
      • JChemSearchOptionsWriter

        public JChemSearchOptionsWriter​(java.lang.String[] initOptions)
    • 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 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.