diff --git a/gui/src/main/java/org/verapdf/gui/CheckerPanel.java b/gui/src/main/java/org/verapdf/gui/CheckerPanel.java index deab16fa..c54d9f7b 100644 --- a/gui/src/main/java/org/verapdf/gui/CheckerPanel.java +++ b/gui/src/main/java/org/verapdf/gui/CheckerPanel.java @@ -317,7 +317,7 @@ private void setupFixMetadataCheckBox(final GridBagLayout gbl, final GridBagCons this.fixMetadata.setSelected(false); this.fixMetadata.setEnabled(false); } else { - this.fixMetadata.setSelected(config.createProcessorConfig().getTasks().contains(TaskType.FIX_METADATA)); + this.fixMetadata.setSelected(config.getApplicationConfig().getProcessType().getTasks().contains(TaskType.FIX_METADATA)); } setGridBagConstraintsParameters(gbc, GUIConstants.FIX_METADATA_CHECKBOX_CONSTRAINT_GRID_X, GUIConstants.FIX_METADATA_CHECKBOX_CONSTRAINT_GRID_Y, @@ -362,7 +362,7 @@ private void setupChooseFlavourBox(final GridBagLayout gbl, final GridBagConstra this.chooseFlavour.setOpaque(true); ChooseFlavourRenderer renderer = new ChooseFlavourRenderer(); this.chooseFlavour.setRenderer(renderer); - PDFAFlavour fromConfig = config.createProcessorConfig().getValidatorConfig().getFlavour(); + PDFAFlavour fromConfig = config.getValidatorConfig().getFlavour(); String fromConfigFlavourText = getFlavourReadableText(fromConfig); if (availableFlavours.contains(fromConfigFlavourText)) { this.chooseFlavour.setSelectedItem(fromConfigFlavourText); @@ -882,7 +882,7 @@ ValidatorConfig validatorConfigFromState() { validatorConfig.isRecordPasses(), maxFails, validatorConfig.isDebug(), validatorConfig.isLogsEnabled(), validatorConfig.getLoggingLevel(), validatorConfig.getMaxNumberOfDisplayedFailedChecks(), - validatorConfig.showErrorMessages(), null, validatorConfig.getShowProgress(), false); + validatorConfig.showErrorMessages(), null, validatorConfig.getShowProgress(), validatorConfig.getNonPDFExtension()); } VeraAppConfig appConfigFromState() { diff --git a/gui/src/main/java/org/verapdf/gui/SettingsPanel.java b/gui/src/main/java/org/verapdf/gui/SettingsPanel.java index 2044bfc4..43c2fd17 100644 --- a/gui/src/main/java/org/verapdf/gui/SettingsPanel.java +++ b/gui/src/main/java/org/verapdf/gui/SettingsPanel.java @@ -193,7 +193,7 @@ public void keyReleased(KeyEvent e) { this.chooseDefaultFlavour.setOpaque(true); ChooseFlavourRenderer renderer = new ChooseFlavourRenderer(); this.chooseDefaultFlavour.setRenderer(renderer); - PDFAFlavour fromConfig = config.createProcessorConfig().getValidatorConfig().getDefaultFlavour(); + PDFAFlavour fromConfig = config.getValidatorConfig().getDefaultFlavour(); String fromConfigDefaultFlavourText = CheckerPanel.getFlavourReadableText(fromConfig); if (availableFlavours.contains(fromConfigDefaultFlavourText)) { this.chooseDefaultFlavour.setSelectedItem(fromConfigDefaultFlavourText); @@ -266,7 +266,7 @@ boolean showDialog(Component parent, String title, ConfigManager settings) { this.ok = false; - ValidatorConfig validatorConfig = settings.createProcessorConfig().getValidatorConfig(); + ValidatorConfig validatorConfig = settings.getValidatorConfig(); this.hidePassedRules.setSelected(validatorConfig.isRecordPasses()); if (Foundries.defaultParserIsPDFBox()) { @@ -303,7 +303,7 @@ boolean showDialog(Component parent, String title, ConfigManager settings) { String fromConfigDefaultFlavourText = CheckerPanel.getFlavourReadableText(defaultFlavour); this.chooseDefaultFlavour.setSelectedItem(fromConfigDefaultFlavourText); - this.fixMetadataPrefix.setText(settings.createProcessorConfig().getFixerConfig().getFixesPrefix()); + this.fixMetadataPrefix.setText(settings.getFixerConfig().getFixesPrefix()); VeraAppConfig appConfig = settings.getApplicationConfig(); this.fixMetadataFolder.setText(appConfig.getFixesFolder()); diff --git a/gui/src/main/java/org/verapdf/gui/ValidateWorker.java b/gui/src/main/java/org/verapdf/gui/ValidateWorker.java index 5216a2e9..1d8f63b0 100644 --- a/gui/src/main/java/org/verapdf/gui/ValidateWorker.java +++ b/gui/src/main/java/org/verapdf/gui/ValidateWorker.java @@ -19,6 +19,7 @@ import org.verapdf.core.utils.LogsFileHandler; import org.verapdf.features.FeatureExtractorConfig; import org.verapdf.gui.utils.GUIConstants; +import org.verapdf.pdfa.validation.profiles.Profiles; import org.verapdf.pdfa.validation.profiles.ValidationProfile; import org.verapdf.pdfa.validation.validators.ValidatorConfig; import org.verapdf.policy.PolicyChecker; @@ -109,15 +110,10 @@ protected ValidateWorkerSummary doInBackground() { this.parent.handleValidationError(ERROR_IN_OBTAINING_POLICY_FEATURES + ": ", e); } } - ProcessorConfig resultConfig = this.customProfile == null - ? ProcessorFactory.fromValues(validatorConfig, featuresConfig, - this.configManager.getPluginsCollectionConfig(), - this.configManager.getFixerConfig(), tasks, - veraAppConfig.getFixesFolder()) - : ProcessorFactory.fromValues(validatorConfig, featuresConfig, - this.configManager.getPluginsCollectionConfig(), - this.configManager.getFixerConfig(), tasks, - this.customProfile, veraAppConfig.getFixesFolder()); + ProcessorConfig resultConfig = ProcessorFactory.fromValues(validatorConfig, featuresConfig, + this.configManager.getPluginsCollectionConfig(), this.configManager.getFixerConfig(), tasks, + this.customProfile == null ? Profiles.defaultProfile() : this.customProfile, + veraAppConfig.getFixesFolder()); try (BatchProcessor processor = ProcessorFactory.fileBatchProcessor(resultConfig)) { VeraAppConfig applicationConfig = this.configManager.getApplicationConfig(); BatchSummary batchSummary = processor.process(this.pdfs, diff --git a/gui/src/main/java/org/verapdf/gui/utils/GUIConstants.java b/gui/src/main/java/org/verapdf/gui/utils/GUIConstants.java index 8b8cd907..2d3a7df4 100644 --- a/gui/src/main/java/org/verapdf/gui/utils/GUIConstants.java +++ b/gui/src/main/java/org/verapdf/gui/utils/GUIConstants.java @@ -100,7 +100,7 @@ public final class GUIConstants { public static final String LABEL_TOOL_TIP = "PDF flavour: the PDF/A or PDF/UA part and conformance level
" + "Validation profile: custom collection of validation rules"; - public static final String CONSORTIUM_TEXT = "© 2015-2023 veraPDF Consortium"; //$NON-NLS-1$ + public static final String CONSORTIUM_TEXT = "© 2015-2024 veraPDF Consortium"; //$NON-NLS-1$ public static final String PREFORMA_FUNDED_TEXT = "Funded by the European Commission’s PREFORMA Project"; public static final String TITLE = "veraPDF Conformance Checker"; public static final String ENCRYPTED_PDF = "Document is password encrypted and can not be processed.";