-
Notifications
You must be signed in to change notification settings - Fork 14
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
WIP: Extensions #404
WIP: Extensions #404
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -860,7 +860,17 @@ <h2>Logs Directory</h2> | |
wrong, while others may wish to only store a log entry if an intervention was required. | ||
</p> | ||
</blockquote> | ||
</section> | ||
|
||
<section id="extensions"> | ||
<h2>Extensions directory</h2> | ||
<p> | ||
The base directory of an OCFL Object MAY contain a directory named <code>extensions</code> for the purposes | ||
zimeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
of extending the functionality of an OCFL Object. Sub-directories of the extensions directory MUST be named | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Point 2: SHOULD would leave open the possibility of multiple things implementing the same extension but with different local names. This would make it difficult for clients to understand that it can operate on that content. The alternative would be to use a NamAsTe file to declare an extension's identity in the root directory of that extension, e.g., There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aren't the directories under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My concern is that by making it a SHOULD we leave open the possibility that people name their directories in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ahankinson I'm agreeing with you! |
||
according to a registered extension name. OCFL Validators MUST ignore any content in extensions that are | ||
not understood. The specific structure and function of the extension, as well as a declaration of the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
that's a little unclear. we should be a bit more specific. i'm assuming you mean by a validator that understands the spec and/or that can validate whatever the extension asks it to validate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I took the language from the existing §4.4, "An OCFL validator must ignore any files in the storage root it does not understand." We also have (in §3.4): "Optional fixity algorithms that are not supported by a client must be ignored by that client." So would something like
make sense? Should we narrow it down specifically to validation, or just leave it open generally to "clients"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should be "clients" and agree with last wording suggestion There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think stick with validators - this is the spec for objects at rest. We can discuss clients in the Implementation Notes (Client Behaviour's section) - ignoring extentions when writing is dangerous. |
||
registered extension name MUST be defined in the OCFL Extensions Registry. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd go for SHOULD instead of MUST again, I'd also put any such language next to the sentence about the name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SHOULD would leave open the possibility of registered and unregistered namespace collisions -- two extensions with the same name but different functions. By making it a MUST we reduce this possibility. |
||
</p> | ||
</section> | ||
</section> | ||
|
||
|
@@ -954,7 +964,7 @@ <h2>Storage Hierarchies</h2> | |
</section> | ||
|
||
<section id="root-extensions"> | ||
<h2>Extensions</h2> | ||
<h2>Root Extensions</h2> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes it sound like their is a difference between extensions that appear in the storage root and the object root. I thought we had agreed that Extensions would be stored at the root and then used in the objects -- but you might not use all extensions listed in the storage root. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change title to "Storage Root Extensions" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... which still leave the question of where descriptions of object extensions go There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Descriptions of object extensions also go in the storage root as a plain text file, on the theory that it is a single place that can describe the structure of some or all objects in that storage root. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree with @ahankinson |
||
<p> | ||
The behavior of the storage root may be extended to support features from other specifications. | ||
An OCFL validator MUST ignore any files in the storage root it does not understand. Additional | ||
|
@@ -1513,6 +1523,27 @@ <h2>Moab in an OCFL Object</h2> | |
} | ||
</pre> | ||
</section> | ||
<section id="example-extended-object"> | ||
<h2>Example Extended OCFL Object</h2> | ||
<p> | ||
The following example OCFL Object has an extension containing custom content. The OCFL Object itself | ||
remains valid. | ||
</p> | ||
<pre> | ||
[object root] | ||
├── 0=ocfl_object_1.0 | ||
├── inventory.json | ||
├── inventory.json.sha512 | ||
├── extensions | ||
│ └── my-extension | ||
│ └── file1-new.txt | ||
└── v1 | ||
├── inventory.json | ||
├── inventory.json.sha512 | ||
└── content | ||
└── file.txt | ||
</pre> | ||
</section> | ||
</section> | ||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capital D in directory to match section title style