IF Commons GitHub

RDF

Quality: 10 tests: 10 passed, 0 failed, 0 skipped, 7 of 8 requirements proved, 0 open issues, 0 open tickets. The tests and issues of the library

RDF as algebraically typed values and the writers of its syntaxes (commons rdf 0001-rdf): IRIs branded once checked, namespaces and typed vocabularies, named nodes, literals typed by language or datatype, class schemas, code lists, the checks a type cannot state, and N-Triples, N-Quads, canonical Turtle and expanded JSON-LD. The one entry of the package @intellectual-frontiers/rdf: every module of src/ is exported from here, so that a harness states its ontology as TypeScript with one import.

Entry points

Modules

Examples

import { classSchema, en, namespace, one, OwlClass, range, rdfs, term, triplesOf, turtle, vocabulary } from "@intellectual-frontiers/rdf";
const EX = namespace("ex", "https://example.org/terms#");
const ex = vocabulary(EX, { Tool: "owl:Class", runs: "owl:DatatypeProperty" });
const Tool = classSchema(ex.Tool, { label: one(rdfs.label, range.langString), runs: one(ex.runs, range.string) });
turtle({ prefixes: [EX], triples: triplesOf([OwlClass.make(ex.Tool, { label: en("Tool") })]) });

Limits

What the modules of this area do not do, or do only in part, as each module's @limits says.

Titles, headings, exports, tables, columns and requirements. Esc closes.