java.lang.Object
com.microblink.blinkid.entities.recognizers.blinkid.mrtd.MrzResult

public final class MrzResult extends Object
Represents data extracted from MRZ (Machine Readable Zone) of Machine Readable Travel Document (MRTD).
  • Constructor Details

    • MrzResult

      public MrzResult(long nativeContext, @Nullable Object keep)
      Parameters:
      nativeContext - Native MRZ result.
      keep - Owner of the native MRZ result.
  • Method Details

    • getDocumentType

      @NonNull public MrtdDocumentType getDocumentType()
      Returns the MRTD document type of recognized document.
      Returns:
      Recognized MRTD document type.
    • getPrimaryId

      @NonNull public 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 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 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 String getSanitizedIssuer()
      Returns issuer, but without additional '<' characters if they exist.
      See Also:
    • getIssuerName

      @NonNull public 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 Date 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

      public AgeLimitStatus getAgeLimitStatus(int ageLimit)
      Calculates whether the document owner is older than the given ageLimit 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:
    • getDocumentNumber

      @NonNull public 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 use getDocumentType().
      Returns:
      document number or empty string if not available
    • getSanitizedDocumentNumber

      @NonNull public String getSanitizedDocumentNumber()
      Returns document number, but without additional '<' characters if they exist.
      See Also:
    • getNationality

      @NonNull public 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 String getSanitizedNationality()
      Returns nationality, but without additional '<' characters if they exist.
      See Also:
    • getNationalityName

      @NonNull public 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 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 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 String getSanitizedDocumentCode()
      Returns document code, but without additional '<' characters if they exist.
      See Also:
    • getDateOfExpiry

      @NonNull public Date getDateOfExpiry()
      Returns date of expiry
      Returns:
      date of expiry
    • getOpt1

      @NonNull public 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 use getDocumentType().
      Returns:
      first optional data or empty string if not available
    • getSanitizedOpt1

      @NonNull public String getSanitizedOpt1()
      Returns opt1 field, but without additional '<' characters if they exist.
      See Also:
    • getOpt2

      @NonNull public 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 use getDocumentType().
      Returns:
      second optional data or empty string if not available
    • getSanitizedOpt2

      @NonNull public String getSanitizedOpt2()
      Returns opt2 field, but without additional '<' characters if they exist.
      See Also:
    • getAlienNumber

      @NonNull public String getAlienNumber()
      Returns alien number. Returns empty string if not available. Exists only on US Green Cards. To see which document was scanned use getDocumentType().
      Returns:
      alien number or empty string if not available
    • getApplicationReceiptNumber

      @NonNull public String getApplicationReceiptNumber()
      Returns application receipt number. Returns empty string if not available. Exists only on US Green Cards. To see which document was scanned use getDocumentType().
      Returns:
      application receipt number or empty string if not available.
    • getImmigrantCaseNumber

      @NonNull public String getImmigrantCaseNumber()
      Returns immigrant case number. Returns empty string if not available. Exists only on US Green Cards. To see which document was scanned use getDocumentType().
      Returns:
      immigrant case number or empty string if not available.
    • getMrzText

      @NonNull public 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.