Class Field

java.lang.Object
io.scanbot.sdk.genericdocument.Field
All Implemented Interfaces:
AutoCloseable

public class Field extends Object implements AutoCloseable
Generic document 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

      public Field(FieldType type, OcrResult value, List<PointF> polygonInRoot)
      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

      public FieldType getType()
      Getter for type field. See constructor documentation for more information about the field.
      Returns:
      type
    • getValue

      public OcrResult 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

      public ImageRef getImage()
      Getter for image field. See constructor documentation for more information about the field.
      Returns:
      image
    • getPolygonInRoot

      public List<PointF> getPolygonInRoot()
      Getter for polygonInRoot field. See constructor documentation for more information about the field.
      Returns:
      polygonInRoot
    • getValidationStatus

      public FieldValidationStatus getValidationStatus()
      Getter for validationStatus field. See constructor documentation for more information about the field.
      Returns:
      validationStatus
    • getParsedData

      public List<FieldParsedData> 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:
      close in interface AutoCloseable