Package edu.upf.taln.dri.lib.loader
Interface PlainTextLoader
-
- All Known Implementing Classes:
PlainTextLoaderImpl
public interface PlainTextLoader
Interface to access the plain text importing methods of Dr. Inventor.
To get an instance of a PlainTextLoader by thePlainTextLoader interface
, always use theFactory
methodgetPlainTextLoader()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Document
parsePlainText(File file)
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encodedDocument
parsePlainText(String absoluteFilePath)
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encodedDocument
parsePlainText(URL url)
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encodedDocument
parseString(String textToLoad, String docName)
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encoded
-
-
-
Method Detail
-
parsePlainText
Document parsePlainText(String absoluteFilePath) throws DRIexception
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encoded- Parameters:
absoluteFilePath
- the absolute path of the (plain) text file to convert- Returns:
- Throws:
DRIexception
-
parsePlainText
Document parsePlainText(File file) throws DRIexception
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encoded- Parameters:
file
- the (plain) text file to import- Returns:
- Throws:
DRIexception
-
parsePlainText
Document parsePlainText(URL url) throws DRIexception
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encoded- Parameters:
url
- the URL of the plain text file to convert- Returns:
- Throws:
DRIexception
-
parseString
Document parseString(String textToLoad, String docName) throws DRIexception
Convert a plain text to aDocument
IMPORTANT: the text should be UTF-8 encoded- Parameters:
textToLoad
- the plain text to load into theDocument
docName
- the document name can be retrieved by the methodDocument.getName()
. Left null or empty string if you do not need to specify any name for the document- Returns:
- Throws:
DRIexception
-
-