@faubulous/mentor-rdf 2.6.1 → 2.7.0
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/dist/index.js +218 -214
- package/dist/index.js.map +4 -4
- package/dist/rdf/data-factory.d.ts +16 -0
- package/dist/rdf/rdf-data-factory.d.ts +7 -0
- package/dist/rdf/tests/helpers.d.ts +8 -0
- package/package.json +3 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as rdfjs from "@rdfjs/types";
|
|
2
2
|
/**
|
|
3
3
|
* An RDF/JS compliant NamedNode implementation.
|
|
4
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
5
|
+
* removed in the next major version.
|
|
4
6
|
*/
|
|
5
7
|
export declare class NamedNode implements rdfjs.NamedNode {
|
|
6
8
|
readonly termType: "NamedNode";
|
|
@@ -10,6 +12,8 @@ export declare class NamedNode implements rdfjs.NamedNode {
|
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* An RDF/JS compliant BlankNode implementation.
|
|
15
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
16
|
+
* removed in the next major version.
|
|
13
17
|
*/
|
|
14
18
|
export declare class BlankNode implements rdfjs.BlankNode {
|
|
15
19
|
readonly termType: "BlankNode";
|
|
@@ -19,6 +23,8 @@ export declare class BlankNode implements rdfjs.BlankNode {
|
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
25
|
* An RDF/JS compliant Literal implementation.
|
|
26
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
27
|
+
* removed in the next major version.
|
|
22
28
|
*/
|
|
23
29
|
export declare class Literal implements rdfjs.Literal {
|
|
24
30
|
readonly termType: "Literal";
|
|
@@ -30,6 +36,8 @@ export declare class Literal implements rdfjs.Literal {
|
|
|
30
36
|
}
|
|
31
37
|
/**
|
|
32
38
|
* An RDF/JS compliant Variable implementation.
|
|
39
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
40
|
+
* removed in the next major version.
|
|
33
41
|
*/
|
|
34
42
|
export declare class Variable implements rdfjs.Variable {
|
|
35
43
|
readonly termType: "Variable";
|
|
@@ -39,6 +47,8 @@ export declare class Variable implements rdfjs.Variable {
|
|
|
39
47
|
}
|
|
40
48
|
/**
|
|
41
49
|
* An RDF/JS compliant DefaultGraph implementation (singleton).
|
|
50
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
51
|
+
* removed in the next major version.
|
|
42
52
|
*/
|
|
43
53
|
export declare class DefaultGraph implements rdfjs.DefaultGraph {
|
|
44
54
|
readonly termType: "DefaultGraph";
|
|
@@ -47,6 +57,8 @@ export declare class DefaultGraph implements rdfjs.DefaultGraph {
|
|
|
47
57
|
}
|
|
48
58
|
/**
|
|
49
59
|
* An RDF/JS compliant Quad implementation.
|
|
60
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
61
|
+
* removed in the next major version.
|
|
50
62
|
*/
|
|
51
63
|
export declare class Quad implements rdfjs.Quad {
|
|
52
64
|
readonly termType: "Quad";
|
|
@@ -65,6 +77,8 @@ export declare class Quad implements rdfjs.Quad {
|
|
|
65
77
|
* and quads according to the RDF/JS specification.
|
|
66
78
|
*
|
|
67
79
|
* @see https://rdf.js.org/data-model-spec/
|
|
80
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
81
|
+
* removed in the next major version.
|
|
68
82
|
*/
|
|
69
83
|
export declare class DataFactory implements rdfjs.DataFactory<rdfjs.Quad, rdfjs.Quad> {
|
|
70
84
|
blankNodeCounter: number;
|
|
@@ -127,5 +141,7 @@ export declare class DataFactory implements rdfjs.DataFactory<rdfjs.Quad, rdfjs.
|
|
|
127
141
|
}
|
|
128
142
|
/**
|
|
129
143
|
* A default DataFactory instance for convenient use.
|
|
144
|
+
* @deprecated Use `rdf-data-factory`, which the store and the Mentor parsers use. This will be
|
|
145
|
+
* removed in the next major version.
|
|
130
146
|
*/
|
|
131
147
|
export declare const dataFactory: DataFactory;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataFactory } from 'rdf-data-factory';
|
|
2
|
+
/**
|
|
3
|
+
* The RDF/JS data factory mentor-rdf creates its terms with. It is the factory of
|
|
4
|
+
* `rdf-data-factory`, which the store (rdf-stores), the Mentor parsers and serializers use as
|
|
5
|
+
* well, so the terms of mentor-rdf compare equal to those of the store.
|
|
6
|
+
*/
|
|
7
|
+
export declare const RdfDataFactory: DataFactory<import("quadstore", { with: { "resolution-mode": "import" } }).Quad>;
|
|
@@ -21,6 +21,14 @@ export declare function readFile(filePath: string): Promise<string>;
|
|
|
21
21
|
* @returns A promise that resolves to the URI of the graph that was loaded.
|
|
22
22
|
*/
|
|
23
23
|
export declare function loadFile(store: Store, filePath: string, graphUri?: string, onQuad?: (quad: rdfjs.Quad) => void): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Get the ids the store gives the blank nodes of a Turtle file loaded into a graph, in the order
|
|
26
|
+
* their tokens are written: the id of the first `[` or `(` comes first.
|
|
27
|
+
* @param filePath Path to a Turtle file.
|
|
28
|
+
* @param graphUri The URI of the graph the file is loaded into.
|
|
29
|
+
* @returns The blank node ids.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getBlankNodeIds(filePath: string, graphUri: string): Promise<string[]>;
|
|
24
32
|
/**
|
|
25
33
|
* Create a RDF triple store from a string.
|
|
26
34
|
* @param filePath Path to a file containing RDF triples in Turtle or N3 format.
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"ontology",
|
|
11
11
|
"vocabulary"
|
|
12
12
|
],
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.7.0",
|
|
14
14
|
"private": false,
|
|
15
15
|
"author": {
|
|
16
16
|
"name": "Sebastian Faubel"
|
|
@@ -84,9 +84,10 @@
|
|
|
84
84
|
"parse-url": "^11.1.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@faubulous/mentor-rdf-parsers": "^2.
|
|
87
|
+
"@faubulous/mentor-rdf-parsers": "^2.3.0",
|
|
88
88
|
"memory-level": "^3.1.0",
|
|
89
89
|
"quadstore": "^15.4.1",
|
|
90
|
+
"rdf-data-factory": "^2.1.0",
|
|
90
91
|
"rdf-stores": "^2.8.0",
|
|
91
92
|
"rdflib": "^2.4.1",
|
|
92
93
|
"rdfxml-streaming-parser": "^3.3.0",
|