|
JMRTD 0.4.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jmrtd.lds.MRZInfo
public class MRZInfo
Data structure for storing the MRZ information as found in DG1. Based on ICAO Doc 9303 part 1 and 3.
| Field Summary | |
|---|---|
static int |
DOC_TYPE_ID1
ID1 document type for credit card sized national identity cards. |
static int |
DOC_TYPE_ID2
ID2 document type. |
static int |
DOC_TYPE_ID3
ID3 document type for passport booklets. |
static int |
DOC_TYPE_UNSPECIFIED
Unspecified document type (do not use, choose ID1 or ID3). |
| Constructor Summary | |
|---|---|
MRZInfo(InputStream in)
Creates a new MRZ based on an input stream. |
|
MRZInfo(int documentType,
Country issuingState,
String primaryIdentifier,
String[] secondaryIdentifiers,
String documentNumber,
Country nationality,
Date dateOfBirth,
Gender gender,
Date dateOfExpiry,
String personalNumber)
Creates a new MRZ. |
|
| Method Summary | |
|---|---|
static char |
checkDigit(String str)
Computes the 7-3-1 check digit for part of the MRZ. |
boolean |
equals(Object obj)
Whether this MRZ info is identical to the other one. |
Date |
getDateOfBirth()
Gets the date of birth of the passport holder. |
Date |
getDateOfExpiry()
Gets the date of expiry |
String |
getDocumentNumber()
Gets the document number. |
int |
getDocumentType()
Gets the document type. |
byte[] |
getEncoded()
Gets this MRZ info as byte array. |
Gender |
getGender()
Gets the passport holder's gender. |
Country |
getIssuingState()
Gets the issuing state |
Country |
getNationality()
Gets the passport holder's nationality. |
String |
getPersonalNumber()
Gets the personal number. |
String |
getPrimaryIdentifier()
Gets the passport holder's last name. |
String[] |
getSecondaryIdentifiers()
Gets the passport holder's first names. |
int |
hashCode()
Gets a hash code for this MRZ info. |
void |
setDateOfBirth(Date dateOfBirth)
Sets the date of birth. |
void |
setDateOfExpiry(Date dateOfExpiry)
Sets the date of expiry. |
void |
setDocumentNumber(String documentNumber)
Sets the document number. |
void |
setGender(Gender gender)
Sets the gender. |
void |
setIssuingState(Country issuingState)
Sets the issuing state. |
void |
setNationality(Country nationality)
Sets the passport holder's nationality. |
void |
setPersonalNumber(String personalNumber)
Sets the personal number. |
void |
setPrimaryIdentifier(String primaryIdentifier)
Sets the passport holder's last name. |
void |
setSecondaryIdentifiers(String secondaryIdentifiers)
Sets the passport holder's first names. |
void |
setSecondaryIdentifiers(String[] secondaryIdentifiers)
Sets the passport holder's first names. |
String |
toString()
Creates a textual representation of this MRZ. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DOC_TYPE_UNSPECIFIED
public static final int DOC_TYPE_ID1
public static final int DOC_TYPE_ID2
public static final int DOC_TYPE_ID3
| Constructor Detail |
|---|
public MRZInfo(int documentType,
Country issuingState,
String primaryIdentifier,
String[] secondaryIdentifiers,
String documentNumber,
Country nationality,
Date dateOfBirth,
Gender gender,
Date dateOfExpiry,
String personalNumber)
documentType - document typeissuingState - issuing stateprimaryIdentifier - card holder namesecondaryIdentifiers - card holder namedocumentNumber - document numbernationality - nationalitydateOfBirth - date of birthgender - genderdateOfExpiry - date of expirypersonalNumber - personal numberpublic MRZInfo(InputStream in)
in - contains the contents of DG1 (without the tag and length)| Method Detail |
|---|
public byte[] getEncoded()
public Date getDateOfBirth()
public void setDateOfBirth(Date dateOfBirth)
dateOfBirth - new date of birthpublic Date getDateOfExpiry()
public void setDateOfExpiry(Date dateOfExpiry)
dateOfExpiry - new date of expirypublic String getDocumentNumber()
public void setDocumentNumber(String documentNumber)
documentNumber - new document numberpublic int getDocumentType()
public Country getIssuingState()
public void setIssuingState(Country issuingState)
issuingState - new issuing statepublic String getPrimaryIdentifier()
public void setPrimaryIdentifier(String primaryIdentifier)
primaryIdentifier - new primary identifierpublic String[] getSecondaryIdentifiers()
public void setSecondaryIdentifiers(String[] secondaryIdentifiers)
secondaryIdentifiers - new secondary identifierspublic void setSecondaryIdentifiers(String secondaryIdentifiers)
secondaryIdentifiers - new secondary identifierspublic Country getNationality()
public void setNationality(Country nationality)
nationality - new nationalitypublic String getPersonalNumber()
public void setPersonalNumber(String personalNumber)
personalNumber - new personal numberpublic Gender getGender()
public void setGender(Gender gender)
gender - new genderpublic String toString()
toString in class ObjectObject.toString()public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic static char checkDigit(String str)
str - a part of the MRZ.
|
JMRTD 0.4.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||