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

SpecimenWrapper label defaults to urn:catalog:: if occurrence ID is empty #145

Open
3 tasks
gaurav opened this issue Sep 22, 2024 · 1 comment
Open
3 tasks

Comments

@gaurav
Copy link
Member

gaurav commented Sep 22, 2024

If you create a SpecimenWrapper from a blank occurrence ID, the returned occurrence ID is urn:catalog:::. This is because the current code constructs a

const wrapped = SpecimenWrapper.fromOccurrenceID('');
print(wrapper.label);
# Returns "Specimen urn:catalog:::"

This is because:

  • The getter method for occurrenceID attempts to construct a Darwin Core triple from the relevant fields, but these are empty.
  • Our default label is Specimen {occurrenceID}

We should change this such that:

  • It's probably not useful to have an occurrence ID with a urn:catalog::: prefix -- we should only return the raw occurrence ID.
  • We should have the label default to Specimen {occurrenceID}, but only if occurrenceID is not blank.
  • Should we include the basisOfRecord in the label as well?
@hlapp
Copy link
Member

hlapp commented Sep 23, 2024

  • Should we include the basisOfRecord in the label as well?

Would that help reduce potential ambiguity, or just bake additional information into the label? I'd be in favor of the former, but don't think the latter needs to our should be a goal.

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