import Store from './volatile-store'; import Writer from './writer'; /** * Configuration options for the turtle/N3 writer */ export interface Options { /** * A map of prefix names to their corresponding namespace URIs for compacting URIs in the output. * * @example * ```ts * { * ex: "http://example.org/", * foaf: "http://xmlns.com/foaf/0.1/", * schema: "https://schema.org/" * } * ``` */ prefixes?: Record; /** * Specifies the output format. * * @defaultValue 'text/turtle' * * Supported values: * - `'text/turtle'` - Standard Turtle format * - `'text/n3'` - Notation3 format */ format?: string; /** * When set to `true`, produces a more compact output by * removing unnecessary whitespace and line breaks. * * @defaultValue false */ compact?: boolean; /** * Used to opt in to using isImpliedBy syntax (`<=`) when in N3 mode. * * @defaultValue false */ isImpliedBy?: boolean; /** * Sets the base IRI for the document, which can be used to resolve relative IRIs. * * @example "http://example.org/base/" */ baseIri?: string; /** * When set to `true`, explicitly writes the `@base` directive * in the output even if a base IRI is provided. * * @defaultValue false * * @example * When enabled, output will include: `@base .` */ explicitBaseIRI?: boolean; /** * When set to `true`, the output will be ordered. * * @defaultValue false * * @example * When enabled, the output will maintain a consistent order of triples. */ ordered?: boolean; } export declare class TTLWriter { private store; private isN3; private isImpliedBy; private prefixes; private prefixRev; private writer; private explicitBnodes; private currentGraph; private baseIRI; private baseIRIString; private explicitBaseIRI; private ordered; constructor(store: Store, writer: Writer, prefixes?: { [prefix: string]: string; }, options?: Options); write(): Promise; private writeGraph; private writeNestedGraph; private writeTurtleSubject; private termToString; private writeTurtlePredicates; private writeGivenTurtlePredicates; private writeTurtleObjects; private writeList; }