@pod-os/core 0.30.0-rc.7fd1609.0 → 0.30.0-rc.90eb79e.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 +74 -245
- package/lib/index.js +74 -245
- package/package.json +13 -13
- package/types/Store.d.ts +1 -1
- package/types/files/FileFetcher.d.ts +1 -1
- package/types/files/HttpStatus.d.ts +2 -2
- package/types/ldp-container/LdpContainer.d.ts +3 -0
- package/types/profile/WebIdProfile.d.ts +3 -1
- package/types/rdf-document/RdfDocument.d.ts +3 -0
- package/types/search/LabelIndex.d.ts +3 -0
- package/types/search/SearchGateway.d.ts +1 -1
- package/types/search/SearchIndex.d.ts +1 -1
- package/types/thing/Thing.d.ts +5 -1
- package/types/type-index/TypeIndex.d.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -22395,10 +22395,10 @@ function createStatement(kb, id4, property4, value7, base2) {
|
|
|
22395
22395
|
return kb.rdfFactory.quad(id4, predicate4, object8, kb.rdfFactory.namedNode(base2));
|
|
22396
22396
|
}
|
|
22397
22397
|
|
|
22398
|
-
// node_modules/n3/src/N3Lexer.js
|
|
22398
|
+
// ../node_modules/n3/src/N3Lexer.js
|
|
22399
22399
|
var import_buffer = __toESM(require_buffer());
|
|
22400
22400
|
|
|
22401
|
-
// node_modules/n3/src/IRIs.js
|
|
22401
|
+
// ../node_modules/n3/src/IRIs.js
|
|
22402
22402
|
var RDF2 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
|
|
22403
22403
|
var XSD = "http://www.w3.org/2001/XMLSchema#";
|
|
22404
22404
|
var SWAP = "http://www.w3.org/2000/10/swap/";
|
|
@@ -22415,9 +22415,7 @@ var IRIs_default = {
|
|
|
22415
22415
|
nil: `${RDF2}nil`,
|
|
22416
22416
|
first: `${RDF2}first`,
|
|
22417
22417
|
rest: `${RDF2}rest`,
|
|
22418
|
-
langString: `${RDF2}langString
|
|
22419
|
-
dirLangString: `${RDF2}dirLangString`,
|
|
22420
|
-
reifies: `${RDF2}reifies`
|
|
22418
|
+
langString: `${RDF2}langString`
|
|
22421
22419
|
},
|
|
22422
22420
|
owl: {
|
|
22423
22421
|
sameAs: "http://www.w3.org/2002/07/owl#sameAs"
|
|
@@ -22432,7 +22430,7 @@ var IRIs_default = {
|
|
|
22432
22430
|
}
|
|
22433
22431
|
};
|
|
22434
22432
|
|
|
22435
|
-
// node_modules/n3/src/N3Lexer.js
|
|
22433
|
+
// ../node_modules/n3/src/N3Lexer.js
|
|
22436
22434
|
var { xsd } = IRIs_default;
|
|
22437
22435
|
var escapeSequence = /\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g;
|
|
22438
22436
|
var escapeReplacements = {
|
|
@@ -22470,7 +22468,6 @@ var lineModeRegExps = {
|
|
|
22470
22468
|
_unescapedIri: true,
|
|
22471
22469
|
_simpleQuotedString: true,
|
|
22472
22470
|
_langcode: true,
|
|
22473
|
-
_dircode: true,
|
|
22474
22471
|
_blank: true,
|
|
22475
22472
|
_newline: true,
|
|
22476
22473
|
_comment: true,
|
|
@@ -22484,16 +22481,15 @@ var N3Lexer = class {
|
|
|
22484
22481
|
this._unescapedIri = /^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/;
|
|
22485
22482
|
this._simpleQuotedString = /^"([^"\\\r\n]*)"(?=[^"])/;
|
|
22486
22483
|
this._simpleApostropheString = /^'([^'\\\r\n]*)'(?=[^'])/;
|
|
22487
|
-
this._langcode = /^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9])/i;
|
|
22488
|
-
this._dircode = /^--(ltr)|(rtl)/;
|
|
22484
|
+
this._langcode = /^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i;
|
|
22489
22485
|
this._prefix = /^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/;
|
|
22490
22486
|
this._prefixed = /^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/;
|
|
22491
22487
|
this._variable = /^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/;
|
|
22492
22488
|
this._blank = /^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/;
|
|
22493
22489
|
this._number = /^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/;
|
|
22494
22490
|
this._boolean = /^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/;
|
|
22495
|
-
this.
|
|
22496
|
-
this.
|
|
22491
|
+
this._keyword = /^@[a-z]+(?=[\s#<:])/i;
|
|
22492
|
+
this._sparqlKeyword = /^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i;
|
|
22497
22493
|
this._shortPredicates = /^a(?=[\s#()\[\]\{\}"'<>])/;
|
|
22498
22494
|
this._newline = /^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/;
|
|
22499
22495
|
this._comment = /#([^\n\r]*)/;
|
|
@@ -22567,9 +22563,7 @@ var N3Lexer = class {
|
|
|
22567
22563
|
if (value7 === null || illegalIriChars.test(value7))
|
|
22568
22564
|
return reportSyntaxError(this);
|
|
22569
22565
|
type5 = "IRI";
|
|
22570
|
-
} else if (input2.length >
|
|
22571
|
-
type5 = "<<(", matchLength = 3;
|
|
22572
|
-
else if (!this._lineMode && input2.length > (inputFinished ? 1 : 2) && input2[1] === "<")
|
|
22566
|
+
} else if (input2.length > 1 && input2[1] === "<")
|
|
22573
22567
|
type5 = "<<", matchLength = 2;
|
|
22574
22568
|
else if (this._n3Mode && input2.length > 1 && input2[1] === "=") {
|
|
22575
22569
|
matchLength = 2;
|
|
@@ -22618,9 +22612,9 @@ var N3Lexer = class {
|
|
|
22618
22612
|
type5 = "var", value7 = match[0];
|
|
22619
22613
|
break;
|
|
22620
22614
|
case "@":
|
|
22621
|
-
if (this._previousMarker === "literal" && (match = this._langcode.exec(input2))
|
|
22615
|
+
if (this._previousMarker === "literal" && (match = this._langcode.exec(input2)))
|
|
22622
22616
|
type5 = "langcode", value7 = match[1];
|
|
22623
|
-
else if (match = this.
|
|
22617
|
+
else if (match = this._keyword.exec(input2))
|
|
22624
22618
|
type5 = match[0];
|
|
22625
22619
|
break;
|
|
22626
22620
|
case ".":
|
|
@@ -22642,11 +22636,6 @@ var N3Lexer = class {
|
|
|
22642
22636
|
case "9":
|
|
22643
22637
|
case "+":
|
|
22644
22638
|
case "-":
|
|
22645
|
-
if (input2[1] === "-") {
|
|
22646
|
-
if (this._previousMarker === "langcode" && (match = this._dircode.exec(input2)))
|
|
22647
|
-
type5 = "dircode", matchLength = 2, value7 = match[1] || match[2], matchLength = value7.length + 2;
|
|
22648
|
-
break;
|
|
22649
|
-
}
|
|
22650
22639
|
if (match = this._number.exec(input2) || inputFinished && (match = this._number.exec(`${input2} `))) {
|
|
22651
22640
|
type5 = "literal", value7 = match[0];
|
|
22652
22641
|
prefix3 = typeof match[1] === "string" ? xsd.double : typeof match[2] === "string" ? xsd.decimal : xsd.integer;
|
|
@@ -22658,9 +22647,7 @@ var N3Lexer = class {
|
|
|
22658
22647
|
case "P":
|
|
22659
22648
|
case "G":
|
|
22660
22649
|
case "g":
|
|
22661
|
-
|
|
22662
|
-
case "v":
|
|
22663
|
-
if (match = this._keyword.exec(input2))
|
|
22650
|
+
if (match = this._sparqlKeyword.exec(input2))
|
|
22664
22651
|
type5 = match[0].toUpperCase();
|
|
22665
22652
|
else
|
|
22666
22653
|
inconclusive = true;
|
|
@@ -22690,21 +22677,13 @@ var N3Lexer = class {
|
|
|
22690
22677
|
case "!":
|
|
22691
22678
|
if (!this._n3Mode)
|
|
22692
22679
|
break;
|
|
22693
|
-
case ")":
|
|
22694
|
-
if (!inputFinished && (input2.length === 1 || input2.length === 2 && input2[1] === ">")) {
|
|
22695
|
-
break;
|
|
22696
|
-
}
|
|
22697
|
-
if (input2.length > 2 && input2[1] === ">" && input2[2] === ">") {
|
|
22698
|
-
type5 = ")>>", matchLength = 3;
|
|
22699
|
-
break;
|
|
22700
|
-
}
|
|
22701
22680
|
case ",":
|
|
22702
22681
|
case ";":
|
|
22703
22682
|
case "[":
|
|
22704
22683
|
case "]":
|
|
22705
22684
|
case "(":
|
|
22685
|
+
case ")":
|
|
22706
22686
|
case "}":
|
|
22707
|
-
case "~":
|
|
22708
22687
|
if (!this._lineMode) {
|
|
22709
22688
|
matchLength = 1;
|
|
22710
22689
|
type5 = firstChar;
|
|
@@ -22869,7 +22848,7 @@ var N3Lexer = class {
|
|
|
22869
22848
|
}
|
|
22870
22849
|
};
|
|
22871
22850
|
|
|
22872
|
-
// node_modules/n3/src/N3DataFactory.js
|
|
22851
|
+
// ../node_modules/n3/src/N3DataFactory.js
|
|
22873
22852
|
var { rdf: rdf2, xsd: xsd2 } = IRIs_default;
|
|
22874
22853
|
var DEFAULTGRAPH;
|
|
22875
22854
|
var _blankNodeCounter = 0;
|
|
@@ -22931,15 +22910,7 @@ var Literal2 = class _Literal extends Term {
|
|
|
22931
22910
|
get language() {
|
|
22932
22911
|
const id4 = this.id;
|
|
22933
22912
|
let atPos = id4.lastIndexOf('"') + 1;
|
|
22934
|
-
|
|
22935
|
-
return atPos < id4.length && id4[atPos++] === "@" ? (dirPos > atPos ? id4.substr(0, dirPos) : id4).substr(atPos).toLowerCase() : "";
|
|
22936
|
-
}
|
|
22937
|
-
// ### The direction of this literal
|
|
22938
|
-
get direction() {
|
|
22939
|
-
const id4 = this.id;
|
|
22940
|
-
const endPos = id4.lastIndexOf('"');
|
|
22941
|
-
const dirPos = id4.lastIndexOf("--");
|
|
22942
|
-
return dirPos > endPos && dirPos + 2 < id4.length ? id4.substr(dirPos + 2).toLowerCase() : "";
|
|
22913
|
+
return atPos < id4.length && id4[atPos++] === "@" ? id4.substr(atPos).toLowerCase() : "";
|
|
22943
22914
|
}
|
|
22944
22915
|
// ### The datatype IRI of this literal
|
|
22945
22916
|
get datatype() {
|
|
@@ -22950,22 +22921,21 @@ var Literal2 = class _Literal extends Term {
|
|
|
22950
22921
|
const id4 = this.id, dtPos = id4.lastIndexOf('"') + 1;
|
|
22951
22922
|
const char = dtPos < id4.length ? id4[dtPos] : "";
|
|
22952
22923
|
return char === "^" ? id4.substr(dtPos + 2) : (
|
|
22953
|
-
// If "@" follows, return rdf:langString
|
|
22954
|
-
char !== "@" ? xsd2.string :
|
|
22924
|
+
// If "@" follows, return rdf:langString; xsd:string otherwise
|
|
22925
|
+
char !== "@" ? xsd2.string : rdf2.langString
|
|
22955
22926
|
);
|
|
22956
22927
|
}
|
|
22957
22928
|
// ### Returns whether this object represents the same term as the other
|
|
22958
22929
|
equals(other2) {
|
|
22959
22930
|
if (other2 instanceof _Literal)
|
|
22960
22931
|
return this.id === other2.id;
|
|
22961
|
-
return !!other2 && !!other2.datatype && this.termType === other2.termType && this.value === other2.value && this.language === other2.language &&
|
|
22932
|
+
return !!other2 && !!other2.datatype && this.termType === other2.termType && this.value === other2.value && this.language === other2.language && this.datatype.value === other2.datatype.value;
|
|
22962
22933
|
}
|
|
22963
22934
|
toJSON() {
|
|
22964
22935
|
return {
|
|
22965
22936
|
termType: this.termType,
|
|
22966
22937
|
value: this.value,
|
|
22967
22938
|
language: this.language,
|
|
22968
|
-
direction: this.direction,
|
|
22969
22939
|
datatype: { termType: "NamedNode", value: this.datatypeString }
|
|
22970
22940
|
};
|
|
22971
22941
|
}
|
|
@@ -23059,9 +23029,6 @@ function blankNode(name9) {
|
|
|
23059
23029
|
function literal(value7, languageOrDataType) {
|
|
23060
23030
|
if (typeof languageOrDataType === "string")
|
|
23061
23031
|
return new Literal2(`"${value7}"@${languageOrDataType.toLowerCase()}`);
|
|
23062
|
-
if (languageOrDataType !== void 0 && !("termType" in languageOrDataType)) {
|
|
23063
|
-
return new Literal2(`"${value7}"@${languageOrDataType.language.toLowerCase()}${languageOrDataType.direction ? `--${languageOrDataType.direction.toLowerCase()}` : ""}`);
|
|
23064
|
-
}
|
|
23065
23032
|
let datatype3 = languageOrDataType ? languageOrDataType.value : "";
|
|
23066
23033
|
if (datatype3 === "") {
|
|
23067
23034
|
if (typeof value7 === "boolean")
|
|
@@ -23115,9 +23082,9 @@ function fromQuad(inQuad) {
|
|
|
23115
23082
|
return quad(fromTerm(inQuad.subject), fromTerm(inQuad.predicate), fromTerm(inQuad.object), fromTerm(inQuad.graph));
|
|
23116
23083
|
}
|
|
23117
23084
|
|
|
23118
|
-
// node_modules/n3/src/N3Parser.js
|
|
23085
|
+
// ../node_modules/n3/src/N3Parser.js
|
|
23119
23086
|
var blankNodePrefix = 0;
|
|
23120
|
-
var N3Parser = class
|
|
23087
|
+
var N3Parser = class {
|
|
23121
23088
|
constructor(options) {
|
|
23122
23089
|
this._contextStack = [];
|
|
23123
23090
|
this._graph = null;
|
|
@@ -23129,6 +23096,7 @@ var N3Parser = class _N3Parser {
|
|
|
23129
23096
|
this._readPredicateOrNamedGraph = this._readPredicate;
|
|
23130
23097
|
this._supportsQuads = !(isTurtle || isTriG || isNTriples || isN3);
|
|
23131
23098
|
this._isImpliedBy = options.isImpliedBy;
|
|
23099
|
+
this._supportsRDFStar = format4 === "" || /star|\*$/.test(format4);
|
|
23132
23100
|
if (isLineMode)
|
|
23133
23101
|
this._resolveRelativeIRI = (iri) => {
|
|
23134
23102
|
return null;
|
|
@@ -23136,8 +23104,6 @@ var N3Parser = class _N3Parser {
|
|
|
23136
23104
|
this._blankNodePrefix = typeof options.blankNodePrefix !== "string" ? "" : options.blankNodePrefix.replace(/^(?!_:)/, "_:");
|
|
23137
23105
|
this._lexer = options.lexer || new N3Lexer({ lineMode: isLineMode, n3: isN3, isImpliedBy: this._isImpliedBy });
|
|
23138
23106
|
this._explicitQuantifiers = !!options.explicitQuantifiers;
|
|
23139
|
-
this._parseUnsupportedVersions = !!options.parseUnsupportedVersions;
|
|
23140
|
-
this._version = options.version;
|
|
23141
23107
|
}
|
|
23142
23108
|
// ## Static class methods
|
|
23143
23109
|
// ### `_resetBlankNodePrefix` restarts blank node prefix identification
|
|
@@ -23197,12 +23163,6 @@ var N3Parser = class _N3Parser {
|
|
|
23197
23163
|
this._quantified = context4.quantified;
|
|
23198
23164
|
}
|
|
23199
23165
|
}
|
|
23200
|
-
// ### `_readBeforeTopContext` is called once only at the start of parsing.
|
|
23201
|
-
_readBeforeTopContext(token2) {
|
|
23202
|
-
if (this._version && !this._isValidVersion(this._version))
|
|
23203
|
-
return this._error(`Detected unsupported version as media type parameter: "${this._version}"`, token2);
|
|
23204
|
-
return this._readInTopContext(token2);
|
|
23205
|
-
}
|
|
23206
23166
|
// ### `_readInTopContext` reads a token when in the top context
|
|
23207
23167
|
_readInTopContext(token2) {
|
|
23208
23168
|
switch (token2.type) {
|
|
@@ -23222,11 +23182,6 @@ var N3Parser = class _N3Parser {
|
|
|
23222
23182
|
this._sparqlStyle = true;
|
|
23223
23183
|
case "@base":
|
|
23224
23184
|
return this._readBaseIRI;
|
|
23225
|
-
// It could be a version declaration
|
|
23226
|
-
case "VERSION":
|
|
23227
|
-
this._sparqlStyle = true;
|
|
23228
|
-
case "@version":
|
|
23229
|
-
return this._readVersion;
|
|
23230
23185
|
// It could be a graph
|
|
23231
23186
|
case "{":
|
|
23232
23187
|
if (this._supportsNamedGraphs) {
|
|
@@ -23292,10 +23247,6 @@ var N3Parser = class _N3Parser {
|
|
|
23292
23247
|
);
|
|
23293
23248
|
return this._readBlankNodeHead;
|
|
23294
23249
|
case "(":
|
|
23295
|
-
const stack = this._contextStack, parent4 = stack.length && stack[stack.length - 1];
|
|
23296
|
-
if (parent4.type === "<<") {
|
|
23297
|
-
return this._error("Unexpected list in reified triple", token2);
|
|
23298
|
-
}
|
|
23299
23250
|
this._saveContext("list", this._graph, this.RDF_NIL, null, null);
|
|
23300
23251
|
this._subject = null;
|
|
23301
23252
|
return this._readListItem;
|
|
@@ -23335,13 +23286,9 @@ var N3Parser = class _N3Parser {
|
|
|
23335
23286
|
} else
|
|
23336
23287
|
this._subject = this._factory.literal(token2.value, this._factory.namedNode(token2.prefix));
|
|
23337
23288
|
break;
|
|
23338
|
-
case "<<(":
|
|
23339
|
-
if (!this._n3Mode)
|
|
23340
|
-
return this._error("Disallowed triple term as subject", token2);
|
|
23341
|
-
this._saveContext("<<(", this._graph, null, null, null);
|
|
23342
|
-
this._graph = null;
|
|
23343
|
-
return this._readSubject;
|
|
23344
23289
|
case "<<":
|
|
23290
|
+
if (!this._supportsRDFStar)
|
|
23291
|
+
return this._error("Unexpected RDF-star syntax", token2);
|
|
23345
23292
|
this._saveContext("<<", this._graph, null, null, null);
|
|
23346
23293
|
this._graph = null;
|
|
23347
23294
|
return this._readSubject;
|
|
@@ -23365,7 +23312,6 @@ var N3Parser = class _N3Parser {
|
|
|
23365
23312
|
case ".":
|
|
23366
23313
|
case "]":
|
|
23367
23314
|
case "}":
|
|
23368
|
-
case "|}":
|
|
23369
23315
|
if (this._predicate === null)
|
|
23370
23316
|
return this._error(`Unexpected ${type5}`, token2);
|
|
23371
23317
|
this._subject = null;
|
|
@@ -23390,7 +23336,6 @@ var N3Parser = class _N3Parser {
|
|
|
23390
23336
|
if ((this._predicate = this._readEntity(token2)) === void 0)
|
|
23391
23337
|
return;
|
|
23392
23338
|
}
|
|
23393
|
-
this._validAnnotation = true;
|
|
23394
23339
|
return this._readObject;
|
|
23395
23340
|
}
|
|
23396
23341
|
// ### `_readObject` reads a quad's object
|
|
@@ -23413,10 +23358,6 @@ var N3Parser = class _N3Parser {
|
|
|
23413
23358
|
);
|
|
23414
23359
|
return this._readBlankNodeHead;
|
|
23415
23360
|
case "(":
|
|
23416
|
-
const stack = this._contextStack, parent4 = stack.length && stack[stack.length - 1];
|
|
23417
|
-
if (parent4.type === "<<") {
|
|
23418
|
-
return this._error("Unexpected list in reified triple", token2);
|
|
23419
|
-
}
|
|
23420
23361
|
this._saveContext("list", this._graph, this._subject, this._predicate, this.RDF_NIL);
|
|
23421
23362
|
this._subject = null;
|
|
23422
23363
|
return this._readListItem;
|
|
@@ -23431,11 +23372,9 @@ var N3Parser = class _N3Parser {
|
|
|
23431
23372
|
this._graph = this._factory.blankNode()
|
|
23432
23373
|
);
|
|
23433
23374
|
return this._readSubject;
|
|
23434
|
-
case "<<(":
|
|
23435
|
-
this._saveContext("<<(", this._graph, this._subject, this._predicate, null);
|
|
23436
|
-
this._graph = null;
|
|
23437
|
-
return this._readSubject;
|
|
23438
23375
|
case "<<":
|
|
23376
|
+
if (!this._supportsRDFStar)
|
|
23377
|
+
return this._error("Unexpected RDF-star syntax", token2);
|
|
23439
23378
|
this._saveContext("<<", this._graph, this._subject, this._predicate, null);
|
|
23440
23379
|
this._graph = null;
|
|
23441
23380
|
return this._readSubject;
|
|
@@ -23464,10 +23403,6 @@ var N3Parser = class _N3Parser {
|
|
|
23464
23403
|
this._subject = null;
|
|
23465
23404
|
return this._readBlankNodeTail(token2);
|
|
23466
23405
|
} else {
|
|
23467
|
-
const stack = this._contextStack, parentParent = stack.length > 1 && stack[stack.length - 2];
|
|
23468
|
-
if (parentParent.type === "<<") {
|
|
23469
|
-
return this._error("Unexpected compound blank node expression in reified triple", token2);
|
|
23470
|
-
}
|
|
23471
23406
|
this._predicate = null;
|
|
23472
23407
|
return this._readPredicate(token2);
|
|
23473
23408
|
}
|
|
@@ -23558,19 +23493,12 @@ var N3Parser = class _N3Parser {
|
|
|
23558
23493
|
this._graph = this._factory.blankNode()
|
|
23559
23494
|
);
|
|
23560
23495
|
return this._readSubject;
|
|
23561
|
-
case "<<":
|
|
23562
|
-
this._saveContext("<<", this._graph, null, null, null);
|
|
23563
|
-
this._graph = null;
|
|
23564
|
-
next4 = this._readSubject;
|
|
23565
|
-
break;
|
|
23566
23496
|
default:
|
|
23567
23497
|
if ((item4 = this._readEntity(token2)) === void 0)
|
|
23568
23498
|
return;
|
|
23569
23499
|
}
|
|
23570
23500
|
if (list === null)
|
|
23571
23501
|
this._subject = list = this._factory.blankNode();
|
|
23572
|
-
if (token2.type === "<<")
|
|
23573
|
-
stack[stack.length - 1].subject = this._subject;
|
|
23574
23502
|
if (previousList === null) {
|
|
23575
23503
|
if (parent4.predicate === null)
|
|
23576
23504
|
parent4.subject = list;
|
|
@@ -23598,73 +23526,43 @@ var N3Parser = class _N3Parser {
|
|
|
23598
23526
|
return this._completeObjectLiteral(token2, true);
|
|
23599
23527
|
}
|
|
23600
23528
|
// ### `_completeLiteral` completes a literal with an optional datatype or language
|
|
23601
|
-
_completeLiteral(token2
|
|
23529
|
+
_completeLiteral(token2) {
|
|
23602
23530
|
let literal4 = this._factory.literal(this._literalValue);
|
|
23603
|
-
let readCb;
|
|
23604
23531
|
switch (token2.type) {
|
|
23605
23532
|
// Create a datatyped literal
|
|
23606
23533
|
case "type":
|
|
23607
23534
|
case "typeIRI":
|
|
23608
23535
|
const datatype3 = this._readEntity(token2);
|
|
23609
23536
|
if (datatype3 === void 0) return;
|
|
23610
|
-
if (datatype3.value === IRIs_default.rdf.langString || datatype3.value === IRIs_default.rdf.dirLangString) {
|
|
23611
|
-
return this._error("Detected illegal (directional) languaged-tagged string with explicit datatype", token2);
|
|
23612
|
-
}
|
|
23613
23537
|
literal4 = this._factory.literal(this._literalValue, datatype3);
|
|
23614
23538
|
token2 = null;
|
|
23615
23539
|
break;
|
|
23616
23540
|
// Create a language-tagged string
|
|
23617
23541
|
case "langcode":
|
|
23618
|
-
if (token2.value.split("-").some((t) => t.length > 8))
|
|
23619
|
-
return this._error("Detected language tag with subtag longer than 8 characters", token2);
|
|
23620
23542
|
literal4 = this._factory.literal(this._literalValue, token2.value);
|
|
23621
|
-
this._literalLanguage = token2.value;
|
|
23622
23543
|
token2 = null;
|
|
23623
|
-
readCb = this._readDirCode.bind(this, component2);
|
|
23624
23544
|
break;
|
|
23625
23545
|
}
|
|
23626
|
-
return { token: token2, literal: literal4
|
|
23627
|
-
}
|
|
23628
|
-
_readDirCode(component2, listItem, token2) {
|
|
23629
|
-
if (token2.type === "dircode") {
|
|
23630
|
-
const term3 = this._factory.literal(this._literalValue, { language: this._literalLanguage, direction: token2.value });
|
|
23631
|
-
if (component2 === "subject")
|
|
23632
|
-
this._subject = term3;
|
|
23633
|
-
else
|
|
23634
|
-
this._object = term3;
|
|
23635
|
-
this._literalLanguage = void 0;
|
|
23636
|
-
token2 = null;
|
|
23637
|
-
}
|
|
23638
|
-
if (component2 === "subject")
|
|
23639
|
-
return token2 === null ? this._readPredicateOrNamedGraph : this._readPredicateOrNamedGraph(token2);
|
|
23640
|
-
return this._completeObjectLiteralPost(token2, listItem);
|
|
23546
|
+
return { token: token2, literal: literal4 };
|
|
23641
23547
|
}
|
|
23642
23548
|
// Completes a literal in subject position
|
|
23643
23549
|
_completeSubjectLiteral(token2) {
|
|
23644
|
-
|
|
23645
|
-
this._subject = completed2.literal;
|
|
23646
|
-
if (completed2.readCb)
|
|
23647
|
-
return completed2.readCb.bind(this, false);
|
|
23550
|
+
this._subject = this._completeLiteral(token2).literal;
|
|
23648
23551
|
return this._readPredicateOrNamedGraph;
|
|
23649
23552
|
}
|
|
23650
23553
|
// Completes a literal in object position
|
|
23651
23554
|
_completeObjectLiteral(token2, listItem) {
|
|
23652
|
-
const completed2 = this._completeLiteral(token2
|
|
23555
|
+
const completed2 = this._completeLiteral(token2);
|
|
23653
23556
|
if (!completed2)
|
|
23654
23557
|
return;
|
|
23655
23558
|
this._object = completed2.literal;
|
|
23656
|
-
if (completed2.readCb)
|
|
23657
|
-
return completed2.readCb.bind(this, listItem);
|
|
23658
|
-
return this._completeObjectLiteralPost(completed2.token, listItem);
|
|
23659
|
-
}
|
|
23660
|
-
_completeObjectLiteralPost(token2, listItem) {
|
|
23661
23559
|
if (listItem)
|
|
23662
23560
|
this._emit(this._subject, this.RDF_FIRST, this._object, this._graph);
|
|
23663
|
-
if (
|
|
23561
|
+
if (completed2.token === null)
|
|
23664
23562
|
return this._getContextEndReader();
|
|
23665
23563
|
else {
|
|
23666
23564
|
this._readCallback = this._getContextEndReader();
|
|
23667
|
-
return this._readCallback(
|
|
23565
|
+
return this._readCallback(completed2.token);
|
|
23668
23566
|
}
|
|
23669
23567
|
}
|
|
23670
23568
|
// ### `_readFormulaTail` reads the end of a formula
|
|
@@ -23678,7 +23576,7 @@ var N3Parser = class _N3Parser {
|
|
|
23678
23576
|
}
|
|
23679
23577
|
// ### `_readPunctuation` reads punctuation between quads or quad parts
|
|
23680
23578
|
_readPunctuation(token2) {
|
|
23681
|
-
let next4, graph3 = this._graph
|
|
23579
|
+
let next4, graph3 = this._graph;
|
|
23682
23580
|
const subject8 = this._subject, inversePredicate = this._inversePredicate;
|
|
23683
23581
|
switch (token2.type) {
|
|
23684
23582
|
// A closing brace ends a graph
|
|
@@ -23691,7 +23589,6 @@ var N3Parser = class _N3Parser {
|
|
|
23691
23589
|
// A dot just ends the statement, without sharing anything with the next
|
|
23692
23590
|
case ".":
|
|
23693
23591
|
this._subject = null;
|
|
23694
|
-
this._tripleTerm = null;
|
|
23695
23592
|
next4 = this._contextStack.length ? this._readSubject : this._readInTopContext;
|
|
23696
23593
|
if (inversePredicate) this._inversePredicate = false;
|
|
23697
23594
|
break;
|
|
@@ -23703,26 +23600,19 @@ var N3Parser = class _N3Parser {
|
|
|
23703
23600
|
case ",":
|
|
23704
23601
|
next4 = this._readObject;
|
|
23705
23602
|
break;
|
|
23706
|
-
// ~ is allowed in the annotation syntax
|
|
23707
|
-
case "~":
|
|
23708
|
-
next4 = this._readReifierInAnnotation;
|
|
23709
|
-
startingAnnotation = true;
|
|
23710
|
-
break;
|
|
23711
23603
|
// {| means that the current triple is annotated with predicate-object pairs.
|
|
23712
23604
|
case "{|":
|
|
23713
|
-
|
|
23714
|
-
|
|
23715
|
-
|
|
23605
|
+
if (!this._supportsRDFStar)
|
|
23606
|
+
return this._error("Unexpected RDF-star syntax", token2);
|
|
23607
|
+
const predicate4 = this._predicate, object8 = this._object;
|
|
23608
|
+
this._subject = this._factory.quad(subject8, predicate4, object8, this.DEFAULTGRAPH);
|
|
23716
23609
|
next4 = this._readPredicate;
|
|
23717
23610
|
break;
|
|
23718
|
-
// |} means that the current
|
|
23611
|
+
// |} means that the current quoted triple in annotation syntax is finalized.
|
|
23719
23612
|
case "|}":
|
|
23720
|
-
if (
|
|
23721
|
-
return this._error("Unexpected
|
|
23722
|
-
if (!this._validAnnotation)
|
|
23723
|
-
return this._error("Annotation block can not be empty", token2);
|
|
23613
|
+
if (this._subject.termType !== "Quad")
|
|
23614
|
+
return this._error("Unexpected asserted triple closing", token2);
|
|
23724
23615
|
this._subject = null;
|
|
23725
|
-
this._annotation = false;
|
|
23726
23616
|
next4 = this._readPunctuation;
|
|
23727
23617
|
break;
|
|
23728
23618
|
default:
|
|
@@ -23732,16 +23622,13 @@ var N3Parser = class _N3Parser {
|
|
|
23732
23622
|
}
|
|
23733
23623
|
return this._error(`Expected punctuation to follow "${this._object.id}"`, token2);
|
|
23734
23624
|
}
|
|
23735
|
-
if (subject8 !== null
|
|
23625
|
+
if (subject8 !== null) {
|
|
23736
23626
|
const predicate4 = this._predicate, object8 = this._object;
|
|
23737
23627
|
if (!inversePredicate)
|
|
23738
23628
|
this._emit(subject8, predicate4, object8, graph3);
|
|
23739
23629
|
else
|
|
23740
23630
|
this._emit(object8, predicate4, subject8, graph3);
|
|
23741
23631
|
}
|
|
23742
|
-
if (startingAnnotation) {
|
|
23743
|
-
this._annotation = true;
|
|
23744
|
-
}
|
|
23745
23632
|
return next4;
|
|
23746
23633
|
}
|
|
23747
23634
|
// ### `_readBlankNodePunctuation` reads punctuation in a blank node
|
|
@@ -23792,21 +23679,6 @@ var N3Parser = class _N3Parser {
|
|
|
23792
23679
|
this._setBase(iri);
|
|
23793
23680
|
return this._readDeclarationPunctuation;
|
|
23794
23681
|
}
|
|
23795
|
-
// ### `_isValidVersion` checks if the given version is valid for this parser to handle.
|
|
23796
|
-
_isValidVersion(version6) {
|
|
23797
|
-
return this._parseUnsupportedVersions || _N3Parser.SUPPORTED_VERSIONS.includes(version6);
|
|
23798
|
-
}
|
|
23799
|
-
// ### `_readVersion` reads version string declaration
|
|
23800
|
-
_readVersion(token2) {
|
|
23801
|
-
if (token2.type !== "literal")
|
|
23802
|
-
return this._error("Expected literal to follow version declaration", token2);
|
|
23803
|
-
if (token2.end - token2.start !== token2.value.length + 2)
|
|
23804
|
-
return this._error("Version declarations must use single quotes", token2);
|
|
23805
|
-
this._versionCallback(token2.value);
|
|
23806
|
-
if (!this._isValidVersion(token2.value))
|
|
23807
|
-
return this._error(`Detected unsupported version: "${token2.value}"`, token2);
|
|
23808
|
-
return this._readDeclarationPunctuation;
|
|
23809
|
-
}
|
|
23810
23682
|
// ### `_readNamedGraphLabel` reads the label of a named graph
|
|
23811
23683
|
_readNamedGraphLabel(token2) {
|
|
23812
23684
|
switch (token2.type) {
|
|
@@ -23933,17 +23805,26 @@ var N3Parser = class _N3Parser {
|
|
|
23933
23805
|
this._emit(subject8, predicate4, object8, this._graph);
|
|
23934
23806
|
return this._readPath;
|
|
23935
23807
|
}
|
|
23936
|
-
// ### `
|
|
23937
|
-
|
|
23938
|
-
if (token2.type !== "
|
|
23939
|
-
|
|
23808
|
+
// ### `_readRDFStarTailOrGraph` reads the graph of a nested RDF-star quad or the end of a nested RDF-star triple
|
|
23809
|
+
_readRDFStarTailOrGraph(token2) {
|
|
23810
|
+
if (token2.type !== ">>") {
|
|
23811
|
+
if (this._supportsQuads && this._graph === null && (this._graph = this._readEntity(token2)) !== void 0)
|
|
23812
|
+
return this._readRDFStarTail;
|
|
23813
|
+
return this._error(`Expected >> to follow "${this._object.id}"`, token2);
|
|
23814
|
+
}
|
|
23815
|
+
return this._readRDFStarTail(token2);
|
|
23816
|
+
}
|
|
23817
|
+
// ### `_readRDFStarTail` reads the end of a nested RDF-star triple
|
|
23818
|
+
_readRDFStarTail(token2) {
|
|
23819
|
+
if (token2.type !== ">>")
|
|
23820
|
+
return this._error(`Expected >> but got ${token2.type}`, token2);
|
|
23940
23821
|
const quad3 = this._factory.quad(
|
|
23941
23822
|
this._subject,
|
|
23942
23823
|
this._predicate,
|
|
23943
23824
|
this._object,
|
|
23944
23825
|
this._graph || this.DEFAULTGRAPH
|
|
23945
23826
|
);
|
|
23946
|
-
this._restoreContext("<<
|
|
23827
|
+
this._restoreContext("<<", token2);
|
|
23947
23828
|
if (this._subject === null) {
|
|
23948
23829
|
this._subject = quad3;
|
|
23949
23830
|
return this._readPredicate;
|
|
@@ -23952,63 +23833,6 @@ var N3Parser = class _N3Parser {
|
|
|
23952
23833
|
return this._getContextEndReader();
|
|
23953
23834
|
}
|
|
23954
23835
|
}
|
|
23955
|
-
// ### `_readReifiedTripleTailOrReifier` reads a reifier or the end of a nested reified triple
|
|
23956
|
-
_readReifiedTripleTailOrReifier(token2) {
|
|
23957
|
-
if (token2.type === "~") {
|
|
23958
|
-
return this._readReifier;
|
|
23959
|
-
}
|
|
23960
|
-
return this._readReifiedTripleTail(token2);
|
|
23961
|
-
}
|
|
23962
|
-
// ### `_readReifiedTripleTail` reads the end of a nested reified triple
|
|
23963
|
-
_readReifiedTripleTail(token2) {
|
|
23964
|
-
if (token2.type !== ">>")
|
|
23965
|
-
return this._error(`Expected >> but got ${token2.type}`, token2);
|
|
23966
|
-
this._tripleTerm = null;
|
|
23967
|
-
const reifier = this._readTripleTerm();
|
|
23968
|
-
this._restoreContext("<<", token2);
|
|
23969
|
-
const stack = this._contextStack, parent4 = stack.length && stack[stack.length - 1];
|
|
23970
|
-
if (parent4 && parent4.type === "list") {
|
|
23971
|
-
this._emit(this._subject, this.RDF_FIRST, reifier, this._graph);
|
|
23972
|
-
return this._getContextEndReader();
|
|
23973
|
-
} else if (this._subject === null) {
|
|
23974
|
-
this._subject = reifier;
|
|
23975
|
-
return this._readPredicateOrReifierTripleEnd;
|
|
23976
|
-
} else {
|
|
23977
|
-
this._object = reifier;
|
|
23978
|
-
return this._getContextEndReader();
|
|
23979
|
-
}
|
|
23980
|
-
}
|
|
23981
|
-
_readPredicateOrReifierTripleEnd(token2) {
|
|
23982
|
-
if (token2.type === ".") {
|
|
23983
|
-
this._subject = null;
|
|
23984
|
-
return this._readPunctuation(token2);
|
|
23985
|
-
}
|
|
23986
|
-
return this._readPredicate(token2);
|
|
23987
|
-
}
|
|
23988
|
-
// ### `_readReifier` reads the triple term identifier after a tilde when in a reifying triple.
|
|
23989
|
-
_readReifier(token2) {
|
|
23990
|
-
this._reifier = this._readEntity(token2);
|
|
23991
|
-
return this._readReifiedTripleTail;
|
|
23992
|
-
}
|
|
23993
|
-
// ### `_readReifier` reads the optional triple term identifier after a tilde when in annotation syntax.
|
|
23994
|
-
_readReifierInAnnotation(token2) {
|
|
23995
|
-
if (token2.type === "IRI" || token2.type === "typeIRI" || token2.type === "type" || token2.type === "prefixed" || token2.type === "blank" || token2.type === "var") {
|
|
23996
|
-
this._reifier = this._readEntity(token2);
|
|
23997
|
-
return this._readPunctuation;
|
|
23998
|
-
}
|
|
23999
|
-
this._readTripleTerm();
|
|
24000
|
-
this._subject = null;
|
|
24001
|
-
return this._readPunctuation(token2);
|
|
24002
|
-
}
|
|
24003
|
-
_readTripleTerm() {
|
|
24004
|
-
const stack = this._contextStack, parent4 = stack.length && stack[stack.length - 1];
|
|
24005
|
-
const parentGraph = parent4 ? parent4.graph : void 0;
|
|
24006
|
-
const reifier = this._reifier || this._factory.blankNode();
|
|
24007
|
-
this._reifier = null;
|
|
24008
|
-
this._tripleTerm = this._tripleTerm || this._factory.quad(this._subject, this._predicate, this._object);
|
|
24009
|
-
this._emit(reifier, this.RDF_REIFIES, this._tripleTerm, parentGraph || this.DEFAULTGRAPH);
|
|
24010
|
-
return reifier;
|
|
24011
|
-
}
|
|
24012
23836
|
// ### `_getContextEndReader` gets the next reader function at the end of a context
|
|
24013
23837
|
_getContextEndReader() {
|
|
24014
23838
|
const contextStack = this._contextStack;
|
|
@@ -24021,10 +23845,8 @@ var N3Parser = class _N3Parser {
|
|
|
24021
23845
|
return this._readListItem;
|
|
24022
23846
|
case "formula":
|
|
24023
23847
|
return this._readFormulaTail;
|
|
24024
|
-
case "<<(":
|
|
24025
|
-
return this._readTripleTermTail;
|
|
24026
23848
|
case "<<":
|
|
24027
|
-
return this.
|
|
23849
|
+
return this._readRDFStarTailOrGraph;
|
|
24028
23850
|
}
|
|
24029
23851
|
}
|
|
24030
23852
|
// ### `_emit` sends a quad through the callback
|
|
@@ -24122,24 +23944,21 @@ var N3Parser = class _N3Parser {
|
|
|
24122
23944
|
}
|
|
24123
23945
|
// ## Public methods
|
|
24124
23946
|
// ### `parse` parses the N3 input and emits each parsed quad through the onQuad callback.
|
|
24125
|
-
parse(input2, quadCallback, prefixCallback
|
|
24126
|
-
let onQuad, onPrefix, onComment
|
|
24127
|
-
if (quadCallback && (quadCallback.onQuad || quadCallback.onPrefix || quadCallback.onComment
|
|
23947
|
+
parse(input2, quadCallback, prefixCallback) {
|
|
23948
|
+
let onQuad, onPrefix, onComment;
|
|
23949
|
+
if (quadCallback && (quadCallback.onQuad || quadCallback.onPrefix || quadCallback.onComment)) {
|
|
24128
23950
|
onQuad = quadCallback.onQuad;
|
|
24129
23951
|
onPrefix = quadCallback.onPrefix;
|
|
24130
23952
|
onComment = quadCallback.onComment;
|
|
24131
|
-
onVersion = quadCallback.onVersion;
|
|
24132
23953
|
} else {
|
|
24133
23954
|
onQuad = quadCallback;
|
|
24134
23955
|
onPrefix = prefixCallback;
|
|
24135
|
-
onVersion = versionCallback;
|
|
24136
23956
|
}
|
|
24137
|
-
this._readCallback = this.
|
|
23957
|
+
this._readCallback = this._readInTopContext;
|
|
24138
23958
|
this._sparqlStyle = false;
|
|
24139
23959
|
this._prefixes = /* @__PURE__ */ Object.create(null);
|
|
24140
23960
|
this._prefixes._ = this._blankNodePrefix ? this._blankNodePrefix.substr(2) : `b${blankNodePrefix++}_`;
|
|
24141
23961
|
this._prefixCallback = onPrefix || noop2;
|
|
24142
|
-
this._versionCallback = onVersion || noop2;
|
|
24143
23962
|
this._inversePredicate = false;
|
|
24144
23963
|
this._quantified = /* @__PURE__ */ Object.create(null);
|
|
24145
23964
|
if (!onQuad) {
|
|
@@ -24185,7 +24004,6 @@ function initDataFactory(parser, factory) {
|
|
|
24185
24004
|
parser.RDF_FIRST = factory.namedNode(IRIs_default.rdf.first);
|
|
24186
24005
|
parser.RDF_REST = factory.namedNode(IRIs_default.rdf.rest);
|
|
24187
24006
|
parser.RDF_NIL = factory.namedNode(IRIs_default.rdf.nil);
|
|
24188
|
-
parser.RDF_REIFIES = factory.namedNode(IRIs_default.rdf.reifies);
|
|
24189
24007
|
parser.N3_FORALL = factory.namedNode(IRIs_default.r.forAll);
|
|
24190
24008
|
parser.N3_FORSOME = factory.namedNode(IRIs_default.r.forSome);
|
|
24191
24009
|
parser.ABBREVIATIONS = {
|
|
@@ -24196,11 +24014,6 @@ function initDataFactory(parser, factory) {
|
|
|
24196
24014
|
};
|
|
24197
24015
|
parser.QUANTIFIERS_GRAPH = factory.namedNode("urn:n3:quantifiers");
|
|
24198
24016
|
}
|
|
24199
|
-
N3Parser.SUPPORTED_VERSIONS = [
|
|
24200
|
-
"1.2",
|
|
24201
|
-
"1.2-basic",
|
|
24202
|
-
"1.1"
|
|
24203
|
-
];
|
|
24204
24017
|
initDataFactory(N3Parser.prototype, N3DataFactory_default);
|
|
24205
24018
|
|
|
24206
24019
|
// node_modules/rdflib/esm/rdfaparser.js
|
|
@@ -28363,6 +28176,9 @@ var Thing = class {
|
|
|
28363
28176
|
var LdpContainer = class extends Thing {
|
|
28364
28177
|
constructor(uri6, store, editable = false) {
|
|
28365
28178
|
super(uri6, store, editable);
|
|
28179
|
+
this.uri = uri6;
|
|
28180
|
+
this.store = store;
|
|
28181
|
+
this.editable = editable;
|
|
28366
28182
|
}
|
|
28367
28183
|
/**
|
|
28368
28184
|
* Resources that the LDP Container contains
|
|
@@ -28500,6 +28316,8 @@ var WebIdProfile = class extends Thing {
|
|
|
28500
28316
|
constructor(webId, store, editable = false) {
|
|
28501
28317
|
super(webId, store, editable);
|
|
28502
28318
|
this.webId = webId;
|
|
28319
|
+
this.store = store;
|
|
28320
|
+
this.editable = editable;
|
|
28503
28321
|
this.profileQuery = this.store.profileQuery(this.webId);
|
|
28504
28322
|
}
|
|
28505
28323
|
/**
|
|
@@ -28640,6 +28458,9 @@ var SearchIndex = class {
|
|
|
28640
28458
|
var RdfDocument = class extends Thing {
|
|
28641
28459
|
constructor(uri6, store, editable = false) {
|
|
28642
28460
|
super(uri6, store, editable);
|
|
28461
|
+
this.uri = uri6;
|
|
28462
|
+
this.store = store;
|
|
28463
|
+
this.editable = editable;
|
|
28643
28464
|
}
|
|
28644
28465
|
subjects() {
|
|
28645
28466
|
const matches = this.store.statementsMatching(
|
|
@@ -28661,6 +28482,9 @@ var RdfDocument = class extends Thing {
|
|
|
28661
28482
|
var LabelIndex = class extends RdfDocument {
|
|
28662
28483
|
constructor(uri6, store, editable = false) {
|
|
28663
28484
|
super(uri6, store, editable);
|
|
28485
|
+
this.uri = uri6;
|
|
28486
|
+
this.store = store;
|
|
28487
|
+
this.editable = editable;
|
|
28664
28488
|
}
|
|
28665
28489
|
/**
|
|
28666
28490
|
* Returns the URIs and labels for all the things listed in the document.
|
|
@@ -50501,6 +50325,8 @@ function listKnownTerms() {
|
|
|
50501
50325
|
// src/uri/UriService.ts
|
|
50502
50326
|
var import_slugify = __toESM(require_slugify(), 1);
|
|
50503
50327
|
var UriService = class {
|
|
50328
|
+
// We expect to use the store for calculating the uris for things
|
|
50329
|
+
// e.g. looking up locations in type index
|
|
50504
50330
|
constructor(store) {
|
|
50505
50331
|
this.store = store;
|
|
50506
50332
|
}
|
|
@@ -50725,6 +50551,9 @@ var AnonymousSession = class {
|
|
|
50725
50551
|
var TypeIndex2 = class extends Thing {
|
|
50726
50552
|
constructor(uri6, store, editable = false) {
|
|
50727
50553
|
super(uri6, store, editable);
|
|
50554
|
+
this.uri = uri6;
|
|
50555
|
+
this.store = store;
|
|
50556
|
+
this.editable = editable;
|
|
50728
50557
|
}
|
|
50729
50558
|
listAll() {
|
|
50730
50559
|
const forClassStatements = this.store.statementsMatching(
|