Class Experiment
- All Implemented Interfaces:
AssociateXMLUponLoad
- Direct Known Subclasses:
OutputExperiment
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
associateXML
(org.apache.commons.configuration.XMLConfiguration xmlConfiguration) Associated an XML configuration with an object.executeExperiment
(ExecutionArguments arguments) Executes the experiment.org.apache.commons.configuration.XMLConfiguration
The configuration of experiment serialized into XML form.abstract boolean
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 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 interfaceAssociateXMLUponLoad
- 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.
-