cadrumo.domain.calculations.registry.descendant_relacion_catalogue module

Typed projection of the governed descendant-relationship catalogue.

class DescendantRelacionCatalogue(relations, default_token, adoption_token, maternity_tokens, entitling_tokens)[source]

Bases: object

The dated Art. 58/81 descendant relationship projection.

Parameters:
relations: tuple[DescendantRelacion, ...]
default_token: DescendantRelacion
adoption_token: DescendantRelacion
maternity_tokens: tuple[DescendantRelacion, ...]
entitling_tokens: tuple[DescendantRelacion, ...]
property all_relations: frozenset[DescendantRelacion]

Return every relationship declared by the authority.

require(value)[source]

Return one relationship only when the authority declares it.

Return type:

DescendantRelacion

Parameters:

value (object)

resolve_descendant_relacion_catalogue(*, effective_date=None, authority=None)[source]

Resolve the complete Art. 58/81 relationship catalogue.

Return type:

DescendantRelacionCatalogue

Parameters:
require_descendant_relacion(value, *, effective_date=None, authority=None)[source]

Return one registry-declared relationship or refuse it.

Return type:

DescendantRelacion

Parameters:
descendant_relacion_tokens(*, effective_date=None, authority=None)[source]

Return relationship choices in authority order.

Return type:

tuple[DescendantRelacion, ...]

Parameters:
descendant_relacion_default_token(*, effective_date=None, authority=None)[source]

Return the authority-declared absent-relation default.

Return type:

DescendantRelacion

Parameters:
descendant_relacion_adoption_token(*, effective_date=None, authority=None)[source]

Return the authority-declared adoption relation token.

Return type:

DescendantRelacion

Parameters:
descendant_relacion_entitling_tokens(*, effective_date=None, authority=None)[source]

Return the Art. 58.2 entry-event entitlement projection.

Return type:

frozenset[DescendantRelacion]

Parameters:
descendant_relacion_maternity_tokens(*, effective_date=None, authority=None)[source]

Return the Art. 81.1 maternity relationship projection.

Return type:

frozenset[DescendantRelacion]

Parameters: