Interface ElementWriter<T>

Type Parameters:
T - the type of element to be written
All Known Subinterfaces:
Generator<T>, MultipleFileTypeGenerator<T>, TransformingGenerator<T,S>
All Known Implementing Classes:
AnnotationAggregateCSVGenerator, AssignmentGenerator, ChannelGenerator, CollectionGenerator, CombinedListGenerator, CSVGenerator, DictionaryGenerator, DisplayStackGenerator, DrawCroppedObjectsGenerator, DrawObjectOnStackGenerator, DrawObjectsGenerator, ExtractBoundingBoxAreaFromStackGenerator, FeatureTableCSVGenerator, FlattenStackGenerator, GeneratorBridge, HDF5ObjectsGenerator, HistogramCSVGenerator, ObjectAsMaskGenerator, ObjectOutputStreamGenerator, ObjectsAsGrayscaleGenerator, ObjectsAsRGBGenerator, ObjectsAsUniqueValueGenerator, ObjectsMergedAsMaskGenerator, ObjectWithBoundingBoxGenerator, OneStageGenerator, RasterGenerator, RasterGeneratorBridge, RasterGeneratorDelegateToDisplayStack, RasterGeneratorDelegateToRaster, RasterGeneratorSelectFormat, SerializedGenerator, SingleFileTypeGenerator, SingleFileTypeGeneratorBridge, StackGenerator, StringGenerator, TransformingGeneratorBridge, XMLGenerator, XStreamGenerator

public interface ElementWriter<T>
Writes an element (with or without an index) to the file system.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(T element, OutputNameStyle outputNameStyle, ElementOutputter outputter)
    Writes a non-indexable output (an output that isn't part of a collection of other similar items).
    void
    writeWithIndex(T element, String index, IndexableOutputNameStyle outputNameStyle, ElementOutputter outputter)
    Writes an indexable output (many outputs of the same type, uniquely identified by an index).
  • Method Details

    • write

      void write(T element, OutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
      Writes a non-indexable output (an output that isn't part of a collection of other similar items).
      Parameters:
      element - the element to write.
      outputNameStyle - how to write output-names.
      outputter - how the element is outputted.
      Throws:
      OutputWriteFailedException - if the write operation fails.
    • writeWithIndex

      void writeWithIndex(T element, String index, IndexableOutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
      Writes an indexable output (many outputs of the same type, uniquely identified by an index).
      Parameters:
      element - the element to write.
      index - a string that uniquely identifies this element compared to others in the same write operation.
      outputNameStyle - how to write output-names.
      outputter - how the element is outputted.
      Throws:
      OutputWriteFailedException - if the write operation fails.