com.groupdocs.redaction.redactions

Class DeleteAnnotationRedaction



  • public class DeleteAnnotationRedaction
    extends Redaction

    Represents a text redaction that deletes annotations if text is matching given regular expression (optionally deletes all annotations).

    • Constructor Detail

      • DeleteAnnotationRedaction

        public DeleteAnnotationRedaction()

        Initializes a new instance of DeleteAnnotationRedaction class, with settings to delete all annotations (matching everything).

      • DeleteAnnotationRedaction

        public DeleteAnnotationRedaction(String pattern)

        Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.

        Parameters:
        pattern - Regular expression
      • DeleteAnnotationRedaction

        public DeleteAnnotationRedaction(Pattern regex)

        Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.

        Parameters:
        regex - Regular expression
    • Method Detail

      • getExpression

        public final Pattern getExpression()

        Gets the regular expression to match.

        Returns:
        The regular expression to match.
      • applyTo

        public RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)

        Applies the redaction to a given format instance.

        Specified by:
        applyTo in class Redaction
        Parameters:
        formatInstance - An instance of a document to apply redaction
        Returns:
        Status of the redaction: success/failure and error message if any