maniiifest
Version:
Typesafe IIIF presentation v3 manifest and collection parsing without external dependencies
33 lines (32 loc) • 1.65 kB
TypeScript
import type * as U from "./iiif-types";
/**
* Parses and provides access to a standalone W3C Annotation.
*
* Create via `Maniiifest.parseAnnotation(data)` or `new ManiiifestAnnotation(data)`.
*/
export declare class ManiiifestAnnotation {
private specification;
constructor(data: any);
getAnnotation(): U.Annotation;
getAnnotationId(): U.Id | null;
getAnnotationType(): U.Type;
getAnnotationContext(): U.Context | null;
getAnnotationBody(): U.Body | null;
getAnnotationTarget(): U.Target | null;
getAnnotationMotivation(): U.Motivation | null;
getAnnotationCreator(): U.Creator | null;
getAnnotationGenerator(): U.Generator | null;
getAnnotationCreated(): U.Created | null;
getAnnotationModified(): U.Modified | null;
getAnnotationFeatureCollection(): U.FeatureCollection | null;
/** @yields {U.AnnotationBodyTextualBody} Each textual body from the annotation. */
iterateAnnotationTextualBody(): IterableIterator<U.AnnotationBodyTextualBody>;
/** @yields {U.AnnotationBodyResource} Each resource body from the annotation. */
iterateAnnotationResourceBody(): IterableIterator<U.AnnotationBodyResource>;
/** @yields {U.AnnotationTarget} Each target of the annotation. */
iterateAnnotationTarget(): IterableIterator<U.AnnotationTarget>;
/** @yields {U.Feature} Each GeoJSON feature from a FeatureCollection body. */
iterateAnnotationFeature(): IterableIterator<U.Feature>;
/** @yields {U.PointCoordinates} Each point coordinate pair from FeatureCollection geometry. */
iterateAnnotationGeometryPointCoordinates(): IterableIterator<U.PointCoordinates>;
}