|
|
|
|
@ -14,11 +14,15 @@ public class RegistrationNumber extends AbstractComponent {
|
|
|
|
|
|
|
|
|
|
private static final DateFormats dateFormats = new DateFormats();
|
|
|
|
|
|
|
|
|
|
public static final String getDigits(String str) {
|
|
|
|
|
return !isEmpty(str) ? str.replaceAll("[^0-9]", "") : "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static final Type getType(String str) {
|
|
|
|
|
if (isEmpty(str))
|
|
|
|
|
String digits = getDigits(str);
|
|
|
|
|
if (isEmpty(digits))
|
|
|
|
|
return Type.UNKNOWN;
|
|
|
|
|
|
|
|
|
|
String digits = str.replaceAll("[^0-9]", "");
|
|
|
|
|
int length = digits.length();
|
|
|
|
|
if (length == 10)
|
|
|
|
|
return Type.BUSINESS;
|
|
|
|
|
|