Class DualMarksAnnotationWriter<T>

Object
DualMarksAnnotationWriter<T>
Type Parameters:
T - rejection-reason
All Implemented Interfaces:
AnnotationWriter<DualMarksAnnotation<T>>

public class DualMarksAnnotationWriter<T> extends Object implements AnnotationWriter<DualMarksAnnotation<T>>
Writes DualMarksAnnotations to the file-system.

Different paths are used when the annotations are considered finished or unfinished.

Author:
Owen Feehan
  • Constructor Details

    • DualMarksAnnotationWriter

      public DualMarksAnnotationWriter()
    • DualMarksAnnotationWriter

      public DualMarksAnnotationWriter(boolean disablePathModification)
      Creates a new DualMarksAnnotationWriter instance.
      Parameters:
      disablePathModification - If true, always use file-paths as if they were finished.
  • Method Details

    • write

      public void write(DualMarksAnnotation<T> annotation, Path path) throws IOException
      Description copied from interface: AnnotationWriter
      Saves the annotation to the filesystem.
      Specified by:
      write in interface AnnotationWriter<T>
      Parameters:
      annotation - the annotation to save.
      path - the path to write to (or a slightly-modified path is derived from this).
      Throws:
      IOException - if the annotation fails to write successfully.