Interface Element

    • Method Detail

      • getName

        @NotNull
        String getName()
        Returns the element's name.
        Returns:
        name
      • getFullName

        @NotNull
        String getFullName()
        Returns the unique full name of the element (relative to the root).
        Returns:
        full element name
      • isLeaf

        boolean isLeaf()
        Returns whether the element is a leaf, i.e. cannot have child nodes.
        Returns:
        true if the element is a leaf
      • getChildren

        @Nullable
        Iterable<Element> getChildren()
                               throws BrowserException
        Returns the ordered list of element's children. Method should return null for a leaf element, and a not null instance for other elements. List can be empty. All children's names are different.
        Returns:
        the list of children, or null
        Throws:
        BrowserException - in case of an error
      • isContentAvailable

        boolean isContentAvailable()
        Returns whether the content is available for the element. The content is usually available for leaf elements and not available for non-leaf ones. If it's not, the call getInputStream() method will result in exception.
        Returns:
        true iff the content is available
        Since:
        7.0
      • getSize

        long getSize()
        Returns the size of the element content.

        If the content is not available for the element (see isContentAvailable()) or due to performance reasons a negative value may be returned. Though some implementations can provide the content size, while the content is not available.

        Returns:
        content size or negative value when unavailable
        Since:
        7.0
      • getBrowser

        @NotNull
        Browser getBrowser()
        Returns:
        browser created this element
        Since:
        8.1
      • getLastModifiedTimestamp

        @Nullable
        default Date getLastModifiedTimestamp()
        Returns the last modification timestamp of the element when available
        Returns:
        last modification timestamp of the element or null if the underlying resource doesn't exist or the underlying resource doesn't provide the modification timestamps
        Since:
        2021.1.1