-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ranges with selectors #3
Comments
Also |
One possibility is to normalise: {
"type": "Range",
"items": [
"https://example.org/canvas-1#xywh=0,1,2,3",
{ "id": "https://example.org/canvas-2#xywh=0,1,2,3", "type": "Canvas" }
{
"type": "SpecificResource",
"source": "https://example.org/canvas-3",
"selector": {
"type": "FragmentSelector",
"value": "xywh=0,1,2,3"
}
}
]
} into: {
"type": "Range",
"items": [
{
"type": "SpecificResource",
"source": {"id": "https://example.org/canvas-1", "type": "Canvas"},
"selector": {
"type": "FragmentSelector",
"value": "xywh=0,1,2,3"
}
}
{
"type": "SpecificResource",
"source": {"id": "https://example.org/canvas-2", "type": "Canvas"},
"selector": {
"type": "FragmentSelector",
"value": "xywh=0,1,2,3"
}
}
{
"type": "SpecificResource",
"source": {"id": "https://example.org/canvas-3", "type": "Canvas"},
"selector": {
"type": "FragmentSelector",
"value": "xywh=0,1,2,3"
}
}
]
} and then feed that into the pipeline, along side ranges? An ID would be generated, need to make sure that on the way out there is an option for compressing the specific resource. This could work along side an additional capability for vault.get('https://example.org/canvas-1');
vault.get({ id: 'https://example.org/canvas-1', type: 'Canvas' });
vault.get({
type: 'SpecificResource',
source: { id: 'https://example.org/canvas-1', type: 'Canvas' },
});
vault.get({
type: 'SpecificResource',
source: 'https://example.org/canvas-1',
});
vault.get({
type: 'SpecificResource',
source: 'https://example.org/canvas-1',
selector: {
type: 'FragmentSelector',
value" 'xywh=0,1,2,3'
}
});
Where these would all return the same thing. You would still need something like the Vault helper to parse the selector itself. |
A new vault helper / part of vault might be an equality helper:
Where |
Currently when parsing ranges, the
id
is pulled out and used as a canvas reference.https://github.com/IIIF-Commons/parser/blob/main/src/presentation-3/traverse.ts#L348-L350
But if the ID contains a
#xywh=0,1,2,3
it will produce an invalid reference:This is still an improvement on the original, normalising to the
id
/type
but breaks the usualvault.get(ref)
model, which you might expect to return.This also relates to
Annotation['target']
types, which are not currently normalized, for the same reason.The text was updated successfully, but these errors were encountered: