Interface IDataset
- All Known Implementing Classes:
TabulatedDataset
public interface IDataset
Interface for classes that will contain one or more indexed objects
implementing
IRecordHolder
.
Dataset's directly equivalent sources might include, e.g. directories where the contained files are the record holders to be, or a database holding tables.
- Author:
- Andy Evans
- Version: 1.0 01 Mar 2021
-
Method Summary
Modifier and Type Method Description void
addRecordHolder(IRecordHolder recordHolder)
Should add a singleRecordHolder
to the end of the container.void
addRecordHolders(ArrayList<IRecordHolder> recordHolders)
Should add a collection ofIRecordHolder
objects to the end of the container.int
getEstimatedRecordCount()
Should get the total records held - or to be held - in this dataset.IMetadata
getMetadata()
Should get the metadata for thisIDataset
.IRecordHolder
getRecordHolder(int index)
Should get a singleRecordHolder
at an index.ArrayList<IRecordHolder>
getRecordHolders()
Should get allRecordHolder
objects.void
setEstimatedRecordCount(int estimatedRecordCount)
Should set the total records held - or to be held - in this dataset.void
setMetadata(IMetadata metadata)
Should set the metadata for thisIDataset
.void
setRecordHolder(int index, IRecordHolder recordHolder)
Should set a singleRecordHolder
at an index.
-
Method Details
-
setMetadata
Should set the metadata for thisIDataset
.- Parameters:
metadata
- The metadata object for thisIDataset
.
-
getMetadata
IMetadata getMetadata()Should get the metadata for thisIDataset
.- Returns:
- IMetadata The metadata object for this
IDataset
.
-
setEstimatedRecordCount
void setEstimatedRecordCount(int estimatedRecordCount)Should set the total records held - or to be held - in this dataset.For data streaming this may be a calculation of the estimated number of records to be held rather than the actual records, hence the name.
- Parameters:
estimatedRecordCount
- Number of records or estimate.
-
getEstimatedRecordCount
int getEstimatedRecordCount()Should get the total records held - or to be held - in this dataset.For data streaming this may be a calculation of the estimated number of records to be held rather than the actual records, hence the name - it should only be used for processing progress estimations, not drawing on data. For the latter, use
getRecordHolders().getRecords().get(i).size()
.- Returns:
- int Number of records or estimate.
-
setRecordHolder
Should set a singleRecordHolder
at an index.- Parameters:
index
- Location to add RecordHolder.recordHolder
- RecordHolder to add.
-
addRecordHolder
Should add a singleRecordHolder
to the end of the container.- Parameters:
recordHolder
- RecordHolder to add.
-
addRecordHolders
Should add a collection ofIRecordHolder
objects to the end of the container.- Parameters:
recordHolders
- Record holders to add.
-
getRecordHolder
Should get a singleRecordHolder
at an index.- Parameters:
index
- Location of RecordHolder.- Returns:
- IRecordHolder RecordHolder requested.
-
getRecordHolders
ArrayList<IRecordHolder> getRecordHolders()Should get allRecordHolder
objects.- Returns:
- ArrayList All RecordHolder as a collection.
-