Class TimeValidator
java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.validate.TimeValidator
- All Implemented Interfaces:
ValueValidator
Validates time values.
- Author:
- Jens Riemschneider
-
Constructor Summary
ConstructorDescriptionInitializes a validator which will check that the timestamp has the right format without minimal length constraint.TimeValidator
(int minLen) Initializes a validator which will check that the timestamp has the right format and the given minimal length (to check the precision). -
Method Summary
-
Constructor Details
-
TimeValidator
public TimeValidator(int minLen) Initializes a validator which will check that the timestamp has the right format and the given minimal length (to check the precision).- Parameters:
minLen
- minimal length of the timestamp; "-1" means no check.
-
TimeValidator
public TimeValidator()Initializes a validator which will check that the timestamp has the right format without minimal length constraint.
-
-
Method Details
-
validate
Description copied from interface:ValueValidator
Validates the given value.- Specified by:
validate
in interfaceValueValidator
- Parameters:
time
- the value.- Throws:
XDSMetaDataException
- if the validation failed.
-