Class JsonAdamsExperimentWriter

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.io.FileFormatHandler, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, Serializable

    public class JsonAdamsExperimentWriter
    extends AbstractAdamsExperimentWriter
    Writes ADAMS experiments in JSON format. Does not store the results.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • JsonAdamsExperimentWriter

        public JsonAdamsExperimentWriter()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • getFormatDescription

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

        public String[] getFormatExtensions()
        Returns the extension(s) of the format.
        Specified by:
        getFormatExtensions in interface adams.core.io.FileFormatHandler
        Specified by:
        getFormatExtensions in class AbstractAdamsExperimentWriter
        Returns:
        the extension (without the dot!)
      • doWrite

        protected String doWrite​(adams.core.io.PlaceholderFile file,
                                 AbstractExperiment exp)
        Performs the actual writing of the experiment file.
        Specified by:
        doWrite in class AbstractAdamsExperimentWriter
        Parameters:
        file - the file to write to
        exp - the experiment to write
        Returns:
        null if successfully written, otherwise error message