Class Paragraph.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
- com.google.cloud.vision.v1p2beta1.Paragraph.Builder
-
- All Implemented Interfaces:
ParagraphOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Paragraph
public static final class Paragraph.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder> implements ParagraphOrBuilder
Structural unit of text representing a number of words in certain order.
Protobuf typegoogle.cloud.vision.v1p2beta1.Paragraph
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Paragraph.BuilderaddAllWords(Iterable<? extends Word> values)List of words in this paragraph.Paragraph.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Paragraph.BuilderaddWords(int index, Word value)List of words in this paragraph.Paragraph.BuilderaddWords(int index, Word.Builder builderForValue)List of words in this paragraph.Paragraph.BuilderaddWords(Word value)List of words in this paragraph.Paragraph.BuilderaddWords(Word.Builder builderForValue)List of words in this paragraph.Word.BuilderaddWordsBuilder()List of words in this paragraph.Word.BuilderaddWordsBuilder(int index)List of words in this paragraph.Paragraphbuild()ParagraphbuildPartial()Paragraph.Builderclear()Paragraph.BuilderclearBoundingBox()The bounding box for the paragraph.Paragraph.BuilderclearConfidence()Confidence of the OCR results for the paragraph.Paragraph.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Paragraph.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Paragraph.BuilderclearProperty()Additional information detected for the paragraph.Paragraph.BuilderclearWords()List of words in this paragraph.Paragraph.Builderclone()BoundingPolygetBoundingBox()The bounding box for the paragraph.BoundingPoly.BuildergetBoundingBoxBuilder()The bounding box for the paragraph.BoundingPolyOrBuildergetBoundingBoxOrBuilder()The bounding box for the paragraph.floatgetConfidence()Confidence of the OCR results for the paragraph.ParagraphgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()TextAnnotation.TextPropertygetProperty()Additional information detected for the paragraph.TextAnnotation.TextProperty.BuildergetPropertyBuilder()Additional information detected for the paragraph.TextAnnotation.TextPropertyOrBuildergetPropertyOrBuilder()Additional information detected for the paragraph.WordgetWords(int index)List of words in this paragraph.Word.BuildergetWordsBuilder(int index)List of words in this paragraph.List<Word.Builder>getWordsBuilderList()List of words in this paragraph.intgetWordsCount()List of words in this paragraph.List<Word>getWordsList()List of words in this paragraph.WordOrBuildergetWordsOrBuilder(int index)List of words in this paragraph.List<? extends WordOrBuilder>getWordsOrBuilderList()List of words in this paragraph.booleanhasBoundingBox()The bounding box for the paragraph.booleanhasProperty()Additional information detected for the paragraph.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Paragraph.BuildermergeBoundingBox(BoundingPoly value)The bounding box for the paragraph.Paragraph.BuildermergeFrom(Paragraph other)Paragraph.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Paragraph.BuildermergeFrom(com.google.protobuf.Message other)Paragraph.BuildermergeProperty(TextAnnotation.TextProperty value)Additional information detected for the paragraph.Paragraph.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Paragraph.BuilderremoveWords(int index)List of words in this paragraph.Paragraph.BuildersetBoundingBox(BoundingPoly value)The bounding box for the paragraph.Paragraph.BuildersetBoundingBox(BoundingPoly.Builder builderForValue)The bounding box for the paragraph.Paragraph.BuildersetConfidence(float value)Confidence of the OCR results for the paragraph.Paragraph.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Paragraph.BuildersetProperty(TextAnnotation.TextProperty value)Additional information detected for the paragraph.Paragraph.BuildersetProperty(TextAnnotation.TextProperty.Builder builderForValue)Additional information detected for the paragraph.Paragraph.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Paragraph.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Paragraph.BuildersetWords(int index, Word value)List of words in this paragraph.Paragraph.BuildersetWords(int index, Word.Builder builderForValue)List of words in this paragraph.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
clear
public Paragraph.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.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.GeneratedMessageV3.Builder<Paragraph.Builder>
-
getDefaultInstanceForType
public Paragraph getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Paragraph build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Paragraph buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Paragraph.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
setField
public Paragraph.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
clearField
public Paragraph.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
clearOneof
public Paragraph.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
setRepeatedField
public Paragraph.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
addRepeatedField
public Paragraph.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
mergeFrom
public Paragraph.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Paragraph.Builder>
-
mergeFrom
public Paragraph.Builder mergeFrom(Paragraph other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
mergeFrom
public Paragraph.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<Paragraph.Builder>- Throws:
IOException
-
hasProperty
public boolean hasProperty()
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;- Specified by:
hasPropertyin interfaceParagraphOrBuilder- Returns:
- Whether the property field is set.
-
getProperty
public TextAnnotation.TextProperty getProperty()
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;- Specified by:
getPropertyin interfaceParagraphOrBuilder- Returns:
- The property.
-
setProperty
public Paragraph.Builder setProperty(TextAnnotation.TextProperty value)
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
-
setProperty
public Paragraph.Builder setProperty(TextAnnotation.TextProperty.Builder builderForValue)
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
-
mergeProperty
public Paragraph.Builder mergeProperty(TextAnnotation.TextProperty value)
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
-
clearProperty
public Paragraph.Builder clearProperty()
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
-
getPropertyBuilder
public TextAnnotation.TextProperty.Builder getPropertyBuilder()
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;
-
getPropertyOrBuilder
public TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder()
Additional information detected for the paragraph.
.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1;- Specified by:
getPropertyOrBuilderin interfaceParagraphOrBuilder
-
hasBoundingBox
public boolean hasBoundingBox()
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;- Specified by:
hasBoundingBoxin interfaceParagraphOrBuilder- Returns:
- Whether the boundingBox field is set.
-
getBoundingBox
public BoundingPoly getBoundingBox()
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;- Specified by:
getBoundingBoxin interfaceParagraphOrBuilder- Returns:
- The boundingBox.
-
setBoundingBox
public Paragraph.Builder setBoundingBox(BoundingPoly value)
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
-
setBoundingBox
public Paragraph.Builder setBoundingBox(BoundingPoly.Builder builderForValue)
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
-
mergeBoundingBox
public Paragraph.Builder mergeBoundingBox(BoundingPoly value)
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
-
clearBoundingBox
public Paragraph.Builder clearBoundingBox()
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
-
getBoundingBoxBuilder
public BoundingPoly.Builder getBoundingBoxBuilder()
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;
-
getBoundingBoxOrBuilder
public BoundingPolyOrBuilder getBoundingBoxOrBuilder()
The bounding box for the paragraph. 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 vertice order will still be (0, 1, 2, 3)..google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2;- Specified by:
getBoundingBoxOrBuilderin interfaceParagraphOrBuilder
-
getWordsList
public List<Word> getWordsList()
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;- Specified by:
getWordsListin interfaceParagraphOrBuilder
-
getWordsCount
public int getWordsCount()
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;- Specified by:
getWordsCountin interfaceParagraphOrBuilder
-
getWords
public Word getWords(int index)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;- Specified by:
getWordsin interfaceParagraphOrBuilder
-
setWords
public Paragraph.Builder setWords(int index, Word value)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
setWords
public Paragraph.Builder setWords(int index, Word.Builder builderForValue)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
addWords
public Paragraph.Builder addWords(Word value)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
addWords
public Paragraph.Builder addWords(int index, Word value)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
addWords
public Paragraph.Builder addWords(Word.Builder builderForValue)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
addWords
public Paragraph.Builder addWords(int index, Word.Builder builderForValue)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
addAllWords
public Paragraph.Builder addAllWords(Iterable<? extends Word> values)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
clearWords
public Paragraph.Builder clearWords()
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
removeWords
public Paragraph.Builder removeWords(int index)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
getWordsBuilder
public Word.Builder getWordsBuilder(int index)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
getWordsOrBuilder
public WordOrBuilder getWordsOrBuilder(int index)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;- Specified by:
getWordsOrBuilderin interfaceParagraphOrBuilder
-
getWordsOrBuilderList
public List<? extends WordOrBuilder> getWordsOrBuilderList()
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;- Specified by:
getWordsOrBuilderListin interfaceParagraphOrBuilder
-
addWordsBuilder
public Word.Builder addWordsBuilder()
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
addWordsBuilder
public Word.Builder addWordsBuilder(int index)
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
getWordsBuilderList
public List<Word.Builder> getWordsBuilderList()
List of words in this paragraph.
repeated .google.cloud.vision.v1p2beta1.Word words = 3;
-
getConfidence
public float getConfidence()
Confidence of the OCR results for the paragraph. Range [0, 1].
float confidence = 4;- Specified by:
getConfidencein interfaceParagraphOrBuilder- Returns:
- The confidence.
-
setConfidence
public Paragraph.Builder setConfidence(float value)
Confidence of the OCR results for the paragraph. Range [0, 1].
float confidence = 4;- Parameters:
value- The confidence to set.- Returns:
- This builder for chaining.
-
clearConfidence
public Paragraph.Builder clearConfidence()
Confidence of the OCR results for the paragraph. Range [0, 1].
float confidence = 4;- Returns:
- This builder for chaining.
-
setUnknownFields
public final Paragraph.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
mergeUnknownFields
public final Paragraph.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Paragraph.Builder>
-
-