Class NamedEntityRedactionSettings
- java.lang.Object
-
- com.nuix.superutilities.namedentities.NamedEntityRedactionSettings
-
public class NamedEntityRedactionSettings extends java.lang.Object
Provides settings for performing named entity text redaction performed byNamedEntityUtility
, specifically in the methodsNamedEntityUtility.recordRedactedCopies(nuix.Item, NamedEntityRedactionSettings)
,NamedEntityUtility.recordRedactedCopies(Collection, NamedEntityRedactionSettings)
andNamedEntityUtility.recordRedactedCopies(nuix.Case, NamedEntityRedactionSettings)
.
-
-
Constructor Summary
Constructors Constructor Description NamedEntityRedactionSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllBuiltInEntities()
Adds the names of all the built-in entities as of Nuix 7.8: company, country, credit-card-num, email, ip-address, money, person, personal-id-num, url and phone-numbervoid
addEntityNames(java.util.Collection<java.lang.String> entityNames)
Adds entity names to this instance.void
clearEntityNames()
Clears all entity names associated with this instancejava.lang.String
getCustomMetadataFieldPrefix()
Gets the prefix applied to custom metadata fields names.java.util.Set<java.lang.String>
getEntityNames()
Gets the entity names currently associated with this instanceboolean
getOnlyRecordChanges()
Gets value determining whether only values that have a redaction performed should be recorded.boolean
getRecordTimeOfRedaction()
Gets whether a custom metadata field will be written to updated items with a time stamp of when the redaction was performed.boolean
getRedactContentText()
Gets value determining whether item's content text should be processedjava.lang.String
getRedactionReplacementTemplate()
Gets the template string used to generate the replacement text put in place of a redaction in the text.boolean
getRedactProperties()
Gets value determining whether metadata properties should be processed.java.util.Set<java.lang.String>
getSpecificProperties()
Gets list of specific metadata property names to be scanned.java.lang.String
getTimeOfRedactionFieldName()
Gets the name of the custom metadata field used to record redaction time stamp whengetRecordTimeOfRedaction()
returns true.void
setCustomMetadataFieldPrefix(java.lang.String customMetadataFieldPrefix)
Sets the prefix applied to custom metadata fields names.void
setOnlyRecordChanges(boolean onlyRecordChanges)
Sets value determining whether only values that have a redaction performed should be recordedvoid
setRecordTimeOfRedaction(boolean recordTimeOfRedaction)
Sets whether a custom metadata field will be written to updated items with a time stamp of when the redaction was performed.void
setRedactContentText(boolean redactContentText)
Sets value determining whether items' content text should be processedvoid
setRedactionReplacementTemplate(java.lang.String redactionReplacementTemplate)
Sets the template string used to generate replacement text put in place of a redaction in the text.void
setRedactProperties(boolean redactProperties)
Sets value determining whether metadata properties should be processedvoid
setSpecificProperties(java.util.Collection<java.lang.String> specificProperties)
Sets list of specific metadata property names to be scanned.void
setTimeOfRedactionFieldName(java.lang.String timeOfRedactionFieldName)
Sets the name of the custom metadata field used to record redaction time stamp whengetRecordTimeOfRedaction()
returns true.
-
-
-
Method Detail
-
addAllBuiltInEntities
public void addAllBuiltInEntities()
Adds the names of all the built-in entities as of Nuix 7.8: company, country, credit-card-num, email, ip-address, money, person, personal-id-num, url and phone-number
-
getEntityNames
public java.util.Set<java.lang.String> getEntityNames()
Gets the entity names currently associated with this instance- Returns:
- The entity names currently associated with this instance
-
addEntityNames
public void addEntityNames(java.util.Collection<java.lang.String> entityNames)
Adds entity names to this instance.- Parameters:
entityNames
- The entity names to add
-
clearEntityNames
public void clearEntityNames()
Clears all entity names associated with this instance
-
getRedactProperties
public boolean getRedactProperties()
Gets value determining whether metadata properties should be processed.- Returns:
- True if metadata properties should be processed
-
setRedactProperties
public void setRedactProperties(boolean redactProperties)
Sets value determining whether metadata properties should be processed- Parameters:
redactProperties
- Whether metadata properties should be processed
-
getRedactContentText
public boolean getRedactContentText()
Gets value determining whether item's content text should be processed- Returns:
- True if item's content text should be processed
-
setRedactContentText
public void setRedactContentText(boolean redactContentText)
Sets value determining whether items' content text should be processed- Parameters:
redactContentText
- Whether items' content text should be processed
-
getOnlyRecordChanges
public boolean getOnlyRecordChanges()
Gets value determining whether only values that have a redaction performed should be recorded.- Returns:
- True when only updated fields are recorded, false when all fields are recorded
-
setOnlyRecordChanges
public void setOnlyRecordChanges(boolean onlyRecordChanges)
Sets value determining whether only values that have a redaction performed should be recorded- Parameters:
onlyRecordChanges
- True when only updated fields are recorded, false when all fields are recorded
-
getCustomMetadataFieldPrefix
public java.lang.String getCustomMetadataFieldPrefix()
Gets the prefix applied to custom metadata fields names. Custom metadata field names are source property field name prepended with this prefix or "ContentText" (for item content text) prepended with this prefix.- Returns:
- The prefix which will be appended to custom metadata field names. Can be an empty string.
-
setCustomMetadataFieldPrefix
public void setCustomMetadataFieldPrefix(java.lang.String customMetadataFieldPrefix)
Sets the prefix applied to custom metadata fields names. Custom metadata field names are source property field name prepended with this prefix or "ContentText" (for item content text) prepended with this prefix.- Parameters:
customMetadataFieldPrefix
- The prefix applied to custom metadata fields names
-
getRedactionReplacementTemplate
public java.lang.String getRedactionReplacementTemplate()
Gets the template string used to generate the replacement text put in place of a redaction in the text.- Returns:
- The template string used to generate replacement text put in place of a redaction in the text
-
setRedactionReplacementTemplate
public void setRedactionReplacementTemplate(java.lang.String redactionReplacementTemplate)
Sets the template string used to generate replacement text put in place of a redaction in the text. The placeholder {entity_name} will be replaced at run-time with the name of the entity if present in the template.- Parameters:
redactionReplacementTemplate
- The template string used to generate replacement text put in place of a redaction in the text
-
getRecordTimeOfRedaction
public boolean getRecordTimeOfRedaction()
Gets whether a custom metadata field will be written to updated items with a time stamp of when the redaction was performed. The name of the custom metadata field used can be set usingsetTimeOfRedactionFieldName(String)
.- Returns:
- True if time stamp will be written to updated items
-
setRecordTimeOfRedaction
public void setRecordTimeOfRedaction(boolean recordTimeOfRedaction)
Sets whether a custom metadata field will be written to updated items with a time stamp of when the redaction was performed. The name of the custom metadata field used can be set usingsetTimeOfRedactionFieldName(String)
.- Parameters:
recordTimeOfRedaction
- True to record when the redaction was performed
-
getTimeOfRedactionFieldName
public java.lang.String getTimeOfRedactionFieldName()
Gets the name of the custom metadata field used to record redaction time stamp whengetRecordTimeOfRedaction()
returns true.- Returns:
- The name of the custom metadata field used to record redaction time stamp
-
setTimeOfRedactionFieldName
public void setTimeOfRedactionFieldName(java.lang.String timeOfRedactionFieldName)
Sets the name of the custom metadata field used to record redaction time stamp whengetRecordTimeOfRedaction()
returns true.- Parameters:
timeOfRedactionFieldName
- The name of the custom metadata field used to record redaction time stamp
-
getSpecificProperties
public java.util.Set<java.lang.String> getSpecificProperties()
Gets list of specific metadata property names to be scanned. If null or has no entries, all metadata properties are scanned. If this contains a list of metadata property names, only those metadata properties will be scanned.- Returns:
- Set of specific metadata properties to be scanned or a null or empty collection if all properties are to be scanned.
-
setSpecificProperties
public void setSpecificProperties(java.util.Collection<java.lang.String> specificProperties)
Sets list of specific metadata property names to be scanned. If null or has no entries, all metadata properties are scanned. If this contains a list of metadata property names, only those metadata properties will be scanned.- Parameters:
specificProperties
- Set of specific metadata properties to be scanned or a null or empty collection means all properties are to be scanned.
-
-