-
Notifications
You must be signed in to change notification settings - Fork 579
Description
Currently the graph is aware of namespaces via Graph.namespace_manager. However, namespaces aren't actually needed for a live graph, they're only used when serializing or de-serializing TTL. In contrast, the Context class is only used by the JSON-LD serializer at the point of serialization.
Therefore, I wonder if we should either move the namespace manager out of the Graph, or alternatively move the Context into the graph for consistency. The latter might be better because it would be backwards compatibility, and then we can preserve context terms we read at deserialization time and re-use them at the point of JSON-LD serialization.
There might also be merit in providing a conversion from one to the other. ie, should we populate the namespace manager with terms from the Context at the point of loading JSON-LD?