Class AnnotationListGenerator
java.lang.Object
org.dspace.app.iiif.model.generator.AnnotationListGenerator
- All Implemented Interfaces:
IIIFResource
@RequestScope
@Component
public class AnnotationListGenerator
extends Object
implements IIIFResource
This generator wraps the domain model for the
AnnotationList.
Please note that this is a request scoped bean. This means that for each http request a different instance will be initialized by Spring and used to serve this specific request.
The model represents an ordered list of annotations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResource(AnnotationGenerator annotation) Adds Annotation resource to the annotation list.de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.openannotation.Annotation>Creates and returns a resource model.voidsetIdentifier(@NotNull String identifier) Sets the required annotation identifier.
-
Constructor Details
-
AnnotationListGenerator
public AnnotationListGenerator()
-
-
Method Details
-
setIdentifier
Sets the required annotation identifier.- Parameters:
identifier- the annotation identifier
-
addResource
Adds Annotation resource to the annotation list.- Parameters:
annotation- an annotation generator
-
generateResource
public de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.openannotation.Annotation> generateResource()Description copied from interface:IIIFResourceCreates and returns a resource model.- Specified by:
generateResourcein interfaceIIIFResource- Returns:
- resource model
-