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 implementsValidationRule, so we can distinguish command chains that can be used for data validation.
-
-
Constructor Summary
Constructors Constructor Description AbstractValidationChain()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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.
-
-
-
Method Detail
-
isApplicable
public abstract boolean isApplicable(String location)
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
public String getCaption()
Description copied from interface:ValidationRuleGets a caption describing the rule.- Specified by:
getCaptionin interfaceValidationRule- Returns:
- a string caption
-
setCaption
public void setCaption(String caption)
Sets the caption for this chain.- Parameters:
caption- the new caption string
-
-