CenterForDigitalHumanities / TPEN-services

Services required by TPEN interfaces in order to interact with data
1 stars 0 forks source link

Initiate Line Entity Class #48

Open cubap opened 8 months ago

cubap commented 8 months ago

A module for a "Line" is needed for use by the other services. In TPEN, a Line is a single Annotation with an id that is referenced in an Annotation Page items array. This Annotation Page is a single Page in an Layer (Annotation Collection). The module should support the methods needed for the api services.

A snip from the relevant document includes:

Single TPEN annotation as a “line” contains Canvas fragment and transcription content

  • Consider membership reference to parent Annotation Page
  • Consider previous and next lines
  • Parameterize
    • Only text content as string
    • Only Image link as URL
    • Get parent/sibling/project
    • Embed referenced documents
    • Metadata only
    • HTML document

The module should be created and importable, but all the methods can just stub out. Tests come first and can simply expect that methodName typeof === "function".

The clip above is a GET but there is also update and delete things to include.

cubap commented 8 months ago

use the attached branch 48-initiate-line-entity-class to add failing tests and start building.