Class AbstractAdamsExperimentWriter

    • Constructor Detail

      • AbstractAdamsExperimentWriter

        public AbstractAdamsExperimentWriter()
    • Method Detail

      • getFormatDescription

        public abstract String getFormatDescription()
        Returns a string describing the format (used in the file chooser).
        Specified by:
        getFormatDescription in interface FileFormatHandler
        Returns:
        a description suitable for displaying in the file chooser
      • getFormatExtensions

        public abstract String[] getFormatExtensions()
        Returns the extension(s) of the format.
        Specified by:
        getFormatExtensions in interface FileFormatHandler
        Returns:
        the extension (without the dot!)
      • getCorrespondingReader

        public abstract AbstractAdamsExperimentReader getCorrespondingReader()
        Returns, if available, the corresponding reader.
        Returns:
        the reader, null if none available
      • isAvailable

        public boolean isAvailable()
        Returns whether the writer is actually available.
        Returns:
        true if available and ready to use
      • check

        protected void check​(AbstractExperiment exp)
        Performs checks.
        Parameters:
        exp - the experiment to check
      • doWrite

        protected abstract String doWrite​(PlaceholderFile file,
                                          AbstractExperiment exp)
        Performs the actual writing of the experiment file.
        Parameters:
        file - the file to write to
        exp - the experiment to write
        Returns:
        null if successfully written, otherwise error message
      • write

        public String write​(PlaceholderFile file,
                            AbstractExperiment exp)
        Writes the experiment file.
        Parameters:
        file - the file to write to
        exp - the experiment to write
        Returns:
        null if successfully written, otherwise error message
      • getWriters

        public static Class[] getWriters()
        Returns a list with classes of writers.
        Returns:
        the writer classes