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

The Slug parameter might not work for adding new annotations #70

Open
jblom opened this issue Aug 8, 2023 · 0 comments
Open

The Slug parameter might not work for adding new annotations #70

jblom opened this issue Aug 8, 2023 · 0 comments
Assignees

Comments

@jblom
Copy link

jblom commented Aug 8, 2023

while exporting all annotations from the MS to AnnoRepo I noticed, that the Slug header param does work for creating containers, but not for annotations added to these containers. I always seem to get a new ID.

This might be because I've added and deleted all annotations multiple times and AnnoRepo might have cached the IDs of earlier annotations (so when creating the same annotation again, AnnoRepo things the ID was already added earlier and therefore assigns a new one).

Example from my logs:

Setting annotation id via Slug: 2b1ef026-6fdd-4881-9522-0241a617c

AnnoRepo returns the following created annotation:

{
    "@context": "http://www.w3.org/ns/anno.jsonld",
    "body": [],
    "created": "2023-03-31T06:09:20Z",
    "creator": {
        "id": "http://annotation.clariah.nl/creator/clariah_test",
        "type": "Person"
    },
    "id": "https://annorepo.dev.clariah.nl/w3c/83184eeb-8f96-4b05-ae00-1825e0b884e3/7cde0a1d-f393-421b-a9ee-7089b2d2588c",
    "target": [
        {
            "layerId": 0,
            "selector": {
                "refinedBy": {
                    "conformsTo": "http://www.w3.org/TR/media-frags/",
                    "type": "FragmentSelector",
                    "value": "t=10.296327,11.296327"
                },
                "type": "NestedPIDSelector",
                "value": [
                    {
                        "id": "daan-catalogue-aggr",
                        "property": "isPartOf",
                        "type": [
                            "Collection"
                        ]
                    },
                    {
                        "id": "2102104180302160831",
                        "property": "isPartOf",
                        "type": [
                            "Resource"
                        ]
                    },
                    {
                        "id": "20210418163FM-RCR3000IF6G",
                        "property": "isRepresentation",
                        "type": [
                            "MediaObject",
                            "Representation",
                            "Segment",
                            "Audio"
                        ]
                    }
                ]
            },
            "source": "20210418163FM-RCR3000IF6G",
            "type": "Segment"
        }
    ],
    "type": "Annotation",
    "via": "http://annotation.clariah.nl/2b1ef026-6fdd-4881-9522-0241a617c053"
}

Note In the via param you can see the original annotation ID I posted (My Slug uses this ID without the IRI part)

@brambg brambg self-assigned this Aug 8, 2023
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

No branches or pull requests

2 participants