Package overit.geocall.basic.anonymizer
Class ItalianFiscalCode
java.lang.Object
overit.geocall.basic.anonymizer.ItalianFiscalCode
Use this class to generate or verify an Italian fiscal code.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGenerate the italian fiscal code based on the user's information given as parameters.protected static StringgetBirthDateCode(Date d, String gender) protected static Stringprotected static StringgetCityCode(String city) protected static StringgetNameCode(String text) protected static StringgetSurnameCode(String text) protected static voidstatic booleanCheck if the given code is compliant to the Italan fiscal code format.
-
Field Details
-
_cities
-
-
Method Details
-
isValid
Check if the given code is compliant to the Italan fiscal code format.- Parameters:
code- string containing the fiscal code that will gonna checked.- Returns:
trueif it is a valid Italian fiscal code;falseotherwise.
-
generate
public static String generate(String surname, String name, Date birthday, String birthplace, String gender) Generate the italian fiscal code based on the user's information given as parameters.- Parameters:
surname- user's surnamename- user's name (can be specified even the second name if any)birthday- user's birthdaybirthplace- user's birthplacegender- string indicating the user's gender. Accepted values are:Mfor maleFfor female
- Returns:
- the string corresponding to the italian fiscal code for this user
-
getNameCode
-
getSurnameCode
-
getBirthDateCode
-
getCityCode
-
getCitySet
-
initializeCityMap
protected static void initializeCityMap() -
getCIN
-