Class MrzResult
java.lang.Object
com.microblink.blinkid.entities.recognizers.blinkid.mrtd.MrzResult
Represents data extracted from MRZ (Machine Readable Zone) of Machine Readable Travel Document (MRTD).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getAge()
The current age of the document owner in years.getAgeLimitStatus
(int ageLimit) Calculates whether the document owner is older than the givenageLimit
in years or not.Returns alien number.Returns application receipt number.Returns holder's date of birthReturns date of expiryReturns document code.Returns document number.Returns the MRTD document type of recognized document.Returns gender of the card holder.Returns immigrant case number.Returns 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 code which indicate the issuing State.Returns the entire Machine Readable Zone text from ID.Returns nationality of the holder represented by a three-letter or two-letter code.Returns full nationality of the holder, which is expanded from the three-letter or two-letter nationality code.getOpt1()
Returns first optional data.getOpt2()
Returns second optional data.Returns the primary indentifier.Returns document code, but without additional '<' characters if they exist.Returns document number, but without additional '<' characters if they exist.Returns issuer, but without additional '<' characters if they exist.Returns nationality, but without additional '<' characters if they exist.Returns opt1 field, but without additional '<' characters if they exist.Returns opt2 field, but without additional '<' characters if they exist.Returns the secondary identifier.boolean
Returns true if Machine Readable Zone has been parsed, false otherwise.boolean
Returns true if all check digits inside MRZ are correct, false otherwise.
-
Constructor Details
-
MrzResult
- Parameters:
nativeContext
- Native MRZ result.keep
- Owner of the native MRZ result.
-
-
Method Details
-
getDocumentType
Returns the MRTD document type of recognized document.- Returns:
- Recognized MRTD document type.
-
getPrimaryId
Returns the primary indentifier. If there is more than one component, they are separated with space.- Returns:
- the primary indentifier
-
getSecondaryId
Returns the secondary identifier. If there is more than one component, they are separated with space.- Returns:
- the secondary identifier
-
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
Returns issuer, but without additional '<' characters if they exist.- See Also:
-
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
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
-1
if date of birth is unknown.
-
getAgeLimitStatus
Calculates whether the document owner is older than the givenageLimit
in 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
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
Returns document number, but without additional '<' characters if they exist.- See Also:
-
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
Returns nationality, but without additional '<' characters if they exist.- See Also:
-
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
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
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
Returns document code, but without additional '<' characters if they exist.- See Also:
-
getDateOfExpiry
Returns date of expiry- Returns:
- date of expiry
-
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
Returns opt1 field, but without additional '<' characters if they exist.- See Also:
-
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
Returns opt2 field, but without additional '<' characters if they exist.- See Also:
-
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
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
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
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.
-