Package edu.upf.taln.dri.lib.loader
Class GROBIDloaderImpl
- java.lang.Object
-
- edu.upf.taln.dri.lib.loader.GROBIDloaderImpl
-
- All Implemented Interfaces:
PDFloader
public class GROBIDloaderImpl extends Object implements PDFloader
IMPORTANT: Never instantiate directly this class!
Implementation of the PDF loading methods of Dr Inventor.
To get an instance of a PDFimporter by thePDFloader interface
, always use theFactory
methodgetPDFloader()
.
-
-
Constructor Summary
Constructors Constructor Description GROBIDloaderImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
deleteFolder(File folder)
Document
parsePDF(byte[] PDFbyteArray, String PDFfileName)
Convert a PDF file to aDocument
Document
parsePDF(File file)
Convert a PDF file to aDocument
Document
parsePDF(String absoluteFilePath)
Convert a PDF file to aDocument
Document
parsePDF(URL url)
Convert a PDF file to aDocument
-
-
-
Method Detail
-
parsePDF
public Document parsePDF(byte[] PDFbyteArray, String PDFfileName) throws DRIexception
Description copied from interface:PDFloader
Convert a PDF file to aDocument
- Specified by:
parsePDF
in interfacePDFloader
- Parameters:
PDFbyteArray
- the byte array of the PDF filePDFfileName
- considered if not null or empty- Returns:
- Throws:
DRIexception
-
deleteFolder
public static void deleteFolder(File folder)
-
parsePDF
public Document parsePDF(String absoluteFilePath) throws DRIexception
Description copied from interface:PDFloader
Convert a PDF file to aDocument
- Specified by:
parsePDF
in interfacePDFloader
- Parameters:
absoluteFilePath
- the absolute path of the PDF file to convert- Returns:
- Throws:
DRIexception
-
parsePDF
public Document parsePDF(File file) throws DRIexception
Description copied from interface:PDFloader
Convert a PDF file to aDocument
- Specified by:
parsePDF
in interfacePDFloader
- Parameters:
file
- the PDF file to convert- Returns:
- Throws:
DRIexception
-
parsePDF
public Document parsePDF(URL url) throws DRIexception
Description copied from interface:PDFloader
Convert a PDF file to aDocument
- Specified by:
parsePDF
in interfacePDFloader
- Parameters:
url
- the URL of the file to convert- Returns:
- Throws:
DRIexception
-
-