Expand description
Shared foundational types for the MIF (Modeled Information Format) ecosystem.
mif-core provides the types shared across the ecosystem’s other crates:
OntologyReference, EntityReference, EntityData, and
ConceptType, plus the concept-URN helpers (concept_urn,
is_concept_urn) for the urn:mif:<uuid> id form MIF 1.4.0 requires. Field definitions are taken directly from the canonical
MIF JSON Schema (mif.schema.json, entity-reference.schema.json,
draft 2020-12; see https://mif-spec.dev/schema/).
Validation of MIF documents against the schema itself lives in the
mif-schema crate; mif-core only defines the shared data shapes.
Structs§
- Entity
Data - Open, ontology-typed entity payload for a memory that is an entity.
- Entity
Id - The entity identifier object nested inside an
EntityReference. - Entity
Reference - Closed pointer to an entity mentioned by a MIF memory.
- Ontology
Reference - A reference to the ontology a MIF memory conforms to.
Enums§
- Concept
Type - MIF’s three-way knowledge taxonomy.
- Entity
Type - Entity type classification: a closed vocabulary of well-known types, or
a custom ontology-defined type (
^[a-z][a-z0-9-]*$) preserved verbatim. - Known
Entity Type - The closed set of well-known entity type values.
Constants§
- CONCEPT_
URN_ PREFIX - The URN prefix of a concept
@id.
Functions§
- concept_
urn - The concept URN
urn:mif:<uuid>forname. - concept_
uuid - The deterministic concept UUID for
name(version 5, inmif_namespace). - is_
concept_ urn - Whether
idis a valid concept URN:urn:mif:followed by a hyphenated UUID, the formmif.schema.json’s@idpattern accepts. - mif_
namespace - The version-5 UUID namespace for derived concept ids:
uuid5(NAMESPACE_URL, "https://mif-spec.dev").