Class UsdlRecognizer.Result
- java.lang.Object
-
- com.microblink.entities.Entity.Result
-
- com.microblink.entities.recognizers.Recognizer.Result
-
- com.microblink.entities.recognizers.blinkbarcode.usdl.UsdlRecognizer.Result
-
- All Implemented Interfaces:
android.os.Parcelable
- Enclosing class:
- UsdlRecognizer
public static final class UsdlRecognizer.Result extends Recognizer.Result
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microblink.entities.recognizers.Recognizer.Result
Recognizer.Result.State
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<UsdlRecognizer.Result>
CREATOR
-
Fields inherited from class com.microblink.entities.Entity.Result
mOwner
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Result(long nativeResult)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description UsdlRecognizer.Result
clone()
Create a copy of the result.protected void
deserializeFromByteArray(byte[] arr)
java.lang.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 givenageLimit
in years or not.java.lang.String
getCity()
The city address portion of the United States driver license owner.DateResult
getDateOfBirth()
The date of birth of the United States driver license owner.DateResult
getDateOfExpiry()
The date of expiry of the United States driver license.DateResult
getDateOfIssue()
The date of issue of the United States driver license.java.lang.String
getDocumentNumber()
The document number of the United States driver license.java.lang.String
getEndorsements()
The additional privileges granted to the United States driver license owner.java.lang.String
getField(UsdlKeys key)
Returns a field inside US Driver's licence.java.lang.String
getFirstName()
The first name of the United States driver license owner.java.lang.String
getFullName()
The full name of the United States driver license owner.java.lang.String
getJurisdiction()
The jurisdiction code address portion of the United States driver license owner.java.lang.String
getLastName()
The last name of the United States driver license owner.java.lang.String
getMiddleName()
The middle name of the United States driver license owner.java.lang.String
getNameSuffix()
The name suffix of the United States driver license owner.java.lang.String[]
getOptionalElements()
Deprecated.java.lang.String
getPostalCode()
The postal code address portion of the United States driver license owner.byte[]
getRawData()
The raw bytes contained inside 2D barcode.java.lang.String
getRawStringData()
Raw string inside 2D barcode.java.lang.String
getRestrictions()
The restrictions to driving privileges for the United States driver license owner.java.lang.String
getSex()
The sex of the United States driver license owner.java.lang.String
getStreet()
The street address portion of the United States driver license owner.java.lang.String
getVehicleClass()
The type of vehicle the driver license owner has privilege to drive.boolean
isUncertain()
True if returned result is uncertain, i.e.protected byte[]
serializeToByteArray()
protected void
terminateNative(long nativeContext)
java.lang.String
toString()
-
Methods inherited from class com.microblink.entities.recognizers.Recognizer.Result
getResultState, isEmpty
-
Methods inherited from class com.microblink.entities.Entity.Result
describeContents, finalize, getNativeContext, readFromParcel, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<UsdlRecognizer.Result> CREATOR
-
-
Method Detail
-
getLastName
@NonNull public java.lang.String getLastName()
The last name of the United States driver license owner.
-
getDateOfExpiry
@NonNull public DateResult getDateOfExpiry()
The date of expiry of the United States driver license.
-
getAddress
@NonNull public java.lang.String getAddress()
The full address of the United States driver license owner.
-
getCity
@NonNull public java.lang.String getCity()
The city address portion of the United States driver license owner.
-
getDocumentNumber
@NonNull public java.lang.String getDocumentNumber()
The document number of the United States driver license.
-
getPostalCode
@NonNull public java.lang.String getPostalCode()
The postal code address portion of the United States driver license owner.
-
getJurisdiction
@NonNull public java.lang.String getJurisdiction()
The jurisdiction code address portion of the United States driver license owner.
-
getSex
@NonNull public java.lang.String getSex()
The sex of the United States driver license owner.
-
getFullName
@NonNull public java.lang.String getFullName()
The full name of the United States driver license owner.
-
getNameSuffix
@NonNull public java.lang.String getNameSuffix()
The name suffix of the United States driver license owner.
-
getRestrictions
@NonNull public java.lang.String getRestrictions()
The restrictions to driving privileges for the United States driver license owner.
-
getDateOfBirth
@NonNull public DateResult 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 DateResult getDateOfIssue()
The date of issue of the United States driver license.
-
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 java.lang.String getFirstName()
The first name of the United States driver license owner.
-
getStreet
@NonNull public java.lang.String getStreet()
The street address portion of the United States driver license owner.
-
getEndorsements
@NonNull public java.lang.String getEndorsements()
The additional privileges granted to the United States driver license owner.
-
getVehicleClass
@NonNull public java.lang.String getVehicleClass()
The type of vehicle the driver license owner has privilege to drive.
-
getMiddleName
@NonNull public java.lang.String getMiddleName()
The middle name of the United States driver license owner.
-
getRawStringData
@NonNull public java.lang.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 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
-
-
getOptionalElements
@NonNull @Deprecated public java.lang.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 withgetField(UsdlKeys)
and usingUsdlKeys.IssuingJurisdictionName
as a parameter.
-
getField
@NonNull public java.lang.String getField(@NonNull UsdlKeys key)
Returns a field inside US Driver's licence. Available Keys are listed inUsdlKeys
enum.- Parameters:
key
- Key representing the required information.- Returns:
- required information (if it exists), or empty string if it does not
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- Returns:
- string version of this result
-
serializeToByteArray
@Nullable protected byte[] serializeToByteArray()
- Specified by:
serializeToByteArray
in classEntity.Result
-
deserializeFromByteArray
protected void deserializeFromByteArray(@NonNull byte[] arr)
- Specified by:
deserializeFromByteArray
in classEntity.Result
-
clone
public UsdlRecognizer.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 classRecognizer.Result
- Returns:
- a copy of the result
-
terminateNative
protected void terminateNative(long nativeContext)
- Specified by:
terminateNative
in classEntity.Result
-
-