java.lang.Object
io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
io.goobi.viewer.model.iiif.presentation.v2.builder.LayerBuilder

public class LayerBuilder extends AbstractBuilder

LayerBuilder class.

Author:
Florian Alpers
  • Constructor Details

    • LayerBuilder

      public LayerBuilder(AbstractApiUrlManager apiUrlManager)

      Constructor for LayerBuilder.

      Parameters:
      apiUrlManager -
  • Method Details

    • createAnnotationLayer

      public de.intranda.api.iiif.presentation.v2.Layer createAnnotationLayer(String pi, de.intranda.api.iiif.presentation.enums.AnnotationType type, String motivation, BiFunction<String,String,List<Path>> fileGetter, BiFunction<String,String,URI> linkGetter) throws PresentationException, IndexUnreachableException, IOException, URISyntaxException

      createAnnotationLayer.

      Parameters:
      pi - a String object.
      type - a AnnotationType object.
      motivation - a String object.
      fileGetter - a BiFunction object.
      linkGetter - a BiFunction object.
      Returns:
      a Layer object.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      IOException - if any.
      URISyntaxException - if any.
    • createAnnotation

      public de.intranda.api.annotation.oa.OpenAnnotation createAnnotation(URI annotationId, URI linkURI, de.intranda.api.iiif.presentation.enums.Format format, de.intranda.api.iiif.presentation.enums.DcType dcType, de.intranda.api.iiif.presentation.enums.AnnotationType annoType, String motivation)

      createAnnotation.

      Parameters:
      annotationId - a URI object.
      linkURI - a URI object.
      format - a Format object.
      dcType - a DcType object.
      annoType - a AnnotationType object.
      motivation - a String object.
      Returns:
      a OpenAnnotation object.
    • createAnnotationList

      public de.intranda.api.iiif.presentation.v2.AnnotationList createAnnotationList(List<de.intranda.api.annotation.IAnnotation> annotations, URI id, de.intranda.api.iiif.presentation.enums.AnnotationType type)

      createAnnotationList.

      Parameters:
      annotations - a List object.
      id - a URI object.
      type - a AnnotationType object.
      Returns:
      a AnnotationList object.
    • generateLayer

      public de.intranda.api.iiif.presentation.v2.Layer generateLayer(String pi, Map<de.intranda.api.iiif.presentation.enums.AnnotationType,List<de.intranda.api.iiif.presentation.v2.AnnotationList>> annoLists, de.intranda.api.iiif.presentation.enums.AnnotationType annoType) throws URISyntaxException

      generateLayer.

      Parameters:
      pi - a String object.
      annoLists - a Map object.
      annoType - a AnnotationType object.
      Returns:
      a Layer object.
      Throws:
      URISyntaxException - if any.
    • mergeAnnotationLists

      public Map<de.intranda.api.iiif.presentation.enums.AnnotationType,de.intranda.api.iiif.presentation.v2.AnnotationList> mergeAnnotationLists(String pi, Map<de.intranda.api.iiif.presentation.enums.AnnotationType,List<de.intranda.api.iiif.presentation.v2.AnnotationList>> annoLists) throws URISyntaxException

      mergeAnnotationLists.

      Parameters:
      pi - a String object.
      annoLists - a Map object.
      Returns:
      a Map object.
      Throws:
      URISyntaxException - if any.