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 StatutoryCitation(**data)[source]¶
Bases:
BaseModelOne 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:
objectRegistry-projected citation rows and namespace qualifiers.
- Parameters:
citations (tuple[StatutoryCitation, ...])
category_citations (Mapping[IvaCategory, tuple[str, ...]])
-
citations:
tuple[StatutoryCitation,...]¶
- class SupplyNatureDerivationOutcome(*values)[source]¶
Bases:
StrEnumWhat the citation parser was able to conclude.
- DERIVED¶
- CONTRADICTED¶
- ABSENT¶
- class SupplyNatureDerivation(**data)[source]¶
Bases:
BaseModelThe citation parser’s typed conclusion.
- Parameters:
outcome (SupplyNatureDerivationOutcome)
nature (SupplyNature | None)
citations (tuple[StatutoryCitation, ...])
note (str)
- 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:
- Parameters:
effective_date (date)
authority (GovernedFactSource | None)
- match_statutory_citations(printed, *, catalogue=None)[source]¶
Return every registry-projected citation row matched in
printed.- Return type:
- Parameters:
printed (str | None)
catalogue (CitationCatalogue | None)
- derive_supply_nature_from_citation(*, printed_citation, catalogue=None)[source]¶
Parse a printed citation against a selected registry catalogue.
- Return type:
- Parameters:
printed_citation (str | None)
catalogue (CitationCatalogue | None)
- supply_nature_implied_by_category(category, *, catalogue=None, category_citations=None)[source]¶
Join a registry-projected category grounding map to citation rows.
- Return type:
- Parameters:
category (IvaCategory | None)
catalogue (CitationCatalogue | None)
category_citations (Mapping[IvaCategory, tuple[str, ...]] | None)