Expand description
Controlled vocabularies and cross-format type/role translation tables.
All mappings are pure match expressions — zero runtime allocation,
compiler-verified exhaustiveness. Callers import only the functions
they need; dead-code warnings serve as a built-in unused-constant detector.
Enums§
- DoiRegistration
Agency - A DOI Registration Agency (RA).
Constants§
- COMMONMETA_
RELATION_ TYPES - Subset of relation types that are valid at the commonmeta schema level
(mirrors Python
COMMONMETA_RELATION_TYPES). - CONTRIBUTOR_
ROLES - All Commonmeta contributor roles (mirrors Python
COMMONMETA_CONTRIBUTOR_ROLES). - CONTRIBUTOR_
TYPES - Contributor types.
- IDENTIFIER_
TYPES - Identifier types (Commonmeta schema enum).
- RELATION_
TYPES - Relation types from the Commonmeta schema.
- WORK_
TYPES - All Commonmeta work types.
Functions§
- bib_
to_ cm - BibTeX entry type string → Commonmeta work type.
- cm_
to_ bib - Commonmeta work type → BibTeX entry type string.
- cm_
to_ citeproc - Commonmeta work type → Citeproc/CSL type (DataCite writer variant).
- cm_
to_ cr - Commonmeta work type → Crossref work type string.
- cm_
to_ cr_ filter_ type - Commonmeta work type → Crossref API filter type (kebab-case).
Used for both Crossref (
type:…) and OpenAlex (type_crossref:…) filters. Returns""for types that have no Crossref equivalent. - cm_
to_ cr_ role - Commonmeta contributor role → Crossref contributor role.
- cm_
to_ csl - Commonmeta work type → CSL type string.
- cm_
to_ dc - Commonmeta work type → DataCite
resourceTypeGeneral. - cm_
to_ dc_ role - Commonmeta contributor role → DataCite contributor type.
- cm_
to_ inveniordm - Commonmeta work type → InvenioRDM
resource_type.id. - cm_
to_ inveniordm_ role - Commonmeta contributor role → InvenioRDM role id (lowercase).
- cm_
to_ ris - Commonmeta work type → RIS type tag.
- cm_
to_ schema_ org - Commonmeta work type → Schema.org
@type(DataCite writer variant; narrower thancm_to_so— DataCite only serialises a subset). - cm_
to_ so - Commonmeta work type → Schema.org
@type. - cr_
to_ cm - Crossref work type string → Commonmeta work type.
- cr_
to_ cm_ container - Crossref container type string → Commonmeta container type.
- cr_
to_ cm_ role - Crossref contributor role → Commonmeta contributor role.
- cr_
work_ to_ container - Crossref work type → its Commonmeta container type.
- csl_
to_ cm - CSL type string → Commonmeta work type.
- dc_
to_ cm - DataCite
resourceTypeGeneral→ Commonmeta work type. - dc_
to_ cm_ container - DataCite container type → Commonmeta container type.
- dc_
to_ cm_ role - DataCite contributor type → Commonmeta contributor role.
- eu_
repo_ to_ cm - Map an
info:eu-repo/semantics/publication-type URI to a commonmeta type. Returns""for access-rights terms and any unrecognised URI. - inveniordm_
to_ cm - InvenioRDM
resource_type.id→ Commonmeta work type. - inveniordm_
to_ cm_ role - InvenioRDM role id (lowercase) → Commonmeta contributor role.
- is_
eu_ repo_ access_ right - Returns
trueifuriis aninfo:eu-repo/semantics/access-rights term. These must not be used as license URLs. - lookup_
work_ type - Case-insensitive lookup against WORK_TYPES.
Returns the canonical PascalCase form, or
""if not found. - oa_
to_ cm - OpenAlex work type → Commonmeta work type.
- oa_
to_ cm_ container - OpenAlex source type → Commonmeta container type.
- ris_
to_ cm - RIS type tag → Commonmeta work type.
- so_
to_ cm - Schema.org
@type→ Commonmeta work type. - subfield_
to_ fos - Map an OpenAlex subfield numeric ID to the OECD Fields of Science category name.
Returns
""if not found. - topic_
to_ subfield - Map an OpenAlex topic numeric ID (digits only, no “T” prefix) to its
parent subfield numeric ID. Returns
""if not found.