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.v1.Document].
     
    Protobuf type google.cloud.documentai.v1.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.v1.Document.Page] in a parent
         [Document][google.cloud.documentai.v1.Document]. Useful when a page is
         taken out of a [Document][google.cloud.documentai.v1.Document] for
         individual processing.
         
        int32 page_number = 1;
        Specified by:
        getPageNumber in interface Document.PageOrBuilder
        Returns:
        The pageNumber.
      • hasImage

        public boolean hasImage()
         Rendered image for this page. This image is preprocessed to remove any
         skew, rotation, and distortions such that the annotation bounding boxes
         can be upright and axis-aligned.
         
        .google.cloud.documentai.v1.Document.Page.Image image = 13;
        Specified by:
        hasImage in interface Document.PageOrBuilder
        Returns:
        Whether the image field is set.
      • getImage

        public Document.Page.Image getImage()
         Rendered image for this page. This image is preprocessed to remove any
         skew, rotation, and distortions such that the annotation bounding boxes
         can be upright and axis-aligned.
         
        .google.cloud.documentai.v1.Document.Page.Image image = 13;
        Specified by:
        getImage in interface Document.PageOrBuilder
        Returns:
        The image.
      • getImageOrBuilder

        public Document.Page.ImageOrBuilder getImageOrBuilder()
         Rendered image for this page. This image is preprocessed to remove any
         skew, rotation, and distortions such that the annotation bounding boxes
         can be upright and axis-aligned.
         
        .google.cloud.documentai.v1.Document.Page.Image image = 13;
        Specified by:
        getImageOrBuilder in interface Document.PageOrBuilder
      • getTransformsList

        public List<Document.Page.Matrix> getTransformsList()
         Transformation matrices that were applied to the original document image
         to produce [Page.image][google.cloud.documentai.v1.Document.Page.image].
         
        repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14;
        Specified by:
        getTransformsList in interface Document.PageOrBuilder
      • getTransformsOrBuilderList

        public List<? extends Document.Page.MatrixOrBuilder> getTransformsOrBuilderList()
         Transformation matrices that were applied to the original document image
         to produce [Page.image][google.cloud.documentai.v1.Document.Page.image].
         
        repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14;
        Specified by:
        getTransformsOrBuilderList in interface Document.PageOrBuilder
      • getTransformsCount

        public int getTransformsCount()
         Transformation matrices that were applied to the original document image
         to produce [Page.image][google.cloud.documentai.v1.Document.Page.image].
         
        repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14;
        Specified by:
        getTransformsCount in interface Document.PageOrBuilder
      • getTransforms

        public Document.Page.Matrix getTransforms​(int index)
         Transformation matrices that were applied to the original document image
         to produce [Page.image][google.cloud.documentai.v1.Document.Page.image].
         
        repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14;
        Specified by:
        getTransforms in interface Document.PageOrBuilder
      • getTransformsOrBuilder

        public Document.Page.MatrixOrBuilder getTransformsOrBuilder​(int index)
         Transformation matrices that were applied to the original document image
         to produce [Page.image][google.cloud.documentai.v1.Document.Page.image].
         
        repeated .google.cloud.documentai.v1.Document.Page.Matrix transforms = 14;
        Specified by:
        getTransformsOrBuilder in interface Document.PageOrBuilder
      • hasDimension

        public boolean hasDimension()
         Physical dimension of the page.
         
        .google.cloud.documentai.v1.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.v1.Document.Page.Layout] for the page.
         
        .google.cloud.documentai.v1.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.v1.Document.Page.Layout] for the page.
         
        .google.cloud.documentai.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Document.Page.Paragraph paragraphs = 6;
        Specified by:
        getParagraphs 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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Document.Page.Table tables = 10;
        Specified by:
        getTablesCount in interface Document.PageOrBuilder
      • getFormFieldsCount

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

        public int getSymbolsCount()
         A list of visually detected symbols on the page.
         
        repeated .google.cloud.documentai.v1.Document.Page.Symbol symbols = 12;
        Specified by:
        getSymbolsCount in interface Document.PageOrBuilder
      • getDetectedBarcodesCount

        public int getDetectedBarcodesCount()
         A list of detected barcodes.
         
        repeated .google.cloud.documentai.v1.Document.Page.DetectedBarcode detected_barcodes = 15;
        Specified by:
        getDetectedBarcodesCount in interface Document.PageOrBuilder
      • hasImageQualityScores

        public boolean hasImageQualityScores()
         Image quality scores.
         
        .google.cloud.documentai.v1.Document.Page.ImageQualityScores image_quality_scores = 17;
        Specified by:
        hasImageQualityScores in interface Document.PageOrBuilder
        Returns:
        Whether the imageQualityScores field is set.
      • hasProvenance

        @Deprecated
        public boolean hasProvenance()
        Deprecated.
        google.cloud.documentai.v1.Document.Page.provenance is deprecated. See google/cloud/documentai/v1/document.proto;l=548
         The history of this page.
         
        .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true];
        Specified by:
        hasProvenance in interface Document.PageOrBuilder
        Returns:
        Whether the provenance field is set.
      • getProvenance

        @Deprecated
        public Document.Provenance getProvenance()
        Deprecated.
        google.cloud.documentai.v1.Document.Page.provenance is deprecated. See google/cloud/documentai/v1/document.proto;l=548
         The history of this page.
         
        .google.cloud.documentai.v1.Document.Provenance provenance = 16 [deprecated = true];
        Specified by:
        getProvenance in interface Document.PageOrBuilder
        Returns:
        The provenance.
      • 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