Package com.microblink.blinkid.entities.recognizers.blinkid.idbarcode

# Class IdBarcodeRecognizer.Result

java.lang.Object
com.microblink.blinkid.entities.Entity.Result
com.microblink.blinkid.entities.recognizers.Recognizer.Result
com.microblink.blinkid.entities.recognizers.blinkid.idbarcode.IdBarcodeRecognizer.Result

All Implemented Interfaces:
  `android.os.Parcelable`

Enclosing class:
  IdBarcodeRecognizer

public static final class IdBarcodeRecognizer.Result extends Recognizer.Result

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.microblink.blinkid.entities.recognizers.Recognizer.Result

  `Recognizer.Result.State`

  ## Nested classes/interfaces inherited from interface android.os.Parcelable

  `android.os.Parcelable.ClassLoaderCreator<T extends Object>, android.os.Parcelable.Creator<T extends Object>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final android.os.Parcelable.Creator<IdBarcodeRecognizer.Result>`
  `CREATOR`

  ### Fields inherited from class com.microblink.blinkid.entities.Entity.Result

  `mOwner`

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Result(long nativeResult)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `IdBarcodeRecognizer.Result`
  `clone()`
  Create a copy of the result.
  `protected void`
  `deserializeFromByteArray(byte[] arr)`
  `String`
  `getAdditionalNameInformation()`
  The additional name information of the document owner.
  `String`
  `getAddress()`
  The address of the document owner.
  `int`
  `getAge()`
  The current age of the document owner in years.
  `AgeLimitStatus`
  `getAgeLimitStatus(int ageLimit)`
  Calculates whether the document owner is older than the given `ageLimit` in years or not.
  `BarcodeType`
  `getBarcodeType()`
  The format of the scanned barcode.
  `String`
  `getCity()`
  The city address portion of the document owner.
  `Date`
  `getDateOfBirth()`
  The date of birth of the document owner.
  `Date`
  `getDateOfExpiry()`
  The date of expiry of the document.
  `Date`
  `getDateOfIssue()`
  The date of issue of the document.
  `String`
  `getDocumentAdditionalNumber()`
  The additional number of the document.
  `String`
  `getDocumentNumber()`
  The document number.
  `IdBarcodeDocumentType`
  `getDocumentType()`
  The document type deduced from the recognized barcode
  `String`
  `getEmployer()`
  The employer of the document owner.
  `String`
  `getEndorsements()`
  The additional privileges granted to the driver license owner.
  `BarcodeElements`
  `getExtendedElements()`
  Document specific extended elements that contain all barcode fields in their original form.
  `String`
  `getFirstName()`
  The first name of the document owner.
  `String`
  `getFullName()`
  The full name of the document owner.
  `String`
  `getIssuingAuthority()`
  The issuing authority of the document.
  `String`
  `getJurisdiction()`
  The jurisdiction code address portion of the document owner.
  `String`
  `getLastName()`
  The last name of the document owner.
  `String`
  `getMaritalStatus()`
  The marital status of the document owner.
  `String`
  `getMiddleName()`
  The middle name of the document owner.
  `String`
  `getNationality()`
  The nationality of the documet owner.
  `String`
  `getPersonalIdNumber()`
  The personal identification number.
  `String`
  `getPlaceOfBirth()`
  The place of birth of the document owner.
  `String`
  `getPostalCode()`
  The postal code address portion of the document owner.
  `String`
  `getProfession()`
  The profession of the document owner.
  `String`
  `getRace()`
  The race of the document owner.
  `byte[]`
  `getRawData()`
  The raw bytes contained inside barcode.
  `String`
  `getReligion()`
  The religion of the document owner.
  `String`
  `getResidentialStatus()`
  The residential status of the document owner.
  `String`
  `getRestrictions()`
  The restrictions to driving privileges for the driver license owner.
  `String`
  `getSex()`
  The sex of the document owner.
  `String`
  `getStreet()`
  The street address portion of the document owner.
  `String`
  `getStringData()`
  String representation of data inside barcode.
  `String`
  `getVehicleClass()`
  The type of vehicle the driver license owner has privilege to drive.
  `boolean`
  `isExpired()`
  Checks whether the document has expired or not by comparing the current time on the device with the date of expiry.
  `boolean`
  `isUncertain()`
  True if returned result is uncertain, i.e.
  `protected byte[]`
  `serializeToByteArray()`
  `protected void`
  `terminateNative(long nativeContext)`
  `String`
  `toString()`

  ### Methods inherited from class com.microblink.blinkid.entities.recognizers.Recognizer.Result

  `getResultState, isEmpty`

  ### Methods inherited from class com.microblink.blinkid.entities.Entity.Result

  `describeContents, finalize, getNativeContext, readFromParcel, writeToParcel`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### CREATOR

    public static final android.os.Parcelable.Creator<IdBarcodeRecognizer.Result> CREATOR

- ## Constructor Details

  - ### Result

    protected Result(long nativeResult)

