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 Link icon

    • MrzResult Link icon

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

    • getDocumentType Link icon

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

      @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 Link icon

      @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 Link icon

      @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 Link icon

      @NonNull public String getSanitizedIssuer()
      Returns issuer, but without additional 'invalid input: '<'' characters if they exist.
      See Also:
    • getIssuerName Link icon

      @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 Link icon

      @NonNull public Date getDateOfBirth()
      Returns holder's date of birth
      Returns:
      holder's date of birth
    • getAge Link icon

      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 Link icon

      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 Link icon

      @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 Link icon

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

      @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 Link icon

      @NonNull public String getSanitizedNationality()
      Returns nationality, but without additional 'invalid input: '<'' characters if they exist.
      See Also:
    • getNationalityName Link icon

      @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 Link icon

      @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 Link icon

      @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 Link icon

      @NonNull public String getSanitizedDocumentCode()
      Returns document code, but without additional 'invalid input: '<'' characters if they exist.
      See Also:
    • getDateOfExpiry Link icon

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

      @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 Link icon

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

      @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 Link icon

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

      @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 Link icon

      @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 Link icon

      @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 Link icon

      @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 Link icon

      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 Link icon

      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.