Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BXC-4330 - IIIFv3 manifests #1620

Merged
merged 7 commits into from
Nov 6, 2023
Merged

Conversation

bbpennel
Copy link
Member

@bbpennel bbpennel commented Nov 3, 2023

https://unclibrary.atlassian.net/browse/BXC-4330

  • Adds a new services/api/iiif/v3/ endpoint for getting manifests and canvases using the iiif v3 presentation api
  • Adds the jiiify-presentation dependency for use in constructing manifests

An example manifest for a work with one image file:

{
    "@context": "http://iiif.io/api/presentation/3/context.json",
    "id": "https://localhost:8080/services/api/iiif/v3/54d91d8f-5059-4324-9f10-85cc159cc79c/manifest",
    "type": "Manifest",
    "label":
    {
        "none":
        [
            "Test Flying Dog Work"
        ]
    },
    "metadata":
    [
        {
            "label":
            {
                "none":
                [
                    "Creators"
                ]
            },
            "value":
            {
                "none":
                [
                    "Boxy"
                ]
            }
        },
        {
            "label":
            {
                "none":
                [
                    "Subjects"
                ]
            },
            "value":
            {
                "none":
                [
                    "Testing"
                ]
            }
        },
        {
            "label":
            {
                "none":
                [
                    ""
                ]
            },
            "value":
            {
                "none":
                [
                    "<a href=\"https://localhost/record/54d91d8f-5059-4324-9f10-85cc159cc79c\">View full record</a>"
                ]
            }
        }
    ],
    "requiredStatement":
    {
        "label":
        {
            "none":
            [
                "Attribution"
            ]
        },
        "value":
        {
            "none":
            [
                "University of North Carolina Libraries, Digital Collections Repository - Part of Ben Collection"
            ]
        }
    },
    "items":
    [
        {
            "id": "https://localhost:8080/services/api/iiif/v3/1d8caa61-1539-4d63-a359-6a5c0831175a/canvas",
            "type": "Canvas",
            "label":
            {
                "none":
                [
                    "Firefly A great pyrenees with a long body flying over the open ocean with puffins flying around it. .jpg"
                ]
            },
            "height": 2048,
            "width": 2048,
            "thumbnail":
            [
                {
                    "id": "https://localhost:8080/services/api/thumb/1d8caa61-1539-4d63-a359-6a5c0831175a/large",
                    "type": "Image"
                }
            ],
            "items":
            [
                {
                    "id": "https://localhost:8080/services/api/iiif/v3/1d8caa61-1539-4d63-a359-6a5c0831175a/page/1",
                    "type": "AnnotationPage",
                    "items":
                    [
                        {
                            "id": "https://localhost:8080/services/api/iiif/v3/1d8caa61-1539-4d63-a359-6a5c0831175a/annotation/1",
                            "type": "Annotation",
                            "motivation": "painting",
                            "body":
                            {
                                "id": "https://localhost:8080/services/api/iiif/v3/1d8caa61-1539-4d63-a359-6a5c0831175a/full/max/0/default.jpg",
                                "type": "Image",
                                "format": "image/jpeg",
                                "height": 2048,
                                "width": 2048,
                                "service":
                                [
                                    {
                                        "id": "https://localhost:8080/services/api/iiif/v3/1d8caa61-1539-4d63-a359-6a5c0831175a",
                                        "type": "ImageService3",
                                        "profile": "level2"
                                    }
                                ]
                            },
                            "target": "https://localhost:8080/services/api/iiif/v3/1d8caa61-1539-4d63-a359-6a5c0831175a/canvas"
                        }
                    ]
                }
            ]
        }
    ]
}

Copy link
Contributor

@sharonluong sharonluong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just some small changes and questions

}

@Test
public void buildManifestNoViewableTest() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe change the test name to buildManifestNoViewableFilesTest to make it more clear

}

@Test
public void buildManifestWorkWithoutViewableTest() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add Files here too

Copy link
Contributor

@sharonluong sharonluong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much clearer! thank you!

@bbpennel bbpennel merged commit 62347ab into iiifv3-development Nov 6, 2023
2 checks passed
@bbpennel bbpennel deleted the bxc-4330-iiifv3-manifests branch November 6, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants