Skip to content

cmem_client.models.graph_import¤

Graph import models for Corporate Memory.

An import is an owl:imports statement, which makes the content of one graph visible in another. The single statements are the items of client.graph_imports, keyed by {from_graph}::::{to_graph}, while the transitive closure of one graph is returned as a tree by that repository.

Classes:

GraphImport¤

Bases: ReadRepositoryItem

Graph Import model.

Attributes:

  • from_graph (str) – IRI of the importing graph, the one which carries the owl:imports statement.
  • to_graph (str) – IRI of the imported graph.

Functions:

  • get_id – Get the id of the item.

from_graph¤

from_graph: str

get_id¤

get_id()

Get the id of the item.

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

to_graph¤

to_graph: str

GraphImportTree¤

Bases: Model

Import tree structure for a graph.

Attributes:

  • tree (dict[str, list[str]]) – Resolved imports, mapping the IRI of each graph to the IRIs of the graphs it imports.
  • ignored (dict[str, list[str]]) – Imports which were not resolved, mapping the IRI of each graph to the IRIs it points at in vain, for example because the target does not exist or

would close a cycle.

ignored¤

ignored: dict[str, list[str]] = Field(default_factory=dict)

model_config¤

model_config = ConfigDict(extra='allow', populate_by_name=True)

tree¤

tree: dict[str, list[str]] = Field(default_factory=dict)

Comments