Package adams.db

Interface SampleDataIntf

  • All Superinterfaces:
    adams.db.BulkReportUpdater<SampleData>, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, adams.db.FieldProvider<adams.data.report.Field>, adams.db.InstrumentProvider, adams.db.ReportProvider<SampleData,​String>, adams.db.ReportProviderByID<SampleData>, adams.db.TableInterface
    All Known Implementing Classes:
    SampleDataF, SampleDataT, SampleDataT, SampleDataT, SampleDataT, SampleDataT, SampleDataT, SampleDataT

    public interface SampleDataIntf
    extends adams.db.TableInterface, adams.db.FieldProvider<adams.data.report.Field>, adams.db.ReportProviderByID<SampleData>, adams.db.InstrumentProvider, adams.db.BulkReportUpdater<SampleData>
    Interface for sample data reports table.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String TABLE_NAME
      this table name.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean exists​(String id)
      Checks whether the report exists in the database.
      List<Integer> getDBIDs​(adams.db.AbstractConditions conditions)
      Return a list of database IDs of data containers that match the defined conditions.
      List<adams.data.report.Field> getFields​(adams.data.report.DataType dtype)
      Returns all available fields.
      List<String> getIDs​(adams.db.AbstractConditions cond)
      Return a list (Vector) of IDs of spectra that match the defined conditions.
      List<String> getIDs​(String[] columns, adams.db.AbstractConditions cond)
      Return a list (Vector) of IDs of spectra that match the defined conditions.
      List<String> getInstruments()
      Returns all the various instruments.
      List<String> getOrphanedIDs​(OrphanedSampleDataConditions conditions)
      Returns a list of sample IDs of of sample data without associated spectra.
      SpectrumIntf getSpectrumHandler()
      Returns the corresponding Spectrum handler.
      boolean init()
      Initialise table & sub-tables.
      SampleData load​(String id)
      Get params.
      • Methods inherited from interface adams.db.BulkReportUpdater

        bulkStore, stopBulkStore
      • Methods inherited from interface adams.db.DatabaseConnectionProvider

        getDatabaseConnection
      • Methods inherited from interface adams.db.FieldProvider

        getFields
      • Methods inherited from interface adams.db.ReportProviderByID

        remove, remove, store, store
      • Methods inherited from interface adams.db.TableInterface

        getTableName
    • Method Detail

      • getSpectrumHandler

        SpectrumIntf getSpectrumHandler()
        Returns the corresponding Spectrum handler.
        Returns:
        the corresponding handler
      • init

        boolean init()
        Initialise table & sub-tables.
        Returns:
        success?
      • getFields

        List<adams.data.report.Field> getFields​(adams.data.report.DataType dtype)
        Returns all available fields.
        Specified by:
        getFields in interface adams.db.FieldProvider<adams.data.report.Field>
        Parameters:
        dtype - the type to limit the search to, use "null" for all
        Returns:
        the list of fields
      • exists

        boolean exists​(String id)
        Checks whether the report exists in the database.
        Specified by:
        exists in interface adams.db.ReportProvider<SampleData,​String>
        Specified by:
        exists in interface adams.db.ReportProviderByID<SampleData>
        Parameters:
        id - the ID of parent data container
        Returns:
        true if the report exists
      • load

        SampleData load​(String id)
        Get params.
        Specified by:
        load in interface adams.db.ReportProvider<SampleData,​String>
        Specified by:
        load in interface adams.db.ReportProviderByID<SampleData>
        Parameters:
        id - sample ID of spectrum
        Returns:
        the hashtable
      • getIDs

        List<String> getIDs​(adams.db.AbstractConditions cond)
        Return a list (Vector) of IDs of spectra that match the defined conditions. Since the alphanumeric IDs can be of numeric nature as well, we're returning them surrounded with double quotes to avoid them being interpreted as database IDs.
        Specified by:
        getIDs in interface adams.db.ReportProvider<SampleData,​String>
        Specified by:
        getIDs in interface adams.db.ReportProviderByID<SampleData>
        Parameters:
        cond - the conditions that the spectra must meet
        Returns:
        list of spectrum ids
      • getIDs

        List<String> getIDs​(String[] columns,
                            adams.db.AbstractConditions cond)
        Return a list (Vector) of IDs of spectra that match the defined conditions. Since the alphanumeric IDs can be of numeric nature as well, we're returning them surrounded with double quotes to avoid them being interpreted as database IDs. If several columns are specified, then the result contains them tab-separated.
        Specified by:
        getIDs in interface adams.db.ReportProvider<SampleData,​String>
        Specified by:
        getIDs in interface adams.db.ReportProviderByID<SampleData>
        Parameters:
        columns - the columns to retrieve ("sp." for spectrum table, "sd." for sampledata table)
        cond - the conditions that the spectra must meet
        Returns:
        list of spectrum ids
      • getDBIDs

        List<Integer> getDBIDs​(adams.db.AbstractConditions conditions)
        Return a list of database IDs of data containers that match the defined conditions.
        Specified by:
        getDBIDs in interface adams.db.ReportProvider<SampleData,​String>
        Specified by:
        getDBIDs in interface adams.db.ReportProviderByID<SampleData>
        Parameters:
        conditions - the conditions that the conatiners must meet
        Returns:
        list of database IDs
      • getOrphanedIDs

        List<String> getOrphanedIDs​(OrphanedSampleDataConditions conditions)
        Returns a list of sample IDs of of sample data without associated spectra.
        Parameters:
        conditions - the conditions that the sampledata must meet
        Returns:
        list of sample IDs
      • getInstruments

        List<String> getInstruments()
        Returns all the various instruments.
        Specified by:
        getInstruments in interface adams.db.InstrumentProvider
        Returns:
        the instruments