public class DeleteAnnotationRedaction extends Redaction
Represents a text redaction that deletes annotations if text is matching given regular expression (optionally deletes all annotations).
Constructor and Description |
---|
DeleteAnnotationRedaction()
Initializes a new instance of DeleteAnnotationRedaction class, with settings to delete all annotations (matching everything).
|
DeleteAnnotationRedaction(Pattern regex)
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.
|
DeleteAnnotationRedaction(String pattern)
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.
|
Modifier and Type | Method and Description |
---|---|
RedactorLogEntry |
applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.
|
Pattern |
getExpression()
Gets the regular expression to match.
|
public DeleteAnnotationRedaction()
Initializes a new instance of DeleteAnnotationRedaction class, with settings to delete all annotations (matching everything).
public DeleteAnnotationRedaction(String pattern)
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.
pattern
- Regular expressionpublic DeleteAnnotationRedaction(Pattern regex)
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.
regex
- Regular expressionpublic final Pattern getExpression()
Gets the regular expression to match.
public RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.