rdflib 2.2.21 → 2.2.22-b51259b5
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 +1 -1
- package/dist/rdflib.min.js.LICENSE.txt +9 -1
- package/dist/rdflib.min.js.map +1 -1
- package/esm/blank-node.js +61 -114
- package/esm/class-order.js +1 -1
- package/esm/collection.js +70 -128
- package/esm/convert.js +1 -2
- package/esm/default-graph.js +14 -48
- package/esm/empty.js +8 -39
- package/esm/factories/canonical-data-factory.js +33 -65
- package/esm/factories/extended-term-factory.js +18 -25
- package/esm/factories/factory-types.js +3 -2
- package/esm/factories/rdflib-data-factory.js +9 -19
- package/esm/fetcher.js +1341 -1854
- package/esm/formula.js +639 -846
- package/esm/index.js +40 -76
- package/esm/jsonldparser.js +24 -49
- package/esm/jsonparser.js +1 -8
- package/esm/lists.js +47 -110
- package/esm/literal.js +120 -189
- package/esm/log.js +7 -7
- package/esm/n3parser.js +1015 -1412
- package/esm/named-node.js +70 -119
- package/esm/namespace.js +2 -5
- package/esm/node-internal.js +73 -110
- package/esm/node.js +2 -7
- package/esm/parse.js +12 -19
- package/esm/patch-parser.js +10 -30
- package/esm/query-to-sparql.js +0 -18
- package/esm/query.js +63 -147
- package/esm/rdfaparser.js +794 -997
- package/esm/rdfxmlparser.js +347 -461
- package/esm/serialize.js +9 -27
- package/esm/serializer.js +820 -1049
- package/esm/sparql-to-query.js +44 -134
- package/esm/statement.js +54 -85
- package/esm/store.js +830 -1103
- package/esm/types.js +22 -21
- package/esm/update-manager.js +869 -1106
- package/esm/updates-via.js +104 -161
- package/esm/uri.js +9 -53
- package/esm/utils/default-graph-uri.js +3 -2
- package/esm/utils/termValue.js +0 -1
- package/esm/utils/terms.js +19 -21
- package/esm/utils-js.js +20 -61
- package/esm/utils.js +10 -21
- package/esm/variable.js +32 -78
- package/esm/xsd.js +2 -2
- package/lib/blank-node.js +60 -113
- package/lib/class-order.js +1 -2
- package/lib/collection.js +69 -131
- package/lib/convert.js +3 -9
- package/lib/default-graph.js +13 -52
- package/lib/empty.js +8 -43
- package/lib/factories/canonical-data-factory.js +35 -79
- package/lib/factories/extended-term-factory.js +18 -32
- package/lib/factories/factory-types.d.ts +6 -6
- package/lib/factories/factory-types.js +1 -4
- package/lib/factories/rdflib-data-factory.js +9 -23
- package/lib/fetcher.d.ts +6 -6
- package/lib/fetcher.js +1370 -1843
- package/lib/formula.js +640 -855
- package/lib/index.js +66 -152
- package/lib/jsonldparser.js +23 -53
- package/lib/jsonparser.js +1 -10
- package/lib/lists.js +55 -112
- package/lib/literal.js +120 -195
- package/lib/log.d.ts +0 -6
- package/lib/log.js +7 -8
- package/lib/n3parser.js +1030 -1436
- package/lib/named-node.js +69 -126
- package/lib/namespace.js +2 -7
- package/lib/node-internal.js +74 -107
- package/lib/node.js +2 -12
- package/lib/parse.d.ts +1 -1
- package/lib/parse.js +12 -32
- package/lib/patch-parser.js +11 -34
- package/lib/query-to-sparql.js +0 -23
- package/lib/query.js +62 -167
- package/lib/rdfaparser.js +796 -1009
- package/lib/rdfxmlparser.js +349 -466
- package/lib/serialize.js +11 -37
- package/lib/serializer.js +823 -1064
- package/lib/sparql-to-query.js +42 -167
- package/lib/statement.js +55 -91
- package/lib/store.d.ts +1 -1
- package/lib/store.js +850 -1112
- package/lib/tf-types.d.ts +4 -4
- package/lib/types.d.ts +8 -8
- package/lib/types.js +23 -23
- package/lib/update-manager.d.ts +1 -1
- package/lib/update-manager.js +865 -1103
- package/lib/updates-via.js +105 -164
- package/lib/uri.js +8 -61
- package/lib/utils/default-graph-uri.js +3 -5
- package/lib/utils/termValue.js +0 -2
- package/lib/utils/terms.js +19 -40
- package/lib/utils-js.js +23 -88
- package/lib/utils.js +10 -27
- package/lib/variable.js +34 -85
- package/lib/xsd-internal.js +0 -3
- package/lib/xsd.js +2 -6
- package/package.json +35 -35
- package/src/fetcher.ts +2 -2
- package/src/update-manager.ts +12 -7
- package/changes.txt +0 -59
package/lib/tf-types.d.ts
CHANGED
|
@@ -142,10 +142,10 @@ export interface RdfJsDataFactory {
|
|
|
142
142
|
supports: SupportTable;
|
|
143
143
|
}
|
|
144
144
|
/** A RDF/JS spec Subject */
|
|
145
|
-
export
|
|
145
|
+
export type Quad_Subject = NamedNode | BlankNode | Variable;
|
|
146
146
|
/** A RDF/JS spec Predicate */
|
|
147
|
-
export
|
|
147
|
+
export type Quad_Predicate = NamedNode | Variable;
|
|
148
148
|
/** A RDF/JS spec Object */
|
|
149
|
-
export
|
|
149
|
+
export type Quad_Object = NamedNode | BlankNode | Literal | Variable | Term;
|
|
150
150
|
/** A RDF/JS spec Graph */
|
|
151
|
-
export
|
|
151
|
+
export type Quad_Graph = NamedNode | DefaultGraph | BlankNode | Variable;
|
package/lib/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const DefaultGraphTermType: "DefaultGraph";
|
|
|
19
19
|
export declare const CollectionTermType: "Collection";
|
|
20
20
|
export declare const EmptyTermType: "Empty";
|
|
21
21
|
export declare const GraphTermType: "Graph";
|
|
22
|
-
export
|
|
22
|
+
export type TermType = typeof NamedNodeTermType | typeof BlankNodeTermType | typeof LiteralTermType | typeof VariableTermType | typeof DefaultGraphTermType | typeof CollectionTermType | typeof EmptyTermType | typeof GraphTermType;
|
|
23
23
|
export declare const HTMLContentType: "text/html";
|
|
24
24
|
export declare const JSONLDContentType: "application/ld+json";
|
|
25
25
|
export declare const N3ContentType: "text/n3";
|
|
@@ -36,9 +36,9 @@ export declare const XHTMLContentType: "application/xhtml+xml";
|
|
|
36
36
|
/**
|
|
37
37
|
* A valid mime type header
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export type ContentType = typeof RDFXMLContentType | typeof HTMLContentType | typeof JSONLDContentType | typeof N3ContentType | typeof N3LegacyContentType | typeof NQuadsAltContentType | typeof NQuadsContentType | typeof SPARQLUpdateContentType | typeof SPARQLUpdateSingleMatchContentType | typeof TurtleContentType | typeof TurtleLegacyContentType | typeof XHTMLContentType;
|
|
40
40
|
/** A type for values that serves as inputs */
|
|
41
|
-
export
|
|
41
|
+
export type ValueType = Term | Node | Date | string | number | boolean | undefined | null | Collection;
|
|
42
42
|
/**
|
|
43
43
|
* In this project, there exist two types for the same kind of RDF concept.
|
|
44
44
|
* We have RDF/JS spec types (standardized, generic), and RDFlib types (internal, specific).
|
|
@@ -48,18 +48,18 @@ export declare type ValueType = Term | Node | Date | string | number | boolean |
|
|
|
48
48
|
* Variables are missing, and the statement requires specific types of terms (e.g. NamedNode instead of Term).
|
|
49
49
|
*/
|
|
50
50
|
/** An RDF/JS Subject */
|
|
51
|
-
export
|
|
51
|
+
export type SubjectType = RDFlibBlankNode | RDFlibNamedNode | RDFlibVariable;
|
|
52
52
|
/** An RDF/JS Predicate */
|
|
53
|
-
export
|
|
53
|
+
export type PredicateType = RDFlibNamedNode | RDFlibVariable;
|
|
54
54
|
/** An RDF/JS Object */
|
|
55
|
-
export
|
|
55
|
+
export type ObjectType = RDFlibNamedNode | RDFlibLiteral | Collection | RDFlibBlankNode | RDFlibVariable | Empty;
|
|
56
56
|
/** An RDF/JS Graph */
|
|
57
|
-
export
|
|
57
|
+
export type GraphType = RDFlibDefaultGraph | RDFlibNamedNode | RDFlibVariable;
|
|
58
58
|
export interface Bindings {
|
|
59
59
|
[id: string]: Term;
|
|
60
60
|
}
|
|
61
61
|
/** All the types that a .fromValue() method might return */
|
|
62
|
-
export
|
|
62
|
+
export type FromValueReturns<C extends Node = any> = Term | undefined | null | Collection<C>;
|
|
63
63
|
export interface IRDFlibDataFactory extends DataFactory<RDFlibNamedNode | RDFlibBlankNode | RDFlibLiteral | Collection | Statement> {
|
|
64
64
|
fetcher: (store: IndexedFormula, options: any) => Fetcher;
|
|
65
65
|
lit: (val: string, lang?: string, dt?: NamedNode) => RDFlibLiteral;
|
package/lib/types.js
CHANGED
|
@@ -4,50 +4,50 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.XHTMLContentType = exports.VariableTermType = exports.TurtleLegacyContentType = exports.TurtleContentType = exports.SPARQLUpdateSingleMatchContentType = exports.SPARQLUpdateContentType = exports.RDFXMLContentType = exports.NamedNodeTermType = exports.NTriplesContentType = exports.NQuadsContentType = exports.NQuadsAltContentType = exports.N3LegacyContentType = exports.N3ContentType = exports.LiteralTermType = exports.JSONLDContentType = exports.HTMLContentType = exports.GraphTermType = exports.EmptyTermType = exports.DefaultGraphTermType = exports.CollectionTermType = exports.BlankNodeTermType = void 0;
|
|
7
|
-
|
|
7
|
+
const NamedNodeTermType = "NamedNode";
|
|
8
8
|
exports.NamedNodeTermType = NamedNodeTermType;
|
|
9
|
-
|
|
9
|
+
const BlankNodeTermType = "BlankNode";
|
|
10
10
|
exports.BlankNodeTermType = BlankNodeTermType;
|
|
11
|
-
|
|
11
|
+
const LiteralTermType = "Literal";
|
|
12
12
|
exports.LiteralTermType = LiteralTermType;
|
|
13
|
-
|
|
13
|
+
const VariableTermType = "Variable";
|
|
14
14
|
exports.VariableTermType = VariableTermType;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const DefaultGraphTermType = "DefaultGraph";
|
|
16
|
+
// Non-RDF/JS types:
|
|
17
17
|
exports.DefaultGraphTermType = DefaultGraphTermType;
|
|
18
|
-
|
|
18
|
+
const CollectionTermType = "Collection";
|
|
19
19
|
exports.CollectionTermType = CollectionTermType;
|
|
20
|
-
|
|
20
|
+
const EmptyTermType = "Empty";
|
|
21
21
|
exports.EmptyTermType = EmptyTermType;
|
|
22
|
-
|
|
22
|
+
const GraphTermType = "Graph";
|
|
23
23
|
exports.GraphTermType = GraphTermType;
|
|
24
|
-
|
|
24
|
+
const HTMLContentType = "text/html";
|
|
25
25
|
exports.HTMLContentType = HTMLContentType;
|
|
26
|
-
|
|
26
|
+
const JSONLDContentType = "application/ld+json";
|
|
27
27
|
exports.JSONLDContentType = JSONLDContentType;
|
|
28
|
-
|
|
28
|
+
const N3ContentType = "text/n3";
|
|
29
29
|
exports.N3ContentType = N3ContentType;
|
|
30
|
-
|
|
30
|
+
const N3LegacyContentType = "application/n3";
|
|
31
31
|
exports.N3LegacyContentType = N3LegacyContentType;
|
|
32
|
-
|
|
32
|
+
const NQuadsAltContentType = "application/nquads";
|
|
33
33
|
exports.NQuadsAltContentType = NQuadsAltContentType;
|
|
34
|
-
|
|
34
|
+
const NQuadsContentType = "application/n-quads";
|
|
35
35
|
exports.NQuadsContentType = NQuadsContentType;
|
|
36
|
-
|
|
36
|
+
const NTriplesContentType = "application/n-triples";
|
|
37
37
|
exports.NTriplesContentType = NTriplesContentType;
|
|
38
|
-
|
|
38
|
+
const RDFXMLContentType = "application/rdf+xml";
|
|
39
39
|
exports.RDFXMLContentType = RDFXMLContentType;
|
|
40
|
-
|
|
40
|
+
const SPARQLUpdateContentType = "application/sparql-update";
|
|
41
41
|
exports.SPARQLUpdateContentType = SPARQLUpdateContentType;
|
|
42
|
-
|
|
42
|
+
const SPARQLUpdateSingleMatchContentType = "application/sparql-update-single-match";
|
|
43
43
|
exports.SPARQLUpdateSingleMatchContentType = SPARQLUpdateSingleMatchContentType;
|
|
44
|
-
|
|
44
|
+
const TurtleContentType = "text/turtle";
|
|
45
45
|
exports.TurtleContentType = TurtleContentType;
|
|
46
|
-
|
|
46
|
+
const TurtleLegacyContentType = "application/x-turtle";
|
|
47
47
|
exports.TurtleLegacyContentType = TurtleLegacyContentType;
|
|
48
|
-
|
|
48
|
+
const XHTMLContentType = "application/xhtml+xml";
|
|
49
|
+
|
|
49
50
|
/**
|
|
50
51
|
* A valid mime type header
|
|
51
52
|
*/
|
|
52
|
-
|
|
53
53
|
exports.XHTMLContentType = XHTMLContentType;
|
package/lib/update-manager.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { BlankNode, NamedNode, Quad, Quad_Subject, Term } from './tf-types';
|
|
|
6
6
|
interface UpdateManagerFormula extends IndexedFormula {
|
|
7
7
|
fetcher: Fetcher;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
type CallBackFunction = (uri: string, ok: boolean, message: string, response: Error | Response) => {} | void;
|
|
10
10
|
/**
|
|
11
11
|
* The UpdateManager is a helper object for a store.
|
|
12
12
|
* Just as a Fetcher provides the store with the ability to read and write,
|