Examples of XMPDocumentBuilder


Examples of org.apache.padaf.xmpbox.parser.XMPDocumentBuilder

  public void testIsartorStyle() throws Exception {

    InputStream fis = XMPDocumentBuilder.class
        .getResourceAsStream("isartorStyleXMPOK.xml");

    XMPDocumentBuilder xdb = new XMPDocumentBuilder();

    XMPMetadata metadata = xdb.parse(fis);
    // <xmpMM:DocumentID>
    Assert.assertEquals("uuid:09C78666-2F91-3A9C-92AF-3691A6D594F7",
        metadata.getXMPMediaManagementSchema().getDocumentIDValue());

    // <xmp:CreateDate>
View Full Code Here

Examples of org.apache.padaf.xmpbox.parser.XMPDocumentBuilder

  @Test
  public void testAltBagSeq() throws Exception {
    InputStream fis = XMPDocumentBuilder.class
        .getResourceAsStream("AltBagSeqTest.xml");

    XMPDocumentBuilder xdb = new XMPDocumentBuilder();

    xdb.parse(fis);
    // XMPMetadata metadata=xdb.parse(fis);
    // SaveMetadataHelper.serialize(metadata, true, System.out);
  }
View Full Code Here

Examples of org.apache.padaf.xmpbox.parser.XMPDocumentBuilder

  public void testIsartorStyleWithThumbs() throws Exception {

    InputStream fis = XMPDocumentBuilder.class
        .getResourceAsStream("ThumbisartorStyle.xml");

    XMPDocumentBuilder xdb = new XMPDocumentBuilder();

    XMPMetadata metadata = xdb.parse(fis);

    // <xmpMM:DocumentID>
    Assert.assertEquals("uuid:09C78666-2F91-3A9C-92AF-3691A6D594F7",
        metadata.getXMPMediaManagementSchema().getDocumentIDValue());
View Full Code Here

Examples of org.apache.padaf.xmpbox.parser.XMPDocumentBuilder

      throws ValidationException {
    try {
      PDDocument document = handler.getDocument();

      byte[] tmp = getXpacket(document.getDocument());
      XMPDocumentBuilder builder;
    try {
    builder = new XMPDocumentBuilder();
    builder.addPreprocessor(new PDFAExtentionSchemaPreprocessor());
    } catch (XmpSchemaException e1) {
      throw new ValidationException(e1.getMessage(), e1);
    }
      XMPMetadata metadata;
      try {
        metadata = builder.parse(tmp);
        handler.setMetadata(metadata);
      } catch (XmpSchemaException e) {
        throw new ValidationException(
            "Parser: Internal Problem (failed to instanciate Schema object)", e);
      } catch (XmpXpacketEndException e) {
View Full Code Here

Examples of org.apache.padaf.xmpbox.parser.XMPDocumentBuilder

            + e.getMessage(), e);
      }

      try {

        XMPDocumentBuilder xmpBuilder = new XMPDocumentBuilder();
        XMPMetadata xmpMeta = xmpBuilder.parse(mdAsBytes);

        FontMetaDataValidation fontMDval = new FontMetaDataValidation();
        List<ValidationError> ve = new ArrayList<ValidationError>();
        boolean isVal = fontMDval.analyseFontName(xmpMeta, fontDesc, ve);
        isVal = isVal & fontMDval.analyseRights(xmpMeta, fontDesc, ve);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.