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.FormatException
DatasetException
public boolean isClosed()
DatasetCollection
isClosed
in interface DatasetCollection
true
if this dataset is closed;
false
otherwise.public void initializeDatasets() throws DatasetException
DatasetCollection
initializeDatasets
in interface DatasetCollection
DatasetException
- If there are problems initializing any of the datasets within
the dataset collection.public int addDataset(Dataset dataset) throws DatasetException
DatasetCollection
addDataset
in interface DatasetCollection
dataset
- 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
DatasetCollection
getDataset
in interface DatasetCollection
datasetIdentifier
- The identifier of the dataset.DatasetException
- If there are problems retrieving the dataset.public Iterator<Dataset> getDatasets()
DatasetCollection
getDatasets
in interface DatasetCollection
public int getNumberOfDatasets()
DatasetCollection
getNumberOfDatasets
in interface DatasetCollection
public boolean hasDataset()
DatasetCollection
hasDataset
in interface DatasetCollection
true
if there are registered datasets, and
false
otherwise.public boolean hasDataset(String datasetIdentifier) throws DatasetException
DatasetCollection
hasDataset
in interface DatasetCollection
true
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
DatasetCollection
removeDataset
in interface DatasetCollection
datasetIdentifier
- The identifier of the dataset that needs to be removed.DatasetException
- If there are problems removing this dataset from the collection.public boolean isDataAvailable()
DatasetCollection
isDataAvailable
in interface DatasetCollection
true
if data is available on any of the underlying
datasets;false
otherwise.public void setDatasetCollectionObserver(DatasetCollectionObserver observer)
DatasetCollection
setDatasetCollectionObserver
in interface DatasetCollection
observer
- The observer being registered.public String getIdentifier()
DataAvailabilityObserver
getIdentifier
in interface DataAvailabilityObserver
public void marshall(ds.funnel.data.format.FormatWriter mFormat) throws ds.funnel.data.format.FormatException
marshall
in interface ds.funnel.data.format.FormatMarshaller
ds.funnel.data.format.FormatException
public void onDataAvailability(String datasetIdentifier)
DataAvailabilityObserver
onDataAvailability
in interface DataAvailabilityObserver
datasetIdentifier
- The identifier of the dataset whose availability is being
reported onpublic void onDatasetClosure(String datasetIdentifier)
DataAvailabilityObserver
onDatasetClosure
in interface DataAvailabilityObserver
datasetIdentifier
- The identifier of the dataset whose availability is being
reported onpublic void resumeAvailabilityNotifications()
DatasetCollection
resumeAvailabilityNotifications
in interface DatasetCollection
Copyright © 2015. All rights reserved.