Class ChangeFormat

  • 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.filter.Filter>, adams.core.SizeOfHandler, adams.data.filter.Filter<Spectrum>, adams.db.DatabaseConnectionHandler, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, Serializable, Comparable

    public class ChangeFormat
    extends AbstractDatabaseFilter
    A filter that uses the sample ID to retrieve different formats from the database. The sample data can be retrieved from a different source.

    Valid options are:

    -D (property: debug)
        If set to true, scheme may output additional info to the console.
     
    -store (property: useStoreTable)
        If set to true, then the data is retrieved from the 'store' tables instead
        of the 'active' ones.
     
    -spectrum <java.lang.String> (property: spectrumFormat)
        The format of the spectrum data to retrieve from the database.
        default: NIR
     
    -sample-data <java.lang.String> (property: sampleDataFormat)
        The format of the sampleData data to retrieve from the database.
        default: NIR
     
    Version:
    $Revision: 2242 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter

        adams.data.filter.AbstractFilter.FilterJob<T extends adams.data.container.DataContainer>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String m_SampleDataFormat
      the format to get the sample data from.
      protected String m_SpectrumFormat
      the format of the spectrum to load from the database.
      • Fields inherited from class adams.data.filter.AbstractDatabaseConnectionFilter

        m_DatabaseConnection
      • Fields inherited from class adams.data.filter.AbstractFilter

        m_DontUpdateID
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      ChangeFormat()  
    • Field Detail

      • m_SpectrumFormat

        protected String m_SpectrumFormat
        the format of the spectrum to load from the database.
      • m_SampleDataFormat

        protected String m_SampleDataFormat
        the format to get the sample data from.
    • Constructor Detail

      • ChangeFormat

        public ChangeFormat()
    • 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 AbstractDatabaseFilter
      • useStoreTableTipText

        public String useStoreTableTipText()
        Returns the tip text for this property.
        Specified by:
        useStoreTableTipText in class AbstractDatabaseFilter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSpectrumFormat

        public void setSpectrumFormat​(String value)
        Sets the format for the spectrum.
        Parameters:
        value - the format
      • getSpectrumFormat

        public String getSpectrumFormat()
        Returns the format for the spectrum.
        Returns:
        the format
      • spectrumFormatTipText

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

        public void setSampleDataFormat​(String value)
        Sets the format for the sample data.
        Parameters:
        value - the format
      • getSampleDataFormat

        public String getSampleDataFormat()
        Returns the format for the sample data.
        Returns:
        the format
      • sampleDataFormatTipText

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

        protected Spectrum processData​(Spectrum data)
        Performs the actual filtering.
        Specified by:
        processData in class adams.data.filter.AbstractFilter<Spectrum>
        Parameters:
        data - the data to filter
        Returns:
        the filtered data