public static final class TextAnnotation.Builder extends GeneratedMessageV3.Builder<TextAnnotation.Builder> implements TextAnnotationOrBuilder
TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty] message definition below for more detail.Protobuf type
google.cloud.vision.v1p4beta1.TextAnnotation
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public TextAnnotation build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public TextAnnotation buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public TextAnnotation.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder mergeFrom(TextAnnotation other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public TextAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<TextAnnotation.Builder>
IOException
public List<Page> getPagesList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
getPagesList
in interface TextAnnotationOrBuilder
public int getPagesCount()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
getPagesCount
in interface TextAnnotationOrBuilder
public Page getPages(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
getPages
in interface TextAnnotationOrBuilder
public TextAnnotation.Builder setPages(int index, Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder setPages(int index, Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder addPages(Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder addPages(int index, Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder addPages(Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder addPages(int index, Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder addAllPages(Iterable<? extends Page> values)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder clearPages()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public TextAnnotation.Builder removePages(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public Page.Builder getPagesBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public PageOrBuilder getPagesOrBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
getPagesOrBuilder
in interface TextAnnotationOrBuilder
public List<? extends PageOrBuilder> getPagesOrBuilderList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
getPagesOrBuilderList
in interface TextAnnotationOrBuilder
public Page.Builder addPagesBuilder()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public Page.Builder addPagesBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public List<Page.Builder> getPagesBuilderList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1p4beta1.Page pages = 1;
public String getText()
UTF-8 text detected on the pages.
string text = 2;
getText
in interface TextAnnotationOrBuilder
public ByteString getTextBytes()
UTF-8 text detected on the pages.
string text = 2;
getTextBytes
in interface TextAnnotationOrBuilder
public TextAnnotation.Builder setText(String value)
UTF-8 text detected on the pages.
string text = 2;
value
- The text to set.public TextAnnotation.Builder clearText()
UTF-8 text detected on the pages.
string text = 2;
public TextAnnotation.Builder setTextBytes(ByteString value)
UTF-8 text detected on the pages.
string text = 2;
value
- The bytes for text to set.public final TextAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
public final TextAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<TextAnnotation.Builder>
Copyright © 2022 Google LLC. All rights reserved.