Class DateTimeValidator


  • public class DateTimeValidator
    extends Object
    Class to validate datetime values.
    Author:
    mcayanan
    • Field Detail

      • DATE_TIME_FORMATS

        public static final HashMap<String,​List<String>> DATE_TIME_FORMATS
        Mapping of field datetime types to its list of valid datetime formats.
    • Constructor Detail

      • DateTimeValidator

        public DateTimeValidator()
    • Method Detail

      • isValid

        public static boolean isValid​(gov.nasa.pds.label.object.FieldType type,
                                      String value)
                               throws Exception
        Checks to see if the given datetime value matches its defined data type.
        Parameters:
        type - The datetime type.
        value - The value to check against.
        Returns:
        'true' if the value matches its data type. 'false' otherwise.
        Throws:
        Exception