manifesto
manifesto copied to clipboard
getAttribution will be deprecated, use getRequiredStatement instead.
The warning message is shown even getRequiredStatement is used.
Version: 3.0.3
We talked about this on the last community call and decided it was probably best to leave this deprecation warning in... Maybe manifesto could be passed a logEnabled option to disable this..?
Thank you for your answer.
even though requiredStatement replaces attribution in the 3.0 API, the property attribution itself cannot be deprecated since it is valid in 2.1. Therefore, I do not agree with the method that uses a fallback to getAttribution only if there is not a requiredStatement and then logs a deprecation warning because it does not exist. This essentially deprecates a 2.1 serialization property which AFAIK is not how a backwards compatible REST API should work, since it is an artifact. Deprecation should occur if you want to remove the method getAttribution, but as long as manifesto supports 2.1 manifests and maintains backwards compatibility, this needs to remain.
Discussed on community call 2018-12-13 (see https://github.com/UniversalViewer/universalviewer/issues/634)
Wider discussion about what Manifesto is being used for here.
- I know I have loaded a 2.1 manifest, and I explicitly want the attribution statement, so I call
getAttribution() - I have loaded some IIIF resource, without worrying about what version it is, and now I want to call
getTheThingThatMustBeShownToTheUser()(I'm not actually suggesting that function name!)
Manifesto supports 2.1 manifests, but its job could be seen as normalising previous versions of the model to a standardised model that we call on to build the view. That model could be the latest version of the Presentation API, rather than some other model, in which case the developer using Manifesto and looking at the spec would call getRequiredStatement(), and getAttribution() would eventually be deprecated. Manifesto is providing helpers, language aware accessors and so on on top of some implied model which might as well be P3.
This approach has its problems too.