Skip to content
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

Initial extension #80

Merged
merged 6 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# OCFL Community Extensions

* [Initial Extension](initial.md)
* [0001: Digest Algorithms](0001-digest-algorithms.md)
* [0002: Flat Direct Storage Layout](0002-flat-direct-storage-layout.md)
* [0003: Hashed Truncated N-tuple Trees with Encapsulating Directory for OCFL Storage Hierarchies](0003-hash-and-id-n-tuple-storage-layout.md)
Expand Down
45 changes: 45 additions & 0 deletions docs/initial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# OCFL Community Extension `initial`: Initial Extension

* **Extension Name:** `initial`
* **Authors:** OCFL Editors
* **Minimum OCFL Version:** 1.0
* **OCFL Community Extensions Version:** 1.0
* **Obsoletes:** n/a
* **Obsoleted by:** n/a

## Overview

This extension allows indication that the semantics of a particular extension takes precedence over all other extensions. It ensures that the special extension name `initial` is a registered extension name and thus that an extension directory `initial` is also valid in both objects and storage roots.

An extension directory MAY contain an `initial` extension identified by the extension directory name `initial`. If it exists, the `initial` extension specifies another extension that MUST be applied before all other extensions in the directory.

The extension configuration file indicates the functional extension to be applied first by specifying that extension's name in the `extension` parameter (not `initial`). This extension can be used to address otherwise undefined behaviors, such as:

* Should extensions be applied in a specific order?
* Is an extension deactivated, only applying to earlier versions of the object?
* Does one extension depend on another?

## Parameter

* **Name:** `extension`
* **Description:** The name of the extension to be applied first
* **Type:** string
* **Constraints:** Must be a valid extension name
* **Default:** Not applicable

## Example

The following `config.json` configuration file indicates that the extension named `NNNN-functional-extension-name` should be applied first.

```
{
"extensionName": "initial",
"extension": "NNNN-functional-extension-name"
}
```

## Revision History

| Date | Description |
| ---- | ----------- |
| 2024-09-19 | First published |