Class Document.Page

  • All Implemented Interfaces:
    Document.PageOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
    Enclosing class:
    Document

    public static final class Document.Page
    extends com.google.protobuf.GeneratedMessageV3
    implements Document.PageOrBuilder
     A page in a [Document][google.cloud.documentai.v1beta1.Document].
     
    Protobuf type google.cloud.documentai.v1beta1.Document.Page
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getPageNumber

        public int getPageNumber()
         1-based index for current
         [Page][google.cloud.documentai.v1beta1.Document.Page] in a parent
         [Document][google.cloud.documentai.v1beta1.Document]. Useful when a page
         is taken out of a [Document][google.cloud.documentai.v1beta1.Document]
         for individual processing.
         
        int32 page_number = 1;
        Specified by:
        getPageNumber in interface Document.PageOrBuilder
        Returns:
        The pageNumber.
      • hasDimension

        public boolean hasDimension()
         Physical dimension of the page.
         
        .google.cloud.documentai.v1beta1.Document.Page.Dimension dimension = 2;
        Specified by:
        hasDimension in interface Document.PageOrBuilder
        Returns:
        Whether the dimension field is set.
      • hasLayout

        public boolean hasLayout()
         [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the
         page.
         
        .google.cloud.documentai.v1beta1.Document.Page.Layout layout = 3;
        Specified by:
        hasLayout in interface Document.PageOrBuilder
        Returns:
        Whether the layout field is set.
      • getLayout

        public Document.Page.Layout getLayout()
         [Layout][google.cloud.documentai.v1beta1.Document.Page.Layout] for the
         page.
         
        .google.cloud.documentai.v1beta1.Document.Page.Layout layout = 3;
        Specified by:
        getLayout in interface Document.PageOrBuilder
        Returns:
        The layout.
      • getDetectedLanguagesCount

        public int getDetectedLanguagesCount()
         A list of detected languages together with confidence.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.DetectedLanguage detected_languages = 4;
        Specified by:
        getDetectedLanguagesCount in interface Document.PageOrBuilder
      • getBlocksList

        public List<Document.Page.Block> getBlocksList()
         A list of visually detected text blocks on the page.
         A block has a set of lines (collected into paragraphs) that have a common
         line-spacing and orientation.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Block blocks = 5;
        Specified by:
        getBlocksList in interface Document.PageOrBuilder
      • getBlocksOrBuilderList

        public List<? extends Document.Page.BlockOrBuilder> getBlocksOrBuilderList()
         A list of visually detected text blocks on the page.
         A block has a set of lines (collected into paragraphs) that have a common
         line-spacing and orientation.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Block blocks = 5;
        Specified by:
        getBlocksOrBuilderList in interface Document.PageOrBuilder
      • getBlocksCount

        public int getBlocksCount()
         A list of visually detected text blocks on the page.
         A block has a set of lines (collected into paragraphs) that have a common
         line-spacing and orientation.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Block blocks = 5;
        Specified by:
        getBlocksCount in interface Document.PageOrBuilder
      • getBlocks

        public Document.Page.Block getBlocks​(int index)
         A list of visually detected text blocks on the page.
         A block has a set of lines (collected into paragraphs) that have a common
         line-spacing and orientation.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Block blocks = 5;
        Specified by:
        getBlocks in interface Document.PageOrBuilder
      • getBlocksOrBuilder

        public Document.Page.BlockOrBuilder getBlocksOrBuilder​(int index)
         A list of visually detected text blocks on the page.
         A block has a set of lines (collected into paragraphs) that have a common
         line-spacing and orientation.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Block blocks = 5;
        Specified by:
        getBlocksOrBuilder in interface Document.PageOrBuilder
      • getParagraphsList

        public List<Document.Page.Paragraph> getParagraphsList()
         A list of visually detected text paragraphs on the page.
         A collection of lines that a human would perceive as a paragraph.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Paragraph paragraphs = 6;
        Specified by:
        getParagraphsList in interface Document.PageOrBuilder
      • getParagraphsCount

        public int getParagraphsCount()
         A list of visually detected text paragraphs on the page.
         A collection of lines that a human would perceive as a paragraph.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Paragraph paragraphs = 6;
        Specified by:
        getParagraphsCount in interface Document.PageOrBuilder
      • getParagraphs

        public Document.Page.Paragraph getParagraphs​(int index)
         A list of visually detected text paragraphs on the page.
         A collection of lines that a human would perceive as a paragraph.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Paragraph paragraphs = 6;
        Specified by:
        getParagraphs in interface Document.PageOrBuilder
      • getParagraphsOrBuilder

        public Document.Page.ParagraphOrBuilder getParagraphsOrBuilder​(int index)
         A list of visually detected text paragraphs on the page.
         A collection of lines that a human would perceive as a paragraph.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Paragraph paragraphs = 6;
        Specified by:
        getParagraphsOrBuilder in interface Document.PageOrBuilder
      • getLinesList

        public List<Document.Page.Line> getLinesList()
         A list of visually detected text lines on the page.
         A collection of tokens that a human would perceive as a line.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Line lines = 7;
        Specified by:
        getLinesList in interface Document.PageOrBuilder
      • getLinesCount

        public int getLinesCount()
         A list of visually detected text lines on the page.
         A collection of tokens that a human would perceive as a line.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Line lines = 7;
        Specified by:
        getLinesCount in interface Document.PageOrBuilder
      • getLines

        public Document.Page.Line getLines​(int index)
         A list of visually detected text lines on the page.
         A collection of tokens that a human would perceive as a line.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Line lines = 7;
        Specified by:
        getLines in interface Document.PageOrBuilder
      • getLinesOrBuilder

        public Document.Page.LineOrBuilder getLinesOrBuilder​(int index)
         A list of visually detected text lines on the page.
         A collection of tokens that a human would perceive as a line.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Line lines = 7;
        Specified by:
        getLinesOrBuilder in interface Document.PageOrBuilder
      • getTokensCount

        public int getTokensCount()
         A list of visually detected tokens on the page.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Token tokens = 8;
        Specified by:
        getTokensCount in interface Document.PageOrBuilder
      • getVisualElementsCount

        public int getVisualElementsCount()
         A list of detected non-text visual elements e.g. checkbox,
         signature etc. on the page.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.VisualElement visual_elements = 9;
        Specified by:
        getVisualElementsCount in interface Document.PageOrBuilder
      • getVisualElements

        public Document.Page.VisualElement getVisualElements​(int index)
         A list of detected non-text visual elements e.g. checkbox,
         signature etc. on the page.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.VisualElement visual_elements = 9;
        Specified by:
        getVisualElements in interface Document.PageOrBuilder
      • getTablesCount

        public int getTablesCount()
         A list of visually detected tables on the page.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Table tables = 10;
        Specified by:
        getTablesCount in interface Document.PageOrBuilder
      • getTables

        public Document.Page.Table getTables​(int index)
         A list of visually detected tables on the page.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.Table tables = 10;
        Specified by:
        getTables in interface Document.PageOrBuilder
      • getFormFieldsCount

        public int getFormFieldsCount()
         A list of visually detected form fields on the page.
         
        repeated .google.cloud.documentai.v1beta1.Document.Page.FormField form_fields = 11;
        Specified by:
        getFormFieldsCount in interface Document.PageOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Document.Page parseFrom​(ByteBuffer data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Document.Page parseFrom​(ByteBuffer data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Document.Page parseFrom​(com.google.protobuf.ByteString data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Document.Page parseFrom​(com.google.protobuf.ByteString data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Document.Page parseFrom​(byte[] data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Document.Page parseFrom​(byte[] data,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Document.Page parseFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Document.Page.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Document.Page.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Document.Page.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Document.Page getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Document.Page> parser()
      • getParserForType

        public com.google.protobuf.Parser<Document.Page> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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