public class GiniVisionExtraction
extends java.lang.Object
An extraction contains an entity describing the general semantic type of the extraction (e.g. a date), which also determines the format of the value containing the information as text. Optionally there may be a box describing the position of the extraction value on the document. In most instances, extractions without a bounding box are meta information (e.g. doctype).
Modifier and Type | Field and Description |
---|---|
static <any> |
CREATOR |
Constructor and Description |
---|
GiniVisionExtraction(java.lang.String value,
java.lang.String entity,
GiniVisionBox box)
Value object for an extraction from the Gini API.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
GiniVisionBox |
getBox() |
java.lang.String |
getEntity() |
java.lang.String |
getValue() |
boolean |
isDirty() |
void |
setBox(GiniVisionBox newBox)
Set a new bounding box.
|
void |
setIsDirty(boolean isDirty) |
void |
setValue(java.lang.String newValue)
Set a new value for this extraction.
|
java.lang.String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public GiniVisionExtraction(java.lang.String value, java.lang.String entity, GiniVisionBox box)
value
- normalized textual representation of the text/information provided by the
extraction value (e. g. bank number without spaces between the digits).
Changing this value marks the extraction as dirtyentity
- key (primary identification) of an entity type (e.g. banknumber). See Extraction
Entities for a full listbox
- (optional) bounding box containing the position of the extraction value on the
document. Only available for some extractions. Changing this value marks the
extraction as dirtypublic int describeContents()
public void writeToParcel(Parcel dest, int flags)
public java.lang.String getValue()
public void setValue(java.lang.String newValue)
newValue
- new valuepublic java.lang.String getEntity()
public GiniVisionBox getBox()
public void setBox(GiniVisionBox newBox)
newBox
- new bounding boxpublic boolean isDirty()
true
if the value or the bounding box has been changedpublic void setIsDirty(boolean isDirty)
isDirty
- pass true
to mark the extraction as dirtypublic java.lang.String toString()
toString
in class java.lang.Object