public class VerhoeffIdentifierValidator extends BaseHyphenatedIdentifierValidator
| Constructor and Description |
|---|
VerhoeffIdentifierValidator() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAllowedCharacters() |
protected int |
getCheckDigit(String undecoratedIdentifier) |
String |
getName() |
String |
getValidIdentifier(String undecoratedIdentifier)
Override to disallow identifiers that are not exactly VERHOEFF_UNDECORATED_ID_LENGTH long.
|
boolean |
isValid(String identifier)
Override to disallow numeric check digits and identifiers that are not exactly
VERHOEFF_ID_LENGTH long.
|
checkAllowedIdentifierpublic String getAllowedCharacters()
getAllowedCharacters in interface IdentifierValidatorgetAllowedCharacters in class BaseHyphenatedIdentifierValidatorBaseHyphenatedIdentifierValidator.getAllowedCharacters()public String getName()
getName in interface IdentifierValidatorgetName in class BaseHyphenatedIdentifierValidatorBaseHyphenatedIdentifierValidator.getName()protected int getCheckDigit(String undecoratedIdentifier)
getCheckDigit in class BaseHyphenatedIdentifierValidatorBaseHyphenatedIdentifierValidator.getCheckDigit(java.lang.String)public boolean isValid(String identifier) throws UnallowedIdentifierException
isValid in interface IdentifierValidatorisValid in class BaseHyphenatedIdentifierValidatoridentifier - The Identifier to check.UnallowedIdentifierException - if the identifier contains unallowed characters or is
otherwise not appropriate for this validator.BaseHyphenatedIdentifierValidator.isValid(java.lang.String)public String getValidIdentifier(String undecoratedIdentifier) throws UnallowedIdentifierException
getValidIdentifier in interface IdentifierValidatorgetValidIdentifier in class BaseHyphenatedIdentifierValidatorundecoratedIdentifier - The identifier prior to being given a check digit or other form
of validation.UnallowedIdentifierException - if the identifier contains unallowed characters or is
otherwise not appropriate for this validator.Should get valid identifierCopyright © 2024 OpenMRS Inc.. All rights reserved.