Class JsonAdamsExperimentReader

  • 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 JsonAdamsExperimentReader
    extends AbstractAdamsExperimentReader
    Reads ADAMS Experiments in JSON format.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • JsonAdamsExperimentReader

        public JsonAdamsExperimentReader()
    • 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 AbstractAdamsExperimentReader
        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 AbstractAdamsExperimentReader
        Returns:
        the extension (without the dot!)
      • doRead

        protected AbstractExperiment doRead​(adams.core.io.PlaceholderFile file)
        Performs the actual reading of the experiment file.
        Specified by:
        doRead in class AbstractAdamsExperimentReader
        Parameters:
        file - the file to read
        Returns:
        the experiment, null if failed to read