casework / CASE-Mapping-Python

Apache License 2.0
0 stars 3 forks source link

uco-core:Bundle should not to be used #18

Open fabrizio-turchi opened 11 months ago

fabrizio-turchi commented 11 months ago
ajnelson-nist commented 2 months ago

(Note I do use JSON and JSON-LD distinctly below.)

The current usage of Bundle is as the root JSON object, which ends up housing the JSON-LD context dictionary.

In CASE example graphs, the root JSON object instead houses a "graph" JSON-LD structure - keys @graph and @context.

Bundle currently gives a way to list all of the involved objects being conveyed in a transit bundle, and this still has semantic relevance worth preserving. But it makes storing non-UcoObjects (e.g. types:Hash) in the graph awkward because there is a need to track whether the object has been inlined somewhere already.

If Bundle is to be removed from its current role, I think a "Graph" class (not ontological---a JSON-LD structural maintenance item) should be added to base.py, and some method added to handle adding any UcoThing to it.