@ldo/traverser-shexj 0.0.1-alpha.14
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/README.md +879 -0
- package/dist/ShexJTraverser.d.ts +316 -0
- package/dist/ShexJTraverser.js +7 -0
- package/dist/ShexJTraverser.js.map +1 -0
- package/dist/ShexJTraverserDefinition.d.ts +3 -0
- package/dist/ShexJTraverserDefinition.js +291 -0
- package/dist/ShexJTraverserDefinition.js.map +1 -0
- package/dist/ShexJTraverserTypes.d.ts +317 -0
- package/dist/ShexJTraverserTypes.js +3 -0
- package/dist/ShexJTraverserTypes.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -0
- package/src/ShexJTraverser.ts +7 -0
- package/src/ShexJTraverserDefinition.ts +303 -0
- package/src/ShexJTraverserTypes.ts +375 -0
- package/src/index.ts +5 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { Traverser } from "@ldo/type-traverser";
|
|
2
|
+
export declare const ShexJTraverser: Traverser<{
|
|
3
|
+
Schema: {
|
|
4
|
+
kind: "interface";
|
|
5
|
+
type: import("shexj").Schema;
|
|
6
|
+
properties: {
|
|
7
|
+
startActs: "SemAct";
|
|
8
|
+
start: "shapeExprOrRef";
|
|
9
|
+
imports: "IRIREF";
|
|
10
|
+
shapes: "ShapeDecl";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
ShapeDecl: {
|
|
14
|
+
kind: "interface";
|
|
15
|
+
type: import("shexj").ShapeDecl;
|
|
16
|
+
properties: {
|
|
17
|
+
id: "shapeDeclLabel";
|
|
18
|
+
abstract: "BOOL";
|
|
19
|
+
restricts: "shapeExprOrRef";
|
|
20
|
+
shapeExpr: "shapeExpr";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
shapeExpr: {
|
|
24
|
+
kind: "union";
|
|
25
|
+
type: import("shexj").shapeExpr;
|
|
26
|
+
typeNames: "ShapeOr" | "ShapeAnd" | "ShapeNot" | "ShapeExternal" | "NodeConstraint" | "Shape";
|
|
27
|
+
};
|
|
28
|
+
shapeExprOrRef: {
|
|
29
|
+
kind: "union";
|
|
30
|
+
type: import("shexj").shapeExprOrRef;
|
|
31
|
+
typeNames: "shapeExpr" | "shapeDeclRef";
|
|
32
|
+
};
|
|
33
|
+
ShapeOr: {
|
|
34
|
+
kind: "interface";
|
|
35
|
+
type: import("shexj").ShapeOr;
|
|
36
|
+
properties: {
|
|
37
|
+
shapeExprs: "shapeExprOrRef";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
ShapeAnd: {
|
|
41
|
+
kind: "interface";
|
|
42
|
+
type: import("shexj").ShapeAnd;
|
|
43
|
+
properties: {
|
|
44
|
+
shapeExprs: "shapeExprOrRef";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
ShapeNot: {
|
|
48
|
+
kind: "interface";
|
|
49
|
+
type: import("shexj").ShapeNot;
|
|
50
|
+
properties: {
|
|
51
|
+
shapeExpr: "shapeExprOrRef";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
ShapeExternal: {
|
|
55
|
+
kind: "interface";
|
|
56
|
+
type: import("shexj").ShapeExternal;
|
|
57
|
+
properties: Record<string, never>;
|
|
58
|
+
};
|
|
59
|
+
shapeDeclRef: {
|
|
60
|
+
kind: "union";
|
|
61
|
+
type: string;
|
|
62
|
+
typeNames: "shapeDeclLabel";
|
|
63
|
+
};
|
|
64
|
+
shapeDeclLabel: {
|
|
65
|
+
kind: "union";
|
|
66
|
+
type: string;
|
|
67
|
+
typeNames: "IRIREF" | "BNODE";
|
|
68
|
+
};
|
|
69
|
+
NodeConstraint: {
|
|
70
|
+
kind: "interface";
|
|
71
|
+
type: import("shexj").NodeConstraint;
|
|
72
|
+
properties: {
|
|
73
|
+
datatype: "IRIREF";
|
|
74
|
+
values: "valueSetValue";
|
|
75
|
+
length: "INTEGER";
|
|
76
|
+
minlength: "INTEGER";
|
|
77
|
+
maxlength: "INTEGER";
|
|
78
|
+
pattern: "STRING";
|
|
79
|
+
flags: "STRING";
|
|
80
|
+
mininclusive: "numericLiteral";
|
|
81
|
+
minexclusive: "numericLiteral";
|
|
82
|
+
totaldigits: "INTEGER";
|
|
83
|
+
fractiondigits: "INTEGER";
|
|
84
|
+
semActs: "SemAct";
|
|
85
|
+
annotations: "Annotation";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
numericLiteral: {
|
|
89
|
+
kind: "union";
|
|
90
|
+
type: number;
|
|
91
|
+
typeNames: "INTEGER" | "DECIMAL" | "DOUBLE";
|
|
92
|
+
};
|
|
93
|
+
valueSetValue: {
|
|
94
|
+
kind: "union";
|
|
95
|
+
type: import("shexj").valueSetValue;
|
|
96
|
+
typeNames: "IriStem" | "IriStemRange" | "LiteralStem" | "LiteralStemRange" | "Language" | "LanguageStem" | "LanguageStemRange" | "objectValue";
|
|
97
|
+
};
|
|
98
|
+
objectValue: {
|
|
99
|
+
kind: "union";
|
|
100
|
+
type: import("shexj").objectValue;
|
|
101
|
+
typeNames: "IRIREF" | "ObjectLiteral";
|
|
102
|
+
};
|
|
103
|
+
ObjectLiteral: {
|
|
104
|
+
kind: "interface";
|
|
105
|
+
type: import("shexj").ObjectLiteral;
|
|
106
|
+
properties: {
|
|
107
|
+
value: "STRING";
|
|
108
|
+
language: "STRING";
|
|
109
|
+
type: "STRING";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
IriStem: {
|
|
113
|
+
kind: "interface";
|
|
114
|
+
type: import("shexj").IriStem;
|
|
115
|
+
properties: {
|
|
116
|
+
stem: "IRIREF";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
IriStemRange: {
|
|
120
|
+
kind: "interface";
|
|
121
|
+
type: import("shexj").IriStemRange;
|
|
122
|
+
properties: {
|
|
123
|
+
stem: "IRIREF";
|
|
124
|
+
exclusions: "IriStemRangeExclusions";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
IriStemRangeExclusions: {
|
|
128
|
+
kind: "union";
|
|
129
|
+
type: string | import("shexj").IriStem;
|
|
130
|
+
typeNames: "IriStem" | "IRIREF";
|
|
131
|
+
};
|
|
132
|
+
LiteralStem: {
|
|
133
|
+
kind: "interface";
|
|
134
|
+
type: import("shexj").LiteralStem;
|
|
135
|
+
properties: {
|
|
136
|
+
stem: "STRING";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
LiteralStemRange: {
|
|
140
|
+
kind: "interface";
|
|
141
|
+
type: import("shexj").LiteralStemRange;
|
|
142
|
+
properties: {
|
|
143
|
+
stem: "LiteralStemRangeStem";
|
|
144
|
+
exclusions: "LiteralStemRangeExclusions";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
LiteralStemRangeStem: {
|
|
148
|
+
kind: "union";
|
|
149
|
+
type: string | import("shexj").Wildcard;
|
|
150
|
+
typeNames: "Wildcard" | "STRING";
|
|
151
|
+
};
|
|
152
|
+
LiteralStemRangeExclusions: {
|
|
153
|
+
kind: "union";
|
|
154
|
+
type: string | import("shexj").LiteralStem;
|
|
155
|
+
typeNames: "LiteralStem" | "STRING";
|
|
156
|
+
};
|
|
157
|
+
Language: {
|
|
158
|
+
kind: "interface";
|
|
159
|
+
type: import("shexj").Language;
|
|
160
|
+
properties: {
|
|
161
|
+
languageTag: "LANGTAG";
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
LanguageStem: {
|
|
165
|
+
kind: "interface";
|
|
166
|
+
type: import("shexj").LanguageStem;
|
|
167
|
+
properties: {
|
|
168
|
+
stem: "LANGTAG";
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
LanguageStemRange: {
|
|
172
|
+
kind: "interface";
|
|
173
|
+
type: import("shexj").LanguageStemRange;
|
|
174
|
+
properties: {
|
|
175
|
+
stem: "LanguageStemRangeStem";
|
|
176
|
+
exclusions: "LanguageStemRangeExclusions";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
LanguageStemRangeStem: {
|
|
180
|
+
kind: "union";
|
|
181
|
+
type: string | import("shexj").Wildcard;
|
|
182
|
+
typeNames: "Wildcard" | "LANGTAG";
|
|
183
|
+
};
|
|
184
|
+
LanguageStemRangeExclusions: {
|
|
185
|
+
kind: "union";
|
|
186
|
+
type: string | import("shexj").LanguageStem;
|
|
187
|
+
typeNames: "LanguageStem" | "LANGTAG";
|
|
188
|
+
};
|
|
189
|
+
Wildcard: {
|
|
190
|
+
kind: "interface";
|
|
191
|
+
type: import("shexj").Wildcard;
|
|
192
|
+
properties: Record<string, never>;
|
|
193
|
+
};
|
|
194
|
+
Shape: {
|
|
195
|
+
kind: "interface";
|
|
196
|
+
type: import("shexj").Shape;
|
|
197
|
+
properties: {
|
|
198
|
+
closed: "BOOL";
|
|
199
|
+
extra: "IRIREF";
|
|
200
|
+
extends: "shapeExprOrRef";
|
|
201
|
+
expression: "tripleExprOrRef";
|
|
202
|
+
semActs: "SemAct";
|
|
203
|
+
annotations: "Annotation";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
tripleExpr: {
|
|
207
|
+
kind: "union";
|
|
208
|
+
type: import("shexj").tripleExpr;
|
|
209
|
+
typeNames: "EachOf" | "OneOf" | "TripleConstraint";
|
|
210
|
+
};
|
|
211
|
+
tripleExprOrRef: {
|
|
212
|
+
kind: "union";
|
|
213
|
+
type: import("shexj").tripleExprOrRef;
|
|
214
|
+
typeNames: "tripleExpr" | "tripleExprRef";
|
|
215
|
+
};
|
|
216
|
+
EachOf: {
|
|
217
|
+
kind: "interface";
|
|
218
|
+
type: import("shexj").EachOf;
|
|
219
|
+
properties: {
|
|
220
|
+
id: "tripleExprLabel";
|
|
221
|
+
min: "INTEGER";
|
|
222
|
+
max: "INTEGER";
|
|
223
|
+
expressions: "tripleExprOrRef";
|
|
224
|
+
semActs: "SemAct";
|
|
225
|
+
annotations: "Annotation";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
OneOf: {
|
|
229
|
+
kind: "interface";
|
|
230
|
+
type: import("shexj").OneOf;
|
|
231
|
+
properties: {
|
|
232
|
+
id: "tripleExprLabel";
|
|
233
|
+
min: "INTEGER";
|
|
234
|
+
max: "INTEGER";
|
|
235
|
+
expressions: "tripleExprOrRef";
|
|
236
|
+
semActs: "SemAct";
|
|
237
|
+
annotations: "Annotation";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
TripleConstraint: {
|
|
241
|
+
kind: "interface";
|
|
242
|
+
type: import("shexj").TripleConstraint;
|
|
243
|
+
properties: {
|
|
244
|
+
id: "tripleExprLabel";
|
|
245
|
+
min: "INTEGER";
|
|
246
|
+
max: "INTEGER";
|
|
247
|
+
inverse: "BOOL";
|
|
248
|
+
predicate: "IRIREF";
|
|
249
|
+
valueExpr: "shapeExprOrRef";
|
|
250
|
+
semActs: "SemAct";
|
|
251
|
+
annotations: "Annotation";
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
tripleExprRef: {
|
|
255
|
+
kind: "union";
|
|
256
|
+
type: string;
|
|
257
|
+
typeNames: "tripleExprLabel";
|
|
258
|
+
};
|
|
259
|
+
tripleExprLabel: {
|
|
260
|
+
kind: "union";
|
|
261
|
+
type: string;
|
|
262
|
+
typeNames: "IRIREF" | "BNODE";
|
|
263
|
+
};
|
|
264
|
+
SemAct: {
|
|
265
|
+
kind: "interface";
|
|
266
|
+
type: import("shexj").SemAct;
|
|
267
|
+
properties: {
|
|
268
|
+
name: "IRIREF";
|
|
269
|
+
code: "STRING";
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
Annotation: {
|
|
273
|
+
kind: "interface";
|
|
274
|
+
type: import("shexj").Annotation;
|
|
275
|
+
properties: {
|
|
276
|
+
predicate: "IRI";
|
|
277
|
+
object: "objectValue";
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
IRIREF: {
|
|
281
|
+
kind: "primitive";
|
|
282
|
+
type: string;
|
|
283
|
+
};
|
|
284
|
+
BNODE: {
|
|
285
|
+
kind: "primitive";
|
|
286
|
+
type: string;
|
|
287
|
+
};
|
|
288
|
+
INTEGER: {
|
|
289
|
+
kind: "primitive";
|
|
290
|
+
type: number;
|
|
291
|
+
};
|
|
292
|
+
STRING: {
|
|
293
|
+
kind: "primitive";
|
|
294
|
+
type: string;
|
|
295
|
+
};
|
|
296
|
+
DECIMAL: {
|
|
297
|
+
kind: "primitive";
|
|
298
|
+
type: number;
|
|
299
|
+
};
|
|
300
|
+
DOUBLE: {
|
|
301
|
+
kind: "primitive";
|
|
302
|
+
type: number;
|
|
303
|
+
};
|
|
304
|
+
LANGTAG: {
|
|
305
|
+
kind: "primitive";
|
|
306
|
+
type: string;
|
|
307
|
+
};
|
|
308
|
+
BOOL: {
|
|
309
|
+
kind: "primitive";
|
|
310
|
+
type: boolean;
|
|
311
|
+
};
|
|
312
|
+
IRI: {
|
|
313
|
+
kind: "primitive";
|
|
314
|
+
type: string;
|
|
315
|
+
};
|
|
316
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShexJTraverser = void 0;
|
|
4
|
+
const ShexJTraverserDefinition_1 = require("./ShexJTraverserDefinition");
|
|
5
|
+
const type_traverser_1 = require("@ldo/type-traverser");
|
|
6
|
+
exports.ShexJTraverser = new type_traverser_1.Traverser(ShexJTraverserDefinition_1.ShexJTraverserDefinition);
|
|
7
|
+
//# sourceMappingURL=ShexJTraverser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverser.js","sourceRoot":"","sources":["../src/ShexJTraverser.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAEtE,wDAAgD;AAEnC,QAAA,cAAc,GAAG,IAAI,0BAAS,CACzC,mDAAwB,CACzB,CAAC"}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShexJTraverserDefinition = void 0;
|
|
4
|
+
exports.ShexJTraverserDefinition = {
|
|
5
|
+
Schema: {
|
|
6
|
+
kind: "interface",
|
|
7
|
+
properties: {
|
|
8
|
+
startActs: "SemAct",
|
|
9
|
+
start: "shapeExprOrRef",
|
|
10
|
+
imports: "IRIREF",
|
|
11
|
+
shapes: "ShapeDecl",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
ShapeDecl: {
|
|
15
|
+
kind: "interface",
|
|
16
|
+
properties: {
|
|
17
|
+
id: "shapeDeclLabel",
|
|
18
|
+
abstract: "BOOL",
|
|
19
|
+
restricts: "shapeExprOrRef",
|
|
20
|
+
shapeExpr: "shapeExpr",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
shapeExpr: {
|
|
24
|
+
kind: "union",
|
|
25
|
+
selector: (item) => item.type,
|
|
26
|
+
},
|
|
27
|
+
shapeExprOrRef: {
|
|
28
|
+
kind: "union",
|
|
29
|
+
selector: (item) => typeof item === "string" ? "shapeDeclRef" : "shapeExpr",
|
|
30
|
+
},
|
|
31
|
+
ShapeOr: {
|
|
32
|
+
kind: "interface",
|
|
33
|
+
properties: {
|
|
34
|
+
shapeExprs: "shapeExprOrRef",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
ShapeAnd: {
|
|
38
|
+
kind: "interface",
|
|
39
|
+
properties: {
|
|
40
|
+
shapeExprs: "shapeExprOrRef",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
ShapeNot: {
|
|
44
|
+
kind: "interface",
|
|
45
|
+
properties: {
|
|
46
|
+
shapeExpr: "shapeExprOrRef",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
ShapeExternal: {
|
|
50
|
+
kind: "interface",
|
|
51
|
+
properties: {},
|
|
52
|
+
},
|
|
53
|
+
shapeDeclRef: {
|
|
54
|
+
kind: "union",
|
|
55
|
+
selector: () => "shapeDeclLabel",
|
|
56
|
+
},
|
|
57
|
+
shapeDeclLabel: {
|
|
58
|
+
kind: "union",
|
|
59
|
+
selector: () => "IRIREF",
|
|
60
|
+
},
|
|
61
|
+
NodeConstraint: {
|
|
62
|
+
kind: "interface",
|
|
63
|
+
properties: {
|
|
64
|
+
datatype: "IRIREF",
|
|
65
|
+
values: "valueSetValue",
|
|
66
|
+
length: "INTEGER",
|
|
67
|
+
minlength: "INTEGER",
|
|
68
|
+
maxlength: "INTEGER",
|
|
69
|
+
pattern: "STRING",
|
|
70
|
+
flags: "STRING",
|
|
71
|
+
mininclusive: "numericLiteral",
|
|
72
|
+
minexclusive: "numericLiteral",
|
|
73
|
+
totaldigits: "INTEGER",
|
|
74
|
+
fractiondigits: "INTEGER",
|
|
75
|
+
semActs: "SemAct",
|
|
76
|
+
annotations: "Annotation",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
numericLiteral: {
|
|
80
|
+
kind: "union",
|
|
81
|
+
selector: () => "DOUBLE",
|
|
82
|
+
},
|
|
83
|
+
valueSetValue: {
|
|
84
|
+
kind: "union",
|
|
85
|
+
selector: (item) => {
|
|
86
|
+
if (typeof item === "string") {
|
|
87
|
+
return "objectValue";
|
|
88
|
+
}
|
|
89
|
+
else if (item.type &&
|
|
90
|
+
[
|
|
91
|
+
"IriStem",
|
|
92
|
+
"IriStemRange",
|
|
93
|
+
"LiteralStem",
|
|
94
|
+
"LiteralStemRange",
|
|
95
|
+
"Language",
|
|
96
|
+
"LanguageStem",
|
|
97
|
+
"LanguageStemRange",
|
|
98
|
+
].includes(item.type)) {
|
|
99
|
+
return item.type;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return "objectValue";
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
objectValue: {
|
|
107
|
+
kind: "union",
|
|
108
|
+
selector: (item) => typeof item === "string" ? "IRIREF" : "ObjectLiteral",
|
|
109
|
+
},
|
|
110
|
+
ObjectLiteral: {
|
|
111
|
+
kind: "interface",
|
|
112
|
+
properties: {
|
|
113
|
+
value: "STRING",
|
|
114
|
+
language: "STRING",
|
|
115
|
+
type: "STRING",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
IriStem: {
|
|
119
|
+
kind: "interface",
|
|
120
|
+
properties: {
|
|
121
|
+
stem: "IRIREF",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
IriStemRange: {
|
|
125
|
+
kind: "interface",
|
|
126
|
+
properties: {
|
|
127
|
+
stem: "IRIREF",
|
|
128
|
+
exclusions: "IriStemRangeExclusions",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
IriStemRangeExclusions: {
|
|
132
|
+
kind: "union",
|
|
133
|
+
selector: (item) => (typeof item === "string" ? "IRIREF" : "IriStem"),
|
|
134
|
+
},
|
|
135
|
+
LiteralStem: {
|
|
136
|
+
kind: "interface",
|
|
137
|
+
properties: {
|
|
138
|
+
stem: "STRING",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
LiteralStemRange: {
|
|
142
|
+
kind: "interface",
|
|
143
|
+
properties: {
|
|
144
|
+
stem: "LiteralStemRangeStem",
|
|
145
|
+
exclusions: "LiteralStemRangeExclusions",
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
LiteralStemRangeStem: {
|
|
149
|
+
kind: "union",
|
|
150
|
+
selector: (item) => (typeof item === "string" ? "STRING" : "Wildcard"),
|
|
151
|
+
},
|
|
152
|
+
LiteralStemRangeExclusions: {
|
|
153
|
+
kind: "union",
|
|
154
|
+
selector: (item) => (typeof item === "string" ? "STRING" : "LiteralStem"),
|
|
155
|
+
},
|
|
156
|
+
Language: {
|
|
157
|
+
kind: "interface",
|
|
158
|
+
properties: {
|
|
159
|
+
languageTag: "LANGTAG",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
LanguageStem: {
|
|
163
|
+
kind: "interface",
|
|
164
|
+
properties: {
|
|
165
|
+
stem: "LANGTAG",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
LanguageStemRange: {
|
|
169
|
+
kind: "interface",
|
|
170
|
+
properties: {
|
|
171
|
+
stem: "LanguageStemRangeStem",
|
|
172
|
+
exclusions: "LanguageStemRangeExclusions",
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
LanguageStemRangeStem: {
|
|
176
|
+
kind: "union",
|
|
177
|
+
selector: (item) => (typeof item === "string" ? "LANGTAG" : "Wildcard"),
|
|
178
|
+
},
|
|
179
|
+
LanguageStemRangeExclusions: {
|
|
180
|
+
kind: "union",
|
|
181
|
+
selector: (item) => typeof item === "string" ? "LANGTAG" : "LanguageStem",
|
|
182
|
+
},
|
|
183
|
+
Wildcard: {
|
|
184
|
+
kind: "interface",
|
|
185
|
+
properties: {},
|
|
186
|
+
},
|
|
187
|
+
Shape: {
|
|
188
|
+
kind: "interface",
|
|
189
|
+
properties: {
|
|
190
|
+
closed: "BOOL",
|
|
191
|
+
extra: "IRIREF",
|
|
192
|
+
extends: "shapeExprOrRef",
|
|
193
|
+
expression: "tripleExprOrRef",
|
|
194
|
+
semActs: "SemAct",
|
|
195
|
+
annotations: "Annotation",
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
tripleExpr: {
|
|
199
|
+
kind: "union",
|
|
200
|
+
selector: (item) => item.type,
|
|
201
|
+
},
|
|
202
|
+
tripleExprOrRef: {
|
|
203
|
+
kind: "union",
|
|
204
|
+
selector: (item) => typeof item === "string" ? "tripleExprRef" : "tripleExpr",
|
|
205
|
+
},
|
|
206
|
+
EachOf: {
|
|
207
|
+
kind: "interface",
|
|
208
|
+
properties: {
|
|
209
|
+
id: "tripleExprLabel",
|
|
210
|
+
min: "INTEGER",
|
|
211
|
+
max: "INTEGER",
|
|
212
|
+
expressions: "tripleExprOrRef",
|
|
213
|
+
semActs: "SemAct",
|
|
214
|
+
annotations: "Annotation",
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
OneOf: {
|
|
218
|
+
kind: "interface",
|
|
219
|
+
properties: {
|
|
220
|
+
id: "tripleExprLabel",
|
|
221
|
+
min: "INTEGER",
|
|
222
|
+
max: "INTEGER",
|
|
223
|
+
expressions: "tripleExprOrRef",
|
|
224
|
+
semActs: "SemAct",
|
|
225
|
+
annotations: "Annotation",
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
TripleConstraint: {
|
|
229
|
+
kind: "interface",
|
|
230
|
+
properties: {
|
|
231
|
+
id: "tripleExprLabel",
|
|
232
|
+
min: "INTEGER",
|
|
233
|
+
max: "INTEGER",
|
|
234
|
+
inverse: "BOOL",
|
|
235
|
+
predicate: "IRIREF",
|
|
236
|
+
valueExpr: "shapeExprOrRef",
|
|
237
|
+
semActs: "SemAct",
|
|
238
|
+
annotations: "Annotation",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
tripleExprRef: {
|
|
242
|
+
kind: "union",
|
|
243
|
+
selector: () => "tripleExprLabel",
|
|
244
|
+
},
|
|
245
|
+
tripleExprLabel: {
|
|
246
|
+
kind: "union",
|
|
247
|
+
selector: () => "IRIREF",
|
|
248
|
+
},
|
|
249
|
+
SemAct: {
|
|
250
|
+
kind: "interface",
|
|
251
|
+
properties: {
|
|
252
|
+
name: "IRIREF",
|
|
253
|
+
code: "STRING",
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
Annotation: {
|
|
257
|
+
kind: "interface",
|
|
258
|
+
properties: {
|
|
259
|
+
predicate: "IRI",
|
|
260
|
+
object: "objectValue",
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
IRIREF: {
|
|
264
|
+
kind: "primitive",
|
|
265
|
+
},
|
|
266
|
+
BNODE: {
|
|
267
|
+
kind: "primitive",
|
|
268
|
+
},
|
|
269
|
+
INTEGER: {
|
|
270
|
+
kind: "primitive",
|
|
271
|
+
},
|
|
272
|
+
STRING: {
|
|
273
|
+
kind: "primitive",
|
|
274
|
+
},
|
|
275
|
+
DECIMAL: {
|
|
276
|
+
kind: "primitive",
|
|
277
|
+
},
|
|
278
|
+
DOUBLE: {
|
|
279
|
+
kind: "primitive",
|
|
280
|
+
},
|
|
281
|
+
LANGTAG: {
|
|
282
|
+
kind: "primitive",
|
|
283
|
+
},
|
|
284
|
+
BOOL: {
|
|
285
|
+
kind: "primitive",
|
|
286
|
+
},
|
|
287
|
+
IRI: {
|
|
288
|
+
kind: "primitive",
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
//# sourceMappingURL=ShexJTraverserDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverserDefinition.js","sourceRoot":"","sources":["../src/ShexJTraverserDefinition.ts"],"names":[],"mappings":";;;AAIa,QAAA,wBAAwB,GACnC;IACE,MAAM,EAAE;QACN,IAAI,EAAE,WAAW;QACjB,UAAU,EAAE;YACV,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,WAAW;SACpB;KACF;IACD,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,UAAU,EAAE;YACV,EAAE,EAAE,gBAAgB;YACpB,QAAQ,EAAE,MAAM;YAChB,SAAS,EAAE,gBAAgB;YAC3B,SAAS,EAAE,WAAW;SACvB;KACF;IACD,SAAS,EAAE;QACT,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,CAAC,IAAe,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI;KACzC;IACD,cAAc,EAAE;QACd,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CACjB,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW;KAC1D;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,UAAU,EAAE;YACV,UAAU,EAAE,gBAAgB;SAC7B;KACF;IACD,QAAQ,EAAE;QACR,IAAI,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