Add dataProviderId for uploading Accessions
Accession Uploader now uses the doi
or instituteCode
and accessionNumber
(and genus
if institute is flagged as having unique accessionNumber
entries) to find an existing record in Genesys. This causes some problems for partners that do not use DOI.
Data providers would like to use their internal identifiers to refer to their entries on Genesys.
When calling /{instCode}/upsert
, they will include a new field in the incoming JSON:
[
{ "dataProviderId": "USDA:123133", "accessionNumber": "FOOBAR", ... },
{ "dataProviderId": "USDA:5424", .... },
...
]
When this field is provided, the Uploader should:
- If
doi
is provided, usedoi
first. - .. if not found by
doi
, then loadAccession
bydataProviderId
if provided (see below) - .. if not found then use existing logic.
The dataProviderId
is unique for the data provider, not to FaoInstitute
. We require that the dataProviderId
has a prefix ${partner.shortName}:
The database must have a new unique key on dataProviderId
.
Please also update the /delete
Accession call to support dataProviderId
.