Package 

Interface PositionsService

  • All Implemented Interfaces:
    org.readium.r2.shared.publication.Publication.Service , org.readium.r2.shared.util.Closeable

    
    public interface PositionsService
     implements Publication.Service
                        

    Provides a list of discrete locations in the publication, no matter what the original format is.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract List<List<Locator>> positionsByReadingOrder() Returns the list of all the positions in the publication, grouped by the resource reading order index.
      List<Locator> positions() Returns the list of all the positions in the publication.
      Resource get(Link link) A service can return a Resource to:
      • respond to a request to its web API declared in links,

      • serve additional resources on behalf of the publication,

      • replace a publication resource by its own version.

      Called by Publication.get for each request.
      List<Link> getLinks()
      • Methods inherited from class org.readium.r2.shared.publication.Publication.Service

        close
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • get

         Resource get(Link link)

        A service can return a Resource to:

        • respond to a request to its web API declared in links,

        • serve additional resources on behalf of the publication,

        • replace a publication resource by its own version.

        Called by Publication.get for each request.

        Warning: If you need to request one of the publication resources to answer the request, use the Fetcher provided by the Publication.Service.Context instead of Publication.get, otherwise it will trigger an infinite loop.