Class SpecLibSampleDataReader

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.io.FileFormatHandler, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<adams.data.io.input.AbstractReportReader>, adams.core.SizeOfHandler, adams.core.Stoppable, adams.core.StoppableWithFeedback, adams.data.io.input.ReportReader<SampleData>, SampleDataReader, adams.db.DatabaseConnectionHandler, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, Serializable, Comparable

    public class SpecLibSampleDataReader
    extends AbstractSampleDataReader
    Reads USGS SpecLib HTML Description files.

    http://speclab.cr.usgs.gov/spectral.lib06/

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -input <adams.core.io.PlaceholderFile> (property: input)
        The file to read and turn into a report.
        default: ${CWD}
     
    -offline <boolean> (property: offline)
        If set to true, the database won't get queried, e.g., for obtaining the 
        parent ID.
        default: false
     
    -store <boolean> (property: useStoreTable)
        If set to true, then the data will get read from the store table, otherwise 
        the active one.
        default: false
     
    -format <java.lang.String> (property: format)
        The type of spectrum to use (used internally to determine the database ID 
        of the spectrum).
        default: NIR
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • SpecLibSampleDataReader

        public SpecLibSampleDataReader()
    • 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
      • getFormatDescription

        public String getFormatDescription()
        Returns a string describing the format (used in the file chooser).
        Specified by:
        getFormatDescription in interface adams.core.io.FileFormatHandler
        Specified by:
        getFormatDescription in class adams.data.io.input.AbstractReportReader<SampleData>
        Returns:
        a description suitable for displaying in the file chooser
      • getFormatExtensions

        public String[] getFormatExtensions()
        Returns the extension(s) of the format.
        Specified by:
        getFormatExtensions in interface adams.core.io.FileFormatHandler
        Specified by:
        getFormatExtensions in class adams.data.io.input.AbstractReportReader<SampleData>
        Returns:
        the extension(s) (without the dot!)
      • newInstance

        public SampleData newInstance()
        Returns a new instance of the report class in use.
        Specified by:
        newInstance in class adams.data.io.input.AbstractReportReader<SampleData>
        Returns:
        the new (empty) report
      • readData

        protected List<SampleData> readData()
        Performs the actual reading.
        Specified by:
        readData in class adams.data.io.input.AbstractReportReader<SampleData>
        Returns:
        the reports that were read