UNPKG

@treecg/ldes-orchestrator

Version:

Fills the gaps that a Linked Data Platform (LDP) cannot do by itself for creating a Linked Data Event Stream (LDES) in LDP.

90 lines (89 loc) 4.77 kB
import { NamedNode } from 'rdf-js'; declare type RecordOf<TKey extends any[], TValue> = Record<TKey[number], TValue>; export declare type Namespace<TKey extends any[], TValue> = { namespace: TValue; } & RecordOf<TKey, TValue>; /** * Creates a function that expands local names from the given base URI, * and exports the given local names as properties on the returned object. */ export declare function createNamespace<TKey extends string, TValue>(baseUri: string, toValue: (expanded: string) => TValue, ...localNames: TKey[]): Namespace<typeof localNames, TValue>; /** * Creates a function that expands local names from the given base URI into strings, * and exports the given local names as properties on the returned object. */ export declare function createUriNamespace<T extends string>(baseUri: string, ...localNames: T[]): Namespace<typeof localNames, string>; /** * Creates a function that expands local names from the given base URI into named nodes, * and exports the given local names as properties on the returned object. */ export declare function createTermNamespace<T extends string>(baseUri: string, ...localNames: T[]): Namespace<typeof localNames, NamedNode>; /** * Creates a function that expands local names from the given base URI into string, * and exports the given local names as properties on the returned object. * Under the `terms` property, it exposes the expanded local names as named nodes. */ export declare function createUriAndTermNamespace<T extends string>(baseUri: string, ...localNames: T[]): Namespace<typeof localNames, string> & { terms: Namespace<typeof localNames, NamedNode>; }; export declare const ACL: { namespace: string; } & RecordOf<("Authorization" | "Read" | "Write" | "Append" | "Control" | "agentClass" | "agent" | "accessTo" | "default" | "mode")[], string> & { terms: Namespace<("Authorization" | "Read" | "Write" | "Append" | "Control" | "agentClass" | "agent" | "accessTo" | "default" | "mode")[], NamedNode<string>>; }; export declare const AS: { namespace: string; } & RecordOf<("object" | "Announce" | "Person" | "Arrive" | "Link" | "Add" | "actor" | "location" | "href" | "name" | "url")[], string> & { terms: Namespace<("object" | "Announce" | "Person" | "Arrive" | "Link" | "Add" | "actor" | "location" | "href" | "name" | "url")[], NamedNode<string>>; }; export declare const DCAT: { namespace: string; } & RecordOf<("Dataset" | "DataService" | "servesDataset" | "contactPoint" | "endpointURL")[], string> & { terms: Namespace<("Dataset" | "DataService" | "servesDataset" | "contactPoint" | "endpointURL")[], NamedNode<string>>; }; export declare const DCT: { namespace: string; } & RecordOf<("conformsTo" | "creator" | "description" | "identifier" | "issued" | "isVersionOf" | "license" | "subject" | "title" | "modified")[], string> & { terms: Namespace<("conformsTo" | "creator" | "description" | "identifier" | "issued" | "isVersionOf" | "license" | "subject" | "title" | "modified")[], NamedNode<string>>; }; export declare const FOAF: { namespace: string; } & RecordOf<"Agent"[], string> & { terms: Namespace<"Agent"[], NamedNode<string>>; }; export declare const LDES: { namespace: string; } & RecordOf<("EventStream" | "BucketizerConfiguration" | "configuration" | "pageSize" | "bucketizer")[], string> & { terms: Namespace<("EventStream" | "BucketizerConfiguration" | "configuration" | "pageSize" | "bucketizer")[], NamedNode<string>>; }; export declare const LDP: { namespace: string; } & RecordOf<("contains" | "BasicContainer" | "Container" | "Resource" | "constrainedBy" | "inbox")[], string> & { terms: Namespace<("contains" | "BasicContainer" | "Container" | "Resource" | "constrainedBy" | "inbox")[], NamedNode<string>>; }; export declare const SH: { namespace: string; } & RecordOf<("targetClass" | "or")[], string> & { terms: Namespace<("targetClass" | "or")[], NamedNode<string>>; }; export declare const RDF: { namespace: string; } & RecordOf<"type"[], string> & { terms: Namespace<"type"[], NamedNode<string>>; }; export declare const TREE: { namespace: string; } & RecordOf<("view" | "shape" | "relation" | "Node" | "path" | "node" | "value" | "GreaterThanOrEqualToRelation")[], string> & { terms: Namespace<("view" | "shape" | "relation" | "Node" | "path" | "node" | "value" | "GreaterThanOrEqualToRelation")[], NamedNode<string>>; }; export declare const VOID: { namespace: string; } & RecordOf<"subset"[], string> & { terms: Namespace<"subset"[], NamedNode<string>>; }; export declare const XSD: { namespace: string; } & RecordOf<("positiveInteger" | "dateTime")[], string> & { terms: Namespace<("positiveInteger" | "dateTime")[], NamedNode<string>>; }; export {};