public class EDIDataReaderEngineImpl extends java.lang.Object implements DataReaderEngine
Constructor and Description |
---|
EDIDataReaderEngineImpl(HeaderBean header,
DataflowBean dataflowBean,
DataStructureBean dataStructureBean,
EDIDataReader ediDataReader)
Create a reader that is reading only a single dataset
|
EDIDataReaderEngineImpl(HeaderBean header,
DataflowBean dataflow,
DataStructureBean dataStructureBean,
java.util.List<EDIDataReader> ediDataReaders)
Create a reader that is reading datasets conforming to only one dsd
|
EDIDataReaderEngineImpl(HeaderBean header,
SdmxBeanRetrievalManager beanRetrievalManager,
java.util.List<EDIDataReader> ediDataReaders)
Create a reader that can iterate over datasets containing data for many dsds
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the reader engine, and releases all resources.
|
void |
copyToOutputStream(java.io.OutputStream outputStream)
Copies the entire dataset that the reader is reading, to the output stream (irrespective of current position)
|
DataReaderEngine |
createCopy()
Creates a copy of this data reader engine, the copy is another iterator over the same source data
|
java.lang.String |
getCrossSectionConcept() |
DatasetHeaderBean |
getCurrentDatasetHeaderBean()
Returns the header information for the current dataset.
|
Keyable |
getCurrentKey()
Returns the current Keyable entry in the dataset, if there has been no initial call to moveNextKeyable, then null will be returned.
|
Observation |
getCurrentObservation()
Returns the current Observation for the current Keyable.
|
DataflowBean |
getDataFlow()
Returns the dataflow that this reader engine is currently reading data for.
|
java.util.List<KeyValue> |
getDatasetAttributes()
Returns the attributes available for the current dataset
|
int |
getDatasetPosition()
Returns the current dataset index the iterator position is at within the data source.
|
DataStructureBean |
getDataStructure()
Returns the data structure definition that this reader engine is currently reading data for
Note this will return null unless there has been a call to moveNextDataset(), this DataStructure returned by this method call may change when reading a new dataset
|
DATA_TYPE |
getDataType() |
HeaderBean |
getHeader()
Returns the header of the datasource that this reader engine is reading data for.
|
int |
getKeyablePosition()
Returns the current Keyable index the iterator position is at within the Data Set
Index starts at -1 - (no Keys have been Read)
|
int |
getObsPosition()
Returns the current Observation index the iterator position is at within the current Keyable being read.
|
ProvisionAgreementBean |
getProvisionAgreement()
Returns the provision agreement that this data is for.
|
int |
getSeriesPosition()
Returns the current Series index the iterator position is at within the Data Set
Index starts at -1 - (no Series Keys have been Read)
|
boolean |
isTimeSeries() |
boolean |
moveNextDataset()
Returns true if there are any more datasets in the data source
|
boolean |
moveNextKeyable()
Returns true if there are any more keys in the dataset
|
boolean |
moveNextObservation()
If this reader is in a series, this will return true if the series has any more observation values.
|
void |
reset()
Moves the read position back to the start of the Data Set (getKeyablePosition() moved back to -1)
|
void |
validateObservation(java.lang.String[] observations)
This method tests the array of observations being passed in and throws an exception if the String contains
any illegal characters.
|
public EDIDataReaderEngineImpl(HeaderBean header, SdmxBeanRetrievalManager beanRetrievalManager, java.util.List<EDIDataReader> ediDataReaders)
header
- beanRetrievalManager
- ediDataReaders
- public EDIDataReaderEngineImpl(HeaderBean header, DataflowBean dataflow, DataStructureBean dataStructureBean, java.util.List<EDIDataReader> ediDataReaders)
public EDIDataReaderEngineImpl(HeaderBean header, DataflowBean dataflowBean, DataStructureBean dataStructureBean, EDIDataReader ediDataReader)
public HeaderBean getHeader()
DataReaderEngine
getHeader
in interface DataReaderEngine
public DataReaderEngine createCopy()
DataReaderEngine
createCopy
in interface DataReaderEngine
public DataStructureBean getDataStructure()
DataReaderEngine
getDataStructure
in interface DataReaderEngine
public DataflowBean getDataFlow()
DataReaderEngine
getDataFlow
in interface DataReaderEngine
public ProvisionAgreementBean getProvisionAgreement()
DataReaderEngine
getProvisionAgreement
in interface DataReaderEngine
public DatasetHeaderBean getCurrentDatasetHeaderBean()
DataReaderEngine
getCurrentDatasetHeaderBean
in interface DataReaderEngine
public boolean isTimeSeries()
public java.lang.String getCrossSectionConcept()
public int getDatasetPosition()
DataReaderEngine
getDatasetPosition
in interface DataReaderEngine
public int getObsPosition()
DataReaderEngine
getObsPosition
in interface DataReaderEngine
public Keyable getCurrentKey()
DataReaderEngine
getCurrentKey
in interface DataReaderEngine
public java.util.List<KeyValue> getDatasetAttributes()
DataReaderEngine
getDatasetAttributes
in interface DataReaderEngine
public boolean moveNextDataset()
DataReaderEngine
moveNextDataset
in interface DataReaderEngine
public boolean moveNextKeyable()
DataReaderEngine
moveNextKeyable
in interface DataReaderEngine
public Observation getCurrentObservation()
DataReaderEngine
getCurrentObservation
in interface DataReaderEngine
public int getKeyablePosition()
DataReaderEngine
getKeyablePosition
in interface DataReaderEngine
public int getSeriesPosition()
DataReaderEngine
getSeriesPosition
in interface DataReaderEngine
public void validateObservation(java.lang.String[] observations)
observations
- public boolean moveNextObservation()
DataReaderEngine
moveNextObservation
in interface DataReaderEngine
public void reset()
DataReaderEngine
reset
in interface DataReaderEngine
public DATA_TYPE getDataType()
public void copyToOutputStream(java.io.OutputStream outputStream)
DataReaderEngine
copyToOutputStream
in interface DataReaderEngine
outputStream
- output stream to copy data topublic void close()
DataReaderEngine
close
in interface DataReaderEngine