Enum Class PDFAFlavour

java.lang.Object
java.lang.Enum<PDFAFlavour>
org.verapdf.pdfa.flavours.PDFAFlavour
All Implemented Interfaces:
Serializable, Comparable<PDFAFlavour>, java.lang.constant.Constable

public enum PDFAFlavour extends Enum<PDFAFlavour>
Enums used as id for PDF/A flavours where a flavour uniquely identifies a specific PDF/A Standard part and associated conformance level. The PDF/A Specification:
ISO 19005 - Document Management - Electronic document format for long-term preservation (PDF/A)
comprises 4 parts:
  1. Part 1: PDF/A-1 - Use of PDF 1.4
  2. Part 2: PDF/A-2 - Use of ISO 32000-1
  3. Part 3: PDF/A-3 - Use of ISO 32000-1 with support for embedded files
  4. Part 4: PDF/A-4 - Use of ISO 32000-2
    1. Note that "Use of ISO 32000-1" indicates that PDF/A parts 2 and 3 are based upon PDF 1.7. ISO 32000-1 is the code for the PDF 1.7 ISO standard. The specification parts specify different conformance levels:
      • Level b - basic
      • Level a - accessible
      • Level u - unicode
      • Level f - embedded files
      • Level e - engineering
      Part 1 does not allow a conformance level u (Unicode) so there are eight valid combinations of specification part and level, shown below:
      • 1a
      • 1b
      • 2a
      • 2b
      • 2u
      • 3a
      • 3b
      • 3u
      • 4
      • 4f
      • 4e
Author:
Carl Wilson
  • Enum Constant Details

    • NO_FLAVOUR

      public static final PDFAFlavour NO_FLAVOUR
      Special ID for the none case
    • PDFA_1_A

      public static final PDFAFlavour PDFA_1_A
      1a PDF Version 1 Level A
    • PDFA_1_B

      public static final PDFAFlavour PDFA_1_B
      1b PDF Version 1 Level B
    • PDFA_2_A

      public static final PDFAFlavour PDFA_2_A
      2a PDF Version 2 Level A
    • PDFA_2_B

      public static final PDFAFlavour PDFA_2_B
      2b PDF Version 2 Level B
    • PDFA_2_U

      public static final PDFAFlavour PDFA_2_U
      2u PDF Version 2 Level U
    • PDFA_3_A

      public static final PDFAFlavour PDFA_3_A
      3a PDF Version 3 Level A
    • PDFA_3_B

      public static final PDFAFlavour PDFA_3_B
      3b PDF Version 3 Level B
    • PDFA_3_U

      public static final PDFAFlavour PDFA_3_U
      3u PDF Version 3 Level U
    • PDFA_4

      public static final PDFAFlavour PDFA_4
      4 PDF Version 4
    • PDFA_4_F

      public static final PDFAFlavour PDFA_4_F
      4 PDF Version 4 Level F
    • PDFA_4_E

      public static final PDFAFlavour PDFA_4_E
      4 PDF Version 4 Level E
    • PDFUA_1

      public static final PDFAFlavour PDFUA_1
      ua1 PDF Version 1
    • PDFUA_2

      public static final PDFAFlavour PDFUA_2
      ua2 PDF Version 2
    • WCAG2_1

      public static final PDFAFlavour WCAG2_1
      wcag PDF version 2.1
    • WCAG2_2

      public static final PDFAFlavour WCAG2_2
      wcag PDF version 2.2
  • Method Details

    • values

      public static PDFAFlavour[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PDFAFlavour valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getPart

      public final PDFAFlavour.Specification getPart()
      Returns:
      an PDFAFlavour.Specification instance that identifies the Specification Part
    • getLevel

      public final PDFAFlavour.Level getLevel()
      Returns:
      the PDFAFlavour.Level instance for this flavour
    • getId

      public final String getId()
      Returns:
      the two character String id for this flavour, e.g. 1a, 1b, 2a, etc.
    • toString

      public final String toString()
      Overrides:
      toString in class Enum<PDFAFlavour>
    • byFlavourId

      public static PDFAFlavour byFlavourId(String flavourId)
      Looks up a PDFAFlavour by two letter flavour identifier. The identifier is a two letter String that identifies a PDFAFlavour, e.g. 1a, 1b, 2a, 2b, 2u, 3a, 3b, 3u, 4, 4f, 4e. The match is case insensitive so 1A, 1B, etc. are also valid flavour ids.
      Parameters:
      flavourId - must be a two character string that exactly matches the flavour identifier.
      Returns:
      the correct PDFAFlavour looked up by String id or NO_FLAVOUR if id does not match a flavour
    • fromString

      public static PDFAFlavour fromString(String toParse)
      Performs a lenient parse of the String toParse to determine whether it contains a valid PDFAFlavour identifier. Be aware that the identifiers are only 2 character Strings (see byFlavourId(String) so unintended matches are possible.
      Parameters:
      toParse - a String parameter that is parsed to see whether it contains a PDFAFlavour identifier.
      Returns:
      the correct PDFAFlavour looked up by parsing toParse or NO_FLAVOUR if no matching flavour was found.
    • getFlavourIds

      public static Set<String> getFlavourIds()
      Returns:
      the Set of PDFA Flavour String ids