graflo.architecture.evolution.aspects.members¶
Which parts of a schema an aspect added: its own types, its relations, and the types it was lifted onto.
Derived from the schema, not recorded on it. Each relation an aspect lifts has
a fixed shape -- a relation name, its two ends, and the IRI it is grounded in --
built by the aspect's vocabulary. A relation counts as the aspect's when it has
exactly the shape the vocabulary would build for its ends, and a type when the
vocabulary builds it (SourceRecord, Agent) or names it after a type it
specialises (<Type>State, <Type>Observation). The IRI alone is not
enough: a domain type or relation may be grounded in a PROV term too.
Only aspects that add types and relations have members. access and sync
add reserved fields, which a caller reads from the fields themselves.
Attributes¶
__all__ = ['AspectEdge', 'AspectMembers', 'aspect_members']
module-attribute
¶
Classes¶
AspectEdge
¶
Bases: ConfigBaseModel
One relation an aspect lifted, by its ends and name.
Source code in graflo/architecture/evolution/aspects/members.py
AspectMembers
¶
Bases: ConfigBaseModel
What a schema owes to its aspects.
Attributes:
| Name | Type | Description |
|---|---|---|
types |
dict[str, str]
|
Each type an aspect defines, and that aspect. |
edges |
list[AspectEdge]
|
Each relation an aspect lifted. |
lifted_onto |
dict[str, list[str]]
|
Each other type an aspect was lifted onto, and those aspects in name order. |
Source code in graflo/architecture/evolution/aspects/members.py
Functions:¶
aspect_members(schema)
¶
The types and relations schema owes to the provenance and state aspects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
Schema
|
A schema, lifted or not. |
required |
Returns:
| Type | Description |
|---|---|
AspectMembers
|
The aspects' own types, the relations they lifted, and the other types |
AspectMembers
|
each was lifted onto. All empty for a schema no aspect was lifted onto. |