|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.tools.rumen.anonymization.WordListAnonymizerUtility
public class WordListAnonymizerUtility
Utility class to handle commonly performed tasks in a
DefaultAnonymizableDataType
using a WordList for anonymization.
//TODO There is no caching for saving memory.
| Constructor Summary | |
|---|---|
WordListAnonymizerUtility()
|
|
| Method Summary | |
|---|---|
static String[] |
extractSuffix(String data,
String[] suffixes)
Extracts a known suffix from the given data. |
static boolean |
hasSuffix(String data,
String[] suffixes)
Checks if the given data has a known suffix. |
static boolean |
isKnownData(String data)
Checks if the given data is known. |
static boolean |
isKnownData(String data,
String[] knownWords)
Checks if the given data is known. |
static boolean |
needsAnonymization(String data)
Checks if the data needs anonymization. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WordListAnonymizerUtility()
| Method Detail |
|---|
public static boolean needsAnonymization(String data)
public static boolean hasSuffix(String data,
String[] suffixes)
public static String[] extractSuffix(String data,
String[] suffixes)
RuntimeException - if the data doesn't have a suffix.
Use hasSuffix(String, String[]) to make sure that the
given data has a suffix.public static boolean isKnownData(String data)
KNOWN_WORDS to
detect if the given data is a commonly used (so called 'known') word.
public static boolean isKnownData(String data,
String[] knownWords)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||