Package adams.data.io.input
Class SpecLibSampleDataReader
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.input.AbstractReportReader<SampleData>
-
- adams.data.io.input.AbstractSampleDataReader
-
- adams.data.io.input.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
-
-
Field Summary
-
Fields inherited from class adams.data.io.input.AbstractSampleDataReader
m_DatabaseConnection, m_Format, m_Offline
-
-
Constructor Summary
Constructors Constructor Description SpecLibSampleDataReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFormatDescription()Returns a string describing the format (used in the file chooser).String[]getFormatExtensions()Returns the extension(s) of the format.StringglobalInfo()Returns a string describing the object.SampleDatanewInstance()Returns a new instance of the report class in use.protected List<SampleData>readData()Performs the actual reading.-
Methods inherited from class adams.data.io.input.AbstractSampleDataReader
defineOptions, determineParentID, formatTipText, getDatabaseConnection, getFormat, getOffline, getSampleData, getSpectrum, initialize, offlineTipText, setDatabaseConnection, setFormat, setOffline
-
Methods inherited from class adams.data.io.input.AbstractReportReader
checkData, cleanUp, compareTo, destroy, equals, forCommandLine, forName, getDefaultFormatExtension, getInput, getReaders, inputTipText, isStopped, postRead, read, reset, setInput, shallowCopy, shallowCopy, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.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:
getFormatDescriptionin interfaceadams.core.io.FileFormatHandler- Specified by:
getFormatDescriptionin classadams.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:
getFormatExtensionsin interfaceadams.core.io.FileFormatHandler- Specified by:
getFormatExtensionsin classadams.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:
newInstancein classadams.data.io.input.AbstractReportReader<SampleData>- Returns:
- the new (empty) report
-
readData
protected List<SampleData> readData()
Performs the actual reading.- Specified by:
readDatain classadams.data.io.input.AbstractReportReader<SampleData>- Returns:
- the reports that were read
-
-