com.pdfunit.validators

## Class BookmarkDetailsValidator

- java.lang.Object
- - com.pdfunit.validators.AbstractValidator
  - - com.pdfunit.validators.BookmarkDetailsValidator

-     @DoNotObfuscate
      public final class BookmarkDetailsValidator
      extends com.pdfunit.validators.AbstractValidator

  Validator for details of a bookmark in PDF documents.
  Since:
    2016.05
  Author:
    Carsten Siedentop, January 2016

- - ### Field Summary

    - ### Fields inherited from class com.pdfunit.validators.AbstractValidator

      `testDocument`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BookmarkDetailsValidator(com.pdfunit.internal.spi.IDocument testDocument, AllBookmarksValidator backReference)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AllBookmarksValidator` | `withLabel(java.lang.String expectedLabel)` Validating an existing bookmark label.
    `AllBookmarksValidator` | `withLabelLinkingToPage(java.lang.String expectedLabel, int toPage)` This method verifies that a bookmark label (given by the first parameter) exists, which points to the page (given by the second parameter).
    `AllBookmarksValidator` | `withLinkToName(java.lang.String expectedName)` This method uses xpath internally to look for bookmarks with a link to the given name.
    `AllBookmarksValidator` | `withLinkToPage(int toPage)` The method verifies that a bookmark exists, which points to the page, given by the parameter.
    `AllBookmarksValidator` | `withLinkToURI(java.lang.String expectedURI)` This method uses xpath internally to look for bookmarks with the given uri.

    - ### Methods inherited from class com.pdfunit.validators.AbstractValidator

      `closeDocument, equals, getDocument, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BookmarkDetailsValidator

          protected BookmarkDetailsValidator(com.pdfunit.internal.spi.IDocument testDocument,
                                  AllBookmarksValidator backReference)

  - ### Method Detail

    - #### withLabel

          @Guarded
          public AllBookmarksValidator withLabel(java.lang.String expectedLabel)

      Validating an existing bookmark label. Leading and trailing spaces of the name of the label will be trimmed.

    - #### withLabelLinkingToPage

          @Guarded
          public AllBookmarksValidator withLabelLinkingToPage(java.lang.String expectedLabel,
                                                             int toPage)

      This method verifies that a bookmark label (given by the first parameter) exists, which points to the page (given by the second parameter).

    - #### withLinkToPage

          @Guarded
          public AllBookmarksValidator withLinkToPage(int toPage)

      The method verifies that a bookmark exists, which points to the page, given by the parameter.

    - #### withLinkToURI

          @Guarded
          public AllBookmarksValidator withLinkToURI(java.lang.String expectedURI)

      This method uses xpath internally to look for bookmarks with the given uri.

    - #### withLinkToName

          @Guarded
          public AllBookmarksValidator withLinkToName(java.lang.String expectedName)

      This method uses xpath internally to look for bookmarks with a link to the given name.

Copyright (C) PDFUnit.com. See here for license.