Class RegisterLabelIdentifiers
java.lang.Object
gov.nasa.pds.tools.validate.rule.AbstractValidationRule
gov.nasa.pds.tools.validate.rule.pds4.RegisterLabelIdentifiers
- All Implemented Interfaces:
ValidationRule
,org.apache.commons.chain.Command
public class RegisterLabelIdentifiers extends AbstractValidationRule
Registers identifiers defined within a label, and verifies that
the same identifier is not registered twice.
-
Field Summary
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
Constructors Constructor Description RegisterLabelIdentifiers()
Creates a new instance. -
Method Summary
Modifier and Type Method Description boolean
isApplicable(String location)
Tests whether a rule is applicable to a target location.void
registerIdentifiers()
Tests that label identifiers are uniquely defined.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 Details
-
RegisterLabelIdentifiers
public RegisterLabelIdentifiers()Creates a new instance.
-
-
Method Details
-
isApplicable
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
-
registerIdentifiers
Tests that label identifiers are uniquely defined.- Throws:
XPathExpressionException
- if there is an error processing the XPath to the label logical identifier
-