Skip to content

Commit

Permalink
Update representative collection iiif manifest structure
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjarling committed Mar 23, 2021
1 parent 4574876 commit 8f3da7a
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 88 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
<a href="#usage">Usage</a>
<ul>
<li><a href="#update-source-images">Update source images</a></li>
<li><a href="#custom-theme">Custom theme</a></li>
<li><a href="#iiif-manifests">IIIF Manifests</a></li>
<li><a href="#custom-theme">Custom theme</a></li>
</ul>
</li>
<li><a href="#roadmap">Roadmap</a></li>
Expand Down Expand Up @@ -108,8 +109,8 @@ Visit [Library of Congress Labs](https://labs.loc.gov/work/experiments/annotatio

- [React](https://reactjs.org/)
- [FabricJS](http://fabricjs.com/)
- [OpenSeadragon](https://openseadragon.github.io/)
- [IIIF](https://iiif.io/)
- [OpenSeadragon](https://openseadragon.github.io/)
- [Chakra UI](https://chakra-ui.com/)

<!-- GETTING STARTED -->
Expand Down Expand Up @@ -151,13 +152,19 @@ yarn test

### Update source images

Source images are currently defined in the following project file:
Source images are currently hosted locally and defined in the following file:

`src/services/loc-images.js`

The application uses the OpenSeadragon Viewer to render images, so your source images can be a combination of locally hosted images (within the application), or externally hosted images (for example, served from a IIIF image server).

This is currently where you'd update the application's source image definitions.
### IIIF Manifests

Application metadata is represented by IIIF Presentation API 3.0 manifest files. The organization is as follows (currently):

- Top level **Collection** manifest resource which contains information about the Speculative Annotation works as a collection.
- Individual manifests which each represent a Work and it's metadata.
- Placeholder Library of Congress Collection manifests which contain metadata about the containing Collection for each Work.
### Custom theme
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "http://localhost:3001/iiif/walt-whitman/manifest",
"type": "Manifest",
"label": { "en": ["WPA Posters"] },
"label": { "en": ["Feinberg Whitman Collection"] },
"homepage": [
{
"id": "https://www.loc.gov/collections/feinberg-whitman/about-this-collection",
"type": "Text",
"label": {
"en": [
"Home page for Walt Whitman Papers in the Charles E. Feinberg Collection"
]
"en": ["Home page for Charles E. Feinberg Collection"]
},
"format": "text/html"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"id": "https://www.loc.gov/search/?fa=partof:lot+7414",
"type": "Text",
"label": {
"en": ["Home page for Folk Musicians Collection"]
"en": ["Home page for Folk Musicians search"]
},
"format": "text/html"
}
Expand Down
File renamed without changes.
Binary file added public/iiif/national-park/image/default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions public/iiif/speculative-annotations-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,28 @@
],
"items": [
{
"id": "https://speculative-annotations.org/iiif/national-park/canvas/1",
"id": "http://localhost:3001/iiif/national-park/canvas/info.json",
"type": "Canvas",
"label": { "none": ["National Park image"] },
"width": "",
"height": "",
"items": [
{
"id": "https://speculative-annotations.org/iiif/national-park/page/1",
"id": "http://localhost:3001/iiif/national-park/page/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://speculative-annotations.org/iiif/national-park/annotation/1",
"id": "http://localhost:3001/iiif/national-park/annotation/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://speculative-annotations.org/iiif/national-park/page/full/max/0/default.jpg",
"id": "http://localhost:3001/iiif/national-park/image/default.jpg",
"type": "Image",
"format": "image/jpeg",
"height": 2000,
"width": 1500
},
"target": "https://speculative-annotations.org/iiif/national-park/canvas/1"
"target": "http://localhost:3001/iiif/national-park/canvas/1"
}
]
}
Expand Down Expand Up @@ -170,7 +170,7 @@
],
"partOf": [
{
"id": "http://localhost:3001/iiif/walt-whitman/info.json",
"id": "http://localhost:3001/iiif/feinberg-whitman/info.json",
"type": "Collection"
}
],
Expand Down Expand Up @@ -273,7 +273,7 @@
],
"partOf": [
{
"id": "http://localhost:3001/iiif/duchess/info.json",
"id": "http://localhost:3001/iiif/federal-theatre-project/info.json",
"type": "Collection"
}
],
Expand Down Expand Up @@ -376,7 +376,7 @@
],
"partOf": [
{
"id": "http://localhost:3001/iiif/zora-neil-hurston/info.json",
"id": "http://localhost:3001/iiif/folk-musicians/info.json",
"type": "Collection"
}
],
Expand Down Expand Up @@ -422,15 +422,15 @@
"metadata": [
{
"label": { "en": ["Creator"] },
"value": { "en": "Russell Lee" }
"value": { "en": ["Russell Lee"] }
},
{
"label": { "en": ["Date"] },
"value": { "en": "July 1942" }
"value": { "en": ["July 1942"] }
},
{
"label": { "en": ["Place"] },
"value": { "en": "Nyssa, Oregon" }
"value": { "en": ["Nyssa, Oregon"] }
},
{
"label": { "en": ["Questions"] },
Expand Down Expand Up @@ -483,7 +483,7 @@
],
"partOf": [
{
"id": "http://localhost:3001/iiif/ice-cream-soda/info.json",
"id": "http://localhost:3001/iiif/japanese-american-farm-workers/info.json",
"type": "Collection"
}
],
Expand Down
11 changes: 5 additions & 6 deletions src/components/Metadata/Metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@ import {
Heading,
IconButton,
Link,
Text,
Tooltip,
Wrap,
WrapItem,
useBreakpointValue,
useDisclosure,
} from '@chakra-ui/react';
import { ExternalLinkIcon } from '@chakra-ui/icons';
import { useParams } from 'react-router-dom';
import { locImages } from 'services/loc-images';
import { loadManifest, parseManifest } from 'manifesto.js';
import { m } from 'framer-motion';

function MetadataHeading({ children }) {
return (
Expand All @@ -51,20 +47,23 @@ function Metadata() {
'iiif/speculative-annotations-manifest.json'
);
const manifests = parseManifest(m).getManifests();

// Find current work manifest
const currentManifest = manifests.find(manifest => {
const arr = manifest.id.split(
'https://speculative-annotations.org/iiif/'
);
// Grab the work id out of the URI, which is the "id" of the local image slug
// Workaround since the images are hosted locally instead of via a IIIF Image service
const id = arr[1].slice(0, arr[1].indexOf('/'));
return params.id === id;
});
console.log(`currentManifest`, currentManifest.getLabel().getValue());

const obj = {
contact: currentManifest.getProperty('provider')[0].id,
label: currentManifest.getLabel().getValue(),
metadata: currentManifest.getMetadata(),
summary: currentManifest.getDescription(),
summary: currentManifest.getProperty('summary')['en'][0],
workUrl: currentManifest.getProperty('homepage')[0].id,
};

Expand Down
62 changes: 1 addition & 61 deletions src/services/loc-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,14 @@ export const locImages = [
{
id: 'national-park',
alt: 'Yellowstone National Park poster',
contact: 'https://ask.loc.gov/prints-photographs',
creator: 'Don C. (Chester) Powell',
curatorImage: nationalParkLoc,
date: '1938?',
info:
"This poster shows Old Faithful erupting at Yellowstone National Park. At first, posters were created by hand, individually painted and lettered. Later on, the divisions' artists usually used the silkscreen process, which was adapted and refined for the mass production of posters by project artist Anthony Velonis in 1936. The printing of a poster was a collaborative effort. Artists were responsible for the poster's design, color selection, and sometimes the cutting of the stencils used to print the poster. The workshop's technical staff screened the posters. With this silkscreening process, as many as six hundred posters were printed in a day.",
questions: [
'Why do you think this poster was made?',
'What do the artists want people to do or learn?',
],
place: '',
seeCollection:
'https://www.loc.gov/collections/works-progress-administration-posters/about-this-collection/',
seeItem: 'https://www.loc.gov/resource/ppmsca.13399/',
title: 'Yellowstone National Park poster',
type: 'image',
url: nationalPark,
},
{
id: 'walt-whitman',
alt: 'Walt Whitman on Leaves of Grass themes',
contact: 'https://ask.loc.gov/manuscripts/',
creator: 'Walt Whitman',
curatorImage: waltWhitmanLoc,
date: '1847-1891',
info:
'The poet Walt Whitman analyzes the themes of poem collection "Leaves of Grass," published in 1855. Whitman spent the rest of his life rewriting and revising "Leaves of Grass," which grew from 12 poems to 400 in the last edition.',
questions: [
'What other themes from "Leaves of Grass" would you add to Whitman\'s list?',
],
place: '',
seeCollection:
'https://www.loc.gov/collections/feinberg-whitman/about-this-collection/',
seeItem: 'https://www.loc.gov/item/mss1863001302',
title: 'Walt Whitman on Leaves of Grass themes',
type: 'image',
url: waltWhitman,
Expand All @@ -57,40 +31,17 @@ export const locImages = [
id: 'duchess',
alt:
'The Duchess costume from "The Tragical History of Doctor Faustus" play',
contact: 'https://ask.loc.gov/#s-la-box-83050-container-tab1',
creator: 'Paul Cadorette',
curatorImage: duchessLoc,
date: 'November 22, 1938',
info:
'The Federal Theatre Project Collection contains documentation for stage productions mounted by the Federal Theatre Project in the period 1935-39. The Federal Theatre Project was the largest and most ambitious effort mounted by the Federal Government to organize and produce theater events. It was an effort of the administration of President Franklin Delano Roosevelt to provide work for unemployed professionals in the theater during the Great Depression which followed the stock market crash of October 1929. The Federal Theatre Project was one of four (subsequently five) arts-related projects called Federal Project Number One, established under the Works Progress Administration (WPA) during Roosevelts first term. The WPA was created through Executive Order No. 7034 issued on May 6, 1935. The FTP was administered from Washington, D. C., but its many companies stretched the full breadth of the Nation. It functioned from 1935 to 1939 when its funding was terminated. In that brief period, it was responsible for some of the most innovative staging of its time.',
questions: [
'What does this costume say about The Duchess as a character in the play?',
'What lines would the Duchess say in this dress?',
],
place: 'Boston, MA',
seeCollection:
'https://www.loc.gov/collections/federal-theatre-project-1935-to-1939/about-this-collection/',
seeItem:
'https://www.loc.gov/resource/ihas.200218724.0/?sp=1&r=-0.882,-0.057,2.765,1.441,0',
title:
'The Duchess costume from "The Tragical History of Doctor Faustus" play',
type: 'image',
url: duchess,
},
{
id: 'filmstrip',
id: 'zora-neil-hurston',
alt:
'Zora Neale Hurston and other African Americans, probably at a recording site in Belle Glade, Florida',
contact: 'https://ask.loc.gov/american-folklife',
creator: '',
curatorImage: filmstripLoc,
date: '1935',
info:
'These were photos taken during the Lomax-Hurston-Barnicle recording expedition to Georgia, Florida, and the Bahamas. Handwritten on back is: "Belle Glade, Fla, poss. 1935"; "Zora Hurston." Photographs depict African American, white, and Latino musicians, singers and dancers, in the southern United States (Alabama, Arkansas, Florida, Georgia, Louisiana, Mississippi, North Carolina, Texas, and Virginia) and the Bahamas (Nassau, Andros Island, and Cat Island). Includes portraits of musicians posed with and without their instruments; many photos show musicians in various settings and activities--at homes, working in prison yards, working on chain gangs, performing outside and on stage at the Asheville Mountain Music Festival, North Carolina. Some photos depict daily life, including domestic activities, baptisms, and farming. Also includes some landscape and marine views, houses, and children playing singing games. Musicians depicted include, among others, Henry Truvillion, James "Iron Head" Baker, Moses "Clear Rock" Platt, Leadbelly, Crockett "Davy" Ward, Bill Hensley, Uncle Bob Ledbetter, and Bascom Lamar Lunsford. Folklorist Zora Neale Hurston, who assisted the Lomaxes on expeditions to Georgia and Florida, is identified in four photographs in subdivisions 7414-C and 7414-G. Unlike many anthropoligists at that time, Hurston believed in integrating herself as an anthropologist and folklorist into the communities and cultures she was studying.',
questions: [],
place: 'Belle Glade, FL',
seeCollection: 'https://www.loc.gov/search/?fa=partof:lot+7414',
seeItem: 'https://www.loc.gov/resource/ppmsc.00618/',
title:
'Zora Neale Hurston and other African Americans, probably at a recording site in Belle Glade, Florida',
type: 'image',
Expand All @@ -100,19 +51,8 @@ export const locImages = [
id: 'ice-cream-soda',
alt:
'Japanese-American farm workers have an ice cream soda on weekly trip to town',
contact: 'https://ask.loc.gov/prints-photographs',
creator: 'Russell Lee',
curatorImage: '',
date: 'July 1942',
info:
'The photographs of the Farm Security Administration - Office of War Information Photograph Collection form an extensive pictorial record of American life between 1935 and 1944. This U.S. government photography project was headed for most of its existence by Roy E. Stryker, formerly an economics instructor at Columbia University, and employed such photographers as Walker Evans, Dorothea Lange, Russell Lee, Arthur Rothstein, Ben Shahn, Jack Delano, Marion Post Wolcott, Gordon Parks, John Vachon, and Carl Mydans. The project initially documented cash loans made to individual farmers by the Resettlement Administration and the construction of planned suburban communities. The second stage focused on the lives of sharecroppers in the South and migratory agricultural workers in the midwestern and western states. As the scope of the project expanded, the photographers turned to recording both rural and urban conditions throughout the United States as well as mobilization efforts for World War II. "From May to November 1942, Nyssa [pronounced NISS-a], Oregon, served as the site of the first farm labor camp organized during the wartime Japanese American experience. Established as a result of the " Oregon Plan " for the forced removal and confinement of the state\'s Nikkei residents, the camp held approximately three hundred fifty laborers at its peak. These workers provided critical agricultural labor in eastern Oregon\'s Malheur County. By the summer of 1942, the camp became so well known that the Pacific Citizen referred to it as "the camp without a fence." [1]" https://encyclopedia.densho.org/Nyssa,_Oregon_(detention_facility)/',
questions: [
'What do you think the life of the man and child was like?',
'What clues from the photograph and the place and time it was taken make you think that?',
],
place: 'Nyssa, Oregon',
seeCollection: 'https://www.loc.gov/search/?fa=partof:lot+292',
seeItem: 'https://www.loc.gov/resource/fsa.8c25306/',
title:
'Japanese-American farm workers have an ice cream soda on weekly trip to town',
type: 'image',
Expand Down

0 comments on commit 8f3da7a

Please sign in to comment.