You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the assumption that i could request a collection using the Identifier and Hymir would statically add the prefix to match the defined collection rule. But when requesting the endpoint
api/presentation/v2/collection/123456
the log indicates that there is no match and it seems like the prefix is not added. matching 123456 against ^collection-([a-zA-Z0-9-_]+)$ is false
But if i then change my request by including the prefix in the URL api/presentation/v2/collection/collection-123456
it seems like the prefix is added to the identifier. The consequence is that now the matching is tried with a duplicated prefix
collection-collection-123456 against ^collection-([a-zA-Z0-9-_]+)$ is true
This is of course not what i want since now i file with a collection prefix is searched which does not exist:
Could not resolve identifier collection-collection-123456 with MIME type application/json to a readable Resource
Attempted URIs were [file:/collections/collection-123456.json]
The only way to fix this was to not append the collection-prefix in the implementation. by taking out this line.
I want to retrieve an IIIF-collection via Hymir and have setup the resolver rule with a "collection"-prefix as described in the documentation.
I had the assumption that i could request a collection using the Identifier and Hymir would statically add the prefix to match the defined collection rule. But when requesting the endpoint
api/presentation/v2/collection/123456
the log indicates that there is no match and it seems like the prefix is not added.
matching 123456 against ^collection-([a-zA-Z0-9-_]+)$ is false
But if i then change my request by including the prefix in the URL
api/presentation/v2/collection/collection-123456
it seems like the prefix is added to the identifier. The consequence is that now the matching is tried with a duplicated prefix
collection-collection-123456 against ^collection-([a-zA-Z0-9-_]+)$ is true
This is of course not what i want since now i file with a collection prefix is searched which does not exist:
The only way to fix this was to not append the collection-prefix in the implementation. by taking out this line.
iiif-server-hymir/src/main/java/de/digitalcollections/iiif/hymir/presentation/backend/PresentationRepositoryImpl.java
Line 72 in dee5a7d
The rule (
^collection-([a-zA-Z0-9-_]+)$
then works as expected (if the collection-prefix is added to the URL) and the files are delivered.The text was updated successfully, but these errors were encountered: