public static final class TextAnnotation.Builder extends com.google.protobuf.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 [google.cloud.vision.v1.TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message
definition below for more detail.
Protobuf type google.cloud.vision.v1.TextAnnotation| Modifier and Type | Method and Description |
|---|---|
TextAnnotation.Builder |
addAllPages(java.lang.Iterable<? extends Page> values)
List of pages detected by OCR.
|
TextAnnotation.Builder |
addPages(int index,
Page.Builder builderForValue)
List of pages detected by OCR.
|
TextAnnotation.Builder |
addPages(int index,
Page value)
List of pages detected by OCR.
|
TextAnnotation.Builder |
addPages(Page.Builder builderForValue)
List of pages detected by OCR.
|
TextAnnotation.Builder |
addPages(Page value)
List of pages detected by OCR.
|
Page.Builder |
addPagesBuilder()
List of pages detected by OCR.
|
Page.Builder |
addPagesBuilder(int index)
List of pages detected by OCR.
|
TextAnnotation.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
TextAnnotation |
build() |
TextAnnotation |
buildPartial() |
TextAnnotation.Builder |
clear() |
TextAnnotation.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
TextAnnotation.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
TextAnnotation.Builder |
clearPages()
List of pages detected by OCR.
|
TextAnnotation.Builder |
clearText()
UTF-8 text detected on the pages.
|
TextAnnotation.Builder |
clone() |
TextAnnotation |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Page |
getPages(int index)
List of pages detected by OCR.
|
Page.Builder |
getPagesBuilder(int index)
List of pages detected by OCR.
|
java.util.List<Page.Builder> |
getPagesBuilderList()
List of pages detected by OCR.
|
int |
getPagesCount()
List of pages detected by OCR.
|
java.util.List<Page> |
getPagesList()
List of pages detected by OCR.
|
PageOrBuilder |
getPagesOrBuilder(int index)
List of pages detected by OCR.
|
java.util.List<? extends PageOrBuilder> |
getPagesOrBuilderList()
List of pages detected by OCR.
|
java.lang.String |
getText()
UTF-8 text detected on the pages.
|
com.google.protobuf.ByteString |
getTextBytes()
UTF-8 text detected on the pages.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
TextAnnotation.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
TextAnnotation.Builder |
mergeFrom(com.google.protobuf.Message other) |
TextAnnotation.Builder |
mergeFrom(TextAnnotation other) |
TextAnnotation.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
TextAnnotation.Builder |
removePages(int index)
List of pages detected by OCR.
|
TextAnnotation.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
TextAnnotation.Builder |
setPages(int index,
Page.Builder builderForValue)
List of pages detected by OCR.
|
TextAnnotation.Builder |
setPages(int index,
Page value)
List of pages detected by OCR.
|
TextAnnotation.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
TextAnnotation.Builder |
setText(java.lang.String value)
UTF-8 text detected on the pages.
|
TextAnnotation.Builder |
setTextBytes(com.google.protobuf.ByteString value)
UTF-8 text detected on the pages.
|
TextAnnotation.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, parseUnknownFieldfindInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic TextAnnotation build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic TextAnnotation buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic TextAnnotation.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextAnnotation.Builder>public TextAnnotation.Builder mergeFrom(TextAnnotation other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public TextAnnotation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextAnnotation.Builder>java.io.IOExceptionpublic java.util.List<Page> getPagesList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;getPagesList in interface TextAnnotationOrBuilderpublic int getPagesCount()
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;getPagesCount in interface TextAnnotationOrBuilderpublic Page getPages(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;getPages in interface TextAnnotationOrBuilderpublic TextAnnotation.Builder setPages(int index, Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder setPages(int index, Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder addPages(Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder addPages(int index, Page value)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder addPages(Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder addPages(int index, Page.Builder builderForValue)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder addAllPages(java.lang.Iterable<? extends Page> values)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder clearPages()
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public TextAnnotation.Builder removePages(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public Page.Builder getPagesBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public PageOrBuilder getPagesOrBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;getPagesOrBuilder in interface TextAnnotationOrBuilderpublic java.util.List<? extends PageOrBuilder> getPagesOrBuilderList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;getPagesOrBuilderList in interface TextAnnotationOrBuilderpublic Page.Builder addPagesBuilder()
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public Page.Builder addPagesBuilder(int index)
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public java.util.List<Page.Builder> getPagesBuilderList()
List of pages detected by OCR.
repeated .google.cloud.vision.v1.Page pages = 1;public java.lang.String getText()
UTF-8 text detected on the pages.
optional string text = 2;getText in interface TextAnnotationOrBuilderpublic com.google.protobuf.ByteString getTextBytes()
UTF-8 text detected on the pages.
optional string text = 2;getTextBytes in interface TextAnnotationOrBuilderpublic TextAnnotation.Builder setText(java.lang.String value)
UTF-8 text detected on the pages.
optional string text = 2;public TextAnnotation.Builder clearText()
UTF-8 text detected on the pages.
optional string text = 2;public TextAnnotation.Builder setTextBytes(com.google.protobuf.ByteString value)
UTF-8 text detected on the pages.
optional string text = 2;public final TextAnnotation.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>public final TextAnnotation.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextAnnotation.Builder>