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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractValidationChain

      public AbstractValidationChain()
  • Method Details

    • 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 interface ValidationRule
      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 interface ValidationRule
      Returns:
      a string caption
    • setCaption

      public void setCaption​(String caption)
      Sets the caption for this chain.
      Parameters:
      caption - the new caption string