Class MultiPageReference

java.lang.Object
io.goobi.viewer.api.rest.model.ner.MultiPageReference
All Implemented Interfaces:
TagGroup, Comparable<TagGroup>

public class MultiPageReference extends Object implements TagGroup
REST API model representing a contiguous range of pages (defined by a first and last page order number) that share a set of NER tag counts. Implements TagGroup to allow uniform handling alongside single-page references.
  • Constructor Details

    • MultiPageReference

      public MultiPageReference()
      Creates a new MultiPageReference instance.
    • MultiPageReference

      public MultiPageReference(int order)
      Creates a new MultiPageReference instance.
      Parameters:
      order - page order number used for both first and last page
    • MultiPageReference

      public MultiPageReference(Integer first, Integer last)
      Creates a new MultiPageReference instance.
      Parameters:
      first - order number of the first page in the range
      last - order number of the last page in the range
  • Method Details

    • getFirstPage

      public Integer getFirstPage()
      Getter for the field firstPage.
      Returns:
      the page order number of the first page in this range
    • getLastPage

      public Integer getLastPage()
      Getter for the field lastPage.
      Returns:
      the page order number of the last page in this range
    • getTags

      public List<TagCount> getTags()
      getTags.
      Specified by:
      getTags in interface TagGroup
      Returns:
      a list of NER tag counts contained in this group
    • compareTo

      public int compareTo(TagGroup o)
      Specified by:
      compareTo in interface Comparable<TagGroup>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getPages

      public int getPages()
      getPages.
      Specified by:
      getPages in interface TagGroup
      Returns:
      the number of pages in this group
    • getPageOrder

      public Integer getPageOrder()
      getPageOrder.
      Specified by:
      getPageOrder in interface TagGroup
      Returns:
      the page order of the first (or only) page in this group
    • addTags

      public void addTags(List<TagCount> tags)
      addTags.
      Specified by:
      addTags in interface TagGroup
      Parameters:
      tags - list of tag counts to add to this group