-
- 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.
-
-
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. Resourceget(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.
List<Link>getLinks()-
-
Method Detail
-
positionsByReadingOrder
abstract List<List<Locator>> positionsByReadingOrder()
Returns the list of all the positions in the publication, grouped by the resource reading order index.
-
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.
-
-
-