@hyperion-framework/presentation-2-parser
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-alpha.0 • Public • Published

Parser IIIF conversion

Lists

Set properties

  • thumbnail
  • logo
  • behavior
  • rendering
  • service
  • seeAlso
  • partOf

Annotation properties

  • body
  • target
  • motivation
  • source
  • selector
  • state
  • stylesheet
  • styleClass

Object properties

  • thumbnail -> "Image"
  • logo -> Image"
  • homepage -> ""
  • rendering -> ""
  • seeAlso -> "Dataset"
  • partOf -> ""

Content type map

  • "image" -> "Image",
  • "audio" -> "Sound",
  • "video" -> "Video",
  • "application/pdf" -> "Text",
  • "text/html" -> "Text",
  • "text/plain" -> "Text",
  • "application/xml" -> "Dataset",
  • "text/xml" -> "Dataset"

Steps (re-naming)

  • [x] attribution to requiredStatement
  • [x] viewingHint to behavior
  • [x] description to summary
  • [x] otherContent to annotations
  • [x] within to partOf
  • [x] Start canvas to start - fixing string starts to objects

Steps

  • [x] Convert language mapping on descriptive properties
  • [x] Fix context fields
  • [x] Fix profiles
  • [x] Fix types
  • [x] Fix non-array elements that need to be (set_properties)
  • [x] Head requests for content type of remote items - behind configuration
  • [x] Fix License field, move to metadata if multiple
  • [x] Fix service type (nothing else)
  • [x] Combine members, collections and manifests into items properties
  • [x] contentLayer to supplementary (AnnotationCollection)
  • [x] Convert canvas images to items into annotation page
  • [x] Annotation page to Annotation list
  • [x] Annotation: on -> target
  • [x] Annotation: resource -> body
  • [x] Annotation: motivation remove prefix

Steps (todo)

  • [ ] Convert multiple sequences into ranges
  • [ ] Merge range structure items + make sure they all have type
  • [ ] Remove behaviour=top from range
  • [ ] Annotation: parse stylesheet
  • [ ] Try to set type on everything - using format, remote types, URL format (content_type_map)
  • [ ] Minting of new URLs for IDs that are not set, using IIIF resource guides

Post-process steps

  • [ ] Process range structures
  • [ ] Add v3 context to top level
  • [ ] Reorder keys

Processing levels

  • [x] Process service
  • [x] Process resource (not service or language or not to be traversed)
  • [x] Process generic (top level?)
  • [x] Process collection
  • [x] Process manifest
  • [x] Process sequence
  • [x] Process canvas
  • [x] Process layer
  • [x] Process annotation page (list)
  • [x] Process annotation collection (layer)
  • [x] Process annotation
  • [x] Process specific resource
  • [x] Process textual body
  • [x] Process choice

Post-processing

  • [x] Post-process manifest

Fixtures

Other

  • Check all presence of all MUSTs in the spec and maybe bail?
  • A Collection must have at least one label.
  • A Manifest must have at least one label.
  • An AnnotationCollection must have at least one label.
  • id on Collection, Manifest, Canvas, content, Range,
  • AnnotationCollection, AnnotationPage, Annotation
  • type on all
  • width+height pair for Canvas, if either
  • items all the way down

Readme

Keywords

none

Package Sidebar

Install

npm i @hyperion-framework/presentation-2-parser

Weekly Downloads

4

Version

2.0.0-alpha.0

License

MIT

Unpacked Size

243 kB

Total Files

11

Last publish

Collaborators

  • stephenwf