public abstract class AbstractSingleDocumentExtractor extends AbstractDocumentExtractor implements SingleDocumentExtractor
SingleDocumentExtractor
interface.
It turns the extractAll
calls into the appropriate
extractDocument
calls. It also chains the different
extractDocument
so that subclasses only need to handle the
URLConnection
version.Constructor and Description |
---|
AbstractSingleDocumentExtractor()
Creates a new
AbstractSingleDocumentExtractor . |
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends Document> |
extractAll(java.io.File file)
Attempts to extract all of the documents from the given file.
|
java.util.List<? extends Document> |
extractAll(java.net.URI uri)
Attempts to extract all of the documents from the given file.
|
java.util.List<? extends Document> |
extractAll(java.net.URLConnection connection)
Attempts to extract all of the documents from the given file.
|
Document |
extractDocument(java.io.File file)
Attempts to extract a document from the given file.
|
Document |
extractDocument(java.net.URI uri)
Attempts to extract a document from the given file.
|
canExtract
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
extractDocument
canExtract, canExtract, canExtract
public AbstractSingleDocumentExtractor()
AbstractSingleDocumentExtractor
.public java.util.List<? extends Document> extractAll(java.io.File file) throws DocumentExtractionException, java.io.IOException
DocumentExtractor
extractAll
in interface DocumentExtractor
extractAll
in class AbstractDocumentExtractor
file
- The file to extract.DocumentExtractionException
- If there is an error extracting data from the file.java.io.IOException
- If there is an IO error.public java.util.List<? extends Document> extractAll(java.net.URI uri) throws DocumentExtractionException, java.io.IOException
DocumentExtractor
extractAll
in interface DocumentExtractor
extractAll
in class AbstractDocumentExtractor
uri
- The URI of the file to extract.DocumentExtractionException
- If there is an error extracting data from the file.java.io.IOException
- If there is an IO error.public java.util.List<? extends Document> extractAll(java.net.URLConnection connection) throws DocumentExtractionException, java.io.IOException
DocumentExtractor
extractAll
in interface DocumentExtractor
connection
- The connection to the file to extract.DocumentExtractionException
- If there is an error extracting data from the file.java.io.IOException
- If there is an IO error.public Document extractDocument(java.io.File file) throws DocumentExtractionException, java.io.IOException
SingleDocumentExtractor
extractDocument
in interface SingleDocumentExtractor
file
- The file to extract.DocumentExtractionException
- If there is an error extracting data from the file.java.io.IOException
- If there is an IO error.public Document extractDocument(java.net.URI uri) throws DocumentExtractionException, java.io.IOException
SingleDocumentExtractor
extractDocument
in interface SingleDocumentExtractor
uri
- The URI of the file to extract.DocumentExtractionException
- If there is an error extracting data from the file.java.io.IOException
- If there is an IO error.