Compartilhar via


DocumentField Class

  • java.lang.Object
    • com.azure.ai.documentintelligence.models.DocumentField

Implements

public final class DocumentField
implements JsonSerializable<DocumentField>

An object representing the content and location of a field value.

Method Summary

Modifier and Type Method and Description
static DocumentField fromJson(JsonReader jsonReader)

Reads an instance of DocumentField from the JsonReader.

List<BoundingRegion> getBoundingRegions()

Get the boundingRegions property: Bounding regions covering the field.

Double getConfidence()

Get the confidence property: Confidence of correctly extracting the field.

String getContent()

Get the content property: Field content.

List<DocumentSpan> getSpans()

Get the spans property: Location of the field in the reading order concatenated content.

DocumentFieldType getType()

Get the type property: Data type of the field value.

AddressValue getValueAddress()

Get the valueAddress property: Address value.

String getValueCountryRegion()

Get the valueCountryRegion property: 3-letter country code value (ISO 3166-1 alpha-3).

CurrencyValue getValueCurrency()

Get the valueCurrency property: Currency value.

LocalDate getValueDate()

Get the valueDate property: Date value in YYYY-MM-DD format (ISO 8601).

Long getValueInteger()

Get the valueInteger property: Integer value.

List<DocumentField> getValueList()

Get the valueList property: Array of field values.

Map<String,DocumentField> getValueMap()

Get the valueMap property: Dictionary of named field values.

Double getValueNumber()

Get the valueNumber property: Floating point value.

String getValuePhoneNumber()

Get the valuePhoneNumber property: Phone number value in E.164 format (ex.

List<String> getValueSelectionGroup()

Get the valueSelectionGroup property: Selection group value.

DocumentSelectionMarkState getValueSelectionMark()

Get the valueSelectionMark property: Selection mark value.

DocumentSignatureType getValueSignature()

Get the valueSignature property: Presence of signature.

String getValueString()

Get the valueString property: String value.

String getValueTime()

Get the valueTime property: Time value in hh:mm:ss format (ISO 8601).

Boolean isValueBoolean()

Get the valueBoolean property: Boolean value.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static DocumentField fromJson(JsonReader jsonReader)

Reads an instance of DocumentField from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DocumentField if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getBoundingRegions

public List getBoundingRegions()

Get the boundingRegions property: Bounding regions covering the field.

Returns:

the boundingRegions value.

getConfidence

public Double getConfidence()

Get the confidence property: Confidence of correctly extracting the field.

Returns:

the confidence value.

getContent

public String getContent()

Get the content property: Field content.

Returns:

the content value.

getSpans

public List getSpans()

Get the spans property: Location of the field in the reading order concatenated content.

Returns:

the spans value.

getType

public DocumentFieldType getType()

Get the type property: Data type of the field value.

Returns:

the type value.

getValueAddress

public AddressValue getValueAddress()

Get the valueAddress property: Address value.

Returns:

the valueAddress value.

getValueCountryRegion

public String getValueCountryRegion()

Get the valueCountryRegion property: 3-letter country code value (ISO 3166-1 alpha-3).

Returns:

the valueCountryRegion value.

getValueCurrency

public CurrencyValue getValueCurrency()

Get the valueCurrency property: Currency value.

Returns:

the valueCurrency value.

getValueDate

public LocalDate getValueDate()

Get the valueDate property: Date value in YYYY-MM-DD format (ISO 8601).

Returns:

the valueDate value.

getValueInteger

public Long getValueInteger()

Get the valueInteger property: Integer value.

Returns:

the valueInteger value.

getValueList

public List getValueList()

Get the valueList property: Array of field values.

Returns:

the valueList value.

getValueMap

public Map getValueMap()

Get the valueMap property: Dictionary of named field values.

Returns:

the valueMap value.

getValueNumber

public Double getValueNumber()

Get the valueNumber property: Floating point value.

Returns:

the valueNumber value.

getValuePhoneNumber

public String getValuePhoneNumber()

Get the valuePhoneNumber property: Phone number value in E.164 format (ex. +19876543210).

Returns:

the valuePhoneNumber value.

getValueSelectionGroup

public List getValueSelectionGroup()

Get the valueSelectionGroup property: Selection group value.

Returns:

the valueSelectionGroup value.

getValueSelectionMark

public DocumentSelectionMarkState getValueSelectionMark()

Get the valueSelectionMark property: Selection mark value.

Returns:

the valueSelectionMark value.

getValueSignature

public DocumentSignatureType getValueSignature()

Get the valueSignature property: Presence of signature.

Returns:

the valueSignature value.

getValueString

public String getValueString()

Get the valueString property: String value.

Returns:

the valueString value.

getValueTime

public String getValueTime()

Get the valueTime property: Time value in hh:mm:ss format (ISO 8601).

Returns:

the valueTime value.

isValueBoolean

public Boolean isValueBoolean()

Get the valueBoolean property: Boolean value.

Returns:

the valueBoolean value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to