public class ExperimentStructure extends PathPrefixer
PathPrefixer
that combines a prefix with an experimentType
.
A convenience method for commonly used prefixer settings when the output occurs in an experiment/$1/
filesystem structure where $1
is the experimentType
.
Constructor and Description |
---|
ExperimentStructure() |
Modifier and Type | Method and Description |
---|---|
void |
checkMisconfigured(BeanInstanceMap defaultInstances)
Checks that a bean's properties conform to expectations.
|
RootedExperiment |
getExperiment() |
String |
getPrefix() |
RegEx |
getRegEx() |
DirectoryWithPrefix |
outFilePrefix(NamedPath path,
Optional<String> experimentIdentifier,
PathPrefixerContext context)
Provides a prefix which can be prepended to all output files.
|
DirectoryWithPrefix |
rootDirectoryPrefix(Optional<String> experimentIdentifier,
PathPrefixerContext context)
Provides a prefix that becomes the root-folder.
|
void |
setExperiment(RootedExperiment experiment) |
void |
setPrefix(String prefix) |
void |
setRegEx(RegEx regEx) |
resolvePath, resolvePath
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
AnchorBean
checkMisconfigured
in class AnchorBean<PathPrefixer>
defaultInstances
- all available default instances if the DefaultInstance
annotation is usedBeanMisconfiguredException
- if the bean has not been configured properly as XMLpublic DirectoryWithPrefix outFilePrefix(NamedPath path, Optional<String> experimentIdentifier, PathPrefixerContext context) throws PathPrefixerException
PathPrefixer
outFilePrefix
in class PathPrefixer
path
- an input to derive a prefix fromexperimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.PathPrefixerException
public DirectoryWithPrefix rootDirectoryPrefix(Optional<String> experimentIdentifier, PathPrefixerContext context) throws PathPrefixerException
PathPrefixer
rootDirectoryPrefix
in class PathPrefixer
experimentIdentifier
- if defined, an identifier for the experiment, to be included in
the directory root.PathPrefixerException
public RootedExperiment getExperiment()
public void setExperiment(RootedExperiment experiment)
public RegEx getRegEx()
public void setRegEx(RegEx regEx)
public String getPrefix()
public void setPrefix(String prefix)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.