DataModel

A base class containing images for a scanned document

import com.sybrin.documentscanner.models.DataModel

Summary

Public methods

Casts the current model to the type specified by the class parameter.

Bitmap

String

Bitmap

String

void

Saves all images within the model to the local device and populates all path fields.

Public methods

castToModel

public <T extends DocumentModel> castToModel (Class<T> class)

Casts the current model to the type specified by the class parameter. The specified type must be a child of DocumentModel.

Parameters

class

Class<T>: Type of class the result is being cast to.

Returns

Value is null if casting was not possible.

getCroppedDocumentImage

public Bitmap getCroppedDocumentImage ()

Returns a cropped image of the scanned document.

Returns

Bitmap

This value cannot be null.

getCroppedDocumentImagePath

public String getCroppedDocumentImagePath ()

Returns the file path of the saved cropped document image.

Returns

String

Value is null if image was not saved.

getOriginalDocumentImage

public Bitmap getDocumentImage ()

Returns an image of the scanned document.

Returns

Bitmap

This value cannot be null.

getOriginalDocumentImagePath

public String getDocumentImagePath ()

Returns the file path of the saved document image.

Returns

String

Value is null if image was not saved.

saveImages

public void saveImage (Context context)

Saves all images within the model to the local device and populates all path fields.

Parameters

Context

Value cannot be null.

Last updated