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 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.
-
-
-
Method Detail
-
isApplicable
public abstract boolean isApplicable(String location)
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
public String getCaption()
Description copied from interface:ValidationRule
Gets a caption describing the rule.- Specified by:
getCaption
in interfaceValidationRule
- Returns:
- a string caption
-
setCaption
public void setCaption(String caption)
Sets the caption for this chain.- Parameters:
caption
- the new caption string
-
-