Class Page.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Page.Builder>
com.google.cloud.vision.v1.Page.Builder
All Implemented Interfaces:
PageOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Page

public static final class Page.Builder extends com.google.protobuf.GeneratedMessage.Builder<Page.Builder> implements PageOrBuilder
 Detected page from OCR.
 
Protobuf type google.cloud.vision.v1.Page
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Page.Builder>
    • clear

      public Page.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Page.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Page.Builder>
    • getDefaultInstanceForType

      public Page getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Page build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Page buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Page.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Page.Builder>
    • mergeFrom

      public Page.Builder mergeFrom(Page other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Page.Builder>
    • mergeFrom

      public Page.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Page.Builder>
      Throws:
      IOException
    • hasProperty

      public boolean hasProperty()
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
      Specified by:
      hasProperty in interface PageOrBuilder
      Returns:
      Whether the property field is set.
    • getProperty

      public TextAnnotation.TextProperty getProperty()
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
      Specified by:
      getProperty in interface PageOrBuilder
      Returns:
      The property.
    • setProperty

      public Page.Builder setProperty(TextAnnotation.TextProperty value)
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
    • setProperty

      public Page.Builder setProperty(TextAnnotation.TextProperty.Builder builderForValue)
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
    • mergeProperty

      public Page.Builder mergeProperty(TextAnnotation.TextProperty value)
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
    • clearProperty

      public Page.Builder clearProperty()
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
    • getPropertyBuilder

      public TextAnnotation.TextProperty.Builder getPropertyBuilder()
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
    • getPropertyOrBuilder

      public TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder()
       Additional information detected on the page.
       
      .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1;
      Specified by:
      getPropertyOrBuilder in interface PageOrBuilder
    • getWidth

      public int getWidth()
       Page width. For PDFs the unit is points. For images (including
       TIFFs) the unit is pixels.
       
      int32 width = 2;
      Specified by:
      getWidth in interface PageOrBuilder
      Returns:
      The width.
    • setWidth

      public Page.Builder setWidth(int value)
       Page width. For PDFs the unit is points. For images (including
       TIFFs) the unit is pixels.
       
      int32 width = 2;
      Parameters:
      value - The width to set.
      Returns:
      This builder for chaining.
    • clearWidth

      public Page.Builder clearWidth()
       Page width. For PDFs the unit is points. For images (including
       TIFFs) the unit is pixels.
       
      int32 width = 2;
      Returns:
      This builder for chaining.
    • getHeight

      public int getHeight()
       Page height. For PDFs the unit is points. For images (including
       TIFFs) the unit is pixels.
       
      int32 height = 3;
      Specified by:
      getHeight in interface PageOrBuilder
      Returns:
      The height.
    • setHeight

      public Page.Builder setHeight(int value)
       Page height. For PDFs the unit is points. For images (including
       TIFFs) the unit is pixels.
       
      int32 height = 3;
      Parameters:
      value - The height to set.
      Returns:
      This builder for chaining.
    • clearHeight

      public Page.Builder clearHeight()
       Page height. For PDFs the unit is points. For images (including
       TIFFs) the unit is pixels.
       
      int32 height = 3;
      Returns:
      This builder for chaining.
    • getBlocksList

      public List<Block> getBlocksList()
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
      Specified by:
      getBlocksList in interface PageOrBuilder
    • getBlocksCount

      public int getBlocksCount()
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
      Specified by:
      getBlocksCount in interface PageOrBuilder
    • getBlocks

      public Block getBlocks(int index)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
      Specified by:
      getBlocks in interface PageOrBuilder
    • setBlocks

      public Page.Builder setBlocks(int index, Block value)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • setBlocks

      public Page.Builder setBlocks(int index, Block.Builder builderForValue)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • addBlocks

      public Page.Builder addBlocks(Block value)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • addBlocks

      public Page.Builder addBlocks(int index, Block value)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • addBlocks

      public Page.Builder addBlocks(Block.Builder builderForValue)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • addBlocks

      public Page.Builder addBlocks(int index, Block.Builder builderForValue)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • addAllBlocks

      public Page.Builder addAllBlocks(Iterable<? extends Block> values)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • clearBlocks

      public Page.Builder clearBlocks()
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • removeBlocks

      public Page.Builder removeBlocks(int index)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • getBlocksBuilder

      public Block.Builder getBlocksBuilder(int index)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • getBlocksOrBuilder

      public BlockOrBuilder getBlocksOrBuilder(int index)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
      Specified by:
      getBlocksOrBuilder in interface PageOrBuilder
    • getBlocksOrBuilderList

      public List<? extends BlockOrBuilder> getBlocksOrBuilderList()
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
      Specified by:
      getBlocksOrBuilderList in interface PageOrBuilder
    • addBlocksBuilder

      public Block.Builder addBlocksBuilder()
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • addBlocksBuilder

      public Block.Builder addBlocksBuilder(int index)
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • getBlocksBuilderList

      public List<Block.Builder> getBlocksBuilderList()
       List of blocks of text, images etc on this page.
       
      repeated .google.cloud.vision.v1.Block blocks = 4;
    • getConfidence

      public float getConfidence()
       Confidence of the OCR results on the page. Range [0, 1].
       
      float confidence = 5;
      Specified by:
      getConfidence in interface PageOrBuilder
      Returns:
      The confidence.
    • setConfidence

      public Page.Builder setConfidence(float value)
       Confidence of the OCR results on the page. Range [0, 1].
       
      float confidence = 5;
      Parameters:
      value - The confidence to set.
      Returns:
      This builder for chaining.
    • clearConfidence

      public Page.Builder clearConfidence()
       Confidence of the OCR results on the page. Range [0, 1].
       
      float confidence = 5;
      Returns:
      This builder for chaining.