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

Image URLs and Canvas IDs (As AnnotationList Targets via on) #186

Open
thehabes opened this issue Jul 15, 2022 · 1 comment
Open

Image URLs and Canvas IDs (As AnnotationList Targets via on) #186

thehabes opened this issue Jul 15, 2022 · 1 comment
Labels
migration Needs to happen as a step in the data migration process

Comments

@thehabes
Copy link
Member

thehabes commented Jul 15, 2022

French Images were not loading. The URIs that are failing are like https://iiif.library.utoronto.ca/v2/paleography:1853/full/2000,/0/default.jpg
They have changed to https://iiif.library.utoronto.ca/image/v2/paleography:1853/full/2000,/0/default.jpg. the folios table was updated so the French projects would load.

mysql> update folios set uri=replace(uri, "https://iiif.library.utoronto.ca/v2/", "https://iiif.library.utoronto.ca/image/v2/");
update folios set imageName=replace(imageName, "https://iiif.library.utoronto.ca/v2/", "https://iiif.library.utoronto.ca/image/v2/");
Query OK, 463 rows affected (0.02 sec)
Rows matched: 2232  Changed: 463  Warnings: 0

As you may have deduced, much of this revolves around a new PALEO_CANVAS_ID_PREFIX=https://iiif.library.utoronto.ca/presentation/v2/.

The French projects load, but none of them can find their corresponding AnnotationList.

This is how the TPEN-NL app has been generating Canvas IDs in the background
String canvasID = man.getProperties().getProperty("PALEO_CANVAS_ID_PREFIX") + f.getImageURL().replaceAll("^.*(paleography[^/]+).*$", "$1");

getByProperties gets the AnnotationList for a given Canvas in a given Project like

 String canvasID = man.getProperties().getProperty("PALEO_CANVAS_ID_PREFIX") + imageURL.replaceAll("^.*(paleography[^/]+).*$", "$1");
 parameter.element("@type", "sc:AnnotationList");
 parameter.element("on", canvasID);
 parameter.element("isPartOf", Integer.toString(projectID));

For "The Art of Cooking", an Italian project...
Their AnnotationList.on is https://paleography.library.utoronto.ca/islandora/object/paleography:IP_314_001
Our AnnotationList.on is https://iiif.library.utoronto.ca/presentation/v2/paleography:IP_314_001

For "Acknowledgement of patronage", a French project projectID=1216...
Their AnnotationList.on property is https://paleography.library.utoronto.ca/islandora/object/paleography:2084
Our AnnotationList.on property is https://iiif.library.utoronto.ca/presentation/v2/paleography:2084

To make this change, we have to comb the RERUM data for AnnotationLists with an on property that matches the pattern that has changed, and replace that old prefix with the new prefix.

That means this is a two part fix.

  1. Run the MySQL commands to fix the folios table so it has the correct URLs.
  2. Update v1 alpha data so the AnnotationLists (and whatever else!) point to the canvas IDs that the TPEN_NL app will be generating dynamically.
@thehabes thehabes added the migration Needs to happen as a step in the data migration process label Jul 15, 2022
@thehabes
Copy link
Member Author

Alternatively, have TPEN-NL know how to request for AnnotationList.on as https://paleography.library.utoronto.ca/islandora/object/paleography:IP_314_001 OR https://iiif.library.utoronto.ca/presentation/v2/paleography:IP_314_001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration Needs to happen as a step in the data migration process
Projects
None yet
Development

No branches or pull requests

1 participant