java.lang.Object
com.microblink.blinkid.entities.recognizers.blinkid.generic.DateResult
All Implemented Interfaces:
android.os.Parcelable, SimpleDateResult

public class DateResult extends Object implements android.os.Parcelable, SimpleDateResult
Helper class for obtaining multialphabet date results.
  • Nested Class Summary

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

    Fields inherited from interface android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Method Summary

    Modifier and Type
    Method
    Description
    static DateResult
    createFromDMY(int day, int month, int year, StringResult originalDateString, boolean isFilledByDomainKnowledge)
    This method is called from native code to build DateResult from native object.
    static DateResult
    createUnparsed(StringResult originalDateString, boolean isFilledByDomainKnowledge)
    This method is called from native code to build DateResult from native object, when date has not been successfully parsed from the given originalDateString.
    int
     
    Date getter, if SimpleDate representation of date result exists returns it, otherwise returns null.
    Returns original string representation of the date which has been extracted from the OCR result.
    boolean
    Indicates that date does not appear on the document but is filled by our internal domain knowledge.
     
    void
    writeToParcel(android.os.Parcel parcel, int i)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • CREATOR

      @NonNull public static final android.os.Parcelable.Creator<DateResult> CREATOR
  • Method Details

    • getOriginalDateString

      @NonNull public StringResult getOriginalDateString()
      Returns original string representation of the date which has been extracted from the OCR result. If it is successfully parsed to SimpleDate object, it can be obtained by using getDate() 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

      @Nullable public SimpleDate getDate()
      Date getter, if SimpleDate representation of date result exists returns it, otherwise returns null. To obtain original date string use getOriginalDateString() method.
      Specified by:
      getDate in interface SimpleDateResult
      Returns:
      if SimpleDate representation 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 build DateResult from native object.
      Parameters:
      day - day of the month
      month - month of the year from interval [1,12]
      year - full year
      originalDateString - original string from which native object has been parsed
      Returns:
      DateResult object
    • createUnparsed

      @NonNull public static DateResult createUnparsed(@NonNull StringResult originalDateString, boolean isFilledByDomainKnowledge)
      This method is called from native code to build DateResult from native object, when date has not been successfully parsed from the given originalDateString.
      Parameters:
      originalDateString - original string from which native object has been created and which has not been successfully parsed to date.
      Returns:
      DateResult object
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • writeToParcel

      public void writeToParcel(@NonNull android.os.Parcel parcel, int i)
      Specified by:
      writeToParcel in interface android.os.Parcelable
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object