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, frozenFields 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 StringgetCaption()Gets a caption describing the rule.abstract booleanisApplicable(String location)Tests whether a rule is applicable to a target location.voidsetCaption(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:ValidationRuleTests whether a rule is applicable to a target location.- Specified by:
isApplicablein 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:ValidationRuleGets a caption describing the rule.- Specified by:
getCaptionin interfaceValidationRule- Returns:
- a string caption
-
setCaption
Sets the caption for this chain.- Parameters:
caption- the new caption string
-