Class FieldValueValidator


  • public class FieldValueValidator
    extends Object
    Class that performs content validation on the field values of a given record.
    Author:
    mcayanan
    • Constructor Detail

      • FieldValueValidator

        public FieldValueValidator​(ProblemListener listener,
                                   RuleContext context)
        Constructor.
        Parameters:
        target - The label.
        dataFile - The data file.
    • Method Detail

      • validate

        public void validate​(gov.nasa.pds.label.object.TableRecord record,
                             gov.nasa.pds.label.object.FieldDescription[] fields)
                      throws FieldContentFatalException
        Validates the field values in the given record.
        Parameters:
        record - The record containing the fields to validate.
        fields - An array of the field descriptions.
        Throws:
        FieldContentFatalException
      • validate

        public void validate​(gov.nasa.pds.label.object.TableRecord record,
                             gov.nasa.pds.label.object.FieldDescription[] fields,
                             boolean checkFieldFormat)
                      throws FieldContentFatalException
        Validates the field values in the given record.
        Parameters:
        record - The record containing the fields to validate.
        fields - An array of the field descriptions.
        checkFieldFormat - A flag to determine whether to check the field values against its specified field format, if present in the label.
        Throws:
        FieldContentFatalException