Skip to content

Add getters for entity register and context list - #27

Open
OliverWoolland wants to merge 2 commits into
property-vectorsfrom
getters
Open

OliverWoolland wants to merge 2 commits into
property-vectorsfrom
getters

Conversation

@OliverWoolland

@OliverWoolland OliverWoolland commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Add some getters for ergonomics and streamline tests

Closes #11


This pull request adds new getter methods to the ROCrate class for retrieving entities and context entries, along with corresponding unit tests to ensure correct behavior. These changes improve the ability to inspect the internal state of an ROCrate instance and verify its contents.

API Enhancements:

  • Added getEntities() method to ROCrate, allowing users to retrieve a copy of the entity register. [1] [2]
  • Added getContext() method to ROCrate, which returns a combined map of local and remote context entries. [1] [2]

Testing Improvements:

  • Added unit test to verify that getEntities() returns the correct number of entities, including both default and user-added entities.
  • Added unit test to check that getContext() returns both prefixed and unprefixed context entries as expected.

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.

Consider friend class accessor for crate / entity internals

1 participant