Package org.apache.padaf.preflight

Examples of org.apache.padaf.preflight.ValidationException


//      System.out.println("DECODED EEXEC : ");
//      System.out.println(new String(decryptedEexec));

      parseDecodedEexec(decryptedEexec);
    } catch (IOException e) {
      throw new ValidationException("Unable to compute the eexec portion : "
          + e.getMessage(), e);
    }
  }
View Full Code Here


        // ---- add the token and the Space character length
        readBytes += (token.length + 1);
      }

    } catch (IOException e) {
      throw new ValidationException("Unable to read the clear text : "
          + e.getMessage(), e);
    }
  }
View Full Code Here

        } else {
          exploreOutlineLevel(outlineHierarchy.getFirstChild(), handler, result);
        }
      }
    } else {
      throw new ValidationException(
          "There are no Catalog entry in the Document.");
    }
    return result;
  }
View Full Code Here

      break;
    case DICTIONARY_PATTERN_SHADING:
      validator = new ShadingPattern(handler, cosPattern);
      break;
    default:
      throw new ValidationException("Unkown pattern type : " + ptype);
    }

    return validator.validate();
  }
View Full Code Here

    } else if (XOBJECT_DICTIONARY_VALUE_SUBTYPE_FORM.equals(subtype)) {
      xObjVal = new XObjFormValidator(handler, dic);
    } else if (XOBJECT_DICTIONARY_VALUE_SUBTYPE_POSTSCRIPT.equals(subtype)) {
      xObjVal = new XObjPostscriptValidator(handler, dic);
    } else {
      throw new ValidationException("Invalid XObject subtype");
    }

    return xObjVal.validate();
  }
View Full Code Here

      if (acroForm != null) {
        checkNeedAppearences(handler, acroForm, result);
        try {
          exploreFields(handler, acroForm.getFields(), result);
        } catch (IOException e) {
          throw new ValidationException("Unable to get the list of fields : "
              + e.getMessage(), e);
        }
      }
    } else {
      throw new ValidationException(
          "There are no Catalog entry in the Document.");
    }

    return result;
  }
View Full Code Here

      validateActions(handler, catalog, result);
      validateLang(handler, catalog, result);
      validateNames(handler, catalog, result);
      validateOCProperties(handler, catalog, result);
    } else {
      throw new ValidationException(
          "There are no Catalog entry in the Document.");
    }

    // ---- Check OutputIntent to know the ICC Profile
    result.addAll(validateOutputIntent(handler));
View Full Code Here

    } catch (IllegalArgumentException e) {
      // ---- this is not a ICC_Profile
      return new ValidationError(
          ERROR_GRAPHIC_OUTPUT_INTENT_ICC_PROFILE_INVALID, "DestOutputProfile isn't a ICCProfile");
    } catch (IOException e) {
      throw new ValidationException("Unable to parse the ICC Profile", e);
    }

    return null;
  }
View Full Code Here

    valConfig = cfg;

    try {
      this.actionFact = cfg.getActionFact().newInstance();
    } catch ( IllegalAccessException e) {
      throw new ValidationException("Unable to instatiate action factory : " + e.getMessage(), e);
    } catch ( InstantiationException e) {
      throw new ValidationException("Unable to instatiate action factory : " + e.getMessage(), e);
    }
   
    try {
      this.annotFact = cfg.getAnnotFact().newInstance();
      this.annotFact.setActionFact(this.actionFact);
    } catch ( IllegalAccessException e) {
      throw new ValidationException("Unable to instatiate annotation factory : " + e.getMessage(), e);
    } catch ( InstantiationException e) {
      throw new ValidationException("Unable to instatiate annotation factory : " + e.getMessage(), e);     
    }

  }
View Full Code Here

   * @throws ValidationException
   */
  protected void checkHandler(DocumentHandler handler)
      throws ValidationException {
    if (handler == null) {
      throw new ValidationException("DocumentHandler can't be null");
    }
    if (!handler.isComplete()) {
      throw new ValidationException("DocumentHandler error : missing element");
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.padaf.preflight.ValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.