Freigeben über


DocumentContentSegment Class

  • java.lang.Object
    • com.azure.ai.contentunderstanding.models.DocumentContentSegment

Implements

public final class DocumentContentSegment
implements JsonSerializable<DocumentContentSegment>

Detected document content segment.

Method Summary

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

Reads an instance of DocumentContentSegment from the JsonReader.

String getCategory()

Get the category property: Classified content category.

int getEndPageNumber()

Get the endPageNumber property: End page number (1-indexed) of the segment.

String getSegmentId()

Get the segmentId property: Segment identifier.

ContentSpan getSpan()

Get the span property: Span of the segment in the markdown content.

int getStartPageNumber()

Get the startPageNumber property: Start page number (1-indexed) of the segment.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static DocumentContentSegment fromJson(JsonReader jsonReader)

Reads an instance of DocumentContentSegment from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DocumentContentSegment 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.

getCategory

public String getCategory()

Get the category property: Classified content category.

Returns:

the category value.

getEndPageNumber

public int getEndPageNumber()

Get the endPageNumber property: End page number (1-indexed) of the segment.

Returns:

the endPageNumber value.

getSegmentId

public String getSegmentId()

Get the segmentId property: Segment identifier.

Returns:

the segmentId value.

getSpan

public ContentSpan getSpan()

Get the span property: Span of the segment in the markdown content.

Returns:

the span value.

getStartPageNumber

public int getStartPageNumber()

Get the startPageNumber property: Start page number (1-indexed) of the segment.

Returns:

the startPageNumber value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to