Class LabelValidationRule
- java.lang.Object
-
- gov.nasa.pds.tools.validate.rule.AbstractValidationRule
-
- gov.nasa.pds.tools.validate.rule.pds4.LabelValidationRule
-
- All Implemented Interfaces:
ValidationRule
,org.apache.commons.chain.Command
public class LabelValidationRule extends AbstractValidationRule
Implements a validation chain that validates PDS4 bundles. It is applicable if there is a bundle label in the root directory.
-
-
Constructor Summary
Constructors Constructor Description LabelValidationRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkLabelExtension()
Implements a rule that checks the label file extension.boolean
isApplicable(String location)
Tests whether a rule is applicable to a target location.void
validateLabel()
Parses the label and records any errors resulting from the parse, including schema and schematron errors.-
Methods inherited from class gov.nasa.pds.tools.validate.rule.AbstractValidationRule
execute, getCaption, getChildContext, getContext, getExtraTarget, getListener, getParentTarget, getRegistrar, getTarget, isDebugLogLevel, isInfoLogLevel, reportError, reportError, setCaption, verifyLidPrefix
-
-
-
-
Constructor Detail
-
LabelValidationRule
public LabelValidationRule() throws TransformerConfigurationException
-
-
Method Detail
-
isApplicable
public boolean isApplicable(String location)
Description copied from class:AbstractValidationRule
Tests whether a rule is applicable to a target location.- Specified by:
isApplicable
in interfaceValidationRule
- Specified by:
isApplicable
in classAbstractValidationRule
- Parameters:
location
- the target location- Returns:
- true, if the rule is applicable to the target, false otherwise
-
checkLabelExtension
@ValidationTest public void checkLabelExtension()
Implements a rule that checks the label file extension.
-
validateLabel
@ValidationTest public void validateLabel()
Parses the label and records any errors resulting from the parse, including schema and schematron errors.
-
-