Package org.verapdf.pdfa.flavours
Enum PDFAFlavour
- java.lang.Object
-
- java.lang.Enum<PDFAFlavour>
-
- org.verapdf.pdfa.flavours.PDFAFlavour
-
- All Implemented Interfaces:
Serializable
,Comparable<PDFAFlavour>
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:- Part 1: PDF/A-1 - Use of PDF 1.4
- Part 2: PDF/A-2 - Use of ISO 32000-1
- Part 3: PDF/A-3 - Use of ISO 32000-1 with support for embedded files
- Part 4: PDF/A-4 - Use of ISO 32000-2
- Level b - basic
- Level a - accessible
- Level u - unicode
- Level f - embedded files
- Level e - engineering
- 1a
- 1b
- 2a
- 2b
- 2u
- 3a
- 3b
- 3u
- 4
- 4f
- 4e
-
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:
- Author:
- Carl Wilson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PDFAFlavour.IsoStandardSeries
Enum to for ISO standard identifiersstatic class
PDFAFlavour.Level
Enum type that identifies the different PDF/A Conformance Levels A (accessible), B (basic), U (unicode), F (embedded files) & E (engineering).static class
PDFAFlavour.Specification
Enumeration of PDF/A Specification Parts, 1-3 used to provide ids and a standard source of details such as name and description for PDF/A Specifications.
-
Enum Constant Summary
Enum Constants Enum Constant Description NO_FLAVOUR
Special ID for the none casePDFA_1_A
1a PDF Version 1 Level APDFA_1_B
1b PDF Version 1 Level BPDFA_2_A
2a PDF Version 2 Level APDFA_2_B
2b PDF Version 2 Level BPDFA_2_U
2u PDF Version 2 Level UPDFA_3_A
3a PDF Version 3 Level APDFA_3_B
3b PDF Version 3 Level BPDFA_3_U
3u PDF Version 3 Level UPDFA_4
4 PDF Version 4PDFA_4_E
4 PDF Version 4 Level EPDFA_4_F
4 PDF Version 4 Level FPDFUA_1
ua1 PDF Version 1WCAG2_1
wcag PDF version 2.1
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PDFAFlavour
byFlavourId(String flavourId)
Looks up aPDFAFlavour
by two letter flavour identifier.static PDFAFlavour
fromString(String toParse)
Performs a lenient parse of the StringtoParse
to determine whether it contains a validPDFAFlavour
identifier.static Set<String>
getFlavourIds()
String
getId()
PDFAFlavour.Level
getLevel()
PDFAFlavour.Specification
getPart()
String
toString()
static PDFAFlavour
valueOf(String name)
Returns the enum constant of this type with the specified name.static PDFAFlavour[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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
-
WCAG2_1
public static final PDFAFlavour WCAG2_1
wcag PDF version 2.1
-
-
Method Detail
-
values
public static PDFAFlavour[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PDFAFlavour c : PDFAFlavour.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PDFAFlavour valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- 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 classEnum<PDFAFlavour>
-
byFlavourId
public static PDFAFlavour byFlavourId(String flavourId)
Looks up aPDFAFlavour
by two letter flavour identifier. The identifier is a two letter String that identifies aPDFAFlavour
, 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 orNO_FLAVOUR
if id does not match a flavour
-
fromString
public static PDFAFlavour fromString(String toParse)
Performs a lenient parse of the StringtoParse
to determine whether it contains a validPDFAFlavour
identifier. Be aware that the identifiers are only 2 character Strings (seebyFlavourId(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 parsingtoParse
orNO_FLAVOUR
if no matching flavour was found.
-
-