ldkit 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +113 -3
- package/esm/library/decoder.js +2 -1
- package/esm/library/encoder.js +2 -1
- package/esm/library/namespaces/dbo.js +3650 -0
- package/esm/library/namespaces/dc.js +22 -0
- package/esm/library/namespaces/foaf.js +70 -0
- package/esm/library/namespaces/gr.js +176 -0
- package/esm/library/namespaces/mod.js +7 -2
- package/esm/library/namespaces/sioc.js +106 -0
- package/esm/library/rdf.js +87 -9
- package/esm/library/resource/query_builder.js +2 -1
- package/esm/library/schema/data_types.js +2 -1
- package/esm/library/schema/utils.js +1 -1
- package/package.json +1 -2
- package/script/library/decoder.js +11 -7
- package/script/library/encoder.js +8 -4
- package/script/library/namespaces/dbo.js +3652 -0
- package/script/library/namespaces/dc.js +24 -0
- package/script/library/namespaces/foaf.js +72 -0
- package/script/library/namespaces/gr.js +178 -0
- package/script/library/namespaces/mod.js +15 -5
- package/script/library/namespaces/sioc.js +108 -0
- package/script/library/rdf.js +89 -10
- package/script/library/resource/query_builder.js +8 -4
- package/script/library/schema/data_types.js +39 -35
- package/script/library/schema/utils.js +6 -3
- package/types/library/namespaces/dbo.d.ts +3649 -0
- package/types/library/namespaces/dc.d.ts +21 -0
- package/types/library/namespaces/dcterms.d.ts +17 -17
- package/types/library/namespaces/foaf.d.ts +69 -0
- package/types/library/namespaces/gr.d.ts +175 -0
- package/types/library/namespaces/mod.d.ts +7 -2
- package/types/library/namespaces/rdf.d.ts +1 -1
- package/types/library/namespaces/rdfs.d.ts +4 -4
- package/types/library/namespaces/schema.d.ts +261 -261
- package/types/library/namespaces/sioc.d.ts +105 -0
- package/types/library/namespaces/skos.d.ts +3 -3
- package/types/library/namespaces/xsd.d.ts +3 -3
- package/types/library/rdf.d.ts +30 -11
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
subject: "sioc:subject";
|
|
3
|
+
link: "sioc:link";
|
|
4
|
+
description: "sioc:description";
|
|
5
|
+
Community: "sioc:Community";
|
|
6
|
+
follows: "sioc:follows";
|
|
7
|
+
id: "sioc:id";
|
|
8
|
+
name: "sioc:name";
|
|
9
|
+
note: "sioc:note";
|
|
10
|
+
reference: "sioc:reference";
|
|
11
|
+
sibling: "sioc:sibling";
|
|
12
|
+
title: "sioc:title";
|
|
13
|
+
topic: "sioc:topic";
|
|
14
|
+
Container: "sioc:Container";
|
|
15
|
+
Role: "sioc:Role";
|
|
16
|
+
about: "sioc:about";
|
|
17
|
+
email: "sioc:email";
|
|
18
|
+
mentions: "sioc:mentions";
|
|
19
|
+
Forum: "sioc:Forum";
|
|
20
|
+
Item: "sioc:Item";
|
|
21
|
+
Post: "sioc:Post";
|
|
22
|
+
Site: "sioc:Site";
|
|
23
|
+
Space: "sioc:Space";
|
|
24
|
+
Thread: "sioc:Thread";
|
|
25
|
+
User: "sioc:User";
|
|
26
|
+
UserAccount: "sioc:UserAccount";
|
|
27
|
+
Usergroup: "sioc:Usergroup";
|
|
28
|
+
account_of: "sioc:account_of";
|
|
29
|
+
addressed_to: "sioc:addressed_to";
|
|
30
|
+
administrator_of: "sioc:administrator_of";
|
|
31
|
+
attachment: "sioc:attachment";
|
|
32
|
+
avatar: "sioc:avatar";
|
|
33
|
+
container_of: "sioc:container_of";
|
|
34
|
+
content: "sioc:content";
|
|
35
|
+
content_encoded: "sioc:content_encoded";
|
|
36
|
+
created_at: "sioc:created_at";
|
|
37
|
+
creator_of: "sioc:creator_of";
|
|
38
|
+
delivered_at: "sioc:delivered_at";
|
|
39
|
+
discussion_of: "sioc:discussion_of";
|
|
40
|
+
earlier_version: "sioc:earlier_version";
|
|
41
|
+
email_sha1: "sioc:email_sha1";
|
|
42
|
+
embeds_knowledge: "sioc:embeds_knowledge";
|
|
43
|
+
feed: "sioc:feed";
|
|
44
|
+
first_name: "sioc:first_name";
|
|
45
|
+
function_of: "sioc:function_of";
|
|
46
|
+
generator: "sioc:generator";
|
|
47
|
+
group_of: "sioc:group_of";
|
|
48
|
+
has_administrator: "sioc:has_administrator";
|
|
49
|
+
has_container: "sioc:has_container";
|
|
50
|
+
has_creator: "sioc:has_creator";
|
|
51
|
+
has_discussion: "sioc:has_discussion";
|
|
52
|
+
has_function: "sioc:has_function";
|
|
53
|
+
has_group: "sioc:has_group";
|
|
54
|
+
has_host: "sioc:has_host";
|
|
55
|
+
has_member: "sioc:has_member";
|
|
56
|
+
has_moderator: "sioc:has_moderator";
|
|
57
|
+
has_modifier: "sioc:has_modifier";
|
|
58
|
+
has_owner: "sioc:has_owner";
|
|
59
|
+
has_parent: "sioc:has_parent";
|
|
60
|
+
has_part: "sioc:has_part";
|
|
61
|
+
has_reply: "sioc:has_reply";
|
|
62
|
+
has_scope: "sioc:has_scope";
|
|
63
|
+
has_space: "sioc:has_space";
|
|
64
|
+
has_subscriber: "sioc:has_subscriber";
|
|
65
|
+
has_usergroup: "sioc:has_usergroup";
|
|
66
|
+
host_of: "sioc:host_of";
|
|
67
|
+
ip_address: "sioc:ip_address";
|
|
68
|
+
last_activity_date: "sioc:last_activity_date";
|
|
69
|
+
last_item_date: "sioc:last_item_date";
|
|
70
|
+
last_name: "sioc:last_name";
|
|
71
|
+
last_reply_date: "sioc:last_reply_date";
|
|
72
|
+
later_version: "sioc:later_version";
|
|
73
|
+
latest_version: "sioc:latest_version";
|
|
74
|
+
likes: "sioc:likes";
|
|
75
|
+
links_to: "sioc:links_to";
|
|
76
|
+
member_of: "sioc:member_of";
|
|
77
|
+
moderator_of: "sioc:moderator_of";
|
|
78
|
+
modified_at: "sioc:modified_at";
|
|
79
|
+
modifier_of: "sioc:modifier_of";
|
|
80
|
+
next_by_date: "sioc:next_by_date";
|
|
81
|
+
next_version: "sioc:next_version";
|
|
82
|
+
num_authors: "sioc:num_authors";
|
|
83
|
+
num_items: "sioc:num_items";
|
|
84
|
+
num_replies: "sioc:num_replies";
|
|
85
|
+
num_threads: "sioc:num_threads";
|
|
86
|
+
num_views: "sioc:num_views";
|
|
87
|
+
owner_of: "sioc:owner_of";
|
|
88
|
+
parent_of: "sioc:parent_of";
|
|
89
|
+
part_of: "sioc:part_of";
|
|
90
|
+
previous_by_date: "sioc:previous_by_date";
|
|
91
|
+
previous_version: "sioc:previous_version";
|
|
92
|
+
read_at: "sioc:read_at";
|
|
93
|
+
related_to: "sioc:related_to";
|
|
94
|
+
reply_of: "sioc:reply_of";
|
|
95
|
+
respond_to: "sioc:respond_to";
|
|
96
|
+
scope_of: "sioc:scope_of";
|
|
97
|
+
shared_by: "sioc:shared_by";
|
|
98
|
+
space_of: "sioc:space_of";
|
|
99
|
+
subscriber_of: "sioc:subscriber_of";
|
|
100
|
+
usergroup_of: "sioc:usergroup_of";
|
|
101
|
+
} & {
|
|
102
|
+
$prefix: "sioc:";
|
|
103
|
+
$iri: "http://rdfs.org/sioc/ns#";
|
|
104
|
+
};
|
|
105
|
+
export default _default;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
definition: "skos:definition";
|
|
2
3
|
member: "skos:member";
|
|
4
|
+
note: "skos:note";
|
|
5
|
+
related: "skos:related";
|
|
3
6
|
Collection: "skos:Collection";
|
|
4
7
|
Concept: "skos:Concept";
|
|
5
8
|
ConceptScheme: "skos:ConceptScheme";
|
|
@@ -10,7 +13,6 @@ declare const _default: {
|
|
|
10
13
|
broaderTransitive: "skos:broaderTransitive";
|
|
11
14
|
changeNote: "skos:changeNote";
|
|
12
15
|
closeMatch: "skos:closeMatch";
|
|
13
|
-
definition: "skos:definition";
|
|
14
16
|
editorialNote: "skos:editorialNote";
|
|
15
17
|
exactMatch: "skos:exactMatch";
|
|
16
18
|
example: "skos:example";
|
|
@@ -24,9 +26,7 @@ declare const _default: {
|
|
|
24
26
|
narrower: "skos:narrower";
|
|
25
27
|
narrowerTransitive: "skos:narrowerTransitive";
|
|
26
28
|
notation: "skos:notation";
|
|
27
|
-
note: "skos:note";
|
|
28
29
|
prefLabel: "skos:prefLabel";
|
|
29
|
-
related: "skos:related";
|
|
30
30
|
relatedMatch: "skos:relatedMatch";
|
|
31
31
|
scopeNote: "skos:scopeNote";
|
|
32
32
|
semanticRelation: "skos:semanticRelation";
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
string: "xsd:string";
|
|
3
3
|
boolean: "xsd:boolean";
|
|
4
|
-
language: "xsd:language";
|
|
5
|
-
date: "xsd:date";
|
|
6
|
-
duration: "xsd:duration";
|
|
7
4
|
ENTITIES: "xsd:ENTITIES";
|
|
8
5
|
ENTITY: "xsd:ENTITY";
|
|
9
6
|
ID: "xsd:ID";
|
|
@@ -21,11 +18,13 @@ declare const _default: {
|
|
|
21
18
|
anyURI: "xsd:anyURI";
|
|
22
19
|
base64Binary: "xsd:base64Binary";
|
|
23
20
|
byte: "xsd:byte";
|
|
21
|
+
date: "xsd:date";
|
|
24
22
|
dateTime: "xsd:dateTime";
|
|
25
23
|
dateTimeStamp: "xsd:dateTimeStamp";
|
|
26
24
|
dayTimeDuration: "xsd:dayTimeDuration";
|
|
27
25
|
decimal: "xsd:decimal";
|
|
28
26
|
double: "xsd:double";
|
|
27
|
+
duration: "xsd:duration";
|
|
29
28
|
float: "xsd:float";
|
|
30
29
|
gDay: "xsd:gDay";
|
|
31
30
|
gMonth: "xsd:gMonth";
|
|
@@ -35,6 +34,7 @@ declare const _default: {
|
|
|
35
34
|
hexBinary: "xsd:hexBinary";
|
|
36
35
|
int: "xsd:int";
|
|
37
36
|
integer: "xsd:integer";
|
|
37
|
+
language: "xsd:language";
|
|
38
38
|
long: "xsd:long";
|
|
39
39
|
negativeInteger: "xsd:negativeInteger";
|
|
40
40
|
nonNegativeInteger: "xsd:nonNegativeInteger";
|
package/types/library/rdf.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import type { Bindings, BlankNode, Literal, NamedNode, Quad, Term, Variable } from "rdf-js";
|
|
2
|
-
export type { Bindings, BlankNode, Literal, NamedNode, Quad, Term, Variable };
|
|
3
1
|
import type * as RDF from "rdf-js";
|
|
4
2
|
export type { RDF };
|
|
5
3
|
export { fromRdf, toRdf } from "rdf-literal";
|
|
6
4
|
import { DataFactory } from "rdf-data-factory";
|
|
7
5
|
export { DataFactory };
|
|
8
|
-
import { BindingsFactory as ComunicaBindingsFactory } from "@comunica/bindings-factory";
|
|
9
6
|
import type { IDataSource, IQueryContextCommon } from "@comunica/types";
|
|
10
7
|
export declare type LDkitContext = {
|
|
11
8
|
graph?: string;
|
|
@@ -14,9 +11,9 @@ export declare type LDkitContext = {
|
|
|
14
11
|
export declare type Context = LDkitContext & RDF.QueryStringContext & RDF.QuerySourceContext<IDataSource> & IQueryContextCommon;
|
|
15
12
|
export declare type IQueryEngine = RDF.StringSparqlQueryable<RDF.SparqlResultSupport, Context>;
|
|
16
13
|
export declare type Iri = string;
|
|
17
|
-
export declare type Node = Map<Iri, Term[]>;
|
|
14
|
+
export declare type Node = Map<Iri, RDF.Term[]>;
|
|
18
15
|
export declare type Graph = Map<Iri, Node>;
|
|
19
|
-
export declare const quadsToGraph: (quads: Quad[]) => Graph;
|
|
16
|
+
export declare const quadsToGraph: (quads: RDF.Quad[]) => Graph;
|
|
20
17
|
export declare namespace RDFJSON {
|
|
21
18
|
type Term = {
|
|
22
19
|
type: "uri" | "literal" | "bnode";
|
|
@@ -25,6 +22,7 @@ export declare namespace RDFJSON {
|
|
|
25
22
|
datatype?: string;
|
|
26
23
|
};
|
|
27
24
|
type Bindings = Record<string, Term>;
|
|
25
|
+
type Triple = [Iri, Iri, Term];
|
|
28
26
|
type SparqlResultsJsonFormat = {
|
|
29
27
|
head: {
|
|
30
28
|
vars?: string[];
|
|
@@ -42,23 +40,44 @@ export declare namespace RDFJSON {
|
|
|
42
40
|
fromJson(jsonBindings: Bindings): RDF.Bindings;
|
|
43
41
|
}
|
|
44
42
|
interface QuadFactory {
|
|
45
|
-
fromJson(jsonRdf:
|
|
43
|
+
fromJson(jsonRdf: Triple): RDF.Quad;
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
export declare class TermFactory implements RDFJSON.TermFactory {
|
|
49
47
|
protected readonly dataFactory: RDF.DataFactory;
|
|
50
48
|
constructor(dataFactory?: RDF.DataFactory);
|
|
51
|
-
fromJson(jsonTerm: RDFJSON.Term): BlankNode | Literal | NamedNode<string>;
|
|
49
|
+
fromJson(jsonTerm: RDFJSON.Term): RDF.BlankNode | RDF.Literal | RDF.NamedNode<string>;
|
|
52
50
|
}
|
|
53
|
-
export declare class
|
|
54
|
-
|
|
51
|
+
export declare class ReadOnlyBindings implements RDF.Bindings {
|
|
52
|
+
readonly type = "bindings";
|
|
53
|
+
protected readonly dataFactory: RDF.DataFactory;
|
|
54
|
+
protected readonly entries: Map<RDF.Variable, RDF.Term>;
|
|
55
|
+
protected readonly variables: Map<string, RDF.Variable>;
|
|
56
|
+
constructor(bindings: Map<RDF.Variable, RDF.Term>, dataFactory?: RDF.DataFactory);
|
|
57
|
+
has(key: string | RDF.Variable): boolean;
|
|
58
|
+
get(key: string | RDF.Variable): RDF.Term | undefined;
|
|
59
|
+
set(_key: string | RDF.Variable, _value: RDF.Term): RDF.Bindings;
|
|
60
|
+
delete(_key: string | RDF.Variable): RDF.Bindings;
|
|
61
|
+
keys(): IterableIterator<RDF.Variable>;
|
|
62
|
+
values(): IterableIterator<RDF.Term>;
|
|
63
|
+
forEach(fn: (value: RDF.Term, key: RDF.Variable) => unknown): void;
|
|
64
|
+
get size(): number;
|
|
65
|
+
[Symbol.iterator](): IterableIterator<[RDF.Variable, RDF.Term]>;
|
|
66
|
+
equals(_other: RDF.Bindings | null | undefined): boolean;
|
|
67
|
+
filter(_fn: (value: RDF.Term, key: RDF.Variable) => boolean): RDF.Bindings;
|
|
68
|
+
map(_fn: (value: RDF.Term, key: RDF.Variable) => RDF.Term): RDF.Bindings;
|
|
69
|
+
merge(_other: RDF.Bindings): RDF.Bindings | undefined;
|
|
70
|
+
mergeWith(_merger: (self: RDF.Term, other: RDF.Term, key: RDF.Variable) => RDF.Term, _other: RDF.Bindings): RDF.Bindings;
|
|
71
|
+
}
|
|
72
|
+
export declare class BindingsFactory implements RDFJSON.BindingsFactory {
|
|
73
|
+
protected readonly dataFactory: RDF.DataFactory;
|
|
55
74
|
protected readonly termFactory: RDFJSON.TermFactory;
|
|
56
75
|
constructor(dataFactory?: RDF.DataFactory, termFactory?: RDFJSON.TermFactory);
|
|
57
|
-
fromJson(jsonBindings: RDFJSON.Bindings):
|
|
76
|
+
fromJson(jsonBindings: RDFJSON.Bindings): ReadOnlyBindings;
|
|
58
77
|
}
|
|
59
78
|
export declare class QuadFactory implements RDFJSON.QuadFactory {
|
|
60
79
|
protected readonly dataFactory: RDF.DataFactory;
|
|
61
80
|
protected readonly termFactory: RDFJSON.TermFactory;
|
|
62
81
|
constructor(dataFactory?: RDF.DataFactory, termFactory?: RDFJSON.TermFactory);
|
|
63
|
-
fromJson(jsonRdf: [Iri, Iri, RDFJSON.Term]): Quad;
|
|
82
|
+
fromJson(jsonRdf: [Iri, Iri, RDFJSON.Term]): RDF.Quad;
|
|
64
83
|
}
|