Class TimeSeriesProcessor<T extends TimeSeries<E,V>,E extends TimeSeriesEntry<V>,V extends Value>

java.lang.Object
edu.ie3.datamodel.io.processor.Processor<T>
edu.ie3.datamodel.io.processor.EntityProcessor<TimeSeries>
edu.ie3.datamodel.io.processor.timeseries.TimeSeriesProcessor<T,E,V>

public class TimeSeriesProcessor<T extends TimeSeries<E,V>,E extends TimeSeriesEntry<V>,V extends Value> extends EntityProcessor<TimeSeries>
  • Field Details

    • eligibleKeys

      public static final List<TimeSeriesProcessorKey> eligibleKeys
      List of all combinations of time series class, entry class and value class, this processor is able to handle
  • Constructor Details

    • TimeSeriesProcessor

      public TimeSeriesProcessor(Class<T> timeSeriesClass, Class<E> entryClass, Class<V> valueClass)
  • Method Details

    • handleEntity

      public Optional<LinkedHashMap<String,String>> handleEntity(TimeSeries entity)
      Description copied from class: EntityProcessor
      Standard call to handle an entity
      Overrides:
      handleEntity in class EntityProcessor<TimeSeries>
      Parameters:
      entity - the entity that should be 'serialized' into a map of fieldName to fieldValue
      Returns:
      an optional Map with fieldName to fieldValue or an empty optional if an error occurred during processing
    • handleTimeSeries

      public Set<LinkedHashMap<String,String>> handleTimeSeries(T timeSeries)
      Handles the time series by processing each entry and collecting the results
      Parameters:
      timeSeries - Time series to handle
      Returns:
      A set of mappings from field name to value
    • getHeaderElements

      public String[] getHeaderElements()
      Description copied from class: Processor
      Return all header elements of the table
      Overrides:
      getHeaderElements in class EntityProcessor<TimeSeries>
      Returns:
      all header elements of the table
    • getEligibleEntityClasses

      protected List<Class<? extends TimeSeries>> getEligibleEntityClasses()
      Description copied from class: Processor
      Returns a (unmodifiable) List of classes that this Processors is capable of processing
      Specified by:
      getEligibleEntityClasses in class Processor<TimeSeries>
      Returns:
      The unmodifiable List of eligible classes