public abstract class TextRedaction extends Redaction
Represents a base abstract class for document text redactions.
Learn more
Modifier | Constructor and Description |
---|---|
protected |
TextRedaction(ReplacementOptions actionOptions)
Initializes a new instance of TextRedaction class.
|
Modifier and Type | Method and Description |
---|---|
ReplacementOptions |
getActionOptions()
Gets the
ReplacementOptions instance, specifying type of text replacement. |
IOcrConnector |
getOcrConnector()
Gets the
IOcrConnector implementation, required to extract text from graphic content. |
protected RedactorLogEntry |
processAsTextual(DocumentFormatInstance formatInstance,
Pattern regex)
This method applies a given Regular Expression to an instance of the doucument, if it implements
ITextualFormatInstance interface and returns RedactionStatus.Skipped otherwise. |
void |
setOcrConnector(IOcrConnector value)
Sets the
IOcrConnector implementation, required to extract text from graphic content. |
applyTo, getDescription
protected TextRedaction(ReplacementOptions actionOptions)
Initializes a new instance of TextRedaction class. This constructor requires ReplacementOptions
as a parameter.
actionOptions
- Text replacement options (exemption code or box color)public final ReplacementOptions getActionOptions()
Gets the ReplacementOptions
instance, specifying type of text replacement.
ReplacementOptions
instance, specifying type of text replacement.public final IOcrConnector getOcrConnector()
Gets the IOcrConnector
implementation, required to extract text from graphic content.
IOcrConnector
implementation, required to extract text from graphic content.public final void setOcrConnector(IOcrConnector value)
Sets the IOcrConnector
implementation, required to extract text from graphic content.
value
- The IOcrConnector
implementation, required to extract text from graphic content.protected final RedactorLogEntry processAsTextual(DocumentFormatInstance formatInstance, Pattern regex)
This method applies a given Regular Expression to an instance of the doucument, if it implements ITextualFormatInstance
interface and returns RedactionStatus.Skipped otherwise.
formatInstance
- An instance of a documentregex
- Regular expression to search and replace