public abstract class MrzRecord extends Object implements Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
MrzRecord(MrzFormat format,
String recordName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildToString(StringBuilder sb) |
void |
fromMrz(String mrz)
Parses the MRZ record.
|
MrzDocumentCode |
getCode() |
char |
getCode1() |
char |
getCode2() |
MrzDate |
getDateOfBirth() |
String |
getDocumentNumber() |
MrzDate |
getExpirationDate() |
MrzFormat |
getFormat() |
String |
getGivenNames() |
String |
getIssuingCountry() |
String |
getNationality() |
String |
getRecordName() |
MrzSex |
getSex() |
String |
getSurname() |
boolean |
isValidComposite() |
boolean |
isValidDateOfBirth() |
boolean |
isValidDocumentNumber() |
boolean |
isValidExpirationDate() |
void |
setCode(MrzDocumentCode code) |
void |
setCode1(char code1) |
void |
setCode2(char code2) |
void |
setDateOfBirth(MrzDate dateOfBirth) |
void |
setDocumentNumber(String documentNumber) |
void |
setExpirationDate(MrzDate expirationDate) |
void |
setGivenNames(String givenNames) |
void |
setIssuingCountry(String issuingCountry) |
protected void |
setName(String[] name)
Helper method to set the full name.
|
void |
setNationality(String nationality) |
void |
setSex(MrzSex sex) |
void |
setSurname(String surname) |
protected void |
setValidComposite(boolean validComposite) |
protected void |
setValidDateOfBirth(boolean validDateOfBirth) |
protected void |
setValidDocumentNumber(boolean validDocumentNumber) |
protected void |
setValidExpirationDate(boolean validExpirationDate) |
abstract String |
toMrz()
Serializes this record to a valid MRZ record.
|
String |
toString() |
public final MrzFormat getFormat()
public final String getRecordName()
public void fromMrz(String mrz) throws MrzParseException
mrz - the mrz record, not null, separated by \nMrzParseException - could not parse MRZprotected final void setName(String[] name)
surname and givenNames.name - expected array of length 2, in the form of [surname, first_name]. Must not be null.public abstract String toMrz()
public MrzDocumentCode getCode()
public void setCode(MrzDocumentCode code)
code - the document codepublic char getCode1()
public void setCode1(char code1)
code1 - the document code1public char getCode2()
public void setCode2(char code2)
code2 - the document code2public String getIssuingCountry()
public void setIssuingCountry(String issuingCountry)
issuingCountry - the issuing countrypublic String getDocumentNumber()
public void setDocumentNumber(String documentNumber)
documentNumber - the document numberpublic String getSurname()
public void setSurname(String surname)
surname - the surnamepublic String getGivenNames()
public void setGivenNames(String givenNames)
givenNames - the given namespublic MrzDate getDateOfBirth()
public void setDateOfBirth(MrzDate dateOfBirth)
dateOfBirth - the date of birthpublic MrzSex getSex()
public void setSex(MrzSex sex)
sex - the sexpublic MrzDate getExpirationDate()
public void setExpirationDate(MrzDate expirationDate)
expirationDate - the expiration datepublic String getNationality()
public void setNationality(String nationality)
nationality - the nationalitypublic boolean isValidDocumentNumber()
protected void setValidDocumentNumber(boolean validDocumentNumber)
validDocumentNumber - true if valid document numberpublic boolean isValidDateOfBirth()
protected void setValidDateOfBirth(boolean validDateOfBirth)
validDateOfBirth - true if valid date of birthpublic boolean isValidExpirationDate()
protected void setValidExpirationDate(boolean validExpirationDate)
validExpirationDate - true if valid expiration date to setpublic boolean isValidComposite()
protected void setValidComposite(boolean validComposite)
validComposite - true if valid compositeprotected void buildToString(StringBuilder sb)
sb - the string builder to hold the record detailsCopyright © 2011–2020 Innovatrics. All rights reserved.