Class Document

  • All Implemented Interfaces:
    android.os.Parcelable

    public class Document
    extends java.lang.Object
    implements android.os.Parcelable
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Document.ProcessingState
      The possible processing states of a document.
      static class  Document.SourceClassification  
      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static android.os.Parcelable.Creator<Document> CREATOR  
      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
    • Constructor Summary

      Constructors 
      Constructor Description
      Document​(java.lang.String id, Document.ProcessingState state, java.lang.String filename, java.lang.Integer pageCount, java.util.Date creationDate, Document.SourceClassification sourceClassification, android.net.Uri uri, java.util.List<android.net.Uri> compositeDocuments, java.util.List<android.net.Uri> partialDocuments)  
    • Field Detail

      • CREATOR

        public static final android.os.Parcelable.Creator<Document> CREATOR
    • Constructor Detail

      • Document

        public Document​(java.lang.String id,
                        Document.ProcessingState state,
                        java.lang.String filename,
                        java.lang.Integer pageCount,
                        java.util.Date creationDate,
                        Document.SourceClassification sourceClassification,
                        android.net.Uri uri,
                        java.util.List<android.net.Uri> compositeDocuments,
                        java.util.List<android.net.Uri> partialDocuments)
    • Method Detail

      • getId

        public java.lang.String getId()
        The document's unique identifier.
      • getPageCount

        public int getPageCount()
        The number of pages.
      • getFilename

        public java.lang.String getFilename()
        The document's filename (as stated on upload).
      • getCreationDate

        public java.util.Date getCreationDate()
        The document's creation date.
      • getUri

        public android.net.Uri getUri()
      • getCompositeDocuments

        public java.util.List<android.net.Uri> getCompositeDocuments()
      • getPartialDocuments

        public java.util.List<android.net.Uri> getPartialDocuments()
      • fromApiResponse

        public static Document fromApiResponse​(org.json.JSONObject responseData)
                                        throws org.json.JSONException
        Creates a new document instance from the JSON data usually returned by the Gini API.
        Parameters:
        responseData - The response data. Should be a valid response.
        Returns:
        The created document instance.
        Throws:
        org.json.JSONException
      • describeContents

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

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable