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 @@
|
|
|
1
|
+
export default function queryToSPARQL(query: any): string;
|
package/lib/query.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function will match a pattern to the current Store
|
|
3
|
+
*
|
|
4
|
+
* The callback function is called whenever a match is found
|
|
5
|
+
* When fetcher is supplied this will be called to load from the web
|
|
6
|
+
* any new nodes as they are discovered. This will cause the query to traverse the
|
|
7
|
+
* graph of linked data, sometimes called "Link Following Query"
|
|
8
|
+
*
|
|
9
|
+
* @param myQuery - a knowledgebase containing a pattern to use as query
|
|
10
|
+
* @param callback - whenever the pattern in myQuery is met this is called with
|
|
11
|
+
* the new bindings as parameter
|
|
12
|
+
* @param fetcher? - If and only if, you want link following, give a fetcher
|
|
13
|
+
* which has been created for the quadstore being queried.
|
|
14
|
+
* @param onDone - callback when query finished
|
|
15
|
+
*/
|
|
16
|
+
export function indexedFormulaQuery(myQuery: any, callback: any, fetcher: any, onDone: any): void;
|
|
17
|
+
/**
|
|
18
|
+
* Query class, for tracking queries the user has in the UI.
|
|
19
|
+
*/
|
|
20
|
+
export class Query {
|
|
21
|
+
constructor(name: any, id: any);
|
|
22
|
+
pat: IndexedFormula;
|
|
23
|
+
vars: any[];
|
|
24
|
+
name: any;
|
|
25
|
+
id: any;
|
|
26
|
+
}
|
|
27
|
+
import IndexedFormula from "./store";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
declare class RDFaProcessor {
|
|
2
|
+
static parseRDFaDOM(dom: any, kb: any, base: any): void;
|
|
3
|
+
static tokenize(str: any): any;
|
|
4
|
+
static trim(str: any): any;
|
|
5
|
+
constructor(kb: any, options: any);
|
|
6
|
+
options: any;
|
|
7
|
+
kb: any;
|
|
8
|
+
target: any;
|
|
9
|
+
blankNodes: any[];
|
|
10
|
+
htmlOptions: {
|
|
11
|
+
selfClosing: string;
|
|
12
|
+
};
|
|
13
|
+
theOne: string;
|
|
14
|
+
language: any;
|
|
15
|
+
vocabulary: any;
|
|
16
|
+
blankCounter: number;
|
|
17
|
+
langAttributes: {
|
|
18
|
+
namespaceURI: string;
|
|
19
|
+
localName: string;
|
|
20
|
+
}[];
|
|
21
|
+
inXHTMLMode: boolean;
|
|
22
|
+
absURIRE: RegExp;
|
|
23
|
+
finishedHandlers: any[];
|
|
24
|
+
addTriple(origin: any, subject: any, predicate: any, object: any): void;
|
|
25
|
+
ancestorPath(node: any): string;
|
|
26
|
+
copyMappings(mappings: any): {};
|
|
27
|
+
copyProperties(): void;
|
|
28
|
+
deriveDateTimeType(value: any): string | null;
|
|
29
|
+
init(): void;
|
|
30
|
+
newBlankNode(): string;
|
|
31
|
+
newSubjectOrigin(origin: any, subject: any): void;
|
|
32
|
+
parseCURIE(value: any, prefixes: any, base: any): any;
|
|
33
|
+
parseCURIEOrURI(value: any, prefixes: any, base: any): any;
|
|
34
|
+
parsePredicate(value: any, defaultVocabulary: any, terms: any, prefixes: any, base: any, ignoreTerms: any): any;
|
|
35
|
+
parsePrefixMappings(str: any, target: any): void;
|
|
36
|
+
parseSafeCURIEOrCURIEOrURI(value: any, prefixes: any, base: any): any;
|
|
37
|
+
parseTermOrCURIEOrAbsURI(value: any, defaultVocabulary: any, terms: any, prefixes: any, base: any): any;
|
|
38
|
+
parseTermOrCURIEOrURI(value: any, defaultVocabulary: any, terms: any, prefixes: any, base: any): any;
|
|
39
|
+
parseURI(uri: any): any;
|
|
40
|
+
process(node: any, options: any): void;
|
|
41
|
+
push(parent: any, subject: any): {
|
|
42
|
+
parent: any;
|
|
43
|
+
subject: any;
|
|
44
|
+
parentObject: null;
|
|
45
|
+
incomplete: never[];
|
|
46
|
+
listMapping: any;
|
|
47
|
+
language: any;
|
|
48
|
+
prefixes: any;
|
|
49
|
+
terms: any;
|
|
50
|
+
vocabulary: any;
|
|
51
|
+
};
|
|
52
|
+
resolveAndNormalize(base: any, uri: any): string;
|
|
53
|
+
setContext(node: any): void;
|
|
54
|
+
setHTMLContext(): void;
|
|
55
|
+
inHTMLMode: boolean | undefined;
|
|
56
|
+
setInitialContext(): void;
|
|
57
|
+
setXHTMLContext(): void;
|
|
58
|
+
setXMLContext(): void;
|
|
59
|
+
tokenize(str: any): any;
|
|
60
|
+
toRDFNodeObject(x: any): any;
|
|
61
|
+
trim(str: any): any;
|
|
62
|
+
}
|
|
63
|
+
declare namespace RDFaProcessor {
|
|
64
|
+
const XMLLiteralURI: string;
|
|
65
|
+
const HTMLLiteralURI: string;
|
|
66
|
+
const PlainLiteralURI: string;
|
|
67
|
+
const objectURI: string;
|
|
68
|
+
const typeURI: string;
|
|
69
|
+
const nameChar: string;
|
|
70
|
+
const nameStartChar: string;
|
|
71
|
+
const NCNAME: RegExp;
|
|
72
|
+
const dateTimeTypes: {
|
|
73
|
+
pattern: RegExp;
|
|
74
|
+
type: string;
|
|
75
|
+
}[];
|
|
76
|
+
}
|
|
77
|
+
export default RDFaProcessor;
|
|
78
|
+
export function parseRDFaDOM(dom: any, kb: any, base: any): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export default class RDFParser {
|
|
2
|
+
/** Standard namespaces that we know how to handle @final
|
|
3
|
+
* @member RDFParser
|
|
4
|
+
*/
|
|
5
|
+
static ns: {
|
|
6
|
+
RDF: string;
|
|
7
|
+
RDFS: string;
|
|
8
|
+
};
|
|
9
|
+
/** DOM Level 2 node type magic numbers @final
|
|
10
|
+
* @member RDFParser
|
|
11
|
+
*/
|
|
12
|
+
static nodeType: {
|
|
13
|
+
ELEMENT: number;
|
|
14
|
+
ATTRIBUTE: number;
|
|
15
|
+
TEXT: number;
|
|
16
|
+
CDATA_SECTION: number;
|
|
17
|
+
ENTITY_REFERENCE: number;
|
|
18
|
+
ENTITY: number;
|
|
19
|
+
PROCESSING_INSTRUCTION: number;
|
|
20
|
+
COMMENT: number;
|
|
21
|
+
DOCUMENT: number;
|
|
22
|
+
DOCUMENT_TYPE: number;
|
|
23
|
+
DOCUMENT_FRAGMENT: number;
|
|
24
|
+
NOTATION: number;
|
|
25
|
+
};
|
|
26
|
+
constructor(store: any);
|
|
27
|
+
/** Our triple store reference @private */
|
|
28
|
+
store: any; /** Our identified blank nodes @private */
|
|
29
|
+
bnodes: {}; /** A context for context-aware stores @private */
|
|
30
|
+
why: any; /** Reification flag */
|
|
31
|
+
reify: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Frame class for namespace and base URI lookups
|
|
34
|
+
* Base lookups will always resolve because the parser knows
|
|
35
|
+
* the default base.
|
|
36
|
+
*
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
private frameFactory;
|
|
40
|
+
getAttributeNodeNS(node: any, uri: any, name: any): any;
|
|
41
|
+
/**
|
|
42
|
+
* Build our initial scope frame and parse the DOM into triples
|
|
43
|
+
* @param {DOMTree} document The DOM to parse
|
|
44
|
+
* @param {String} base The base URL to use
|
|
45
|
+
* @param {Object} why The context to which this resource belongs
|
|
46
|
+
*/
|
|
47
|
+
parse(document: any, base: string, why: any): boolean;
|
|
48
|
+
base: string | undefined;
|
|
49
|
+
parseDOM(frame: any): void;
|
|
50
|
+
/**
|
|
51
|
+
* Cleans out state from a previous parse run
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
private cleanParser;
|
|
55
|
+
/**
|
|
56
|
+
* Builds scope frame
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
private buildFrame;
|
|
60
|
+
}
|