diff --git a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/AbstractTestCorpus.java b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/AbstractTestCorpus.java index d2895e6..6f2342d 100644 --- a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/AbstractTestCorpus.java +++ b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/AbstractTestCorpus.java @@ -150,7 +150,7 @@ public enum Corpus { EnumSet.of(PDFAFlavour.PDFA_1_A, PDFAFlavour.PDFA_1_B, PDFAFlavour.PDFA_2_A, PDFAFlavour.PDFA_2_B, PDFAFlavour.PDFA_2_U, PDFAFlavour.PDFA_3_B, PDFAFlavour.PDFA_4, PDFAFlavour.PDFA_4_F, PDFAFlavour.PDFA_4_E, - PDFAFlavour.PDFUA_1), + PDFAFlavour.PDFUA_1, PDFAFlavour.PDFUA_2), URI.create(VERA_URL), "veraCorp-"), ISARTOR("Isartor", EnumSet.of(PDFAFlavour.PDFA_1_B), URI.create(ISARTOR_URL), "isartCorp-"), BFO("BFO", EnumSet.of(PDFAFlavour.PDFA_2_B), URI.create(BFO_URL), "bfoCorp-"), diff --git a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/GitHubBackedProfileDirectory.java b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/GitHubBackedProfileDirectory.java index 54af420..15b9694 100644 --- a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/GitHubBackedProfileDirectory.java +++ b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/GitHubBackedProfileDirectory.java @@ -115,10 +115,10 @@ private static Set fromGitHubBranch(final String branchName) String PDFUApathPrefix = GITHUB_ROOT + branchName + PDFUA_PROFILE_PATH_PART + PDFUA_PROFILE_PREFIX; Set profileSet = new HashSet<>(); for (PDFAFlavour flavour : PDFAFlavour.values()) { - if (flavour == PDFAFlavour.NO_FLAVOUR || flavour == PDFAFlavour.WCAG2_1) { + if (flavour == PDFAFlavour.NO_FLAVOUR || flavour.getPart().getFamily() == PDFAFlavour.SpecificationFamily.WCAG) { continue; } - String profileURLString = (flavour != PDFAFlavour.PDFUA_1 ? PDFApathPrefix : PDFUApathPrefix) + String profileURLString = (flavour.getPart().getFamily() != PDFAFlavour.SpecificationFamily.PDF_UA ? PDFApathPrefix : PDFUApathPrefix) + flavour.getPart().getPartNumber() + flavour.getLevel().getCode().toUpperCase() + XML_SUFFIX; try { URL profileURL = new URL(profileURLString); diff --git a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/RegressionTestingHelper.java b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/RegressionTestingHelper.java index 371385a..054f510 100644 --- a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/RegressionTestingHelper.java +++ b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/RegressionTestingHelper.java @@ -146,7 +146,7 @@ private void itemsMapFromZipSource(File zipFile, boolean isWcag) throws IOExcept while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); String entryName = entry.getName(); - if ((isWcag == entryName.contains("WCAG-21")) && !entry.isDirectory()) { + if ((isWcag == entryName.contains("WCAG_2_2")) && !entry.isDirectory()) { if (entryName.endsWith(".pdf")) { this.pdfMap.put(entryName, entry); } else if (entryName.endsWith(".sch")) { diff --git a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/ZipBackedTestCorpus.java b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/ZipBackedTestCorpus.java index 581bdf0..2464162 100644 --- a/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/ZipBackedTestCorpus.java +++ b/veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/ZipBackedTestCorpus.java @@ -118,6 +118,9 @@ public static boolean checkFlavour(final String item, final PDFAFlavour flavour) if (flavour == PDFAFlavour.PDFUA_1) { return item.contains("PDF_UA-1"); } + if (flavour == PDFAFlavour.PDFUA_2) { + return item.contains("PDF_UA-2"); + } if (flavour == PDFAFlavour.PDFA_4) { return item.contains("PDF_A-4") && !matchFlavour(item, PDFAFlavour.PDFA_4_E) && !matchFlavour(item, PDFAFlavour.PDFA_4_F); } diff --git a/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-gf.yml b/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-gf.yml index dd4d40c..7ca2798 100644 --- a/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-gf.yml +++ b/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-gf.yml @@ -33,6 +33,9 @@ "ua1": [ ] + "ua2": + [ + ] "BFO": "2b": [ diff --git a/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-pdfbox.yml b/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-pdfbox.yml index fae5d77..772ec67 100644 --- a/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-pdfbox.yml +++ b/veraPDF-integration/src/test/resources/org/verapdf/integration/tests/rules/corpus-pdfbox.yml @@ -242,6 +242,9 @@ "7.21.7-t1-pass-c", "7.21.7-t2-pass-a", ] + "ua2": + [ + ] "BFO": "2b": [ diff --git a/veraPDF-pdf-regression-tests/src/main/java/org/verapdf/pdf/regression/tests/PDFRegressionTestUtils.java b/veraPDF-pdf-regression-tests/src/main/java/org/verapdf/pdf/regression/tests/PDFRegressionTestUtils.java index ecf742c..70a5164 100644 --- a/veraPDF-pdf-regression-tests/src/main/java/org/verapdf/pdf/regression/tests/PDFRegressionTestUtils.java +++ b/veraPDF-pdf-regression-tests/src/main/java/org/verapdf/pdf/regression/tests/PDFRegressionTestUtils.java @@ -17,7 +17,7 @@ public class PDFRegressionTestUtils { PDFAFlavour.PDFA_2_A, PDFAFlavour.PDFA_2_B, PDFAFlavour.PDFA_2_U, PDFAFlavour.PDFA_3_A, PDFAFlavour.PDFA_3_B, PDFAFlavour.PDFA_3_U, PDFAFlavour.PDFA_4, PDFAFlavour.PDFA_4_F, PDFAFlavour.PDFA_4_E, - PDFAFlavour.PDFUA_1); + PDFAFlavour.PDFUA_1, PDFAFlavour.PDFUA_2); private static final EnumMap> filesByFlavour = new EnumMap<>(PDFAFlavour.class); public static void main(String[] args) { diff --git a/veraPDF-wcag-regression-tests/src/main/java/org/verapdf/wcag/regression/tests/WCAGRegressionTestUtils.java b/veraPDF-wcag-regression-tests/src/main/java/org/verapdf/wcag/regression/tests/WCAGRegressionTestUtils.java index 2d8a35b..f46a893 100644 --- a/veraPDF-wcag-regression-tests/src/main/java/org/verapdf/wcag/regression/tests/WCAGRegressionTestUtils.java +++ b/veraPDF-wcag-regression-tests/src/main/java/org/verapdf/wcag/regression/tests/WCAGRegressionTestUtils.java @@ -15,7 +15,7 @@ import java.util.Map; public class WCAGRegressionTestUtils { - private static final String wcagProfileUrl = "https://github.com/veraPDF/veraPDF-validation-profiles/raw/integration/PDF_UA/WCAG-21-Complete.xml"; + private static final String wcagProfileUrl = "https://github.com/veraPDF/veraPDF-validation-profiles/raw/integration/PDF_UA/WCAG-2-2-Complete.xml"; public static void main(String[] args) { test();