Package io.scanbot.sdk.genericdocument
Class Field
java.lang.Object
io.scanbot.sdk.genericdocument.Field
- All Implemented Interfaces:
AutoCloseable
Generic document field.
-
Constructor Summary
ConstructorsConstructorDescriptionField(FieldType type, OcrResult value, double confidenceWeight, ImageRef image, List<PointF> polygonInRoot, FieldValidationStatus validationStatus, List<FieldParsedData> parsedData) Constructs Field with the given params.Constructs Field with default parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes native resources (images) held by the object.doubleGetter for confidenceWeight field.getImage()Getter for image field.Getter for parsedData field.Getter for polygonInRoot field.getType()Getter for type field.Getter for validationStatus field.getValue()Getter for value field.
-
Constructor Details
-
Field
public Field(FieldType type, OcrResult value, double confidenceWeight, ImageRef image, List<PointF> polygonInRoot, FieldValidationStatus validationStatus, List<FieldParsedData> parsedData) Constructs Field with the given params.- Parameters:
type- The type of the field.value- Value of the field. Applicable only to text fields.confidenceWeight- Confidence weight. Default is `1.0`.image- Crop of the field.polygonInRoot- Coordinates of the field in the root document coordinate system.validationStatus- Field validation status. Applicable only to fields that support some kind of validation. Default is `NONE`.parsedData- Parsed data.
-
Field
Constructs Field with default parameters.- Parameters:
type- The type of the field.value- Value of the field. Applicable only to text fields.polygonInRoot- Coordinates of the field in the root document coordinate system.
-
-
Method Details
-
getType
Getter for type field. See constructor documentation for more information about the field.- Returns:
- type
-
getValue
Getter for value field. See constructor documentation for more information about the field.- Returns:
- value
-
getConfidenceWeight
public double getConfidenceWeight()Getter for confidenceWeight field. See constructor documentation for more information about the field.- Returns:
- confidenceWeight
-
getImage
Getter for image field. See constructor documentation for more information about the field.- Returns:
- image
-
getPolygonInRoot
Getter for polygonInRoot field. See constructor documentation for more information about the field.- Returns:
- polygonInRoot
-
getValidationStatus
Getter for validationStatus field. See constructor documentation for more information about the field.- Returns:
- validationStatus
-
getParsedData
Getter for parsedData field. See constructor documentation for more information about the field.- Returns:
- parsedData
-
close
public void close()Closes native resources (images) held by the object.- Specified by:
closein interfaceAutoCloseable
-