public class DatasetCollectionManagement extends Object implements DatasetCollection, DataAvailabilityObserver
DataCollection Interface.| Modifier | Constructor and Description |
|---|---|
protected |
DatasetCollectionManagement() |
protected |
DatasetCollectionManagement(ds.funnel.data.format.FormatReader mFormat) |
| Modifier and Type | Method and Description |
|---|---|
int |
addDataset(Dataset dataset)
Add a dataset to this collection.
|
Dataset |
getDataset(String datasetIdentifier)
Retrieve a specific dataset
|
Iterator<Dataset> |
getDatasets()
Retrieve an iterator to iterate over the datasets.
|
String |
getIdentifier()
This retrieves the identifier associated with the observer.
|
int |
getNumberOfDatasets()
Get the number of datasets in this collection.
|
boolean |
hasDataset()
Check to see if any dataset is part of this collection.
|
boolean |
hasDataset(String datasetIdentifier)
Check to see if a dataset with the specified identifier is part of this
collection
|
void |
initializeDatasets()
Initializes all the constituent datasets in this collection.
|
boolean |
isClosed()
This method indicates whether this dataset collection is closed.
|
boolean |
isDataAvailable()
Reports on the availability of data in any of the underlying datasets
that are part of this collection.
|
void |
marshall(ds.funnel.data.format.FormatWriter mFormat) |
void |
onDataAvailability(String datasetIdentifier)
This method is invoked on the observers to reflect the availability of
new data in the input dataset
|
void |
onDatasetClosure(String datasetIdentifier)
This method is invoked on the observer when the dataset will be closed
and thus no more data will be available.
|
int |
removeDataset(String datasetIdentifier)
Remove a dataset from this collection
|
void |
resumeAvailabilityNotifications()
Resume data availability notifications for this collection.
|
void |
setDatasetCollectionObserver(DatasetCollectionObserver observer)
Register an observer for the DatasetCollection
|
String |
toString() |
protected DatasetCollectionManagement()
protected DatasetCollectionManagement(ds.funnel.data.format.FormatReader mFormat)
throws ds.funnel.data.format.FormatException,
DatasetException
ds.funnel.data.format.FormatExceptionDatasetExceptionpublic boolean isClosed()
DatasetCollectionisClosed in interface DatasetCollectiontrue if this dataset is closed;
false otherwise.public void initializeDatasets()
throws DatasetException
DatasetCollectioninitializeDatasets in interface DatasetCollectionDatasetException - If there are problems initializing any of the datasets within
the dataset collection.public int addDataset(Dataset dataset) throws DatasetException
DatasetCollectionaddDataset in interface DatasetCollectiondataset - The dataset to be added to the collection in question.DatasetException - If there are problems adding this dataset to the collectionpublic Dataset getDataset(String datasetIdentifier) throws DatasetException
DatasetCollectiongetDataset in interface DatasetCollectiondatasetIdentifier - The identifier of the dataset.DatasetException - If there are problems retrieving the dataset.public Iterator<Dataset> getDatasets()
DatasetCollectiongetDatasets in interface DatasetCollectionpublic int getNumberOfDatasets()
DatasetCollectiongetNumberOfDatasets in interface DatasetCollectionpublic boolean hasDataset()
DatasetCollectionhasDataset in interface DatasetCollectiontrue if there are registered datasets, and
false otherwise.public boolean hasDataset(String datasetIdentifier) throws DatasetException
DatasetCollectionhasDataset in interface DatasetCollectiontrue if the dataset with specified identifier is
part of this collection;false otherwise.DatasetException - If the specified datasetIdentifier is a NULLpublic int removeDataset(String datasetIdentifier) throws DatasetException
DatasetCollectionremoveDataset in interface DatasetCollectiondatasetIdentifier - The identifier of the dataset that needs to be removed.DatasetException - If there are problems removing this dataset from the collection.public boolean isDataAvailable()
DatasetCollectionisDataAvailable in interface DatasetCollectiontrue if data is available on any of the underlying
datasets;false otherwise.public void setDatasetCollectionObserver(DatasetCollectionObserver observer)
DatasetCollectionsetDatasetCollectionObserver in interface DatasetCollectionobserver - The observer being registered.public String getIdentifier()
DataAvailabilityObservergetIdentifier in interface DataAvailabilityObserverpublic void marshall(ds.funnel.data.format.FormatWriter mFormat)
throws ds.funnel.data.format.FormatException
marshall in interface ds.funnel.data.format.FormatMarshallerds.funnel.data.format.FormatExceptionpublic void onDataAvailability(String datasetIdentifier)
DataAvailabilityObserveronDataAvailability in interface DataAvailabilityObserverdatasetIdentifier - The identifier of the dataset whose availability is being
reported onpublic void onDatasetClosure(String datasetIdentifier)
DataAvailabilityObserveronDatasetClosure in interface DataAvailabilityObserverdatasetIdentifier - The identifier of the dataset whose availability is being
reported onpublic void resumeAvailabilityNotifications()
DatasetCollectionresumeAvailabilityNotifications in interface DatasetCollectionCopyright © 2015. All rights reserved.