Class MrzResult
- java.lang.Object
-
- com.microblink.documentverification.entities.recognizers.blinkid.mrtd.MrzResult
-
public final class MrzResult extends java.lang.ObjectRepresents data extracted from MRZ (Machine Readable Zone) of Machine Readable Travel Document (MRTD).
-
-
Constructor Summary
Constructors Constructor Description MrzResult(long nativeContext, java.lang.Object keep)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAge()The current age of the document owner in years.AgeLimitStatusgetAgeLimitStatus(int ageLimit)Calculates whether the document owner is older than the givenageLimitin years or not.java.lang.StringgetAlienNumber()Returns alien number.java.lang.StringgetApplicationReceiptNumber()Returns application receipt number.DateResultgetDateOfBirth()Returns holder's date of birthDateResultgetDateOfExpiry()Returns date of expiryjava.lang.StringgetDocumentCode()Returns document code.java.lang.StringgetDocumentNumber()Returns document number.MrtdDocumentTypegetDocumentType()Returns the MRTD document type of recognized document.java.lang.StringgetGender()Returns gender of the card holder.java.lang.StringgetImmigrantCaseNumber()Returns immigrant case number.java.lang.StringgetIssuer()Returns three-letter or two-letter code which indicate the issuing State.java.lang.StringgetIssuerName()Returns full issuer name that is expanded from the three-letter or two-letter code which indicate the issuing State.java.lang.StringgetMrzText()Returns the entire Machine Readable Zone text from ID.java.lang.StringgetNationality()Returns nationality of the holder represented by a three-letter or two-letter code.java.lang.StringgetNationalityName()Returns full nationality of the holder, which is expanded from the three-letter or two-letter nationality code.java.lang.StringgetOpt1()Returns first optional data.java.lang.StringgetOpt2()Returns second optional data.java.lang.StringgetPrimaryId()Returns the primary indentifier.java.lang.StringgetSanitizedDocumentCode()Returns document code, but without additional '<' characters if they exist.java.lang.StringgetSanitizedDocumentNumber()Returns document number, but without additional '<' characters if they exist.java.lang.StringgetSanitizedIssuer()Returns issuer, but without additional '<' characters if they exist.java.lang.StringgetSanitizedNationality()Returns nationality, but without additional '<' characters if they exist.java.lang.StringgetSanitizedOpt1()Returns opt1 field, but without additional '<' characters if they exist.java.lang.StringgetSanitizedOpt2()Returns opt2 field, but without additional '<' characters if they exist.java.lang.StringgetSecondaryId()Returns the secondary identifier.booleanisMrzParsed()Returns true if Machine Readable Zone has been parsed, false otherwise.booleanisMrzVerified()Returns true if all check digits inside MRZ are correct, false otherwise.
-
-
-
Method Detail
-
getDocumentType
@NonNull public MrtdDocumentType getDocumentType()
Returns the MRTD document type of recognized document.- Returns:
- Recognized MRTD document type.
-
getPrimaryId
@NonNull public java.lang.String getPrimaryId()
Returns the primary indentifier. If there is more than one component, they are separated with space.- Returns:
- the primary indentifier
-
getSecondaryId
@NonNull public java.lang.String getSecondaryId()
Returns the secondary identifier. If there is more than one component, they are separated with space.- Returns:
- the secondary identifier
-
getIssuer
@NonNull public java.lang.String getIssuer()
Returns three-letter or two-letter code which indicate the issuing State. Three-letter codes are based on Aplha-3 codes for entities specified in ISO 3166-1, with extensions for certain States. Two-letter codes are based on Aplha-2 codes for entities specified in ISO 3166-1, with extensions for certain States.- Returns:
- three-letter or two-letter code which indicate the issuing State
-
getSanitizedIssuer
@NonNull public java.lang.String getSanitizedIssuer()
Returns issuer, but without additional '<' characters if they exist.- See Also:
getIssuer()
-
getIssuerName
@NonNull public java.lang.String getIssuerName()
Returns full issuer name that is expanded from the three-letter or two-letter code which indicate the issuing State.- Returns:
- full issuer name that is expanded from the three-letter or two-letter issuer code.
-
getDateOfBirth
@NonNull public DateResult getDateOfBirth()
Returns holder's date of birth- Returns:
- holder's date of birth
-
getAge
public int getAge()
The current age of the document owner in years. It is calculated as difference between now and date of birth. Now is current time on the device.- Returns:
- current age of the document owner in years or
-1if date of birth is unknown.
-
getAgeLimitStatus
public AgeLimitStatus getAgeLimitStatus(int ageLimit)
Calculates whether the document owner is older than the givenageLimitin years or not. Status is calculated by using the date of birth and the current time on the device.- Parameters:
ageLimit- age limit in years- Returns:
- age limit status for the document owner:
-
AgeLimitStatus.OverAgeLimit: age is greater than or equal to the given age limit -
AgeLimitStatus.BelowAgeLimit: age is less than the given age limit -
AgeLimitStatus.NotAvailable: date of birth is unknown
-
-
getDocumentNumber
@NonNull public java.lang.String getDocumentNumber()
Returns document number. Document number contains up to 9 characters. Element does not exist on US Green Card. To see which document was scanned usegetDocumentType().- Returns:
- document number or empty string if not available
-
getSanitizedDocumentNumber
@NonNull public java.lang.String getSanitizedDocumentNumber()
Returns document number, but without additional '<' characters if they exist.- See Also:
getDocumentNumber()
-
getNationality
@NonNull public java.lang.String getNationality()
Returns nationality of the holder represented by a three-letter or two-letter code. Three-letter codes are based on Alpha-3 codes for entities specified in ISO 3166-1, with extensions for certain States. Two-letter codes are based on Aplha-2 codes for entities specified in ISO 3166-1, with extensions for certain States.- Returns:
- nationality of the holder represented by a three-letter or two-letter code
-
getSanitizedNationality
@NonNull public java.lang.String getSanitizedNationality()
Returns nationality, but without additional '<' characters if they exist.- See Also:
getNationality()
-
getNationalityName
@NonNull public java.lang.String getNationalityName()
Returns full nationality of the holder, which is expanded from the three-letter or two-letter nationality code.- Returns:
- full nationality of the holder, which is expanded from the three-letter or two-letter nationality code.
-
getGender
@NonNull public java.lang.String getGender()
Returns gender of the card holder. Gender is specified by use of the single initial, capital letter F for female, M for male or<for unspecified.- Returns:
- gender of the holder.
-
getDocumentCode
@NonNull public java.lang.String getDocumentCode()
Returns document code. Document code contains two characters. For MRTD the first character shall be A, C or I. The second character shall be discretion of the issuing State or organization except that V shall not be used, and `C` shall not be used after `A` except in the crew member certificate. On machine-readable passports (MRP) first character shall be `P` to designate an MRP. One additional letter may be used, at the discretion of the issuing State or organization, to designate a particular MRP. If the second character position is not used for this purpose, it shall be filled by the filter character<.- Returns:
- document code
-
getSanitizedDocumentCode
@NonNull public java.lang.String getSanitizedDocumentCode()
Returns document code, but without additional '<' characters if they exist.- See Also:
getDocumentCode()
-
getDateOfExpiry
@NonNull public DateResult getDateOfExpiry()
Returns date of expiry- Returns:
- date of expiry
-
getOpt1
@NonNull public java.lang.String getOpt1()
Returns first optional data. Returns empty string if not available. Element does not exist on US Green Card. To see which document was scanned usegetDocumentType().- Returns:
- first optional data or empty string if not available
-
getSanitizedOpt1
@NonNull public java.lang.String getSanitizedOpt1()
Returns opt1 field, but without additional '<' characters if they exist.- See Also:
getOpt1()
-
getOpt2
@NonNull public java.lang.String getOpt2()
Returns second optional data. Returns empty string if not available. Element does not exist on Passports and Visas. To see which document was scanned usegetDocumentType().- Returns:
- second optional data or empty string if not available
-
getSanitizedOpt2
@NonNull public java.lang.String getSanitizedOpt2()
Returns opt2 field, but without additional '<' characters if they exist.- See Also:
getOpt2()
-
getAlienNumber
@NonNull public java.lang.String getAlienNumber()
Returns alien number. Returns empty string if not available. Exists only on US Green Cards. To see which document was scanned usegetDocumentType().- Returns:
- alien number or empty string if not available
-
getApplicationReceiptNumber
@NonNull public java.lang.String getApplicationReceiptNumber()
Returns application receipt number. Returns empty string if not available. Exists only on US Green Cards. To see which document was scanned usegetDocumentType().- Returns:
- application receipt number or empty string if not available.
-
getImmigrantCaseNumber
@NonNull public java.lang.String getImmigrantCaseNumber()
Returns immigrant case number. Returns empty string if not available. Exists only on US Green Cards. To see which document was scanned usegetDocumentType().- Returns:
- immigrant case number or empty string if not available.
-
getMrzText
@NonNull public java.lang.String getMrzText()
Returns the entire Machine Readable Zone text from ID. This text is usually used for parsing other elements. NOTE: This string is available only if OCR result was parsed successfully.- Returns:
- the entire Machine Readable Zone text from ID.
-
isMrzParsed
public boolean isMrzParsed()
Returns true if Machine Readable Zone has been parsed, false otherwise.- Returns:
- true if Machine Readable Zone has been parsed, false otherwise.
-
isMrzVerified
public boolean isMrzVerified()
Returns true if all check digits inside MRZ are correct, false otherwise.- Returns:
- true is all check digits inside MRZ are correct, false otherwise.
-
-