Package com.microblink.blinkid.entities.recognizers.blinkid.usdl

# Class UsdlCombinedRecognizer.Result

java.lang.Object
com.microblink.blinkid.entities.Entity.Result
com.microblink.blinkid.entities.recognizers.Recognizer.Result
com.microblink.blinkid.entities.recognizers.blinkid.usdl.UsdlCombinedRecognizer.Result

All Implemented Interfaces:
  `android.os.Parcelable`, `CombinedDataMatchResult`, `CombinedResult`, `EncodedFaceImageResult`, `EncodedFullDocumentImageResult`, `FaceImageResult`, `FullDocumentImageResult`

Enclosing class:
  UsdlCombinedRecognizer

public static final class UsdlCombinedRecognizer.Result extends Recognizer.Result implements FullDocumentImageResult, EncodedFullDocumentImageResult, FaceImageResult, EncodedFaceImageResult, CombinedResult, CombinedDataMatchResult

- ## 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<UsdlCombinedRecognizer.Result>`
  `CREATOR`

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

  `mOwner`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.CombinedDataMatchResult

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.CombinedResult

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.imageresult.EncodedFaceImageResult

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.imageresult.EncodedFullDocumentImageResult

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.imageresult.FaceImageResult

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.imageresult.FullDocumentImageResult

  `CLASS_NAME`

  ### 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
  `UsdlCombinedRecognizer.Result`
  `clone()`
  Create a copy of the result.
  `protected void`
  `deserializeFromByteArray(byte[] arr)`
  `String`
  `getAddress()`
  The full address of the United States driver license 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.
  `Date`
  `getDateOfBirth()`
  The date of birth of the United States driver license owner.
  `Date`
  `getDateOfExpiry()`
  The date of expiry of the United States driver license.
  `Date`
  `getDateOfIssue()`
  The date of issue of the United States driver license.
  `DataMatchState`
  `getDocumentDataMatch()`
  Returns result of the data matching algorithm for scanned parts/sides of the document.
  `String`
  `getDocumentNumber()`
  The document number of the United States driver license.
  `byte[]`
  `getEncodedFaceImage()`
  `byte[]`
  `getEncodedFullDocumentImage()`
  `String`
  `getEndorsements()`
  The additional privileges granted to the United States driver license owner.
  `Image`
  `getFaceImage()`
  `String`
  `getField(UsdlKeys key)`
  Returns a field inside US Driver's licence.
  `String`
  `getFirstName()`
  The first name of the United States driver license owner.
  `Image`
  `getFullDocumentImage()`
  `String`
  `getFullName()`
  The full name of the United States driver license owner.
  `String`
  `getLastName()`
  The last name of the United States driver license owner.
  `String`
  `getMiddleName()`
  The middle name of the United States driver license owner.
  `String`
  `getNameSuffix()`
  The name suffix of the United States driver license owner.
  `String[]`
  `getOptionalElements()`
  Deprecated.
  `byte[]`
  `getRawData()`
  The raw bytes contained inside 2D barcode.
  `String`
  `getRawStringData()`
  Raw string inside 2D barcode.
  `String`
  `getRestrictions()`
  The restrictions to driving privileges for the United States driver license owner.
  `String`
  `getSex()`
  The sex of the United States driver license owner.
  `String`
  `getVehicleClass()`
  The type of vehicle the driver license owner has privilege to drive.
  `boolean`
  `isScanningFirstSideDone()`
  `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<UsdlCombinedRecognizer.Result> CREATOR

- ## Constructor Details

  - ### Result

    protected Result(long nativeResult)

- ## Method Details

  - ### getDocumentDataMatch

    @NonNull public DataMatchState getDocumentDataMatch()
    Description copied from interface: `CombinedDataMatchResult`
    Returns result of the data matching algorithm for scanned parts/sides of the document. For example if date of expiry is scanned from the front and back side of the document and values do not match, this method will return `DataMatchState.Failed`. Result will be `DataMatchState.Success` only if scanned values for all fields that are compared are the same. If data matching has not been performed, result will be `DataMatchState.NotPerformed`.
    Specified by:
      `getDocumentDataMatch` in interface `CombinedDataMatchResult`
    Returns:
      result of the data matching algorithm for scanned parts/sides of the document.

  - ### getLastName

    @NonNull public String getLastName()
    The last name of the United States driver license owner.

  - ### getDateOfExpiry

    @NonNull public Date getDateOfExpiry()
    The date of expiry of the United States driver license.

  - ### getAddress

    @NonNull public String getAddress()
    The full address of the United States driver license owner.

  - ### getDocumentNumber

    @NonNull public String getDocumentNumber()
    The document number of the United States driver license.

  - ### getSex

    @NonNull public String getSex()
    The sex of the United States driver license owner.

  - ### getEncodedFullDocumentImage

    @NonNull public byte[] getEncodedFullDocumentImage()
    Specified by:
      `getEncodedFullDocumentImage` in interface `EncodedFullDocumentImageResult`
    Returns:
      encoded full document image in JPEG format if enabled with `EncodeFullDocumentImagesOptions.setEncodeFullDocumentImage(boolean)` , else `null`

  - ### getFullName

    @NonNull public String getFullName()
    The full name of the United States driver license owner.

  - ### getNameSuffix

    @NonNull public String getNameSuffix()
    The name suffix of the United States driver license owner.

  - ### getRestrictions

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

  - ### getEncodedFaceImage

    @NonNull public byte[] getEncodedFaceImage()
    Specified by:
      `getEncodedFaceImage` in interface `EncodedFaceImageResult`
    Returns:
      encoded face image in JPEG from the document if enabled with `EncodeFaceImageOptions.setEncodeFaceImage(boolean)` , else `null`

  - ### getDateOfBirth

    @NonNull public Date getDateOfBirth()
    The date of birth of the United States driver license owner.

  - ### getRawData

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

  - ### getDateOfIssue

    @NonNull public Date getDateOfIssue()
    The date of issue of the United States driver license.

  - ### getFaceImage

    @Nullable public Image getFaceImage()
    Specified by:
      `getFaceImage` in interface `FaceImageResult`
    Returns:
      face image from the document if enabled with `FaceImageOptions.setReturnFaceImage(boolean)`, else `null`

  - ### isUncertain

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

  - ### getFirstName

    @NonNull public String getFirstName()
    The first name of the United States driver license owner.

  - ### getFullDocumentImage

    @Nullable public Image getFullDocumentImage()
    Specified by:
      `getFullDocumentImage` in interface `FullDocumentImageResult`
    Returns:
      image of the full document if enabled with `FullDocumentImageOptions.setReturnFullDocumentImage(boolean)`, else `null`

  - ### isScanningFirstSideDone

    public boolean isScanningFirstSideDone()
    Specified by:
      `isScanningFirstSideDone` in interface `CombinedResult`
    Returns:
      `true` if recognizer has finished scanning first side and is now scanning back side, `false` if it's still scanning first side.

  - ### getEndorsements

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

  - ### getVehicleClass

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

  - ### getMiddleName

    @NonNull public String getMiddleName()
    The middle name of the United States driver license owner.

  - ### getRawStringData

    @NonNull public String getRawStringData()
    Raw string inside 2D barcode.

  - ### 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

  - ### getOptionalElements

    @NonNull @Deprecated public String[] getOptionalElements()
    Deprecated.
    Array of elements that are not part of AAMVA standard and are specific to each US state. If no specific elements existed inside 2D barcode, this is an empty array. Otherwise, this array contains list of state-specific elements in the same order as given inside barcode. NOTE: Size of this array is both state-specific and barcode-specific. Each US state has ability to arbitrarily define size and contents of these elements. You can obtain the US state with `getField(com.microblink.blinkid.entities.recognizers.blinkbarcode.usdl.UsdlKeys)` and using `UsdlKeys.IssuingJurisdictionName` as a parameter.

  - ### getField

    @NonNull public String getField(@NonNull UsdlKeys key)
    Returns a field inside US Driver's licence. Available Keys are listed in `UsdlKeys` enum.
    Parameters:
      `key` - Key representing the required information.
    Returns:
      required information (if it exists), or empty string if it does not

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### 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 UsdlCombinedRecognizer.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`