/** * @medicine-wheel/relational-query — RDF → Flat Kinship-Graph Migration * * Ingests RDF triples and emits a flat kinship graph (co-equal nodes + named, * context-bound relations). The reconciliation move: `rdfs:subClassOf` and * `rdf:type` — the axes that encode taxonomic subordination — are mapped onto * a NAMED kinship edge (`co-emerges-with` by default), never re-introduced as * a class hierarchy. Source provenance is carried into each relation's * `context.authorized_by`. */ import type { Relation, RelationalNode, KinshipEdgeName } from '@medicine-wheel/ontology-core'; /** A single RDF statement (subject–predicate–object), IRIs or prefixed names. */ export interface RdfTriple { subject: string; predicate: string; object: string; } export interface MigrationOptions { /** Provenance label written into each relation's context.authorized_by. */ source?: string; /** Predicate (IRI or prefixed) → kinship edge name overrides. */ predicateMap?: Record; /** Predicates whose (literal) objects fold into node.name. */ labelPredicates?: string[]; /** Decide whether an RDF term is a resource (→ node) vs a literal (→ attribute). */ isResource?: (term: string) => boolean; /** ISO timestamp for created/updated fields (defaults to now). */ now?: string; } export interface KinshipGraph { nodes: RelationalNode[]; relations: Relation[]; } /** The local name of an IRI or prefixed term (after the last #, / or :). */ export declare function localName(term: string): string; /** Migrate RDF triples into a flat kinship graph. */ export declare function rdfToKinshipGraph(triples: RdfTriple[], options?: MigrationOptions): KinshipGraph; /** Emit MERGE statements for a kinship graph (KuzuDB / openCypher). */ export declare function kinshipGraphToCypher(graph: KinshipGraph): string[]; /** Emit newline-delimited JSON (one node/relation per line) for the JSONL store. */ export declare function kinshipGraphToJsonl(graph: KinshipGraph): string; //# sourceMappingURL=migrate.d.ts.map