Package com.google.cloud.vision.v1
Class Block.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Block.Builder>
com.google.cloud.vision.v1.Block.Builder
- All Implemented Interfaces:
BlockOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Block
public static final class Block.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Block.Builder>
implements BlockOrBuilder
Logical element on the page.Protobuf type
google.cloud.vision.v1.Block-
Method Summary
Modifier and TypeMethodDescriptionaddAllParagraphs(Iterable<? extends Paragraph> values) List of paragraphs in this block (if this blocks is of type text).addParagraphs(int index, Paragraph value) List of paragraphs in this block (if this blocks is of type text).addParagraphs(int index, Paragraph.Builder builderForValue) List of paragraphs in this block (if this blocks is of type text).addParagraphs(Paragraph value) List of paragraphs in this block (if this blocks is of type text).addParagraphs(Paragraph.Builder builderForValue) List of paragraphs in this block (if this blocks is of type text).List of paragraphs in this block (if this blocks is of type text).addParagraphsBuilder(int index) List of paragraphs in this block (if this blocks is of type text).build()clear()Detected block type (text, image etc) for this block.The bounding box for the block.Confidence of the OCR results on the block.List of paragraphs in this block (if this blocks is of type text).Additional information detected for the block.Detected block type (text, image etc) for this block.intDetected block type (text, image etc) for this block.The bounding box for the block.The bounding box for the block.The bounding box for the block.floatConfidence of the OCR results on the block.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetParagraphs(int index) List of paragraphs in this block (if this blocks is of type text).getParagraphsBuilder(int index) List of paragraphs in this block (if this blocks is of type text).List of paragraphs in this block (if this blocks is of type text).intList of paragraphs in this block (if this blocks is of type text).List of paragraphs in this block (if this blocks is of type text).getParagraphsOrBuilder(int index) List of paragraphs in this block (if this blocks is of type text).List<? extends ParagraphOrBuilder>List of paragraphs in this block (if this blocks is of type text).Additional information detected for the block.Additional information detected for the block.Additional information detected for the block.booleanThe bounding box for the block.booleanAdditional information detected for the block.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeBoundingBox(BoundingPoly value) The bounding box for the block.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Additional information detected for the block.removeParagraphs(int index) List of paragraphs in this block (if this blocks is of type text).setBlockType(Block.BlockType value) Detected block type (text, image etc) for this block.setBlockTypeValue(int value) Detected block type (text, image etc) for this block.setBoundingBox(BoundingPoly value) The bounding box for the block.setBoundingBox(BoundingPoly.Builder builderForValue) The bounding box for the block.setConfidence(float value) Confidence of the OCR results on the block.setParagraphs(int index, Paragraph value) List of paragraphs in this block (if this blocks is of type text).setParagraphs(int index, Paragraph.Builder builderForValue) List of paragraphs in this block (if this blocks is of type text).Additional information detected for the block.setProperty(TextAnnotation.TextProperty.Builder builderForValue) Additional information detected for the block.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Block.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Block.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Block.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Block.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Block.Builder>
-
mergeFrom
public Block.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Block.Builder>- Throws:
IOException
-
hasProperty
public boolean hasProperty()Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;- Specified by:
hasPropertyin interfaceBlockOrBuilder- Returns:
- Whether the property field is set.
-
getProperty
Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;- Specified by:
getPropertyin interfaceBlockOrBuilder- Returns:
- The property.
-
setProperty
Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; -
setProperty
Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; -
mergeProperty
Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; -
clearProperty
Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; -
getPropertyBuilder
Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; -
getPropertyOrBuilder
Additional information detected for the block.
.google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;- Specified by:
getPropertyOrBuilderin interfaceBlockOrBuilder
-
hasBoundingBox
public boolean hasBoundingBox()The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2;- Specified by:
hasBoundingBoxin interfaceBlockOrBuilder- Returns:
- Whether the boundingBox field is set.
-
getBoundingBox
The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2;- Specified by:
getBoundingBoxin interfaceBlockOrBuilder- Returns:
- The boundingBox.
-
setBoundingBox
The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2; -
setBoundingBox
The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2; -
mergeBoundingBox
The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2; -
clearBoundingBox
The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2; -
getBoundingBoxBuilder
The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2; -
getBoundingBoxOrBuilder
The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).
.google.cloud.vision.v1.BoundingPoly bounding_box = 2;- Specified by:
getBoundingBoxOrBuilderin interfaceBlockOrBuilder
-
getParagraphsList
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;- Specified by:
getParagraphsListin interfaceBlockOrBuilder
-
getParagraphsCount
public int getParagraphsCount()List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;- Specified by:
getParagraphsCountin interfaceBlockOrBuilder
-
getParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;- Specified by:
getParagraphsin interfaceBlockOrBuilder
-
setParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
setParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
addParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
addParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
addParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
addParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
addAllParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
clearParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
removeParagraphs
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
getParagraphsBuilder
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
getParagraphsOrBuilder
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;- Specified by:
getParagraphsOrBuilderin interfaceBlockOrBuilder
-
getParagraphsOrBuilderList
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3;- Specified by:
getParagraphsOrBuilderListin interfaceBlockOrBuilder
-
addParagraphsBuilder
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
addParagraphsBuilder
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
getParagraphsBuilderList
List of paragraphs in this block (if this blocks is of type text).
repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; -
getBlockTypeValue
public int getBlockTypeValue()Detected block type (text, image etc) for this block.
.google.cloud.vision.v1.Block.BlockType block_type = 4;- Specified by:
getBlockTypeValuein interfaceBlockOrBuilder- Returns:
- The enum numeric value on the wire for blockType.
-
setBlockTypeValue
Detected block type (text, image etc) for this block.
.google.cloud.vision.v1.Block.BlockType block_type = 4;- Parameters:
value- The enum numeric value on the wire for blockType to set.- Returns:
- This builder for chaining.
-
getBlockType
Detected block type (text, image etc) for this block.
.google.cloud.vision.v1.Block.BlockType block_type = 4;- Specified by:
getBlockTypein interfaceBlockOrBuilder- Returns:
- The blockType.
-
setBlockType
Detected block type (text, image etc) for this block.
.google.cloud.vision.v1.Block.BlockType block_type = 4;- Parameters:
value- The blockType to set.- Returns:
- This builder for chaining.
-
clearBlockType
Detected block type (text, image etc) for this block.
.google.cloud.vision.v1.Block.BlockType block_type = 4;- Returns:
- This builder for chaining.
-
getConfidence
public float getConfidence()Confidence of the OCR results on the block. Range [0, 1].
float confidence = 5;- Specified by:
getConfidencein interfaceBlockOrBuilder- Returns:
- The confidence.
-
setConfidence
Confidence of the OCR results on the block. Range [0, 1].
float confidence = 5;- Parameters:
value- The confidence to set.- Returns:
- This builder for chaining.
-
clearConfidence
Confidence of the OCR results on the block. Range [0, 1].
float confidence = 5;- Returns:
- This builder for chaining.
-