-
Notifications
You must be signed in to change notification settings - Fork 12
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
Parameterising Extensions #2
Comments
Are you imagining that extension parameters will be stored in files in the OCFL storage root? For example, let's say that there's an extension that describes an n-tuple storage layout. The draft spec currently states that the
In this case, would the {
"key": "n-tuple-layout",
"description": "n-tuple storage layout"
} And in the storage root there's an additional file named something like {
"encoding" : "hash",
"casing" : "lower",
"digestAlgorithm" : "md5",
"size" : 2,
"depth" : 3,
"encapsulation" : {
"defaultString" : "obj",
"type" : "id",
"encoding" : "url"
}
} that encapsulates all of an extension's configuration as defined in the extension's spec? Additionally, is there a need to support extension versioning? In the layout example, should |
My preference is to include extension parameters where the extension is referenced - so in the same file so it can't get mislaid. A parameterised extension reference without the parameters is of limited usefulness. |
A first cut can be found at https://github.com/neilsjefferies/extensions (forked because everything got touched). NB. I don't mix identifer definitions with storage layout definitions in the examples given - which is what @pwinckles suggestion does. Identifiers are used in places other than storage layouts and should really be another namespace-y extension themselves. The digest extension is parameterised so code can quickly determine whether an OCFL contains digests it cannot handle. |
So, in the case of
Or create a file
Is that correct? |
@pwinckles At the moment, yes - but we're still wrangling with the extension part of the spec so this may change. My expectation is that the second mechanism would be used for extensions with content in directories. NB. This is itself an extension and not part of the core spec! |
Extensions may have a number of options describing functional variants. We need to define an mechanism to allow extensions to have parameters that cirscumscribe these options. These should be both human readable within the extension definition but allow for the implementation of machine actionable mechanisms (via JSON and URL) for programmatic access. To this end parameters will be defined as a set of key-value pairs.
The text was updated successfully, but these errors were encountered: