Package net.gini.android.models
Class Document
- java.lang.Object
-
- net.gini.android.models.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
-
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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
static Document
fromApiResponse(org.json.JSONObject responseData)
Creates a new document instance from the JSON data usually returned by the Gini API.java.util.List<android.net.Uri>
getCompositeDocuments()
java.util.Date
getCreationDate()
The document's creation date.java.lang.String
getFilename()
The document's filename (as stated on upload).java.lang.String
getId()
The document's unique identifier.int
getPageCount()
The number of pages.java.util.List<android.net.Uri>
getPartialDocuments()
Document.SourceClassification
getSourceClassification()
Classification of the source file.Document.ProcessingState
getState()
The document's processing state.android.net.Uri
getUri()
void
writeToParcel(android.os.Parcel dest, int flags)
-
-
-
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.
-
getState
public Document.ProcessingState getState()
The document's processing state.
-
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()
-
getSourceClassification
public Document.SourceClassification getSourceClassification()
Classification of the source file.
-
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 interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
-