Class DateTimeValidator

java.lang.Object
gov.nasa.pds.tools.validate.rule.pds4.DateTimeValidator

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

    • 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 Details

    • DateTimeValidator

      public DateTimeValidator()
  • Method Details

    • 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