Class HylandViewerAnnotationCreator

java.lang.Object
com.saperion.ngc.viewer.hylandviewer.annotation.HylandViewerAnnotationCreator
Direct Known Subclasses:
HylandViewerIniAnnotationCreator

public abstract class HylandViewerAnnotationCreator extends Object
Resolves the annotation INI format into Hyland Viewer JSON annotation format
Author:
schowdhury
  • Field Details

    • docDimension

      protected com.saperion.hyrcs.models.DocDimension docDimension
  • Constructor Details

    • HylandViewerAnnotationCreator

      public HylandViewerAnnotationCreator()
  • Method Details

    • parseIni

      public List<Section> parseIni(String annotationsIni)
      Parses the annotations defined by the specified ini-string and returns a list of parsed sections
      Parameters:
      annotationsIni - the annotation ini string
      Returns:
      list of sections
    • createAnnotationList

      public List<Annotation> createAnnotationList(List<Section> parsedIniSections, boolean editMode)
      Creates a list of annotations from the list of parsed ini sections
      Parameters:
      parsedIniSections - the list of sections
      Returns:
      the list of annotations
    • setDocDimension

      public void setDocDimension(com.saperion.hyrcs.models.DocDimension docDimension)
      Set the dimension of a document
      Parameters:
      docDimension - the document dimension (width and height of a document)
    • createAnnotation

      protected abstract Annotation createAnnotation(String type, Section section, com.saperion.hyrcs.models.DocDimension docDimension, boolean editMode)
      This is an abstract factory method responsible for creating annotation
      Parameters:
      type - annotation type
      section - contains information about an annotation (e.g. - annotation type and key value pairs)
      docDimension - the document dimension (width and height of a document)
      Returns:
      Annotation