betty.associations.proxy module

Proxy associations.

class betty.associations.proxy.ProxyAssociation

Bases: ProxyAttr, Association, Generic

An association that proxies to another association.

__init__(field: FieldDefinition[OwnerT, GetT, DataDefinitionT] | ResolvableDataDefinition[DataDefinitionT] | None = None, *args: Any, proxied: Association[OwnerT, AssociateT, GetT, SetT, DataDefinitionT], **kwargs: Any)
associate(owner: OwnerT, associate: AssociateT, /) None

Associate two entities.

disassociate(owner: OwnerT, associate: AssociateT, /) None

Disassociate two entities.

async dump_linked_data_for(project: Project, target: OwnerT, /) PortableData

Dump the given target to JSON-LD.

get_associates(owner: OwnerT, /) Iterable[AssociateT]

Get the associates for the given owner.

is_resolver(value: Associate[OwnerT, AssociateT], /) TypeGuard[AssociateResolver[OwnerT, AssociateT]]

Test that the value is an entity (associate) resolver.

async linked_data_schema_for(project: Project, /) Schema

Define the JSON Schema for betty.linked_data.LinkedDataDumper.dump_linked_data_for().

resolve(project: Project, owner: OwnerT, /) None

Resolve any associates the owner may have for this association.