Class AltoAnnotationBuilder

java.lang.Object
io.goobi.viewer.model.annotation.AltoAnnotationBuilder

public class AltoAnnotationBuilder extends Object
Creates an de.intranda.api.iiif.presentation.AnnotationList of TextualAnnotations from the content of an ALTO document. Depending on selected granularity, it is either one annotation per page, per TextBlock, per line or per word
Author:
Florian
  • Constructor Details

  • Method Details

    • createAnnotations

      public List<de.intranda.api.annotation.AbstractAnnotation> createAnnotations(de.intranda.digiverso.ocr.alto.model.structureclasses.Page alto, String pi, Integer pageNo, de.intranda.api.annotation.IResource target, AltoAnnotationBuilder.Granularity granularity, boolean urlOnlyTarget)

      createAnnotations.

      Parameters:
      alto - a Page object.
      pi -
      pageNo -
      target -
      granularity - a AltoAnnotationBuilder.Granularity object.
      urlOnlyTarget - a boolean.
      Returns:
      a List object.
    • createAnnotations

      public List<de.intranda.api.annotation.AbstractAnnotation> createAnnotations(List<de.intranda.digiverso.ocr.alto.model.superclasses.GeometricData> elements, String pi, Integer pageNo, de.intranda.api.annotation.IResource target, boolean urlOnlyTarget)

      createAnnotations.

      Parameters:
      elements - a List object.
      pi -
      pageNo -
      target -
      urlOnlyTarget - a boolean.
      Returns:
      a List object.
    • createAnnotation

      public de.intranda.api.annotation.AbstractAnnotation createAnnotation(de.intranda.digiverso.ocr.alto.model.superclasses.GeometricData element, String pi, Integer pageNo, de.intranda.api.annotation.IResource canvas, boolean urlOnlyTarget)

      createAnnotation.

      Parameters:
      element - a GeometricData object.
      pi -
      pageNo -
      canvas - a IResource object.
      urlOnlyTarget - a boolean.
      Returns:
      a IAnnotation object.