Class BulkRedactorSettings

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addExpression​(java.lang.String regularExpression)
      Adds a regular expression to the list of expressions used to locate text to markup.
      void addNamedEntity​(java.lang.String namedEntityType)
      Adds a named entity type to the list of types to be redacted.
      void addPhrase​(java.lang.String phrase)
      Adds a phrase to the list of expressions used to find and markup text.
      void addPhrases​(java.util.Collection<java.lang.String> phrases)
      Adds multiple phrases to the list of expressions used to find and markup text.
      static java.lang.String escapeRegexSpecialCharacters​(java.lang.String input)
      Escapes regular expression characters in the input string.
      boolean getApplyHighLights()  
      boolean getApplyRedactions()  
      java.util.Set<java.lang.String> getExpressions()
      Gets the regular expressions which will be used to locate text to markup.
      nuix.MarkupSet getMarkupSet​(nuix.Case nuixCase)
      Gets the Nuix MarkupSet object based on the markup set name as set by setMarkupSetName(String).
      java.lang.String getMarkupSetName()
      Gets the name of the markup set to which markups will be recorded against.
      java.util.Set<java.lang.String> getNamedEntityTypes()
      Gets the list of named entity types to be redacted.
      java.io.File getTempDirectory()
      Gets the temp directory to which BulkRedactor will export PDF files which will be provided to Aspose.
      static java.lang.String phraseToExpression​(java.lang.String phrase)
      Converts a phrase (string with potentially multiple terms) into a regular expression for used searching for text to redact in a PDF.
      void setApplyHighLights​(boolean applyHighLights)  
      void setApplyRedactions​(boolean applyRedactions)  
      void setExpressions​(java.util.Collection<java.lang.String> expressions)
      Sets the regular expressions which will be used to locate text to markup.
      void setMarkupSetName​(java.lang.String markupSetName)
      Sets the name of the markup set to which markup will be recorded against.
      void setNamedEntityTypes​(java.util.Collection<java.lang.String> namedEntityTypes)
      Sets the list of named entity type to be redacted.
      void setTempDirectory​(java.io.File tempDirectory)
      Sets the temp directory to which BulkRedactor will export PDF files which will be provided to Aspose.
      void setTempDirectory​(java.lang.String tempDirectory)
      Sets the temp directory to which BulkRedactor will export PDF files which will be provided to Aspose.
      static java.util.List<java.lang.String> splitPhrase​(java.lang.String phrase)
      Splits a string into tokens on whitespace using the regular expression: \s+
      static java.lang.String termToRegex​(java.lang.String inputTerm)
      Converts a plain text term to a regular expression which is case insensitive.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BulkRedactorSettings

        public BulkRedactorSettings()
    • Method Detail

      • getMarkupSetName

        public java.lang.String getMarkupSetName()
        Gets the name of the markup set to which markups will be recorded against.
        Returns:
        The name of the markup set to use.
      • setMarkupSetName

        public void setMarkupSetName​(java.lang.String markupSetName)
        Sets the name of the markup set to which markup will be recorded against.
        Parameters:
        markupSetName - The name of the markup set to use. If the name provided does not exist, a markup set will be created.
      • getTempDirectory

        public java.io.File getTempDirectory()
        Gets the temp directory to which BulkRedactor will export PDF files which will be provided to Aspose.
        Returns:
        The PDF export temp directory.
      • setTempDirectory

        public void setTempDirectory​(java.io.File tempDirectory)
        Sets the temp directory to which BulkRedactor will export PDF files which will be provided to Aspose.
        Parameters:
        tempDirectory - The PDF export temp directory.
      • setTempDirectory

        public void setTempDirectory​(java.lang.String tempDirectory)
        Sets the temp directory to which BulkRedactor will export PDF files which will be provided to Aspose.
        Parameters:
        tempDirectory - The PDF export temp directory.
      • getExpressions

        public java.util.Set<java.lang.String> getExpressions()
        Gets the regular expressions which will be used to locate text to markup.
        Returns:
        The regular expressions which will be used to locate text to markup.
      • setExpressions

        public void setExpressions​(java.util.Collection<java.lang.String> expressions)
        Sets the regular expressions which will be used to locate text to markup.
        Parameters:
        expressions - The regular expressions which will be used to locate text to markup.
      • addExpression

        public void addExpression​(java.lang.String regularExpression)
        Adds a regular expression to the list of expressions used to locate text to markup.
        Parameters:
        regularExpression - A regular expression to add
      • getNamedEntityTypes

        public java.util.Set<java.lang.String> getNamedEntityTypes()
        Gets the list of named entity types to be redacted.
        Returns:
        The list of named entity types to be redacted.
      • setNamedEntityTypes

        public void setNamedEntityTypes​(java.util.Collection<java.lang.String> namedEntityTypes)
        Sets the list of named entity type to be redacted.
        Parameters:
        namedEntityTypes - The named entity types to be redacted.
      • addNamedEntity

        public void addNamedEntity​(java.lang.String namedEntityType)
        Adds a named entity type to the list of types to be redacted.
        Parameters:
        namedEntityType - The named entity type to be added to the list.
      • getMarkupSet

        public nuix.MarkupSet getMarkupSet​(nuix.Case nuixCase)
        Gets the Nuix MarkupSet object based on the markup set name as set by setMarkupSetName(String). If the markup set by the given name already exists, then this will yield that existing markup set. If it does not, a new markup set with the given name will be created.
        Parameters:
        nuixCase - The relevant Nuix Case
        Returns:
        Either the existing markup set or a newly created markup set, based on the markup set name as set by setMarkupSetName(String).
      • escapeRegexSpecialCharacters

        public static java.lang.String escapeRegexSpecialCharacters​(java.lang.String input)
        Escapes regular expression characters in the input string.
        Parameters:
        input - String with regular expression characters to escape.
        Returns:
        String with the regular expression characters escaped.
      • termToRegex

        public static java.lang.String termToRegex​(java.lang.String inputTerm)
        Converts a plain text term to a regular expression which is case insensitive. This is done by generating a regular expression with a character class matching each letter in both lower case and upper case. For example if the input term is "cat", this returns a regular expression "[Cc][Aa][Tt]".
        Parameters:
        inputTerm - Term to convert to a case insensitive regular expression
        Returns:
        String Regular expression that is case insensitive regular expression for input term
      • splitPhrase

        public static java.util.List<java.lang.String> splitPhrase​(java.lang.String phrase)
        Splits a string into tokens on whitespace using the regular expression: \s+
        Parameters:
        phrase - The phrase to tokenize.
        Returns:
        List of token strings.
      • phraseToExpression

        public static java.lang.String phraseToExpression​(java.lang.String phrase)
        Converts a phrase (string with potentially multiple terms) into a regular expression for used searching for text to redact in a PDF.
        Parameters:
        phrase - The phrase to convert into a regular expression. May be single or multiple terms.
        Returns:
        A regular expression to match that phrase in a case insensitive manner. Internally calls splitPhrase(String) and termToRegex(String).
      • addPhrase

        public void addPhrase​(java.lang.String phrase)
        Adds a phrase to the list of expressions used to find and markup text. Phrase is converted to an expression using phraseToExpression(String). Resulting expression is then surrounded '\b' to anchor it to word boundaries.
        Parameters:
        phrase - The phrase to add to the list of expressions used to find and markup text.
      • addPhrases

        public void addPhrases​(java.util.Collection<java.lang.String> phrases)
        Adds multiple phrases to the list of expressions used to find and markup text. Internally calls addPhrase(String) for each string in the provide value.
        Parameters:
        phrases - Multiple phrases to the list of expressions used to find and markup text.
      • getApplyRedactions

        public boolean getApplyRedactions()
      • setApplyRedactions

        public void setApplyRedactions​(boolean applyRedactions)
      • getApplyHighLights

        public boolean getApplyHighLights()
      • setApplyHighLights

        public void setApplyHighLights​(boolean applyHighLights)