Class Field

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Field
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Generic document field.
    • Constructor Detail

      • Field

        public Field​(FieldType type,
                     OcrResult value,
                     double confidenceWeight,
                     ImageRef image,
                     java.util.List<PointF> polygonInRoot,
                     FieldValidationStatus validationStatus,
                     java.util.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,
                     java.util.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 Detail

      • 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 java.util.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 java.util.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 java.lang.AutoCloseable