java.lang.Object
com.saperion.ngc.viewer.hylandviewer.annotation.json.Annotation
Direct Known Subclasses:
LineAnnotation, RectangleAnnotation, Redaction, TextAnnotation

public abstract class Annotation extends Object
Contains configuration of annotation
Author:
schowdhury
  • Field Details

    • annId

      protected String annId
      Id of the annotation
    • pageNo

      protected String pageNo
      Id of the content item the annotation belongs to
    • x

      protected double x
      X position of the annotation
    • y

      protected double y
      Y position of the annotation
    • width

      protected double width
      Width of the annotation
    • height

      protected double height
      Height of the annotation
    • fillColor

      protected String fillColor
      Fill color of the annotation
    • fillable

      protected boolean fillable
      Toggle to show fill color
    • fixRotation

      protected boolean fixRotation
      Toggle to fix annotation rotation (Annotation does not rotate with the page it belongs to).
    • resizable

      protected boolean resizable
      Annotation is resizable
    • movable

      protected boolean movable
      Annotation is movable
    • opacity

      protected double opacity
      Opacity of the annotation
    • stroke

      protected Stroke stroke
      Stroke info of the annotation
    • docDimension

      protected com.saperion.hyrcs.models.DocDimension docDimension
      Dimension of the document. It will not be serialized.
    • editMode

      protected boolean editMode
      To check whether the document is opened in edit mode or not
  • Constructor Details

    • Annotation

      public Annotation()
    • Annotation

      public Annotation(com.saperion.hyrcs.models.DocDimension docDimension, boolean editMode)
  • Method Details

    • getAnnId

      public String getAnnId()
    • setAnnId

      public void setAnnId(String annId)
    • getPageNo

      public String getPageNo()
    • setPageNo

      public void setPageNo(String pageNo)
    • getX

      public double getX()
    • getY

      public double getY()
    • getWidth

      public double getWidth()
    • getHeight

      public double getHeight()
    • getFillColor

      public String getFillColor()
    • isFillable

      public boolean isFillable()
    • isFixRotation

      public boolean isFixRotation()
    • isResizable

      public boolean isResizable()
    • isMovable

      public boolean isMovable()
    • getOpacity

      public double getOpacity()
    • getStroke

      public Stroke getStroke()
    • normalizeX

      protected double normalizeX(int x)
      The CoreServer delivers all coordinates for a normalized document sized 10000px x 10000px. So we have to calculate the real coordinates here.
    • normalizeY

      protected double normalizeY(int y)
    • getType

      public abstract AnnotationType getType()
    • draw

      public abstract void draw(Section section)
      This is an abstract method for filling up the annotation configuration by different types of annotations subclasses
      Parameters:
      section - contains information about an annotation (e.g. - annotation type and key value pairs)