Class HylandViewerAnnotationCreator
- java.lang.Object
-
- com.saperion.ngc.viewer.hylandviewer.annotation.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
-
Constructor Summary
Constructors Constructor Description HylandViewerAnnotationCreator()
-
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 annotationjava.util.List<Annotation>
createAnnotationList(java.util.List<Section> parsedIniSections, boolean editMode)
Creates a list of annotations from the list of parsed ini sectionsjava.util.List<Section>
parseIni(java.lang.String annotationsIni)
Parses the annotations defined by the specified ini-string and returns a list of parsed sectionsvoid
setDocDimension(com.saperion.hyrcs.models.DocDimension docDimension)
Set the dimension of a document
-
-
-
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 typesection
- 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
-
-