Class PEFBook

    • Method Detail

      • getInputEncoding

        public String getInputEncoding()
        Gets the encoding used for this document at the time of the parsing.
        Returns:
        returns the input encoding
      • getURI

        public URI getURI()
        Gets the uri for the document at the time of parsing.
        Returns:
        returns the uri
      • getVolumes

        public int getVolumes()
        Gets the number of volumes in this document.
        Returns:
        returns the number of volumes
      • getSectionsInVolume

        public int getSectionsInVolume​(int volume)
        Gets the number of sections in the specified volume.
        Parameters:
        volume - the volume number, one based
        Returns:
        returns the number of sections
        Throws:
        IllegalArgumentException - if the volume is less than 1 or greater than getVolumes()
      • getPages

        public int getPages()
        Gets the total number of pages in this document.
        Returns:
        returns the number of pages
      • getPageTags

        public int getPageTags()
        Gets the number of page tags in this document.
        Returns:
        returns the number of page tags
      • getSheets

        public int getSheets()
        Gets the number of sheets in this document.
        Returns:
        returns the number of sheets
      • getSheets

        public int getSheets​(int volume)
        Gets the number of sheets in the specified volume.
        Parameters:
        volume - the volume number, one based
        Returns:
        returns the number of sheets in the specified volume
        Throws:
        IllegalArgumentException - if the volume is less than 1 or greater than getVolumes()
      • getSheets

        public int getSheets​(int volume,
                             int section)
        Gets the number of sheets in the specified section.
        Parameters:
        volume - the volume number, one based
        section - the section number, one based
        Returns:
        returns the number of sheets in the specified section
        Throws:
        IllegalArgumentException - if the volume is less than 1 or greater than getVolumes() or if section is less than 1 or greater than getSectionsInVolume(int)
      • getFirstPage

        public int getFirstPage​(int volume)
        Gets the first page number in the specified volume.
        Parameters:
        volume - the volume number, one based
        Returns:
        returns the first page number in the specified volume
        Throws:
        IllegalArgumentException - if the volume is less than 1 or greater than getVolumes()
      • getFirstPage

        public int getFirstPage​(int volume,
                                int section)
        Gets the first page number in the specified section.
        Parameters:
        volume - the volume number, one based
        section - the section number, one based
        Returns:
        returns the first page number in the specified section
        Throws:
        IllegalArgumentException - if the volume is less than 1 or greater than getVolumes() or if section is less than 1 or greater than getSectionsInVolume(int)
      • getLastPage

        public int getLastPage​(int volume)
        Gets the last page number in the specified volume.
        Parameters:
        volume - the volume number, one based
        Returns:
        returns the last page number in the specified volume
        Throws:
        IllegalArgumentException - if the volume is less than 1 or greater than getVolumes()
      • getLastPage

        public int getLastPage​(int volume,
                               int section)
        Gets the last page number in the specified section.
        Parameters:
        volume - the volume number, one based
        section - the section number, one based
        Returns:
        returns the last page number in the specified section
        Throws:
        IllegalArgumentException - if the volume is less than 1 or greater than getVolumes() or if section is less than 1 or greater than getSectionsInVolume(int)
      • getMaxWidth

        public int getMaxWidth()
        Gets the maximum defined page width, in chars.
        Returns:
        returns the maximum page width
      • getMaxHeight

        public int getMaxHeight()
        Gets the maximum defined page height, in rows.
        Returns:
        returns the maximum page height
      • containsEightDot

        public boolean containsEightDot()
        Returns true if this document contains eight dot patterns, false otherwise.
        Returns:
        returns true if the document contains eight dot patterns, false otherwise
      • getMetadataKeys

        public Iterable<String> getMetadataKeys()
        Gets a collection of all metadata keys in this document. A metadata key is a local element name in the http://purl.org/dc/elements/1.1/ namespace.
        Returns:
        returns the metadata keys
      • getMetadata

        public Iterable<String> getMetadata​(String key)
        Gets a collection of values for a specfied metadata key. A metadata key is a local element name in the http://purl.org/dc/elements/1.1/ namespace.
        Parameters:
        key - the metadata to get values for
        Returns:
        returns the values for the specified key
      • getTitle

        public Iterable<String> getTitle()
        Gets the document titles from this document's metadata. Convenience method for getMetadata("title").
        Returns:
        returns the document titles
      • getAuthors

        public Iterable<String> getAuthors()
        Gets the document authors from this document's metadata. Convenience method for getMetadata("creator").
        Returns:
        returns the document authors
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object