Skip to content

Interface: OntologyExportDocument

@kortexya/reasoninglayer


@kortexya/reasoninglayer / OntologyExport / OntologyExportDocument

Interface: OntologyExportDocument

Defined in: src/types/ontology-export.ts:106

An exported ontology document, verbatim.

Remarks

The export endpoints are content-negotiated and the OpenAPI spec declares no schema for their bodies, so the SDK surfaces the document exactly as the server serialized it, together with the Content-Type the server actually answered with. RDF serializations are text; the default JSON rendering is JSON text (parse it with JSON.parse when you need the object).

The media type is the server’s Content-Type verbatim, parameters included — Turtle is served as text/turtle; charset=utf-8, not a bare text/turtle, so match on a prefix rather than comparing for equality.

Example

const result: OntologyExportDocument = {
contentType: 'text/turtle; charset=utf-8',
document: '@prefix : <urn:osfkb:tenant:...> .\n',
};

Properties

contentType

contentType: string

Defined in: src/types/ontology-export.ts:108

The media type from the response Content-Type header (empty when absent).


document

document: string

Defined in: src/types/ontology-export.ts:110

The exported document body, verbatim.