@@ -51,6 +51,10 @@ public class PDFAIdentificationSchema extends XMPSchema
5151 @ PropertyType (type = Types .Text , card = Cardinality .Simple )
5252 public static final String CONFORMANCE = "conformance" ;
5353
54+ // PDFBOX-6088 https://pdfa.org/future-proofing-xmp-identification-schema/
55+ @ PropertyType (type = Types .Integer , card = Cardinality .Simple )
56+ public static final String REV = "rev" ;
57+
5458 /*
5559 * <rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">
5660 * <pdfaid:conformance>B</pdfaid:conformance> <pdfaid:part>1</pdfaid:part> </rdf:Description>
@@ -73,7 +77,7 @@ public PDFAIdentificationSchema(XMPMetadata metadata, String prefix)
7377 }
7478
7579 /**
76- * Set the PDFA Version identifier (with string)
80+ * Set the PDF/A Version identifier (with string)
7781 *
7882 * @param value
7983 * The version Id value to set
@@ -86,7 +90,7 @@ public void setPartValueWithString(String value)
8690 }
8791
8892 /**
89- * Set the PDFA Version identifier (with an int)
93+ * Set the PDF/A Version identifier (with an int)
9094 *
9195 * @param value
9296 * The version Id value to set
@@ -203,7 +207,7 @@ public Integer getPart()
203207 }
204208
205209 /**
206- * Give the property corresponding to the PDFA Version id
210+ * Give the property corresponding to the PDF/A Version id
207211 *
208212 * @return Part property
209213 */
@@ -233,7 +237,7 @@ public String getAmendment()
233237 }
234238
235239 /**
236- * Give the property corresponding to the PDFA Amendment id
240+ * Give the property corresponding to the PDF/A Amendment id
237241 *
238242 * @return Amendment property
239243 */
@@ -248,7 +252,7 @@ public TextType getAmdProperty()
248252 }
249253
250254 /**
251- * Give the PDFA Amendment Id (as an String)
255+ * Give the PDF/A Amendment Id (as an String)
252256 *
253257 * @return Amendment Value
254258 */
@@ -273,7 +277,7 @@ public String getAmd()
273277 }
274278
275279 /**
276- * Give the property corresponding to the PDFA Conformance id
280+ * Give the property corresponding to the PDF/A Conformance id
277281 *
278282 * @return conformance property
279283 */
@@ -312,4 +316,76 @@ public String getConformance()
312316 }
313317 }
314318
319+ /**
320+ * Set the PDF/A revision (with string)
321+ *
322+ * @param value The revision value to set
323+ *
324+ */
325+ public void setRevValueWithString (String value )
326+ {
327+ IntegerType rev = (IntegerType ) instanciateSimple (REV , value );
328+ addProperty (rev );
329+ }
330+
331+ /**
332+ * Set the PDF/A revision (with an int)
333+ *
334+ * @param value The revision value to set
335+ */
336+ public void setRevValueWithInt (int value )
337+ {
338+ IntegerType rev = (IntegerType ) instanciateSimple (REV , value );
339+ addProperty (rev );
340+ }
341+
342+ /**
343+ * Set the PDF/A revision identifier (with an int)
344+ *
345+ * @param value The revision property to set
346+ */
347+ public void setRev (Integer value )
348+ {
349+ setRevValueWithInt (value );
350+ }
351+
352+ /**
353+ * Set the PDF/A revision identifier
354+ *
355+ * @param rev set the PDF/A revision id property
356+ */
357+ public void setRevProperty (IntegerType rev )
358+ {
359+ addProperty (rev );
360+ }
361+
362+ /**
363+ * Give the property corresponding to the PDF/A revision
364+ *
365+ * @return revision property
366+ */
367+ public IntegerType getRevProperty ()
368+ {
369+ AbstractField tmp = getProperty (REV );
370+ if (tmp instanceof IntegerType )
371+ {
372+ return (IntegerType ) tmp ;
373+ }
374+ return null ;
375+ }
376+
377+ /**
378+ * Give the PDF/A revision (as an integer)
379+ *
380+ * @return revision value (Integer) or null if it is missing
381+ */
382+ public Integer getRev ()
383+ {
384+ IntegerType tmp = getRevProperty ();
385+ if (tmp == null )
386+ {
387+ return null ;
388+ }
389+ return tmp .getValue ();
390+ }
315391}
0 commit comments