Project: talenddataquality
Issue TDQ-11440: Create an API to validate, format, enrich phone information
Contribute phone number validation (credible), reformatting (country standard), enrichment (land line, cell…) The API will wrap the google library (use maven to get the lastest version - https://github.com/googlei18n/libphonenumber ) It will be created in the data-quality git repository in the standardization project: https://github.com/Talend/data-quality/tree/master/dataquality-standardization Create a package org.talend.dataquality.standardization.phone Use maven dependencies to reference the google library. h1. Features of the API: h2. Method required in the API h3. Validation - isPossiblePhoneNumber to check whether some data are possible phone numbers (will delegate call to Google API) - isValidPhoneNumber to validate the phone number. h3. Transformation h4. Formatting - let the caller of the API format phone number (with a default E164 format, with a specified format, can use also the PhoneNumberUtil.formatOutOfCountryCallingNumber() method ) - let the caller choose the format and format the phone number accordingly h4. Extract information from phone number Create method to extract the following information from a phone number - phone number type - is valid region - country - region - geocode phone number (see PhoneNumberOfflineGeocoder) - getCarrier - getTimeZone See the attached example from http://libphonenumber.appspot.com/phonenumberparser?number=0147012500&country=FR h1. Unit tests for every single method of the API. Test phone numbers. Test data that are not phone numbers and assert on the expected errors. The following phone numbers should be correct: {noformat} +33656965822 000147554323 +33(0)147554323 00(0)147554323 0662965822 754-3010 (541) 754-3010 +1-541-754-3010 1-541-754-3010 001-541-754-3010 191 541 754 3010 636-48018 (089) / 636-48018 +49-89-636-48018 19-49-89-636-48018 (724) 203-2300 {noformat} ----
Story points: 8