Package gov.nasa.pds.tools.validate.rule
Class AbstractValidationChain
java.lang.Object
org.apache.commons.chain.impl.ChainBase
gov.nasa.pds.tools.validate.rule.AbstractValidationChain
- All Implemented Interfaces:
ValidationRule
,org.apache.commons.chain.Chain
,org.apache.commons.chain.Command
- Direct Known Subclasses:
BundleValidationRule
,CollectionValidationRule
,DirectoryValidationRule
,DummyValidationChain
,LabelValidationChain
,StandardValidationChain
public abstract class AbstractValidationChain extends org.apache.commons.chain.impl.ChainBase implements ValidationRule
Implements a command chain that also implements
ValidationRule
,
so we can distinguish command chains that can be used for data
validation.-
Field Summary
Fields inherited from class org.apache.commons.chain.impl.ChainBase
commands, frozen
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
Constructors Constructor Description AbstractValidationChain()
-
Method Summary
Modifier and Type Method Description String
getCaption()
Gets a caption describing the rule.abstract boolean
isApplicable(String location)
Tests whether a rule is applicable to a target location.void
setCaption(String caption)
Sets the caption for this chain.Methods inherited from class org.apache.commons.chain.impl.ChainBase
addCommand, execute
-
Constructor Details
-
AbstractValidationChain
public AbstractValidationChain()
-
-
Method Details
-
isApplicable
Description copied from interface:ValidationRule
Tests whether a rule is applicable to a target location.- Specified by:
isApplicable
in interfaceValidationRule
- Parameters:
location
- the target location to validate- Returns:
- true, if the rule is applicable to the target, false otherwise
-
getCaption
Description copied from interface:ValidationRule
Gets a caption describing the rule.- Specified by:
getCaption
in interfaceValidationRule
- Returns:
- a string caption
-
setCaption
Sets the caption for this chain.- Parameters:
caption
- the new caption string
-