ArchiveLabs / iiif.archivelab.org

Internet Archive IIIF Image 2.0 Server
GNU General Public License v3.0
30 stars 13 forks source link

Use linking properties to refer to files and pages #71

Closed benwbrum closed 10 months ago

benwbrum commented 1 year ago

The IIIF spec supports use of linking properties like seeAlso and related to refer to other resources about an item from inside a manifest. The Internet Archive's abundant derivative files could be linked from IA manifests, allowing clients to consume these resources easily.

(Real-world use case: a IIIF client that imports a printed document, then wants to import the OCR text.)

To take an example, this item has a manifest with these simple linking properties :+1:

   "related":"http://archive.org/details/hhfbc196-bingenontherhine",
   "seeAlso":"http://archive.org/metadata/hhfbc196-bingenontherhine",

Adding the derived files to the manifest would look like this:

{
   "@context":"http://iiif.io/api/presentation/2/context.json",
   "@id":"https://iiif.archivelab.org/iiif/hhfbc196-bingenontherhine/manifest.json",
   "@type":"sc:Manifest",
   "attribution":"The Internet Archive",
   "description":"20x11 cm.<br /><br />First Line: \"A Soldier of the Legion lay dying in Algiers\"<br /><br />This is a scanned copy of the original broadside in the Helen Hartness Flanders Collection at Middlebury College.",
   "label":"Bingen on the Rhine",
   "logo":"https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcReMN4l9cgu_qb1OwflFeyfHcjp8aUfVNSJ9ynk2IfuHwW1I4mDSw",
   "metadata":[
      {
         "label":"title",
         "value":"Bingen on the Rhine"
      },
      {
         "label":"publisher",
         "value":"n/a"
      },
      {
         "label":"subject",
         "value":"Helen Hartness Flanders. Broadsides. Folk music. Folksongs. Ballads. New England"
      },
      {
         "label":"date",
         "value":"18??"
      }
   ],
   "related": [
      {
         "@id": "http://archive.org/details/hhfbc196-bingenontherhine",
         "label": "Internet Archive page for Bingen on the Rhine",
         "format": "text/html"
      }
   ],
   "seeAlso": [
      {
         "@id": "http://archive.org/metadata/hhfbc196-bingenontherhine",
         "label": "Internet Archive Metadata",
         "format": "application/json"
      }
      {
         "label":"Item Tile",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/__ia_thumb.jpg",
         "format": "image/jpeg"
      },
      {
         "label":"Animated GIF",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg.gif",
         "format": "image/gif"
      },
      {
         "label":"Text PDF",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg.pdf",
         "format": "application/pdf"
      },
      {
         "label":"Abbyy GZ",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg_abbyy.gz",
         "format": "application/gzip"
      },
      {
         "label":"DjVuTXT",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg_djvu.txt",
         "format": "text/plain"
      },
      {
         "label":"Djvu XML",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg_djvu.xml",
         "format": "application/xml"
      },
      {
         "label":"Generic Raw Book Zip",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg_images.zip",
         "format": "application/zip"
      },
      {
         "label":"Single Page Processed JP2 ZIP",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg_jp2.zip",
         "format": "application/zip"
      },
      {
         "label":"Scandata",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/fbc.bs.196.bingenontherhine.jpg_scandata.xml",
         "format": "application/xml"
      },
      {
         "label":"Archive BitTorrent",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/hhfbc196-bingenontherhine_archive.torrent",
         "format": "application/x-bittorrent"
      },
      {
         "label":"File Metadata",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/hhfbc196-bingenontherhine_files.xml",
         "format": "application/xml"
      },
      {
         "label":"Metadata",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/hhfbc196-bingenontherhine_meta.sqlite",
         "format": "application/octet-stream"
      },
      {
         "label":"Item Metadata",
         "@id":"https://archive.org/download/hhfbc196-bingenontherhine/hhfbc196-bingenontherhine_meta.xml",
          "format": "application/xml"
      }
   ],
   "sequences":[
      {
         "@context":"http://iiif.io/api/image/2/context.json",
         "@id":"https://iiif.archivelab.org/iiif/hhfbc196-bingenontherhine/canvas/default",
         "@type":"sc:Sequence",
         "canvases":[
            {
               "@context":"http://iiif.io/api/presentation/2/context.json",
               "@id":"https://iiif.archivelab.org/iiif/hhfbc196-bingenontherhine$0/canvas",
               "@type":"sc:Canvas",
               "description":"",
               "height":2286,
               "images":[
                  {
                     "@context":"http://iiif.io/api/image/2/context.json",
                     "@id":"https://iiif.archivelab.org/iiif/hhfbc196-bingenontherhine$0/annotation",
                     "@type":"oa:Annotation",
                     "motivation":"sc:painting",
                     "on":"https://iiif.archivelab.org/iiif/hhfbc196-bingenontherhine$0/annotation",
                     "resource":{
                        "@id":"https://iiif.archivelab.org/iiif/hhfbc196-bingenontherhine$0/full/full/0/default.jpg",
                        "@type":"dctypes:Image",
                        "format":"image/jpeg",
                        "height":2286,
                        "service":{
                           "@context":"http://iiif.io/api/image/2/context.json",
                           "@id":"https://iiif.archivelab.org/iiif/hhfbc196-bingenontherhine$0",
                           "profile":"https://iiif.io/api/image/2/profiles/level2.json"
                        },
                        "width":1221
                     }
                  }
               ],
               "label":"p. ",
               "width":1221
            }
         ],
         "label":"default"
      }
   ],
   "thumbnail":{
      "@id":"https://ia600206.us.archive.org/BookReader/BookReaderPreview.php?id=hhfbc196-bingenontherhine&subPrefix=fbc.bs.196.bingenontherhine.jpg&itemPath=/29/items/hhfbc196-bingenontherhine&server=ia600206.us.archive.org&page=preview&"
   },
   "viewingHint":"paged"
}
eroux commented 1 year ago

Good idea! I think rendering should be used instead of seeAlso for some resources like PDF (especially the raw PDF without the text), see #71

saracarl commented 10 months ago

moved.