Class FeatureStreamMultipleCSVReader

java.lang.Object
es.upm.fi.cig.multictbnc.data.reader.FeatureStreamMultipleCSVReader

public class FeatureStreamMultipleCSVReader extends Object
Class responsible for reading multiple CSV files representing a feature stream.
  • 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 stream
      currentDataset - current dataset to which feature variables will be added
      nameTimeVariable - name of the time variable
  • Method Details

    • getNameLastFeatureReceived

      public String getNameLastFeatureReceived()
      Retrieves the name of the last feature variable received from the feature stream.
      Returns:
      name of the last feature variable received
    • readCompleteDataset

      public Dataset readCompleteDataset() throws UnreadDatasetException, FileNotFoundException
      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 dataset
      FileNotFoundException - 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 dataset
      FileNotFoundException - if the dataset file is not found