Package com.marklogic.client.ext.file
Class AbstractDocumentFileReader
- java.lang.Object
-
- com.marklogic.client.ext.helper.LoggingObject
-
- com.marklogic.client.ext.file.AbstractDocumentFileReader
-
- Direct Known Subclasses:
DefaultDocumentFileReader,JarDocumentFileReader
public abstract class AbstractDocumentFileReader extends LoggingObject
Defines some generic features for the DefaultDocumentFileReader and JarDocumentFileReader.
-
-
Field Summary
-
Fields inherited from class com.marklogic.client.ext.helper.LoggingObject
logger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDocumentFileReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDocumentFileProcessor(DocumentFileProcessor processor)DocumentFileProcessorgetDocumentFileProcessor(java.lang.String classShortName)java.util.List<DocumentFileProcessor>getDocumentFileProcessors()FormatDocumentFileProcessorgetFormatDocumentFileProcessor()booleanisCatchProcessingError()protected DocumentFileprocessDocumentFile(DocumentFile documentFile)The catchProcessingError field controls whether an exception thrown by a processor will be caught or not.voidsetCatchProcessingError(boolean catchProcessingError)voidsetDocumentFileProcessors(java.util.List<DocumentFileProcessor> documentFileProcessors)voidsetFormatDocumentFileProcessor(FormatDocumentFileProcessor formatDocumentFileProcessor)-
Methods inherited from class com.marklogic.client.ext.helper.LoggingObject
format
-
-
-
-
Method Detail
-
getDocumentFileProcessor
public DocumentFileProcessor getDocumentFileProcessor(java.lang.String classShortName)
- Parameters:
classShortName-- Returns:
- Retrieves a DocumentFileProcessor with the given short class name. Useful for when you want to customize a particular processor.
-
addDocumentFileProcessor
public void addDocumentFileProcessor(DocumentFileProcessor processor)
-
processDocumentFile
protected DocumentFile processDocumentFile(DocumentFile documentFile)
The catchProcessingError field controls whether an exception thrown by a processor will be caught or not. Starting in 3.11.0, it defaults to false, as an exception typically indicates that the processing should stop.- Parameters:
documentFile-- Returns:
- the result of processing the given DocumentFile; may return null
-
getDocumentFileProcessors
public java.util.List<DocumentFileProcessor> getDocumentFileProcessors()
-
setDocumentFileProcessors
public void setDocumentFileProcessors(java.util.List<DocumentFileProcessor> documentFileProcessors)
-
getFormatDocumentFileProcessor
public FormatDocumentFileProcessor getFormatDocumentFileProcessor()
-
setFormatDocumentFileProcessor
public void setFormatDocumentFileProcessor(FormatDocumentFileProcessor formatDocumentFileProcessor)
-
isCatchProcessingError
public boolean isCatchProcessingError()
-
setCatchProcessingError
public void setCatchProcessingError(boolean catchProcessingError)
-
-