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 StringTABLE_NAMEthis table name.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists(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.SpectrumIntfgetSpectrumHandler()Returns the corresponding Spectrum handler.booleaninit()Initialise table & sub-tables.SampleDataload(String id)Get params.
-
-
-
Field Detail
-
TABLE_NAME
static final String TABLE_NAME
this table name.- See Also:
- Constant Field Values
-
-
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:
getFieldsin interfaceadams.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:
existsin interfaceadams.db.ReportProvider<SampleData,String>- Specified by:
existsin interfaceadams.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:
loadin interfaceadams.db.ReportProvider<SampleData,String>- Specified by:
loadin interfaceadams.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:
getIDsin interfaceadams.db.ReportProvider<SampleData,String>- Specified by:
getIDsin interfaceadams.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:
getIDsin interfaceadams.db.ReportProvider<SampleData,String>- Specified by:
getIDsin interfaceadams.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:
getDBIDsin interfaceadams.db.ReportProvider<SampleData,String>- Specified by:
getDBIDsin interfaceadams.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
-
-