UNPKG

maniiifest

Version:

Typesafe IIIF presentation v3 manifest and collection parsing without external dependencies

41 lines (40 loc) 2.36 kB
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; /** @returns {U.AnnotationTargetFeature | null} The GeoJSON Feature target, if present. */ getAnnotationTargetFeature(): U.AnnotationTargetFeature | null; /** @returns {U.AnnotationTargetFeatureCollection | null} The GeoJSON FeatureCollection target, if present. */ getAnnotationTargetFeatureCollection(): U.AnnotationTargetFeatureCollection | 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>; /** @yields {U.Feature} Each GeoJSON feature from a Feature or FeatureCollection target. */ iterateAnnotationTargetFeature(): IterableIterator<U.Feature>; /** @yields {U.PointCoordinates} Each point coordinate pair from target geometry. */ iterateAnnotationTargetGeometryPointCoordinates(): IterableIterator<U.PointCoordinates>; }