Package org.verapdf.gf.model
Class GFModelParser
- java.lang.Object
-
- org.verapdf.gf.model.GFModelParser
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Component,PDFAParser
public class GFModelParser extends Object implements PDFAParser
- Author:
- Timur Kamalov
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static GFModelParsercreateModelWithFlavour(File pdfFile, PDFAFlavour flavour)static GFModelParsercreateModelWithFlavour(File pdfFile, PDFAFlavour flavour, PDFAFlavour defaultFlavour)static GFModelParsercreateModelWithFlavour(InputStream toLoad, PDFAFlavour flavour)ComponentDetailsgetDetails()FeatureExtractionResultgetFeatures(FeatureExtractorConfig config)FeatureExtractionResultgetFeatures(FeatureExtractorConfig config, List<AbstractFeaturesExtractor> extractors)PDFAFlavourgetFlavour()PDDocumentgetPDDocument()GetPDDocumentobject for current file.PDFDocumentgetPDFDocument()ObjectgetRoot()Method return root object of model implementation from greenfield model together with the hierarchy.
-
-
-
Method Detail
-
createModelWithFlavour
public static GFModelParser createModelWithFlavour(InputStream toLoad, PDFAFlavour flavour) throws ModelParsingException, EncryptedPdfException
-
createModelWithFlavour
public static GFModelParser createModelWithFlavour(File pdfFile, PDFAFlavour flavour) throws ModelParsingException, EncryptedPdfException
-
createModelWithFlavour
public static GFModelParser createModelWithFlavour(File pdfFile, PDFAFlavour flavour, PDFAFlavour defaultFlavour) throws ModelParsingException, EncryptedPdfException
-
getPDDocument
public PDDocument getPDDocument()
GetPDDocumentobject for current file.- Returns:
PDDocumentobject of greenfield library.- Throws:
IOException- when target file is not pdf or pdf file is not contain root object
-
getRoot
public Object getRoot()
Method return root object of model implementation from greenfield model together with the hierarchy.- Specified by:
getRootin interfacePDFAParser- Returns:
- root object representing by
CosDocument - Throws:
IOException- when target file is not pdf or pdf file is not contain root object
-
getDetails
public ComponentDetails getDetails()
- Specified by:
getDetailsin interfaceComponent
-
getFlavour
public PDFAFlavour getFlavour()
- Specified by:
getFlavourin interfacePDFAParser- Returns:
PDFAFlavourfor the model that has been parsed
-
getPDFDocument
public PDFDocument getPDFDocument()
- Specified by:
getPDFDocumentin interfacePDFAParser- Returns:
- the
PDFDocumentparsed.
-
getFeatures
public FeatureExtractionResult getFeatures(FeatureExtractorConfig config)
- Specified by:
getFeaturesin interfacePDFAParser- Parameters:
config- aFeatureExtractorConfigthat denotes the features to be extracted.- Returns:
- features collection of the document as a
FeatureExtractionResult
-
getFeatures
public FeatureExtractionResult getFeatures(FeatureExtractorConfig config, List<AbstractFeaturesExtractor> extractors)
- Specified by:
getFeaturesin interfacePDFAParser- Parameters:
config- aFeatureExtractorConfigthat denotes the features to be extracted.extractors- extractors for features reporting- Returns:
- features collection of the document as a
FeatureExtractionResult
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-