Class FieldInstanceGenerator

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<adams.data.instances.AbstractInstanceGenerator>, adams.core.SizeOfHandler, adams.data.instances.InstanceGeneratorWithFields, InstanceGeneratorWithSampleID, adams.db.DatabaseConnectionHandler, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, adams.db.OptionalDatabaseConnectionUser, Serializable, Comparable

    public class FieldInstanceGenerator
    extends AbstractFieldInstanceGenerator
    A generator for turning fields of the sample data of a spectrum into weka.core.Instance objects.

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to
        the console (0 = off).
        default: 0
        minimum: 0
     
    -add-db-id (property: addDatabaseID)
        If set to true, then the database ID will be added to the output.
     
    -add-sample-id (property: addSampleID)
        If set to true, then the sample ID will be added to the output.
     
    -notes <adams.core.base.BaseString> [-notes ...] (property: notes)
        The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION'
        .
        default:
     
    -load-sample-data (property: loadSampleData)
        If set to true, then the sample data will be loaded if only dummy report
        available, using the sample ID.
     
    -store (property: useStoreTable)
        If set to true, then the sample data will get read from the store table,
        otherwise the active one.
     
    -field <adams.data.report.Field> [-field ...] (property: fields)
        The sample data fields to add to the output.
        default:
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Prefix

        protected String m_Prefix
        the prefix to use.
    • Constructor Detail

      • FieldInstanceGenerator

        public FieldInstanceGenerator()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractFieldInstanceGenerator
      • setPrefix

        public void setPrefix​(String value)
        Sets the prefix for the attribute names.
        Parameters:
        value - the name prefix
      • getPrefix

        public String getPrefix()
        Returns the prefix for the attribute names.
        Returns:
        the name prefix
      • prefixTipText

        public String prefixTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • generateHeader

        protected void generateHeader​(Spectrum data)
        Generates the header of the output data.
        Specified by:
        generateHeader in class adams.data.instances.AbstractInstanceGenerator<Spectrum>
        Parameters:
        data - the input data
      • generateOutput

        protected weka.core.Instance generateOutput​(Spectrum data)
        Generates the actual data.
        Specified by:
        generateOutput in class adams.data.instances.AbstractInstanceGenerator<Spectrum>
        Parameters:
        data - the input data to transform
        Returns:
        the generated data