- ## Method Details

  - ### getLastName

    @NonNull public String getLastName()
    The last name of the document owner.

  - ### getExtendedElements

    @NonNull public BarcodeElements getExtendedElements()
    Document specific extended elements that contain all barcode fields in their original form. Currently this is only filled for AAMVACompliant documents.

  - ### getDocumentType

    @NonNull public IdBarcodeDocumentType getDocumentType()
    The document type deduced from the recognized barcode

  - ### getCity

    @NonNull public String getCity()
    The city address portion of the document owner.

  - ### getDocumentNumber

    @NonNull public String getDocumentNumber()
    The document number.

  - ### getPersonalIdNumber

    @NonNull public String getPersonalIdNumber()
    The personal identification number.

  - ### getBarcodeType

    @NonNull public BarcodeType getBarcodeType()
    The format of the scanned barcode.

  - ### getJurisdiction

    @NonNull public String getJurisdiction()
    The jurisdiction code address portion of the document owner.

  - ### getPostalCode

    @NonNull public String getPostalCode()
    The postal code address portion of the document owner.

  - ### getRawData

    @NonNull public byte[] getRawData()
    The raw bytes contained inside barcode.

  - ### isUncertain

    public boolean isUncertain()
    True if returned result is uncertain, i.e. if scanned barcode was incomplete (i.e. (has parts of it missing).

  - ### getStreet

    @NonNull public String getStreet()
    The street address portion of the document owner.

  - ### getResidentialStatus

    @NonNull public String getResidentialStatus()
    The residential status of the document owner.

  - ### getEmployer

    @NonNull public String getEmployer()
    The employer of the document owner.

  - ### getVehicleClass

    @NonNull public String getVehicleClass()
    The type of vehicle the driver license owner has privilege to drive.

  - ### getProfession

    @NonNull public String getProfession()
    The profession of the document owner.

  - ### getDateOfExpiry

    @NonNull public Date getDateOfExpiry()
    The date of expiry of the document.

  - ### getPlaceOfBirth

    @NonNull public String getPlaceOfBirth()
    The place of birth of the document owner.

  - ### getAddress

    @NonNull public String getAddress()
    The address of the document owner.

  - ### getRace

    @NonNull public String getRace()
    The race of the document owner.

  - ### getSex

    @NonNull public String getSex()
    The sex of the document owner.

  - ### getFullName

    @NonNull public String getFullName()
    The full name of the document owner.

  - ### getRestrictions

    @NonNull public String getRestrictions()
    The restrictions to driving privileges for the driver license owner.

  - ### getDateOfBirth

    @NonNull public Date getDateOfBirth()
    The date of birth of the document owner.

  - ### getDocumentAdditionalNumber

    @NonNull public String getDocumentAdditionalNumber()
    The additional number of the document.

  - ### getDateOfIssue

    @NonNull public Date getDateOfIssue()
    The date of issue of the document.

  - ### getStringData

    @NonNull public String getStringData()
    String representation of data inside barcode.

  - ### getReligion

    @NonNull public String getReligion()
    The religion of the document owner.

  - ### getFirstName

    @NonNull public String getFirstName()
    The first name of the document owner.

  - ### getIssuingAuthority

    @NonNull public String getIssuingAuthority()
    The issuing authority of the document.

  - ### getNationality

    @NonNull public String getNationality()
    The nationality of the documet owner.

  - ### getAdditionalNameInformation

    @NonNull public String getAdditionalNameInformation()
    The additional name information of the document owner.

  - ### getEndorsements

    @NonNull public String getEndorsements()
    The additional privileges granted to the driver license owner.

  - ### getMiddleName

    @NonNull public String getMiddleName()
    The middle name of the document owner.

  - ### getMaritalStatus

    @NonNull public String getMaritalStatus()
    The marital status of the document owner.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`
    Returns:
      string version of this result

  - ### getAge

    public int getAge()
    The current age of the document owner in years. It is calculated 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:
      - `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

  - ### isExpired

    public boolean isExpired()
    Checks whether the document has expired or not by comparing the current time on the device with the date of expiry.
    Returns:
      `true` if the document has expired, `false` if the document has not expired or date of expiry is unknown.

  - ### serializeToByteArray

    @Nullable protected byte[] serializeToByteArray()
    Specified by:
      `serializeToByteArray` in class `Entity.Result`

  - ### deserializeFromByteArray

    protected void deserializeFromByteArray(@NonNull byte[] arr)
    Specified by:
      `deserializeFromByteArray` in class `Entity.Result`

  - ### clone

    public IdBarcodeRecognizer.Result clone()
    Description copied from class: `Entity.Result`
    Create a copy of the result. This is required in order to retain the result even after owning entity has mutated it.
    Specified by:
      `clone` in class `Recognizer.Result`
    Returns:
      a copy of the result

  - ### terminateNative

    protected void terminateNative(long nativeContext)
    Specified by:
      `terminateNative` in class `Entity.Result`