Class HylandViewerAnnotationCreator

  • Direct Known Subclasses:
    HylandViewerIniAnnotationCreator

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

      Fields 
      Modifier and Type Field Description
      protected com.saperion.hyrcs.models.DocDimension docDimension  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract Annotation createAnnotation​(java.lang.String type, Section section, com.saperion.hyrcs.models.DocDimension docDimension, boolean editMode)
      This is an abstract factory method responsible for creating annotation
      java.util.List<Annotation> createAnnotationList​(java.util.List<Section> parsedIniSections, boolean editMode)
      Creates a list of annotations from the list of parsed ini sections
      java.util.List<Section> parseIni​(java.lang.String annotationsIni)
      Parses the annotations defined by the specified ini-string and returns a list of parsed sections
      void setDocDimension​(com.saperion.hyrcs.models.DocDimension docDimension)
      Set the dimension of a document
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • docDimension

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

      • HylandViewerAnnotationCreator

        public HylandViewerAnnotationCreator()
    • Method Detail

      • parseIni

        public java.util.List<Section> parseIni​(java.lang.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 java.util.List<Annotation> createAnnotationList​(java.util.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​(java.lang.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