Exemplo n.º 1
0
  /**
   * Test typical Acrobat CS3 metadata
   *
   * @throws Exception Forwards exceptions to JUnit
   */
  public void testAcrobatS3() throws Exception {
    XMPMeta xmp = XMPMetaFactory.parse(getTestFilestream("XMPApplicationDataTest_AcrobatCS3.xmp"));
    assertNotNull(xmp);

    log(xmp.dumpObject());

    compareReferenceAndResult("XMPApplicationDataTest_AcrobatCS3.txt", xmp.dumpObject());
  }
Exemplo n.º 2
0
  /**
   * Test typical Indesign CS3 metadata
   *
   * @throws Exception Forwards exceptions to JUnit
   */
  @Ignore("todo: Import the latest changes to enable the below test case.")
  public void itestIndesignCS3() throws Exception {
    XMPMeta xmp = XMPMetaFactory.parse(getTestFilestream("XMPApplicationDataTest_IndesignCS3.xmp"));
    assertNotNull(xmp);

    log(xmp.dumpObject());

    compareReferenceAndResult("XMPApplicationDataTest_IndesignCS3.txt", xmp.dumpObject());
  }
Exemplo n.º 3
0
 @Override
 public void process(final Directory directory, final Map<String, Object> metadata) {
   final XmpDirectory xmpDir = (XmpDirectory) directory;
   final XMPMeta xmp = xmpDir.getXMPMeta();
   try {
     final String documentId = xmp.getPropertyString(XMPNodeUtils.NS_XMP_MM, "DocumentID");
     metadata.put(XMP_DOCUMENT_ID, documentId);
   } catch (final XMPException e) {
     LOGGER.warn("Could not read xmpDocumentID", e);
   }
 }
Exemplo n.º 4
0
  public void testBadInputDoesArrayItemExist3() throws Exception {
    assertFalse(meta.doesArrayItemExist("", "", -1));

    // expectException(meta, "doesArrayItemExist", new Class[] {
    // String.class, String.class,
    // Integer.TYPE }, new Object[] { "", "", new Integer(-1) },
    // XMPConst.ERR_BADPARAM, "Empty array name");
  }
Exemplo n.º 5
0
  public void testBadInputDoesArrayItemExist1() throws Exception {
    assertFalse(meta.doesArrayItemExist("", "arrayPropSmall", 1));

    // expectException(meta, "doesArrayItemExist", new Class[] {
    // String.class, String.class,
    // Integer.TYPE }, new Object[] { "", "arrayPropSmall", new Integer(1)
    // },
    // XMPConst.ERR_BADPARAM, "Empty schema namespace URI");
  }