Module es.upm.fi.cig.multictbnc
Class FeatureStreamMultipleCSVReader
java.lang.Object
es.upm.fi.cig.multictbnc.data.reader.FeatureStreamMultipleCSVReader
Class responsible for reading multiple CSV files representing a feature stream.
-
Constructor Summary
ConstructorDescriptionFeatureStreamMultipleCSVReader
(String pathFeatureStream, Dataset currentDataset, String nameTimeVariable) Constructs a FeatureStreamMultipleCSVReader with the specified path to the feature stream, a current dataset and the name of the time variable. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the name of the last feature variable received from the feature stream.boolean
Checks whether there is more feature data arriving in the feature stream.Reads the complete feature stream to generate a static dataset.Reads a new feature variable from the feature stream and adds it to the current dataset.
-
Constructor Details
-
FeatureStreamMultipleCSVReader
public FeatureStreamMultipleCSVReader(String pathFeatureStream, Dataset currentDataset, String nameTimeVariable) Constructs a FeatureStreamMultipleCSVReader with the specified path to the feature stream, a current dataset and the name of the time variable.- Parameters:
pathFeatureStream
- path to the feature streamcurrentDataset
- current dataset to which feature variables will be addednameTimeVariable
- name of the time variable
-
-
Method Details
-
getNameLastFeatureReceived
Retrieves the name of the last feature variable received from the feature stream.- Returns:
- name of the last feature variable received
-
readCompleteDataset
Reads the complete feature stream to generate a static dataset. It iterates through the feature stream, reading individual datasets until no more data is arriving.- Returns:
- generated static dataset
- Throws:
UnreadDatasetException
- if there is an issue reading the datasetFileNotFoundException
- if the dataset file is not found
-
isDataArriving
public boolean isDataArriving()Checks whether there is more feature data arriving in the feature stream.- Returns:
true
if there is more data arriving,false
otherwise
-
readDataset
Reads a new feature variable from the feature stream and adds it to the current dataset.- Returns:
- current dataset with the new feature variable added
- Throws:
UnreadDatasetException
- if there is an issue reading the datasetFileNotFoundException
- if the dataset file is not found
-