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 Summary
Fields Modifier and Type Field Description static HashMap<String,List<Pattern>>DATE_TIME_FORMATSMapping of field datetime types to its list of valid datetime formats.
-
Constructor Summary
Constructors Constructor Description DateTimeValidator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisValid(gov.nasa.pds.label.object.FieldType type, String value)Checks to see if the given datetime value matches its defined data type.
-
-
-
Method Detail
-
isValid
public static boolean isValid(gov.nasa.pds.label.object.FieldType type, String value) throws ExceptionChecks 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
-
-