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

explicit identifier for fin import #251

Open
qjhart opened this issue Jan 11, 2023 · 2 comments
Open

explicit identifier for fin import #251

qjhart opened this issue Jan 11, 2023 · 2 comments
Assignees

Comments

@qjhart
Copy link
Member

qjhart commented Jan 11, 2023

The current methodology for the fin import cli is;

  • when an object has no identifier, and is a ArchivalGroup, then look to the schema:identifier and choose and ark: if it exists. For example the following would use ark:/87287/d7002v as the identifier
{
  "@context":  "http://schema.library.ucdavis.edu/context/dams.json",
  "@id": "",
  "@type": [ "fedora:ArchivalGroup", "CreativeWork", "Menu" ],
  "identifier": [ "ark:/87287/d7002v" ]
}

However, in practice, this would actually add the data as if it were explicitly set with the `"@id": "info:fedora/item/ark:/87287/d7002v"'.

If you have two identifiers that are arks: eg.

{
  "@context:": {
     "@context":  "http://schema.library.ucdavis.edu/context/dams.json",
     "shelfmark":"ark:/87287/d7r94j/"
  },
  "@id": "",
  "@type": [ "fedora:ArchivalGroup", "CreativeWork", "Menu"],
  "identifier": [ "ark:/87287/d7002v", "shelfmark:D-060/box:60+folder:112"]
}

Then it's unclear where to upload this data. The current plan is you can specifically add the @id parameter, and disambiguate this setup. This has two problems. One, we have to remember to add the info:fedora/item prefix, and second, in reality it's actually now ok in fedora 6 to have two @ids with valid LDP urls like:

{
  "@context:": {
     "@context":  "http://schema.library.ucdavis.edu/context/dams.json",
     "shelfmark":"ark:/87287/d7r94j/"
  },
 "@graph":[ {
  "@id": "info:fedora/ark:/87287/d7002v",
  "@type": [ "fedora:ArchivalGroup", "CreativeWork", "Menu"],
  "identifier": [ "ark:/87287/d7002v", "shelfmark:D-060/box:60+folder:112"]
  },
  {
    "@id":"info:fedora/ark:/9999/9999",
   "desc": "random info"
  }]
}

We are already using metadata with multiple @ids.

@qjhart
Copy link
Member Author

qjhart commented Jan 11, 2023

I can think of a number of alternatives, originally, I was thinking that we use our own prefix like info:fin, and then make items like:

{
  "@context:": {
     "@context":  "http://schema.library.ucdavis.edu/context/dams.json",
     "shelfmark":"ark:/87287/d7r94j/"
  },
 "@graph":[ {
  "@id": "info:fin/ark:/87287/d7002v",
  "@type": [ "fedora:ArchivalGroup", "CreativeWork", "Menu"],
  "identifier": [ "ark:/87287/d7002v", "shelfmark:D-060/box:60+folder:112"]
  },
  {
    "@id":"info:fedora/ark:/9999/9999",
   "desc": "random info"
  }]
}

And then fail if there is more than one info:fin. But that wouldn't really survive an import/export/import,so I think the better alternative is to only use the @id if it's a ArchivalGroup and fail if there are two.

Alternatively, I suppose we could have a type like fin:Item and use that @id. Which is some way is better since you wouldn't need to scrub the fedora:ArchiveGroup and move it to the header?

@jrmerz
Copy link
Member

jrmerz commented Jan 13, 2023

Reminder, we have moved the info:fedora/item definition to be a @type based lookup in fin io import. The @type to base path (e.g. info:fedora/item) definition is stored at /fcrepo/rest/finio/config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants