Class DateResult
java.lang.Object
com.microblink.blinkid.entities.recognizers.blinkid.generic.DateResult
- All Implemented Interfaces:
android.os.Parcelable,SimpleDateResult
Helper class for obtaining multialphabet date results.
-
Nested Class Summary
-
Field Summary
FieldsFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Method Summary
Modifier and TypeMethodDescriptionstatic DateResultcreateFromDMY(int day, int month, int year, StringResult originalDateString, boolean isFilledByDomainKnowledge) This method is called from native code to buildDateResultfrom native object.static DateResultcreateUnparsed(StringResult originalDateString, boolean isFilledByDomainKnowledge) This method is called from native code to buildDateResultfrom native object, when date has not been successfully parsed from the givenoriginalDateString.intgetDate()Date getter, ifSimpleDaterepresentation of date result exists returns it, otherwise returns null.Returns original string representation of the date which has been extracted from the OCR result.booleanIndicates that date does not appear on the document but is filled by our internal domain knowledge.toString()voidwriteToParcel(android.os.Parcel parcel, int i)
-
Field Details
-
CREATOR
-
-
Method Details
-
getOriginalDateString
Returns original string representation of the date which has been extracted from the OCR result. If it is successfully parsed toSimpleDateobject, it can be obtained by usinggetDate()method.- Returns:
- original string representation of the date which has been extracted from the OCR result
-
isFilledByDomainKnowledge
public boolean isFilledByDomainKnowledge()Indicates that date does not appear on the document but is filled by our internal domain knowledge.- Returns:
- true if the date is filled by our internal domain knowledge
-
getDate
Date getter, ifSimpleDaterepresentation of date result exists returns it, otherwise returns null. To obtain original date string usegetOriginalDateString()method.- Specified by:
getDatein interfaceSimpleDateResult- Returns:
- if
SimpleDaterepresentation of date result exists returns it, otherwise returns null.
-
createFromDMY
@NonNull public static DateResult createFromDMY(int day, int month, int year, @NonNull StringResult originalDateString, boolean isFilledByDomainKnowledge) This method is called from native code to buildDateResultfrom native object.- Parameters:
day- day of the monthmonth- month of the year from interval [1,12]year- full yearoriginalDateString- original string from which native object has been parsed- Returns:
DateResultobject
-
createUnparsed
@NonNull public static DateResult createUnparsed(@NonNull StringResult originalDateString, boolean isFilledByDomainKnowledge) This method is called from native code to buildDateResultfrom native object, when date has not been successfully parsed from the givenoriginalDateString.- Parameters:
originalDateString- original string from which native object has been created and which has not been successfully parsed to date.- Returns:
DateResultobject
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel parcel, int i) - Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-
toString
-