/*
   * (non-Javadoc)
   *
   * @see net.awl.edoc.pdfa.validation.graphics.color.ColorSpaceHelper#validate(java .util.List)
   */
  @Override
  public final void validate() throws ValidationException {
    if (pdcs == null) {
      throw new ValidationException("Unable to create a PDColorSpace with the value null");
    }

    this.iccpw = ICCProfileWrapper.getOrSearchICCProfile(context);
    processAllColorSpace(pdcs);
  }
 /** Method called by the processAllColorSpace if the ColorSpace to check is DeviceCYMK. */
 protected void processCYMKColorSpace(PDColorSpace colorSpace) {
   if (!processDefaultColorSpace(colorSpace)) {
     if (iccpw == null) {
       context.addValidationError(
           new ValidationError(
               ERROR_GRAPHIC_INVALID_COLOR_SPACE_MISSING, "DestOutputProfile is missing"));
     } else if (!iccpw.isCMYKColorSpace()) {
       context.addValidationError(
           new ValidationError(
               ERROR_GRAPHIC_INVALID_COLOR_SPACE_CMYK, "DestOutputProfile isn't CMYK ColorSpace"));
     }
   }
 }