com.groupdocs.redaction

Class DeleteAnnotationRedaction



  • public class DeleteAnnotationRedaction
    extends Redaction

    Deletes annotations, if text is matching given regular expression. Optionally deletes all annotations

    • Constructor Detail

      • DeleteAnnotationRedaction

        public DeleteAnnotationRedaction()

        Creates new instance, deleting all annotations (matching everything)

      • DeleteAnnotationRedaction

        public DeleteAnnotationRedaction(String pattern)

        Creates new instance, deleting annotations matching given expression

        Parameters:
        pattern - Regular expression
      • DeleteAnnotationRedaction

        public DeleteAnnotationRedaction(Pattern regex)

        Creates new instance, deleting annotations matching given expression

        Parameters:
        regex - Regular expression
    • Method Detail

      • getExpression

        public final Pattern getExpression()

        Regular expression to match

      • applyTo

        public RedactionLogEntry applyTo(DocumentFormatInstance formatInstance)

        Applies redaction to given format instance

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