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

Improve LDObject, add ISA model API #478

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

kMutagene
Copy link
Member

This PR (eventually)

  • slightly remodels LDObject to use arrays for @type and additionalType. Json encode/decode was adapted to be able to parse string OR array fields, but ALWAYS write array fields (even for singletons)
  • Adds many API functions to get typed properties from ISA LDObjects (e.g., get all Persons as a Person [] from the given Investigation LDObject)

@kMutagene
Copy link
Member Author

Blocked by CSBiology/DynamicObj#35 as we need the fixed version of CopyDynamicPropertiesTo to correctly set only dynamic props when trying to 'upcast', e.g. aDynamicObj as a LDObject, which has some static members in contrast to a fully dynamic DynamicObj

- Json: parse `@type`/`additionalType` from either string (-> singleton) or array field, always write array
- add tests
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

Successfully merging this pull request may close these issues.

[Feature Request] RO Crate Datamodel - ISA Profile: Add typed getter/setter APIs for known fields
1 participant