code: public final void validate() throws ValidationException {
          super.validate();
  
          final Parameter relParam = getParameter(Parameter.RELATED);
          final Parameter valueParam = getParameter(Parameter.VALUE);
  
          if (relParam != null || !Value.DATE_TIME.equals(valueParam)) {
  
              ParameterValidator.getInstance().assertOneOrLess(Parameter.RELATED,
                      getParameters());
  
              ParameterValidator.getInstance().assertNullOrEqual(Value.DURATION,
                      getParameters());
  
              if (getDuration() == null) {
                  throw new ValidationException("Duration value not specified");
              }
          } else {
              ParameterValidator.getInstance().assertOne(Parameter.VALUE,
                      getParameters());
  
              ParameterValidator.getInstance().assertNullOrEqual(Value.DATE_TIME,
                      getParameters());
  
              if (getDateTime() == null) {
                  throw new ValidationException("DATE-TIME value not specified");
              }
          }
      }
docs: {@inheritDoc}