Class SingleFileInputBase

Object
SingleFileInputBase
All Implemented Interfaces:
InputFromManager
Direct Known Subclasses:
FileInput, FileWithDirectoryInput, ImageMetadataInput

public abstract class SingleFileInputBase extends Object implements InputFromManager
A base class for inputs that refer to a single file.
Author:
Owen Feehan
  • Constructor Details

    • SingleFileInputBase

      protected SingleFileInputBase(NamedFile file)
      Creates for a particular file.
      Parameters:
      file - the file, with an associated name.
  • Method Details

    • identifier

      public String identifier()
      Description copied from interface: InputFromManager
      A unique name associated with the input.

      The name should never begin with or end with whitespace.

      It should never contain backslashes, but forward-slashes are permitted.

      Specified by:
      identifier in interface InputFromManager
      Returns:
      a string uniquely (in the current dataset) identifying the input in a meaningful way.
    • pathForBinding

      public Optional<Path> pathForBinding()
      Description copied from interface: InputFromManager
      A path to a file from which this input originated.

      This path is not guaranteed to be unique for each input i.e. multiple inputs may originate from the same path.

      Specified by:
      pathForBinding in interface InputFromManager
      Returns:
      the primary path associated with the input, if it exists.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFile

      public File getFile()
      The associated single file.
      Returns:
      the file, as used internally.