Class 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
    • Method Detail

      • 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.
        canvas - a de.intranda.api.iiif.presentation.v2.Canvas object.
        granularity - a AltoAnnotationBuilder.Granularity object.
        baseUrl - a String 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.
        canvas - a de.intranda.api.iiif.presentation.v2.Canvas object.
        baseUrl - a String object.
        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.
        canvas - a IResource object.
        baseUrl - a String object.
        urlOnlyTarget - a boolean.
        Returns:
        a IAnnotation object.