这是indexloc提供的服务,不要输入任何密码
Skip to content

Consolidate Context and NamespaceManager #3272

@multimeric

Description

@multimeric

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions