Class PresentationRepositoryImpl

  • All Implemented Interfaces:
    PresentationRepository

    @Repository
    public class PresentationRepositoryImpl
    extends java.lang.Object
    implements PresentationRepository
    Default implementation trying to get manifest.json from an resolved URI as String and returning Manifest instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.digitalcollections.iiif.model.sharedcanvas.AnnotationList getAnnotationList​(java.lang.String identifier, java.lang.String name, java.lang.String canvasId)  
      de.digitalcollections.iiif.model.sharedcanvas.Collection getCollection​(java.lang.String name)  
      java.time.Instant getCollectionModificationDate​(java.lang.String identifier)  
      de.digitalcollections.iiif.model.sharedcanvas.Manifest getManifest​(java.lang.String identifier)  
      java.time.Instant getManifestModificationDate​(java.lang.String identifier)  
      protected java.lang.String getResourceJson​(java.net.URI resourceUri)  
      • Methods inherited from class java.lang.Object

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

      • PresentationRepositoryImpl

        public PresentationRepositoryImpl()
    • Method Detail

      • getAnnotationList

        public de.digitalcollections.iiif.model.sharedcanvas.AnnotationList getAnnotationList​(java.lang.String identifier,
                                                                                              java.lang.String name,
                                                                                              java.lang.String canvasId)
                                                                                       throws ResolvingException,
                                                                                              de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException,
                                                                                              InvalidDataException
        Specified by:
        getAnnotationList in interface PresentationRepository
        Parameters:
        identifier - unique identifier of the corresponding manifest
        name - unique name of annotation list
        canvasId - name of the corresponding canvas
        Returns:
        AnnotationList specified by name
        Throws:
        ResolvingException - if no annotation list found
        de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException - if annotation list with given name can not be found
        InvalidDataException - if data is corrupted
      • getCollection

        public de.digitalcollections.iiif.model.sharedcanvas.Collection getCollection​(java.lang.String name)
                                                                               throws ResolvingException,
                                                                                      de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException,
                                                                                      InvalidDataException
        Specified by:
        getCollection in interface PresentationRepository
        Parameters:
        name - unique name of collection
        Returns:
        Collection specified by name
        Throws:
        ResolvingException - in case Collection does not exist or can not be delivered
        de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException - if Collection with given name can not be found
        InvalidDataException - if collection contains invalid data
      • getManifest

        public de.digitalcollections.iiif.model.sharedcanvas.Manifest getManifest​(java.lang.String identifier)
                                                                           throws ResolvingException,
                                                                                  de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException,
                                                                                  InvalidDataException
        Specified by:
        getManifest in interface PresentationRepository
        Parameters:
        identifier - unique id for IIIF resource
        Returns:
        Manifest specifying presentation for IIIF resource
        Throws:
        ResolvingException - in case Manifest does not exist or can not be delivered
        de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException - if Manifest with given identifier can not be found
        InvalidDataException - if manifest contains invalid data
      • getManifestModificationDate

        public java.time.Instant getManifestModificationDate​(java.lang.String identifier)
                                                      throws ResolvingException,
                                                             de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException
        Specified by:
        getManifestModificationDate in interface PresentationRepository
        Throws:
        ResolvingException
        de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException
      • getCollectionModificationDate

        public java.time.Instant getCollectionModificationDate​(java.lang.String identifier)
                                                        throws ResolvingException,
                                                               de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException
        Specified by:
        getCollectionModificationDate in interface PresentationRepository
        Throws:
        ResolvingException
        de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException
      • getResourceJson

        protected java.lang.String getResourceJson​(java.net.URI resourceUri)
                                            throws ResolvingException,
                                                   de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException
        Throws:
        ResolvingException
        de.digitalcollections.model.api.identifiable.resource.exceptions.ResourceNotFoundException