Class Experiment

All Implemented Interfaces:
AssociateXMLUponLoad
Direct Known Subclasses:
OutputExperiment

public abstract class Experiment extends AnchorBean<Experiment> implements AssociateXMLUponLoad
A base class for a type of task that produces some kind of result of interest.

It is an atomic unit of execution in the Anchor framework in many contexts.

Author:
Owen Feehan
  • Constructor Details

    • Experiment

      public Experiment()
  • Method Details

    • executeExperiment

      public abstract Optional<Path> executeExperiment(ExecutionArguments arguments) throws ExperimentExecutionException
      Executes the experiment.
      Parameters:
      arguments - arguments that may influence how the experiment is run.
      Returns:
      the path files written into as output, if such a path exists.
      Throws:
      ExperimentExecutionException - if an error occurs executing the experiment.
    • getXMLConfiguration

      public org.apache.commons.configuration.XMLConfiguration getXMLConfiguration()
      The configuration of experiment serialized into XML form.
      Returns:
      the internal XML-representation that has been associated with the experiment.
    • associateXML

      public void associateXML(org.apache.commons.configuration.XMLConfiguration xmlConfiguration)
      Description copied from interface: AssociateXMLUponLoad
      Associated an XML configuration with an object.
      Specified by:
      associateXML in interface AssociateXMLUponLoad
      Parameters:
      xmlConfiguration - the xml-configuration to associate with an object.
    • useDetailedLogging

      public abstract boolean useDetailedLogging()
      Whether to log in more or less detail.

      It's appropriate to perform more detailed logging for a lengthier experiment, but something quick and simple is preferable for a short job, which may only be outputted to the console.

      Returns:
      true iff detailed logging should be employed.