-
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
Version 2.0 #19
Merged
Merged
Version 2.0 #19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…isation' into feature/v2
### Added - Support for `navPlace` and `textGranularity` - Fragment selectors in SpecificResources, strings and `{id,type}` References are now normalised, reducing the need to parse IDs to grab the ID/Type - Added expand target helper, used internally for normalization (possibly useful for content state). - New sub-package `@iiif/parser/strict` for fixing common mistakes in Presentation 3, with detailed feedback for implementors. - Test coverage across every [IIIF Cookbook](https://iiif.io/api/cookbook) recipe, testing: - Parsing / Traversing the IIIF - Normalizing the IIIF correctly - Re-serializing the IIIF back to identical JSON - New traversal option for `SpecificResource` - New traversal option for `GeoJson` (e.g. from the `navPlace` extension) - ### Fixed - `[presentation-2]` `startCanvas` property on Sequences are now added to the Manifest when converting - Fixed handling Specific resources where the `source` is only string (inferring the correct type from the context) - Serializing Presentation 2 resources without items - Bug where AV canvases would have height and width of `0` when serializing - Bug where custom `@context` on Manifest was not retained during serialization - Bug where Content Resources did not keep extra properties when serializing (e.g. `value` or `geometry`) - ### Removed - `posterCanvas` - hangover from pre-3.0, this will be ignored - `logo` on non-provider resources - hangover from pre-3.0, these will be ignored - `motivation` field on non-Annotation resources (bug) - `Traverse.traversePosterCanvas()` is removed (now `Traverse.traverseLinkedCanvases()`) - ### Changed - `range.items[]` is now normalised to either `Reference<'Range'>` or `SpecificResource<Reference<'Canvas'>>` - `manifest.start` is now normalised to a `SpecificResource<Reference<'Canvas'>>`
This was referenced Jul 27, 2022
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5974107:
|
Added service recording during normalization
Added Image 3 API
Bug with ImageService2 when converted to Presentation 2 (profile is incorrect) |
Added hasPart support
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parser version 2
What's new?
In short, the parser now supports a wider variation of IIIF resources, such as the
navPlace
andtextGranularity
extensions and now normalizes further into the Annotation specification. It also includes parsing for IIIF Image services, allow you to query supported features from Image Services or construct IIIF Image URL requests.Still remaining:
Additions
hasPart
extension Dereferencable labels #5 | Added hasPart support #23Non-breaking - delayed features
Build
Planned features
Normalization of Image Services, Auth Services and Search Services
This was something that was in very early versions, but became a difficult to maintain and stay correct - to support 2.1 and 3.0. A normalization step could upgrade the service to the latest version of the specification (even if it resolves to 2.1 for example) and Vault or other users could normalize and ingest the full image services into the store.
There are 2 approaches, splitting each into their own space in the store:
Or keeping them together in a generic
Service
The first option would mean there may be a mix of references and nested items in
resource.service
but it does keep the similar formats together - the second option would add another layer of de-referencing toservices
which might add a bit of friction.JSON-LD Framing as serialisation option
Currently the serialization uses code-as-configuration, with a format based on
Object.fromEntries()
format. As described in #10 this would allow you to pick and compose different resources together, a subset of their properties and have that generate a JSON-LD document out at the end. This format would be quite usefulDereferenced label issue
As described in #5 there is an issue where multiple resources that are normalized (and then merged) may overwrite each other or have different labels and properties. Although this is unlikely to be fully resolved here, a first step may be to exposing the helper in the parser for merges together items for use outside, so that resources can avoid being overwritten.
Current changelog
Added
navPlace
andtextGranularity
{id,type}
References are now normalised, reducing the need to parse IDs to grab the ID/Type@iiif/parser/strict
for fixing common mistakes in Presentation 3, with detailed feedback for implementors.@iiif/parser/image-3
for parsing IIIF Image API and some helpersSpecificResource
GeoJson
(e.g. from thenavPlace
extension)Services
when normalizing 1Fixed
[presentation-2]
startCanvas
property on Sequences are now added to the Manifest when convertingsource
is only string (inferring the correct type from the context)0
when serializing@context
on Manifest was not retained during serializationvalue
orgeometry
)UNSET
keyword.Removed
posterCanvas
- hangover from pre-3.0, this will be ignoredlogo
on non-provider resources - hangover from pre-3.0, these will be ignored2motivation
field on non-Annotation resources (bug)Traverse.traversePosterCanvas()
is removed (nowTraverse.traverseLinkedCanvases()
)Changed
range.items[]
is now normalised to eitherReference<'Range'>
3 orSpecificResource<Reference<'Canvas'>>
4manifest.start
is now normalised to aSpecificResource<Reference<'Canvas'>>
Footnotes
This does not replace the inline services with references, instead it's a parallel store of normalized services. Editing tools will have to update both. This moves the problem of multiple services with different structures and fields to the user. The normalized structures will be specifically useful for loading Image services progressively in a store without affecting the serialisation of the IIIF. ↩
These properties were added to the specification pre-3.0 and then later removed. ↩
A
Reference<T>
has the shape:{ id: string, type: T }
and is usually narrowed to one or more types ↩SpecificResource is defined by the W3C Annotation specification, but in short you can access the original reference by accessing
specificResource.source
↩