rdflib 2.2.9 → 2.2.10-4fa7e876
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/rdflib.min.js +6 -6
- package/dist/rdflib.min.js.map +1 -1
- package/esm/n3parser.js +1330 -1286
- package/esm/rdfxmlparser.js +429 -412
- package/esm/serialize.js +1 -1
- package/esm/serializer.js +849 -821
- package/esm/xsd.js +9 -14
- package/lib/convert.d.ts +2 -0
- package/lib/jsonldparser.d.ts +13 -0
- package/lib/jsonparser.d.ts +4 -0
- package/lib/log.d.ts +15 -0
- package/lib/n3parser.d.ts +62 -0
- package/lib/n3parser.js +1334 -1289
- package/lib/patch-parser.d.ts +3 -0
- package/lib/query-to-sparql.d.ts +1 -0
- package/lib/query.d.ts +27 -0
- package/lib/rdfaparser.d.ts +78 -0
- package/lib/rdfxmlparser.d.ts +60 -0
- package/lib/rdfxmlparser.js +430 -413
- package/lib/serialize.d.ts +1 -1
- package/lib/serialize.js +1 -1
- package/lib/serializer.d.ts +54 -0
- package/lib/serializer.js +851 -824
- package/lib/sparql-to-query.d.ts +6 -0
- package/lib/updates-via.d.ts +26 -0
- package/lib/utils-js.d.ts +50 -0
- package/lib/xsd-internal.d.ts +11 -0
- package/lib/xsd.d.ts +19 -0
- package/lib/xsd.js +8 -14
- package/package.json +18 -18
- package/src/n3parser.js +1114 -1110
- package/src/rdfxmlparser.js +22 -21
- package/src/serialize.ts +3 -3
- package/src/serializer.js +74 -62
- package/src/xsd.js +16 -14
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @SPARQL: SPARQL text that is converted to a query object which is returned.
|
|
3
|
+
* @testMode: testing flag. Prevents loading of sources.
|
|
4
|
+
*/
|
|
5
|
+
export default function SPARQLToQuery(SPARQL: any, testMode: any, kb: any): false | Query;
|
|
6
|
+
import { Query } from "./query";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class UpdatesSocket {
|
|
2
|
+
constructor(parent: any, via: any);
|
|
3
|
+
parent: any;
|
|
4
|
+
via: any;
|
|
5
|
+
connected: boolean;
|
|
6
|
+
pending: {};
|
|
7
|
+
subscribed: {};
|
|
8
|
+
socket: {};
|
|
9
|
+
_decode(q: any): {};
|
|
10
|
+
_send(method: any, uri: any, data: any): any;
|
|
11
|
+
_subscribe(uri: any): any;
|
|
12
|
+
onClose(e: any): {};
|
|
13
|
+
onError(e: any): void;
|
|
14
|
+
onMessage(e: any): any;
|
|
15
|
+
onOpen(e: any): any[];
|
|
16
|
+
subscribe(uri: any): any;
|
|
17
|
+
}
|
|
18
|
+
export class UpdatesVia {
|
|
19
|
+
constructor(fetcher: any);
|
|
20
|
+
fetcher: any;
|
|
21
|
+
graph: {};
|
|
22
|
+
via: {};
|
|
23
|
+
onHeaders(d: any): boolean;
|
|
24
|
+
onUpdate(uri: any, d: any): any;
|
|
25
|
+
register(via: any, uri: any): any;
|
|
26
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export function mediaTypeClass(mediaType: any): NamedNode;
|
|
2
|
+
export function linkRelationProperty(relation: any): NamedNode;
|
|
3
|
+
/**
|
|
4
|
+
* Adds callback functionality to an object.
|
|
5
|
+
* Callback functions are indexed by a 'hook' string.
|
|
6
|
+
* They return true if they want to be called again.
|
|
7
|
+
* @method callbackify
|
|
8
|
+
* @param obj {Object}
|
|
9
|
+
* @param callbacks {Array<string>}
|
|
10
|
+
*/
|
|
11
|
+
export function callbackify(obj: any, callbacks: Array<string>): void;
|
|
12
|
+
/**
|
|
13
|
+
* Returns a DOM parser based on current runtime environment.
|
|
14
|
+
*/
|
|
15
|
+
export function DOMParserFactory(): any;
|
|
16
|
+
export function domToString(node: any, options: any): string;
|
|
17
|
+
export function dumpNode(node: any, options: any, selfClosing: any, skipAttributes: any): string;
|
|
18
|
+
export function dtstamp(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Compares statements (heavy comparison for repeatable canonical ordering)
|
|
21
|
+
*/
|
|
22
|
+
export function heavyCompare(x: any, y: any, g: any, uriMap: any): any;
|
|
23
|
+
export function heavyCompareSPO(x: any, y: any, g: any, uriMap: any): any;
|
|
24
|
+
/**
|
|
25
|
+
* Defines a simple debugging function
|
|
26
|
+
* @method output
|
|
27
|
+
* @param o {String}
|
|
28
|
+
*/
|
|
29
|
+
export function output(o: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Returns a DOM from parsex XML.
|
|
32
|
+
*/
|
|
33
|
+
export function parseXML(str: any, options: any): any;
|
|
34
|
+
/**
|
|
35
|
+
* Removes all statements equal to x from a
|
|
36
|
+
*/
|
|
37
|
+
export function RDFArrayRemove(a: any, x: any): void;
|
|
38
|
+
export function string_startswith(str: any, pref: any): boolean;
|
|
39
|
+
export function stackString(e: any): string;
|
|
40
|
+
import NamedNode from "./named-node";
|
|
41
|
+
import log from "./log";
|
|
42
|
+
import * as uri from "./uri";
|
|
43
|
+
export namespace string {
|
|
44
|
+
export { stringTemplate as template };
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* C++, python style %s -> subs
|
|
48
|
+
*/
|
|
49
|
+
declare function stringTemplate(base: any, subs: any): string;
|
|
50
|
+
export { log, uri };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
const boolean: NamedNode;
|
|
3
|
+
const dateTime: NamedNode;
|
|
4
|
+
const decimal: NamedNode;
|
|
5
|
+
const double: NamedNode;
|
|
6
|
+
const integer: NamedNode;
|
|
7
|
+
const langString: NamedNode;
|
|
8
|
+
const string: NamedNode;
|
|
9
|
+
}
|
|
10
|
+
export default _default;
|
|
11
|
+
import NamedNode from "./named-node";
|
package/lib/xsd.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function createXSD(localFactory?: import("./factories/factory-types").DataFactory<import("./factories/factory-types").DefaultFactoryTypes, import("./factories/factory-types").Indexable>): {
|
|
2
|
+
boolean: import("./named-node").default;
|
|
3
|
+
dateTime: import("./named-node").default;
|
|
4
|
+
decimal: import("./named-node").default;
|
|
5
|
+
double: import("./named-node").default;
|
|
6
|
+
integer: import("./named-node").default;
|
|
7
|
+
langString: import("./named-node").default;
|
|
8
|
+
string: import("./named-node").default;
|
|
9
|
+
};
|
|
10
|
+
export default defaultXSD;
|
|
11
|
+
declare namespace defaultXSD {
|
|
12
|
+
const boolean: import("./named-node").default;
|
|
13
|
+
const dateTime: import("./named-node").default;
|
|
14
|
+
const decimal: import("./named-node").default;
|
|
15
|
+
const double: import("./named-node").default;
|
|
16
|
+
const integer: import("./named-node").default;
|
|
17
|
+
const langString: import("./named-node").default;
|
|
18
|
+
const string: import("./named-node").default;
|
|
19
|
+
}
|
package/lib/xsd.js
CHANGED
|
@@ -8,25 +8,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.createXSD = createXSD;
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
|
|
13
11
|
var _canonicalDataFactory = _interopRequireDefault(require("./factories/canonical-data-factory"));
|
|
14
12
|
|
|
15
13
|
function createXSD() {
|
|
16
14
|
var localFactory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _canonicalDataFactory.default;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
return {
|
|
16
|
+
boolean: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean"),
|
|
17
|
+
dateTime: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#dateTime"),
|
|
18
|
+
decimal: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#decimal"),
|
|
19
|
+
double: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#double"),
|
|
20
|
+
integer: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer"),
|
|
21
|
+
langString: localFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),
|
|
22
|
+
string: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#string")
|
|
20
23
|
};
|
|
21
|
-
|
|
22
|
-
XSD.boolean = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#boolean');
|
|
23
|
-
XSD.dateTime = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#dateTime');
|
|
24
|
-
XSD.decimal = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#decimal');
|
|
25
|
-
XSD.double = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#double');
|
|
26
|
-
XSD.integer = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#integer');
|
|
27
|
-
XSD.langString = localFactory.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString');
|
|
28
|
-
XSD.string = localFactory.namedNode('http://www.w3.org/2001/XMLSchema#string');
|
|
29
|
-
return XSD;
|
|
30
24
|
}
|
|
31
25
|
|
|
32
26
|
var defaultXSD = createXSD(_canonicalDataFactory.default);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rdflib",
|
|
3
3
|
"description": "an RDF library for node.js. Suitable for client and server side.",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.10-4fa7e876",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=6.0"
|
|
7
7
|
},
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"homepage": "http://github.com/linkeddata/rdflib.js",
|
|
45
45
|
"bugs": "http://github.com/linkeddata/rdflib.js/issues",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@babel/runtime": "^7.
|
|
48
|
-
"async": "^3.2.
|
|
47
|
+
"@babel/runtime": "^7.16.0",
|
|
48
|
+
"async": "^3.2.2",
|
|
49
49
|
"cross-fetch": "^3.1.4",
|
|
50
50
|
"jsonld": "^5.2.0",
|
|
51
51
|
"n3": "^1.11.1",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"xmldom": "^0.6.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/cli": "^7.
|
|
57
|
-
"@babel/core": "^7.
|
|
58
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
59
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
60
|
-
"@babel/preset-env": "^7.
|
|
61
|
-
"@babel/preset-typescript": "^7.
|
|
62
|
-
"@babel/register": "^7.
|
|
56
|
+
"@babel/cli": "^7.16.0",
|
|
57
|
+
"@babel/core": "^7.16.0",
|
|
58
|
+
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
59
|
+
"@babel/plugin-transform-runtime": "^7.16.0",
|
|
60
|
+
"@babel/preset-env": "^7.16.0",
|
|
61
|
+
"@babel/preset-typescript": "^7.16.0",
|
|
62
|
+
"@babel/register": "^7.16.0",
|
|
63
63
|
"@types/chai": "^4.2.22",
|
|
64
64
|
"@types/dirty-chai": "^2.0.2",
|
|
65
65
|
"@types/express": "^4.17.13",
|
|
@@ -67,32 +67,32 @@
|
|
|
67
67
|
"@types/mocha": "^9.0.0",
|
|
68
68
|
"@types/rdf-js": "^4.0.1",
|
|
69
69
|
"@types/sinon-chai": "^3.2.5",
|
|
70
|
-
"babel-loader": "^8.2.
|
|
70
|
+
"babel-loader": "^8.2.3",
|
|
71
71
|
"chai": "^4.3.4",
|
|
72
72
|
"diff": "^5.0.0",
|
|
73
73
|
"dirty-chai": "^2.0.1",
|
|
74
74
|
"eslint": "^7.32.0",
|
|
75
75
|
"fs-grep": "^0.0.5",
|
|
76
76
|
"mocha": "^9.1.3",
|
|
77
|
-
"nock": "^13.1.
|
|
78
|
-
"node-fetch": "^2.6.
|
|
77
|
+
"nock": "^13.1.4",
|
|
78
|
+
"node-fetch": "^2.6.6",
|
|
79
79
|
"node-mkdirp": "0.0.1",
|
|
80
80
|
"rimraf": "^3.0.2",
|
|
81
|
-
"sinon": "^
|
|
81
|
+
"sinon": "^12.0.1",
|
|
82
82
|
"sinon-chai": "^3.7.0",
|
|
83
83
|
"source-map-loader": "^1.1.3",
|
|
84
|
-
"typedoc": "^0.22.
|
|
84
|
+
"typedoc": "^0.22.7",
|
|
85
85
|
"typescript": "^4.4.4",
|
|
86
86
|
"webpack": "^4.46.0",
|
|
87
|
-
"webpack-cli": "^4.9.
|
|
88
|
-
"webpack-dev-server": "^4.
|
|
87
|
+
"webpack-cli": "^4.9.1",
|
|
88
|
+
"webpack-dev-server": "^4.4.0",
|
|
89
89
|
"wrapper-webpack-plugin": "^2.1.0"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "babel src --extensions \".ts,.js\" -d lib",
|
|
93
93
|
"build:esm": "babel src --extensions \".ts,.js\" --env-name esm -d esm",
|
|
94
94
|
"build:browser": "webpack --progress",
|
|
95
|
-
"build:types": "tsc --emitDeclarationOnly -d --moduleResolution node --declarationDir lib
|
|
95
|
+
"build:types": "tsc --emitDeclarationOnly -d --moduleResolution node --declarationDir lib",
|
|
96
96
|
"doc": "typedoc --out ./doc ./src/index.ts --excludePrivate --excludeInternal --tsconfig ./tsconfig.json",
|
|
97
97
|
"ignore:prepublishOnly": "npm ci && npm run build && npm run build:types && npm run build:browser && npm run build:esm",
|
|
98
98
|
"postversion": "git push --follow-tags",
|