Interface LabelledResultsCollector


public interface LabelledResultsCollector
Stores LabelledResultsVector as they are calculated, and writes to the file-system.
Author:
Owen Feehan
  • Method Details

    • add

      void add​(LabelledResultsVector results)
      Adds a results-element to be written.

      This should be called once for each set of results to be written.

      Parameters:
      results - the results.
    • flushAndClose

      void flushAndClose​(Optional<NamedFeatureStore<FeatureInputResults>> featuresAggregate, boolean includeGroups, Function<org.anchoranalysis.io.output.outputter.InputOutputContext,​FeatureCSVWriterFactory> csvWriterCreator, FeatureOutputMetadata outputMetadata, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.io.output.error.OutputWriteFailedException
      Writes any queued (but not yet written elements to the file-system), and closes open file-handles.

      This should be called once only after all calls to add(LabelledResultsVector) are completed.

      Parameters:
      featuresAggregate - aggregate-features.
      includeGroups - iff true a group-column is included in the CSV file and the group exports occur, otherwise not.
      csvWriterCreator - creates a CSV writer for a particular IO-context.
      outputMetadata - metadata for writing features to the file-system with CSV and other formats.
      context - input-output context.
      Throws:
      org.anchoranalysis.io.output.error.OutputWriteFailedException - if writing fails.