Class Document.TextChange (2.32.0)

public static final class Document.TextChange extends GeneratedMessageV3 implements Document.TextChangeOrBuilder

This message is used for text changes aka. OCR corrections.

Protobuf type google.cloud.documentai.v1beta3.Document.TextChange

Static Fields

CHANGED_TEXT_FIELD_NUMBER

public static final int CHANGED_TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

PROVENANCE_FIELD_NUMBER

public static final int PROVENANCE_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_ANCHOR_FIELD_NUMBER

public static final int TEXT_ANCHOR_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Document.TextChange getDefaultInstance()
Returns
TypeDescription
Document.TextChange

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Document.TextChange.Builder newBuilder()
Returns
TypeDescription
Document.TextChange.Builder

newBuilder(Document.TextChange prototype)

public static Document.TextChange.Builder newBuilder(Document.TextChange prototype)
Parameter
NameDescription
prototypeDocument.TextChange
Returns
TypeDescription
Document.TextChange.Builder

parseDelimitedFrom(InputStream input)

public static Document.TextChange parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.TextChange parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Document.TextChange parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Document.TextChange parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Document.TextChange parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Document.TextChange parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Document.TextChange parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.TextChange parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Document.TextChange parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.TextChange parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Document.TextChange parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Document.TextChange parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.TextChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Document.TextChange> parser()
Returns
TypeDescription
Parser<TextChange>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getChangedText()

public String getChangedText()

The text that replaces the text identified in the text_anchor.

string changed_text = 2;

Returns
TypeDescription
String

The changedText.

getChangedTextBytes()

public ByteString getChangedTextBytes()

The text that replaces the text identified in the text_anchor.

string changed_text = 2;

Returns
TypeDescription
ByteString

The bytes for changedText.

getDefaultInstanceForType()

public Document.TextChange getDefaultInstanceForType()
Returns
TypeDescription
Document.TextChange

getParserForType()

public Parser<Document.TextChange> getParserForType()
Returns
TypeDescription
Parser<TextChange>
Overrides

getProvenance(int index)

public Document.Provenance getProvenance(int index)

The history of this annotation.

repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Provenance

getProvenanceCount()

public int getProvenanceCount()

The history of this annotation.

repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];

Returns
TypeDescription
int

getProvenanceList()

public List<Document.Provenance> getProvenanceList()

The history of this annotation.

repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];

Returns
TypeDescription
List<Provenance>

getProvenanceOrBuilder(int index)

public Document.ProvenanceOrBuilder getProvenanceOrBuilder(int index)

The history of this annotation.

repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.ProvenanceOrBuilder

getProvenanceOrBuilderList()

public List<? extends Document.ProvenanceOrBuilder> getProvenanceOrBuilderList()

The history of this annotation.

repeated .google.cloud.documentai.v1beta3.Document.Provenance provenance = 3 [deprecated = true];

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta3.Document.ProvenanceOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTextAnchor()

public Document.TextAnchor getTextAnchor()

Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single TextAnchor.text_segments element. If the start and end index of the text segment are the same, the text change is inserted before that index.

.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;

Returns
TypeDescription
Document.TextAnchor

The textAnchor.

getTextAnchorOrBuilder()

public Document.TextAnchorOrBuilder getTextAnchorOrBuilder()

Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single TextAnchor.text_segments element. If the start and end index of the text segment are the same, the text change is inserted before that index.

.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;

Returns
TypeDescription
Document.TextAnchorOrBuilder

hasTextAnchor()

public boolean hasTextAnchor()

Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single TextAnchor.text_segments element. If the start and end index of the text segment are the same, the text change is inserted before that index.

.google.cloud.documentai.v1beta3.Document.TextAnchor text_anchor = 1;

Returns
TypeDescription
boolean

Whether the textAnchor field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Document.TextChange.Builder newBuilderForType()
Returns
TypeDescription
Document.TextChange.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Document.TextChange.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Document.TextChange.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Document.TextChange.Builder toBuilder()
Returns
TypeDescription
Document.TextChange.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException