Share via


DocumentAnnotation Class

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

Implements

public final class DocumentAnnotation
implements JsonSerializable<DocumentAnnotation>

Annotation in a document, such as a strikethrough or a comment.

Method Summary

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

Reads an instance of DocumentAnnotation from the JsonReader.

String getAuthor()

Get the author property: Annotation author.

List<DocumentAnnotationComment> getComments()

Get the comments property: Comments associated with the annotation.

OffsetDateTime getCreatedAt()

Get the createdAt property: Date and time when the annotation was created.

String getId()

Get the id property: Annotation identifier.

DocumentAnnotationKind getKind()

Get the kind property: Annotation kind.

OffsetDateTime getLastModifiedAt()

Get the lastModifiedAt property: Date and time when the annotation was last modified.

String getSource()

Get the source property: Position of the annotation.

List<ContentSpan> getSpans()

Get the spans property: Spans of the content associated with the annotation.

List<String> getTags()

Get the tags property: Tags associated with the annotation.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static DocumentAnnotation fromJson(JsonReader jsonReader)

Reads an instance of DocumentAnnotation from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getAuthor

public String getAuthor()

Get the author property: Annotation author.

Returns:

the author value.

getComments

public List<DocumentAnnotationComment> getComments()

Get the comments property: Comments associated with the annotation.

Returns:

the comments value.

getCreatedAt

public OffsetDateTime getCreatedAt()

Get the createdAt property: Date and time when the annotation was created.

Returns:

the createdAt value.

getId

public String getId()

Get the id property: Annotation identifier.

Returns:

the id value.

getKind

public DocumentAnnotationKind getKind()

Get the kind property: Annotation kind.

Returns:

the kind value.

getLastModifiedAt

public OffsetDateTime getLastModifiedAt()

Get the lastModifiedAt property: Date and time when the annotation was last modified.

Returns:

the lastModifiedAt value.

getSource

public String getSource()

Get the source property: Position of the annotation.

Returns:

the source value.

getSpans

public List<ContentSpan> getSpans()

Get the spans property: Spans of the content associated with the annotation.

Returns:

the spans value.

getTags

public List<String> getTags()

Get the tags property: Tags associated with the annotation.

Returns:

the tags value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to