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 Summary
Constructors Constructor Description Experiment() -
Method Summary
Modifier and Type Method Description voidassociateXML(org.apache.commons.configuration.XMLConfiguration xmlConfiguration)abstract Optional<Path>executeExperiment(ExecutionArguments arguments)Executes the experiment.org.apache.commons.configuration.XMLConfigurationgetXMLConfiguration()The configuration of experiment serialized into XML form.abstract booleanuseDetailedLogging()Whether to log in more or less detail.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Experiment
public Experiment()
-
-
Method Details
-
executeExperiment
public abstract Optional<Path> executeExperiment(ExecutionArguments arguments) throws ExperimentExecutionExceptionExecutes 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)- Specified by:
associateXMLin interfaceAssociateXMLUponLoad
-
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.
-