cadrumo.domain.iva.supply_nature module

Generic parser and outcome mechanics for supply-nature citations.

Concrete citation rows, namespace qualifiers, category relationships, article headings, ordering, and legal provenance are canonical registry data. This module retains only typed outcomes, normalization/matching mechanics, and the explicit projection boundary that accepts selected catalogue data.

class SupplyNature(*values)[source]

Bases: StrEnum

What an operation supplies.

GOODS
SERVICES
class StatutoryCitation(**data)[source]

Bases: BaseModel

One registry-projected citation row and its generic outcome.

Parameters:

data (Any)

article: str
heading: str
corpus_ref: str
establishes: SupplyNature | None
class CitationCatalogue(citations, qualifiers, category_citations=<factory>)[source]

Bases: object

Registry-projected citation rows and namespace qualifiers.

Parameters:
citations: tuple[StatutoryCitation, ...]
qualifiers: tuple[str, ...]
category_citations: Mapping[IvaCategory, tuple[str, ...]]
class SupplyNatureDerivationOutcome(*values)[source]

Bases: StrEnum

What the citation parser was able to conclude.

DERIVED
CONTRADICTED
ABSENT
class SupplyNatureDerivation(**data)[source]

Bases: BaseModel

The citation parser’s typed conclusion.

Parameters:
outcome: SupplyNatureDerivationOutcome
nature: SupplyNature | None
citations: tuple[StatutoryCitation, ...]
note: str
registry_citation_catalogue(*, effective_date, authority=None)[source]

Project the dated citation mapping fact into generic parser inputs.

Return type:

CitationCatalogue

Parameters:
match_statutory_citations(printed, *, catalogue=None)[source]

Return every registry-projected citation row matched in printed.

Return type:

tuple[StatutoryCitation, ...]

Parameters:
derive_supply_nature_from_citation(*, printed_citation, catalogue=None)[source]

Parse a printed citation against a selected registry catalogue.

Return type:

SupplyNatureDerivation

Parameters:
supply_nature_implied_by_category(category, *, catalogue=None, category_citations=None)[source]

Join a registry-projected category grounding map to citation rows.

Return type:

SupplyNatureDerivation

Parameters: