java.lang.Object
edu.kit.datamanager.takita.model.page.Page
Direct Known Subclasses:
ImagePage, TextPage

public abstract class Page extends Object
The Page class represents the model of an abstract Page.
  • Field Details

    • annotations

      @Field(type=Nested, includeInParent=true) protected List<Annotation> annotations
    • resourceUrl

      protected String resourceUrl
    • thumbResourceUrl

      protected String thumbResourceUrl
  • Constructor Details

    • Page

      public Page(String id, ResourceType resourceType, String pageNumber, Instant created, String resourceUrl)
      Constructor for Page, only sets Id.
      Parameters:
      id - to be set, only id String and not link
      resourceType - the resourceType of the page
      pageNumber - the identifier of the page
      created - the date the page was created
      resourceUrl - the url that points at the resource
  • Method Details

    • getId

      public String getId()
      Gets Id of page.
      Returns:
      pageId
    • getManuscriptId

      public String getManuscriptId()
      Gets manuscript Id of manuscript to which the page belongs to.
      Returns:
      manuscriptId
    • setManuscriptId

      public void setManuscriptId(String manuscriptId)
      Sets manuscript Id of manuscript to which the page belongs to.
      Parameters:
      manuscriptId - to be set
    • getResourceType

      public ResourceType getResourceType()
      Gets the resource type.
      Returns:
      the resource type
    • getLastModified

      public Instant getLastModified()
      Gets the date it was last modified.
      Returns:
      the date
    • setLastModified

      public void setLastModified(Instant lastModified)
      Sets the date is was last modified.
      Parameters:
      lastModified - the date to set
    • getPageNumber

      public String getPageNumber()
      Gets the pageNumber.
      Returns:
      the pageNumber
    • getCreated

      public Instant getCreated()
      Gets the Date it was created.
      Returns:
      the Date
    • getResourceUrl

      public abstract String getResourceUrl()
      Gets the url of the resource of a page.
      Returns:
      url as String
    • getThumbResourceUrl

      public abstract String getThumbResourceUrl()
      Gets the url of the resource of a thumbnail.
      Returns:
      url as String
    • getAnnotations

      public List<Annotation> getAnnotations()
      Gets all annotations belonging to page.
      Returns:
      list of annotations
    • setAnnotations

      public void setAnnotations(List<Annotation> annotations)
      Sets all annotation belonging to page.
      Parameters:
      annotations - to be set
    • addAnnotation

      public void addAnnotation(Annotation annotation)
      Adds an annotation to list of annotations.
      Parameters:
      annotation - to be added