Class PageReference

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

public class PageReference extends Object implements TagGroup
REST API model representing a single page of a digitized document and the NER tag counts found on it. Implements TagGroup to allow uniform handling alongside multi-page references.
  • Constructor Details

    • PageReference

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

      public PageReference(int pageOrder)
      Creates a new PageReference instance.
      Parameters:
      pageOrder - display order number of the referenced page
  • Method Details

    • getPageOrder

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

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

      public void setTags(List<TagCount> nerTags)
      Setter for the field tags.
      Parameters:
      nerTags - list of NER tag counts to assign to this page reference
    • 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
    • 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