Skip to content

Core

momapy_kb.core

Core data models for momapy_kb.

Provides CollectionEntry and Collection dataclasses for organizing maps into named collections.

Classes:

Name Description
Collection

A named collection of map entries.

CollectionEntry

A single entry in a collection.

Collection dataclass

Collection(name: str, entries: frozenset[CollectionEntry] = frozenset())

A named collection of map entries.

Attributes:

Name Type Description
name str

The collection name.

entries frozenset[CollectionEntry]

The entries in this collection.

CollectionEntry dataclass

CollectionEntry(id_: str, model: Map | Model | Layout, rdf_annotations: frozendict[MapElement, frozenset[RDFAnnotation]] | None = None, file_path: str | None = None, ids: frozendict[MapElement, frozenset[str]] | None = None, notes: frozendict[MapElement, frozenset[str]] | None = None)

A single entry in a collection.

Attributes:

Name Type Description
id_ str

Unique identifier for this entry.

model Map | Model | Layout

The momapy map, model, or layout object.

rdf_annotations frozendict[MapElement, frozenset[RDFAnnotation]] | None

Optional RDF annotations per map element.

file_path str | None

Optional path to the source file.

ids frozendict[MapElement, frozenset[str]] | None

Optional ID mappings per map element.

notes frozendict[MapElement, frozenset[str]] | None

Optional notes per map element.