rdflib 2.2.10 → 2.2.12-5f141ca2
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/.babelrc +0 -0
- package/README.md +1 -0
- package/changes.txt +0 -0
- package/dist/rdflib.min.js +62 -0
- package/dist/rdflib.min.js.map +1 -0
- package/esm/blank-node.js +137 -0
- package/esm/class-order.js +12 -0
- package/esm/collection.js +173 -0
- package/esm/convert.js +61 -0
- package/esm/default-graph.js +57 -0
- package/esm/empty.js +46 -0
- package/esm/factories/canonical-data-factory.js +204 -0
- package/esm/factories/extended-term-factory.js +55 -0
- package/esm/factories/factory-types.js +18 -0
- package/esm/factories/rdflib-data-factory.js +55 -0
- package/esm/fetcher.js +2180 -0
- package/esm/formula.js +987 -0
- package/esm/index.js +64 -0
- package/esm/jsonldparser.js +122 -0
- package/esm/jsonparser.js +60 -0
- package/esm/literal.js +236 -0
- package/esm/log.js +13 -0
- package/esm/n3parser.js +1854 -0
- package/esm/named-node.js +154 -0
- package/esm/namespace.js +17 -0
- package/esm/node-internal.js +151 -0
- package/esm/node.js +46 -0
- package/esm/parse.js +138 -0
- package/esm/patch-parser.js +110 -0
- package/esm/query-to-sparql.js +83 -0
- package/esm/query.js +620 -0
- package/esm/rdfaparser.js +1197 -0
- package/esm/rdfxmlparser.js +588 -0
- package/esm/serialize.js +95 -0
- package/esm/serializer.js +1162 -0
- package/esm/sparql-to-query.js +566 -0
- package/esm/statement.js +128 -0
- package/esm/store.js +1306 -0
- package/esm/tf-types.js +1 -0
- package/esm/types.js +25 -0
- package/esm/update-manager.js +1252 -0
- package/esm/updates-via.js +197 -0
- package/esm/uri.js +245 -0
- package/esm/utils/default-graph-uri.js +4 -0
- package/esm/utils/termValue.js +8 -0
- package/esm/utils/terms.js +72 -0
- package/esm/utils-js.js +348 -0
- package/esm/utils.js +103 -0
- package/esm/variable.js +101 -0
- package/esm/xsd-internal.js +10 -0
- package/esm/xsd.js +15 -0
- package/lib/blank-node.d.ts +44 -0
- package/lib/blank-node.js +0 -0
- package/lib/class-order.d.ts +7 -0
- package/lib/class-order.js +0 -0
- package/lib/collection.d.ts +65 -0
- package/lib/collection.js +0 -0
- package/lib/convert.d.ts +2 -0
- package/lib/convert.js +0 -0
- package/lib/default-graph.d.ts +13 -0
- package/lib/default-graph.js +0 -0
- package/lib/empty.d.ts +11 -0
- package/lib/empty.js +0 -0
- package/lib/factories/canonical-data-factory.d.ts +6 -0
- package/lib/factories/canonical-data-factory.js +0 -0
- package/lib/factories/extended-term-factory.d.ts +13 -0
- package/lib/factories/extended-term-factory.js +0 -0
- package/lib/factories/factory-types.d.ts +67 -0
- package/lib/factories/factory-types.js +0 -0
- package/lib/factories/rdflib-data-factory.d.ts +4 -0
- package/lib/factories/rdflib-data-factory.js +0 -0
- package/lib/fetcher.d.ts +443 -0
- package/lib/fetcher.js +3 -2
- package/lib/formula.d.ts +327 -0
- package/lib/formula.js +0 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.js +0 -0
- package/lib/jsonldparser.d.ts +13 -0
- package/lib/jsonldparser.js +0 -0
- package/lib/jsonparser.d.ts +4 -0
- package/lib/jsonparser.js +0 -0
- package/lib/literal.d.ts +67 -0
- package/lib/literal.js +0 -0
- package/lib/log.d.ts +15 -0
- package/lib/log.js +0 -0
- package/lib/n3parser.d.ts +62 -0
- package/lib/n3parser.js +1334 -1289
- package/lib/named-node.d.ts +44 -0
- package/lib/named-node.js +0 -0
- package/lib/namespace.d.ts +7 -0
- package/lib/namespace.js +0 -0
- package/lib/node-internal.d.ts +63 -0
- package/lib/node-internal.js +0 -0
- package/lib/node.d.ts +2 -0
- package/lib/node.js +0 -0
- package/lib/parse.d.ts +16 -0
- package/lib/parse.js +0 -0
- package/lib/patch-parser.d.ts +3 -0
- package/lib/patch-parser.js +0 -0
- package/lib/query-to-sparql.d.ts +1 -0
- package/lib/query-to-sparql.js +0 -0
- package/lib/query.d.ts +27 -0
- package/lib/query.js +0 -0
- package/lib/rdfaparser.d.ts +78 -0
- package/lib/rdfaparser.js +0 -0
- package/lib/rdfxmlparser.d.ts +60 -0
- package/lib/rdfxmlparser.js +430 -413
- package/lib/serialize.d.ts +23 -0
- 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/sparql-to-query.js +0 -0
- package/lib/statement.d.ts +55 -0
- package/lib/statement.js +0 -0
- package/lib/store.d.ts +302 -0
- package/lib/store.js +0 -0
- package/lib/tf-types.d.ts +151 -0
- package/lib/tf-types.js +0 -0
- package/lib/types.d.ts +68 -0
- package/lib/types.js +0 -0
- package/lib/update-manager.d.ts +198 -0
- package/lib/update-manager.js +0 -0
- package/lib/updates-via.d.ts +26 -0
- package/lib/updates-via.js +0 -0
- package/lib/uri.d.ts +33 -0
- package/lib/uri.js +0 -0
- package/lib/utils/default-graph-uri.d.ts +3 -0
- package/lib/utils/default-graph-uri.js +0 -0
- package/lib/utils/termValue.d.ts +3 -0
- package/lib/utils/termValue.js +0 -0
- package/lib/utils/terms.d.ts +33 -0
- package/lib/utils/terms.js +0 -0
- package/lib/utils-js.d.ts +50 -0
- package/lib/utils-js.js +0 -0
- package/lib/utils.d.ts +20 -0
- package/lib/utils.js +0 -0
- package/lib/variable.d.ts +29 -0
- package/lib/variable.js +0 -0
- package/lib/xsd-internal.d.ts +11 -0
- package/lib/xsd-internal.js +0 -0
- package/lib/xsd.d.ts +19 -0
- package/lib/xsd.js +8 -14
- package/package.json +3 -3
- package/src/blank-node.ts +0 -0
- package/src/class-order.ts +0 -0
- package/src/collection.ts +0 -0
- package/src/convert.js +0 -0
- package/src/default-graph.ts +0 -0
- package/src/empty.ts +0 -0
- package/src/factories/canonical-data-factory.ts +0 -0
- package/src/factories/extended-term-factory.ts +0 -0
- package/src/factories/factory-types.ts +0 -0
- package/src/factories/rdflib-data-factory.ts +0 -0
- package/src/fetcher.ts +6 -3
- package/src/formula.ts +0 -0
- package/src/index.ts +0 -0
- package/src/jsonldparser.js +0 -0
- package/src/jsonparser.js +0 -0
- package/src/literal.ts +0 -0
- package/src/log.js +0 -0
- package/src/n3parser.js +1114 -1110
- package/src/named-node.ts +0 -0
- package/src/namespace.ts +0 -0
- package/src/node-internal.ts +0 -0
- package/src/node.ts +0 -0
- package/src/parse.ts +0 -0
- package/src/patch-parser.js +0 -0
- package/src/query-to-sparql.js +0 -0
- package/src/query.js +0 -0
- package/src/rdfaparser.js +0 -0
- package/src/rdfxmlparser.js +22 -21
- package/src/serialize.ts +3 -3
- package/src/serializer.js +74 -62
- package/src/sparql-to-query.js +0 -0
- package/src/statement.ts +0 -0
- package/src/store.ts +0 -0
- package/src/tf-types.ts +0 -0
- package/src/types.ts +0 -0
- package/src/update-manager.ts +0 -0
- package/src/updates-via.js +0 -0
- package/src/uri.ts +0 -0
- package/src/utils/default-graph-uri.ts +0 -0
- package/src/utils/termValue.ts +0 -0
- package/src/utils/terms.ts +0 -0
- package/src/utils-js.js +0 -0
- package/src/utils.ts +0 -0
- package/src/variable.ts +0 -0
- package/src/xsd-internal.js +0 -0
- package/src/xsd.js +16 -14
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Formula from './formula';
|
|
2
|
+
import { ContentType } from './types';
|
|
3
|
+
import IndexedFormula from './store';
|
|
4
|
+
import { BlankNode, NamedNode } from './tf-types';
|
|
5
|
+
/**
|
|
6
|
+
* Serialize to the appropriate format
|
|
7
|
+
*/
|
|
8
|
+
export default function serialize(
|
|
9
|
+
/** The graph or nodes that should be serialized */
|
|
10
|
+
target: Formula | NamedNode | BlankNode,
|
|
11
|
+
/** The store */
|
|
12
|
+
kb?: IndexedFormula, base?: unknown,
|
|
13
|
+
/**
|
|
14
|
+
* The mime type.
|
|
15
|
+
* Defaults to Turtle.
|
|
16
|
+
*/
|
|
17
|
+
contentType?: string | ContentType, callback?: (err: Error | undefined | null, result?: string) => any, options?: {
|
|
18
|
+
/**
|
|
19
|
+
* A string of letters, each of which set an options
|
|
20
|
+
* e.g. `deinprstux`
|
|
21
|
+
*/
|
|
22
|
+
flags: string;
|
|
23
|
+
}): string | undefined;
|
package/lib/serialize.js
CHANGED
|
@@ -36,7 +36,7 @@ contentType, callback, options) {
|
|
|
36
36
|
var opts = options || {};
|
|
37
37
|
contentType = contentType || _types.TurtleContentType; // text/n3 if complex?
|
|
38
38
|
|
|
39
|
-
var documentString =
|
|
39
|
+
var documentString = undefined;
|
|
40
40
|
|
|
41
41
|
try {
|
|
42
42
|
var sz = (0, _serializer.default)(kb);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export default function createSerializer(store: any): Serializer;
|
|
2
|
+
export class Serializer {
|
|
3
|
+
constructor(store: any);
|
|
4
|
+
flags: string;
|
|
5
|
+
base: any;
|
|
6
|
+
prefixes: string[];
|
|
7
|
+
namespaces: any[];
|
|
8
|
+
namespacesUsed: any[];
|
|
9
|
+
keywords: string[];
|
|
10
|
+
prefixchars: string;
|
|
11
|
+
incoming: {} | null;
|
|
12
|
+
formulas: any[];
|
|
13
|
+
store: any;
|
|
14
|
+
rdfFactory: any;
|
|
15
|
+
xsd: {
|
|
16
|
+
boolean: NamedNode;
|
|
17
|
+
dateTime: NamedNode;
|
|
18
|
+
decimal: NamedNode;
|
|
19
|
+
double: NamedNode;
|
|
20
|
+
integer: NamedNode;
|
|
21
|
+
langString: NamedNode;
|
|
22
|
+
string: NamedNode;
|
|
23
|
+
};
|
|
24
|
+
setBase(base: any): Serializer;
|
|
25
|
+
setFlags(flags: any): Serializer;
|
|
26
|
+
toStr(x: any): any;
|
|
27
|
+
fromStr(s: any): any;
|
|
28
|
+
suggestPrefix(prefix: any, uri: any): void;
|
|
29
|
+
suggestNamespaces(namespaces: any): Serializer;
|
|
30
|
+
checkIntegrity(): void;
|
|
31
|
+
makeUpPrefix(uri: any): any;
|
|
32
|
+
rootSubjects(sts: any): {
|
|
33
|
+
roots: any[];
|
|
34
|
+
subjects: {};
|
|
35
|
+
rootsHash: {};
|
|
36
|
+
incoming: {};
|
|
37
|
+
};
|
|
38
|
+
toN3(f: any): string;
|
|
39
|
+
_notQNameChars: string;
|
|
40
|
+
_notNameChars: string;
|
|
41
|
+
explicitURI(uri: any): string;
|
|
42
|
+
statementsToNTriples(sts: any): string;
|
|
43
|
+
statementsToN3(sts: any): string;
|
|
44
|
+
defaultNamespace: string | undefined;
|
|
45
|
+
atomicTermToN3(expr: any, stats: any): any;
|
|
46
|
+
validPrefix: RegExp;
|
|
47
|
+
forbidden1: RegExp;
|
|
48
|
+
forbidden3: RegExp;
|
|
49
|
+
stringToN3(str: any, flags: any): string;
|
|
50
|
+
symbolToN3(x: any): any;
|
|
51
|
+
writeStore(write: any): void;
|
|
52
|
+
statementsToXML(sts: any): string;
|
|
53
|
+
}
|
|
54
|
+
import NamedNode from "./named-node";
|