You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2015/10/15 19:21:56 UTC

svn commit: r1708853 - /pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java

Author: msahyoun
Date: Thu Oct 15 17:21:56 2015
New Revision: 1708853

URL: http://svn.apache.org/viewvc?rev=1708853&view=rev
Log:
PDFBOX-3027: allow conformance level 'U' as a valid entry

Modified:
    pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java

Modified: pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java?rev=1708853&r1=1708852&r2=1708853&view=diff
==============================================================================
--- pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java (original)
+++ pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/schema/PDFAIdentificationSchema.java Thu Oct 15 17:21:56 2015
@@ -148,11 +148,11 @@ public class PDFAIdentificationSchema ex
      * @param value
      *            The conformance level value to set
      * @throws BadFieldValueException
-     *             If Conformance Value not 'A' or 'B'
+     *             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"))
+        if (value.equals("A") || value.equals("B") || value.equals("U"))
         {
             TextType conf = createTextType(CONFORMANCE, value);
             addProperty(conf);
@@ -161,7 +161,7 @@ public class PDFAIdentificationSchema ex
         else
         {
             throw new BadFieldValueException(
-                    "The property given not seems to be a PDF/A conformance level (must be A or B)");
+                    "The property given not seems to be a PDF/A conformance level (must be A, B or U)");
         }
     }
 
@@ -171,19 +171,19 @@ public class PDFAIdentificationSchema ex
      * @param conf
      *            The conformance level property to set
      * @throws BadFieldValueException
-     *             If Conformance Value not 'A' or 'B'
+     *             If Conformance Value not 'A', 'B' or 'U' (PDF/A-2 and PDF/A-3)
      */
     public void setConformanceProperty(TextType conf) throws BadFieldValueException
     {
         String value = conf.getStringValue();
-        if (value.equals("A") || value.equals("B"))
+        if (value.equals("A") || value.equals("B") || value.equals("U"))
         {
             addProperty(conf);
         }
         else
         {
             throw new BadFieldValueException(
-                    "The property given not seems to be a PDF/A conformance level (must be A or B)");
+                    "The property given not seems to be a PDF/A conformance level (must be A, B or U)");
         }
     }