@treecg/curation
Version:
This library implements a class (Curator) with methods to curate an announcement LDES in LDP.
80 lines (79 loc) • 4.32 kB
TypeScript
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 AS: {
namespace: string;
} & RecordOf<("object" | "Link" | "Announce" | "Person" | "Arrive" | "Add" | "actor" | "location" | "href" | "name" | "url")[], string> & {
terms: Namespace<("object" | "Link" | "Announce" | "Person" | "Arrive" | "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" | "modified" | "subject" | "title")[], string> & {
terms: Namespace<("conformsTo" | "creator" | "description" | "identifier" | "issued" | "isVersionOf" | "license" | "modified" | "subject" | "title")[], 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" | "member" | "shape" | "relation" | "Node" | "Collection" | "GreaterThanOrEqualToRelation" | "node" | "path" | "value")[], string> & {
terms: Namespace<("view" | "member" | "shape" | "relation" | "Node" | "Collection" | "GreaterThanOrEqualToRelation" | "node" | "path" | "value")[], 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 {};