Package org.apache.padaf.preflight.xmp

Examples of org.apache.padaf.preflight.xmp.XpacketParsingException


    if (cb == null) {
      // missing Metadata Key in catalog
      ValidationError error = new ValidationError(
          ValidationConstants.ERROR_METADATA_FORMAT,
          "Missing Metadata Key in catalog");
      throw new XpacketParsingException("Failed while retrieving xpacket",
          error);
    }
    // no filter key
    COSDictionary metadataDictionnary = COSUtils.getAsDictionary(cb, cdocument);
    if (metadataDictionnary.getItem(COSName.FILTER) != null) {
      // should not be defined
      ValidationError error = new ValidationError(
          ValidationConstants.ERROR_SYNTAX_STREAM_INVALID_FILTER,
          "Filter specified in metadata dictionnary");
      throw new XpacketParsingException("Failed while retrieving xpacket",
          error);
    }

    PDStream stream = PDStream.createFromCOS(metadataDictionnary);
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

TOP

Related Classes of org.apache.padaf.preflight.xmp.XpacketParsingException

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.