Package org.apache.padaf.xmpbox

Examples of org.apache.padaf.xmpbox.XMPMetadata$SchemasContainer


  protected XMPMetadata metadata;

  @Before
  public void init() throws Exception {
    metadata = new XMPMetadata();

  }
View Full Code Here


  protected Document parent;
  protected XMPSchema tmp, tmp2;

  @Before
  public void init() throws Exception {
    metadata = new XMPMetadata();
    String tmpNsURI = "http://www.test.org/schem/";
    tmp = new XMPSchema(metadata, "test", tmpNsURI);
    tmp.addBagValue("test:BagContainer", "Value1");
    tmp.addBagValue("test:BagContainer", "Value2");
    tmp.addBagValue("test:BagContainer", "Value3");
View Full Code Here

  }

  @Test
  public void testInitMetaDataWithInfo() throws Exception {
    String xpacketBegin = "TESTBEG", xpacketId = "TESTID", xpacketBytes = "TESTBYTES", xpacketEncoding = "TESTENCOD";
    metadata = new XMPMetadata(xpacketBegin, xpacketId, xpacketBytes,
        xpacketEncoding);
    Assert.assertEquals(xpacketBegin, metadata.getXpacketBegin());
    Assert.assertEquals(xpacketId, metadata.getXpacketId());
    Assert.assertEquals(xpacketBytes, metadata.getXpacketBytes());
    Assert.assertEquals(xpacketEncoding, metadata.getXpacketEncoding());
View Full Code Here

    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) {
        throw new ValidationException("Unable to parse font metadata due to : "
            + e.getMessage(), e);
      }
      List<ValidationError> lve = new ArrayList<ValidationError>();

      // 6.7.5 no deprecated attribute in xpacket processing instruction
      if (metadata.getXpacketBytes() != null) {
        lve.add(new ValidationError(
            ValidationConstants.ERROR_METADATA_XPACKET_DEPRECATED,
            "bytes attribute is forbidden"));
      }
      if (metadata.getXpacketEncoding() != null) {
        lve.add(new ValidationError(
            ValidationConstants.ERROR_METADATA_XPACKET_DEPRECATED,
            "encoding attribute is forbidden"));
      }
View Full Code Here

      }

      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

Related Classes of org.apache.padaf.xmpbox.XMPMetadata$SchemasContainer

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.