diff --git a/pdfbox-validation-model/src/main/java/org/verapdf/model/ModelParser.java b/pdfbox-validation-model/src/main/java/org/verapdf/model/ModelParser.java index 6870912b..dc2a3798 100644 --- a/pdfbox-validation-model/src/main/java/org/verapdf/model/ModelParser.java +++ b/pdfbox-validation-model/src/main/java/org/verapdf/model/ModelParser.java @@ -24,6 +24,8 @@ import org.verapdf.containers.StaticCoreContainers; import org.verapdf.xmp.containers.StaticXmpCoreContainers; import org.verapdf.xmp.impl.VeraPDFMeta; + +import java.util.Collections; import java.util.logging.Logger; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.common.PDMetadata; @@ -69,7 +71,7 @@ public final class ModelParser implements PDFAParser { private PDDocument document; - private final PDFAFlavour flavour; + private PDFAFlavour flavour; private ModelParser(final InputStream docStream, PDFAFlavour flavour, PDFAFlavour defaultFlavour) throws IOException { this.document = PDDocument.load(docStream, false, true); @@ -195,6 +197,16 @@ public PDFAFlavour getFlavour() { return this.flavour; } + @Override + public List getFlavours() { + return Collections.singletonList(flavour); + } + + @Override + public void setFlavours(List flavours) { + this.flavour = flavours.get(0); + } + @Override public FeatureExtractionResult getFeatures(FeatureExtractorConfig config) { return PBFeatureParser.getFeaturesCollection(this.document, config);