K - The type of object being anonymizedpublic abstract class AbstractAnonymizer<K> extends Object implements Anonymizer<K>
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Anonymizer<K>> |
attributeAnonymizers
The map of AttributeType'sOID we want to anonymize.
|
protected boolean |
caseSensitive
A flag set to true if the AttributeType is case sensitive
|
private static int[] |
CHAR_MAP
A table containing booleans when the corresponding char is printable
|
private static char[] |
NOT_SENSITIVE_MAP
Map of chars to use in the anonymized values 0 5 10 15 20 25 30 35 40
|
protected SchemaManager |
schemaManager
The SchemaManager instance
|
private static char[] |
SENSITIVE_MAP |
| Constructor and Description |
|---|
AbstractAnonymizer() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
computeNewValue(byte[] valBytes)
Compute the next byte[] value
|
protected String |
computeNewValue(String valStr)
Compute the next String value
|
Map<Integer,byte[]> |
getLatestBytesMap() |
Map<Integer,String> |
getLatestStringMap() |
void |
setAnonymizers(Map<String,Anonymizer<K>> attributeAnonymizers)
Set the list of existing anonymizers
|
void |
setLatestBytesMap(Map<Integer,byte[]> latestBytesMap) |
void |
setLatestStringMap(Map<Integer,String> latestStringMap) |
void |
setSchemaManager(SchemaManager schemaManager)
Inject a SchemaManager instance in this Anonymizer
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitanonymizeprotected SchemaManager schemaManager
protected Map<String,Anonymizer<K>> attributeAnonymizers
protected boolean caseSensitive
private static final char[] NOT_SENSITIVE_MAP
private static final char[] SENSITIVE_MAP
private static final int[] CHAR_MAP
public void setSchemaManager(SchemaManager schemaManager)
setSchemaManager in interface Anonymizer<K>schemaManager - The SchemaManager instancepublic void setAnonymizers(Map<String,Anonymizer<K>> attributeAnonymizers)
setAnonymizers in interface Anonymizer<K>attributeAnonymizers - The list of existing anonymizerspublic Map<Integer,String> getLatestStringMap()
getLatestStringMap in interface Anonymizer<K>public void setLatestStringMap(Map<Integer,String> latestStringMap)
setLatestStringMap in interface Anonymizer<K>latestStringMap - The latest String anonymized value mappublic Map<Integer,byte[]> getLatestBytesMap()
getLatestBytesMap in interface Anonymizer<K>public void setLatestBytesMap(Map<Integer,byte[]> latestBytesMap)
setLatestBytesMap in interface Anonymizer<K>latestBytesMap - The latest byte[] anonymized value mapprotected String computeNewValue(String valStr)
valStr - The original valueprotected byte[] computeNewValue(byte[] valBytes)
valBytes - The original valueCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.