class PidValidator implements ValueValidator {

    @Override
    public void validate(String value) throws XDSMetaDataException {
        notNull(value, "value cannot be null");
        
        Matcher matcher = PID_PATTERN.matcher(value);
        metaDataAssert(matcher.matches(), INVALID_PID, value);
                
        int number = Integer.parseInt(matcher.group(1));
        metaDataAssert(number != 2 && number != 4 && number != 12 && number != 19,
                UNSUPPORTED_PID, value);
    }

}