Java Library: Output Fields
Java Library: Output Fields
Field Objects
Each Field contains attributes representing the data that is returned from the API. The exact data structure depends on the type of the field. Most Field classes have an attribute named value. The data type of the value attribute varies between field types.
All Field classes contain some common data types
confidence(Double): The confidence score of the field prediction.polygon(Polygoncontaining aList<Point>): Contains the relative vertices coordinates (points) of a polygon containing the field in the image.reconstructed(Boolean): True if the field was reconstructed or computed using other fields.rawValue(String): A string representing the field that was returned.boundingBox(Polygoncontaining aList<Point>): Represents the bounding box containing the field in the image
The library uses the following classes to represents common field types
Amount
Used to represent sum totals, monetary value etc. The value attribute is of type java.lang.Double
Date
The value attribute is of type java.Time.LocalDate
Field
Used to represent text fields and fields whose value is captured as String. This type also has a map attribute extraFields that represents any additional fields returned from the api.
The
valueattribute is of typejava.lang.String\The
extraFieldsis a map of typeMap<String,String>
Locale
The value attribute is of type java.util.Locale
This class also contains additional attributes containing String representations of the available locale information returned by the API.
languageof typejava.lang.String- Language code in ISO 639-1 format as seen on the document. The following language codes are supported:ca,de,en,es,fr,it,nlandpt.countryof typejava.lang.String- Currency code in ISO 4217 format as seen on the document. The following country codes are supported:CAD,CHF,GBP,EUR,USD.currencyof typejava.lang.String- Country code in ISO 3166-1 alpha-2 format as seen on the document. The following country codes are supported:CA,CH,DE,ES,FR,GB,IT,NL,PTandUS.
Orientation
The orientation field is only available at the page level as it describes whether the page image should be rotated to be upright.
If the page requires rotation for correct display, the orientation field gives a prediction among these 3 possible outputs:
0 degrees: the page is already upright
90 degrees: the page must be rotated clockwise to be upright
270 degrees: the page must be rotated counterclockwise to be upright
The value attribute of type java.lang.Integer is set to one of 0, 90, or 270
Payment Details
This field type captures information related to the payment details for vendors
ibanof typejava.lang.Stringswiftof typejava.lang.StringroutingNumberof typejava.lang.StringaccountNumberof typejava.lang.String
Tax
This field type captures tax information
valueof typejava.lang.Doublerepresents the tax amount.codeof typejava.lang.Stringrepresents The tax code (HST, GST, City Tax, State tax for US, etc..).rateof typejava.lang.Doublerepresents the tax rate.
Time
The value attribute is of type java.time.LocalTime
Last updated
Was this helpful?

