CoEDL / ocfl-js

A library to work with OCFL repositories and objects
0 stars 3 forks source link

Identifiers need to be created as per configuration in the repository #8

Open marcolarosa opened 2 years ago

marcolarosa commented 2 years ago

extensions supported by the repo

library functionality to be implemented

ptsefton commented 2 years ago

Trying to clarify the above.

We need two new idToPath functions that can be selected with config in the repo's extensions dir (any repo needs one of these, not multiples).

  1. An implementation of the hashed-n-tuple storage layout algorithm id2NTuple(id) that is mentioned above. This will take an ID - any ID - hash it, and generate an n-tuple path looking in the repo config for the n-tuple parameters as described this extension.
  2. An ARCP specific function arcpIDtopath(id) that will:
    • Find the name part of the ARCP id and use it as the first directory under the storage root this can call the function in 1. above ${name}/${id2NTuple(id)}
    • If it's not an ARCP ID then just return id2NTuple(id)

Note that the OCFL Object's inventory.id in the manifest should reference the original ID eg an arcp:// id (complete with the protocol and all the parts) or a URL

ptsefton commented 2 years ago

Above the issue should say:

hash the whole arcp (including protocol) and turn it into an n-tuple path to create then rest of the path (we are not creating an ID the ARCP is the identifier)