/** * Create and add a default PDFA Identification schema to this metadata. * * This method return the created schema to enter information. * * @return schema added in order to work on it */ public PDFAIdentificationSchema createAndAddPFAIdentificationSchema() { PDFAIdentificationSchema pdfAId = new PDFAIdentificationSchema(this); pdfAId.setAboutAsSimple(""); addSchema(pdfAId); return pdfAId; }
/** * Set the PDF/A amendment identifier * * @param value * The amendment identifier value to set */ public void setAmd(String value) { TextType amd = createTextType(AMD, value); addProperty(amd); }
/** * Give the Conformance id * * @return conformance id value */ public String getConformance() { TextType tt = getConformanceProperty(); if (tt == null) { for (Attribute attribute : getAllAttributes()) { if (attribute.getName().equals(CONFORMANCE)) { return attribute.getValue(); } } return null; } else { return tt.getStringValue(); } }
/** * Set the PDFA Version identifier (with string) * * @param value * The version Id value to set * */ public void setPartValueWithString(String value) { IntegerType part = (IntegerType) instanciateSimple(PART, value); addProperty(part); }
pdfaSchema.setPart(1); pdfaSchema.setConformance("B");
pdfaid = new PDFAIdentificationSchema(xmp); if (ensurePDFisUpgraded) { try { pdfaid.setConformance(conformanceLevel.getLetter());// $NON-NLS-1$ //$NON-NLS-1$ } catch (BadFieldValueException ex) { pdfaid.setPart(3);
if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix())) ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(), PDFAIdentificationSchema.class.getName())); checkConformanceLevel(ve, id.getConformance()); checkPartNumber(ve, id.getPart() == null ? -1 : id.getPart()); return ve;
/** * Give the PDFA Amendment Id (as an String) * * @return Amendment Value */ public String getAmd() { TextType tmp = getAmdProperty(); if (tmp == null) { for (Attribute attribute : getAllAttributes()) { if (attribute.getName().equals(AMD)) { return attribute.getValue(); } } return null; } else { return tmp.getStringValue(); } }
/** * Set the PDF/A Version identifier * * @param part * set the PDF/A Version id property */ public void setPartProperty(IntegerType part) { addProperty(part); }
id.setPart(1); id.setConformance("B");
if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix())) ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(), PDFAIdentificationSchema.class.getName())); checkConformanceLevel(ve, id.getConformance()); checkPartNumber(ve, id.getPart() == null ? -1 : id.getPart()); return ve;
/** * Set the PDFA Version identifier (with an int) * * @param value * The version Id value to set */ public void setPartValueWithInt(int value) { IntegerType part = (IntegerType) instanciateSimple(PART, value); addProperty(part); }
/** * Give the PDFA Amendment Id (as an String) * * @return Amendment Value */ public String getAmd() { TextType tmp = getAmdProperty(); if (tmp == null) { for (Attribute attribute : getAllAttributes()) { if (attribute.getName().equals(AMD)) { return attribute.getValue(); } } return null; } else { return tmp.getStringValue(); } }
/** * Set the PDF/A amendment identifier * * @param amd * The amendment identifier property to set */ public void setAmdProperty(TextType amd) { addProperty(amd); }
pdfaSchema.setPart(1); pdfaSchema.setConformance("B");
if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix())) ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(), PDFAIdentificationSchema.class.getName())); checkConformanceLevel(ve, id.getConformance()); checkPartNumber(ve, id.getPart() == null ? -1 : id.getPart()); return ve;
/** * Set the PDF/A conformance level * * @param value * The conformance level value to set * @throws BadFieldValueException * If Conformance Value not 'A', 'B' or 'U' (PDF/A-2 and PDF/A-3) */ public void setConformance(String value) throws BadFieldValueException { if (value.equals("A") || value.equals("B") || value.equals("U")) { TextType conf = createTextType(CONFORMANCE, value); addProperty(conf); } else { throw new BadFieldValueException( "The property given not seems to be a PDF/A conformance level (must be A, B or U)"); } }
/** * Set the PDFA Version identifier (with an int) * * @param value * The version Id value to set */ public void setPartValueWithInt(int value) { IntegerType part = (IntegerType) instanciateSimple(PART, value); addProperty(part); }
/** * Create and add a default PDFA Identification schema to this metadata. * * This method return the created schema to enter information. * * @return schema added in order to work on it */ public PDFAIdentificationSchema createAndAddPFAIdentificationSchema() { PDFAIdentificationSchema pdfAId = new PDFAIdentificationSchema(this); pdfAId.setAboutAsSimple(""); addSchema(pdfAId); return pdfAId; }
/** * Give the Conformance id * * @return conformance id value */ public String getConformance() { TextType tt = getConformanceProperty(); if (tt == null) { for (Attribute attribute : getAllAttributes()) { if (attribute.getName().equals(CONFORMANCE)) { return attribute.getValue(); } } return null; } else { return tt.getStringValue(); } }