All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.freelibrary.iiif.presentation.v3.ids.Minter Maven / Gradle / Ivy

There is a newer version: 0.12.4
Show newest version

package info.freelibrary.iiif.presentation.v3.ids;

import java.net.URI;

import info.freelibrary.iiif.presentation.v3.CanvasResource;

/**
 * An ID minter for manifests.
 */
public interface Minter {

    /**
     * Gets this minter's manifest ID.
     *
     * @return The manifest ID associated with this minter
     */
    URI getManifestID();

    /**
     * Gets a new canvas ID.
     *
     * @return A new canvas ID
     */
    URI getCanvasID();

    /**
     * Gets a new annotation ID.
     *
     * @return A new annotation ID
     */
    URI getAnnotationID();

    /**
     * Gets a new annotation page ID from the supplied canvas.
     *
     * @param  A type of canvas resource (e.g. Canvas, AccompanyingCanvas, PlaceholderCanvas, etc.)
     * @param aCanvasResource A canvas resource
     * @return A new annotation page ID
     */
    > URI getAnnotationPageID(CanvasResource aCanvasResource);

    /**
     * Gets a new range ID.
     *
     * @return A new range ID
     */
    URI getRangeID();

    /**
     * Whether the minter has another ID available.
     *
     * @return True if there is another ID available
     */
    boolean hasNext();

    /**
     * Gets total number of IDs that this minter can mint.
     *
     * @return The total number of IDs that this minter can mint
     */
    int size();

    /**
     * Gets the number of IDs that are available for use.
     *
     * @return The number of IDs that are available for use
     */
    int remaining();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy