@shaclmate/shacl-ast 4.0.8 → 4.0.10

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.
@@ -1,6 +1,6 @@
1
1
  import type { BlankNode, DatasetCore, Literal, NamedNode, Quad_Graph, Variable } from "@rdfjs/types";
2
2
  import { Either, Maybe } from "purify-ts";
3
- import { PropertyPath, Resource, ResourceSet } from "rdfjs-resource";
3
+ import { PropertyPath as RdfjsResourcePropertyPath, Resource, ResourceSet } from "rdfjs-resource";
4
4
  interface $BooleanFilter {
5
5
  readonly value?: boolean;
6
6
  }
@@ -8,13 +8,22 @@ type $CollectionFilter<ItemFilterT> = ItemFilterT & {
8
8
  readonly $maxCount?: number;
9
9
  readonly $minCount?: number;
10
10
  };
11
- type $FromRdfOptions = {
11
+ export type $FromRdfResourceFunction<T> = (resource: Resource, options?: {
12
12
  context?: unknown;
13
13
  graph?: Exclude<Quad_Graph, Variable>;
14
14
  ignoreRdfType?: boolean;
15
15
  objectSet?: $ObjectSet;
16
16
  preferredLanguages?: readonly string[];
17
- };
17
+ }) => Either<Error, T>;
18
+ export type $FromRdfResourceValuesFunction<T> = (resourceValues: Either<Error, Resource.Values>, options: {
19
+ context?: unknown;
20
+ graph?: Exclude<Quad_Graph, Variable>;
21
+ ignoreRdfType?: boolean;
22
+ objectSet?: $ObjectSet;
23
+ preferredLanguages?: readonly string[];
24
+ propertyPath: $PropertyPath;
25
+ resource: Resource;
26
+ }) => Either<Error, Resource.Values<T>>;
18
27
  interface $IdentifierFilter {
19
28
  readonly in?: readonly (BlankNode | NamedNode)[];
20
29
  readonly type?: "BlankNode" | "NamedNode";
@@ -34,17 +43,25 @@ interface $NumericFilter<T> {
34
43
  readonly minExclusive?: T;
35
44
  readonly minInclusive?: T;
36
45
  }
37
- type $PropertiesFromRdfParameters = {
38
- context?: unknown;
39
- graph?: Exclude<Quad_Graph, Variable>;
46
+ type $PropertiesFromRdfResourceFunction<T> = (resource: Resource, options: {
47
+ context: undefined | unknown;
48
+ graph: Exclude<Quad_Graph, Variable> | undefined;
40
49
  ignoreRdfType: boolean;
41
50
  objectSet: $ObjectSet;
42
51
  preferredLanguages?: readonly string[];
43
- resource: Resource;
44
- };
52
+ }) => Either<Error, T>;
53
+ export type $PropertyPath = RdfjsResourcePropertyPath;
54
+ export declare namespace $PropertyPath {
55
+ type $Filter = object;
56
+ function $filter(_filter: $Filter, _value: $PropertyPath): boolean;
57
+ const $fromRdfResource: $FromRdfResourceFunction<$PropertyPath>;
58
+ const $fromRdfResourceValues: $FromRdfResourceValuesFunction<$PropertyPath>;
59
+ const $schema: Readonly<object>;
60
+ const $toRdfResource: $ToRdfResourceFunction<$PropertyPath>;
61
+ }
45
62
  export interface $ShaclPropertySchema<TypeSchemaT = object> {
46
63
  readonly kind: "Shacl";
47
- readonly path: PropertyPath;
64
+ readonly path: $PropertyPath;
48
65
  readonly type: () => TypeSchemaT;
49
66
  }
50
67
  interface $StringFilter {
@@ -58,6 +75,18 @@ interface $TermFilter {
58
75
  readonly languageIn?: readonly string[];
59
76
  readonly typeIn?: readonly ("BlankNode" | "Literal" | "NamedNode")[];
60
77
  }
78
+ export type $ToRdfResourceFunction<T> = (value: T, options?: {
79
+ graph?: Exclude<Quad_Graph, Variable>;
80
+ ignoreRdfType?: boolean;
81
+ resourceSet?: ResourceSet;
82
+ }) => Resource;
83
+ export type $ToRdfResourceValuesFunction<T> = (value: T, options: {
84
+ graph?: Exclude<Quad_Graph, Variable>;
85
+ ignoreRdfType?: boolean;
86
+ propertyPath: $PropertyPath;
87
+ resource: Resource;
88
+ resourceSet: ResourceSet;
89
+ }) => (bigint | boolean | number | string | BlankNode | Literal | NamedNode)[];
61
90
  export interface PropertyShape {
62
91
  readonly $identifier: PropertyShape.$Identifier;
63
92
  readonly $type: "PropertyShape";
@@ -89,7 +118,7 @@ export interface PropertyShape {
89
118
  readonly not: readonly (BlankNode | NamedNode)[];
90
119
  readonly or: readonly (readonly (BlankNode | NamedNode)[])[];
91
120
  readonly order: Maybe<number>;
92
- readonly path: PropertyPath;
121
+ readonly path: $PropertyPath;
93
122
  readonly patterns: readonly string[];
94
123
  readonly uniqueLang: Maybe<boolean>;
95
124
  readonly xone: readonly (readonly (BlankNode | NamedNode)[])[];
@@ -131,15 +160,16 @@ export declare namespace PropertyShape {
131
160
  readonly not?: $CollectionFilter<$IdentifierFilter>;
132
161
  readonly or?: $CollectionFilter<$CollectionFilter<$IdentifierFilter>>;
133
162
  readonly order?: $MaybeFilter<$NumericFilter<number>>;
134
- readonly path?: PropertyPath.$Filter;
163
+ readonly path?: $PropertyPath.$Filter;
135
164
  readonly patterns?: $CollectionFilter<$StringFilter>;
136
165
  readonly uniqueLang?: $MaybeFilter<$BooleanFilter>;
137
166
  readonly xone?: $CollectionFilter<$CollectionFilter<$IdentifierFilter>>;
138
167
  };
139
- function $fromRdf(resource: Resource, options?: $FromRdfOptions): Either<Error, PropertyShape>;
168
+ const $fromRdfResource: $FromRdfResourceFunction<PropertyShape>;
169
+ const $fromRdfResourceValues: $FromRdfResourceValuesFunction<PropertyShape>;
140
170
  const $fromRdfType: NamedNode<string>;
141
171
  function isPropertyShape(object: $Object): object is PropertyShape;
142
- function $propertiesFromRdf($parameters: $PropertiesFromRdfParameters): Either<Error, {
172
+ const $propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
143
173
  $identifier: BlankNode | NamedNode;
144
174
  $type: "PropertyShape";
145
175
  and: readonly (readonly (BlankNode | NamedNode)[])[];
@@ -170,7 +200,7 @@ export declare namespace PropertyShape {
170
200
  not: readonly (BlankNode | NamedNode)[];
171
201
  or: readonly (readonly (BlankNode | NamedNode)[])[];
172
202
  order: Maybe<number>;
173
- path: PropertyPath;
203
+ path: $PropertyPath;
174
204
  patterns: readonly string[];
175
205
  uniqueLang: Maybe<boolean>;
176
206
  xone: readonly (readonly (BlankNode | NamedNode)[])[];
@@ -184,7 +214,7 @@ export declare namespace PropertyShape {
184
214
  };
185
215
  };
186
216
  readonly $type: {
187
- readonly kind: "TypeDiscriminant";
217
+ readonly kind: "Discriminant";
188
218
  readonly type: () => {
189
219
  kind: "TypeDiscriminant";
190
220
  ownValues: string[];
@@ -523,11 +553,7 @@ export declare namespace PropertyShape {
523
553
  };
524
554
  };
525
555
  };
526
- function $toRdf(_propertyShape: PropertyShape, options?: {
527
- ignoreRdfType?: boolean;
528
- graph?: Exclude<Quad_Graph, Variable>;
529
- resourceSet?: ResourceSet;
530
- }): Resource;
556
+ function $toRdfResource(_propertyShape: PropertyShape, options?: Parameters<$ToRdfResourceFunction<PropertyShape>>[1]): Resource;
531
557
  }
532
558
  export interface PropertyGroup {
533
559
  readonly $identifier: PropertyGroup.$Identifier;
@@ -547,10 +573,11 @@ export declare namespace PropertyGroup {
547
573
  readonly comments?: $CollectionFilter<$StringFilter>;
548
574
  readonly labels?: $CollectionFilter<$StringFilter>;
549
575
  };
550
- function $fromRdf(resource: Resource, options?: $FromRdfOptions): Either<Error, PropertyGroup>;
576
+ const $fromRdfResource: $FromRdfResourceFunction<PropertyGroup>;
577
+ const $fromRdfResourceValues: $FromRdfResourceValuesFunction<PropertyGroup>;
551
578
  const $fromRdfType: NamedNode<string>;
552
579
  function isPropertyGroup(object: $Object): object is PropertyGroup;
553
- function $propertiesFromRdf($parameters: $PropertiesFromRdfParameters): Either<Error, {
580
+ const $propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
554
581
  $identifier: BlankNode | NamedNode;
555
582
  $type: "PropertyGroup";
556
583
  comments: readonly string[];
@@ -565,7 +592,7 @@ export declare namespace PropertyGroup {
565
592
  };
566
593
  };
567
594
  readonly $type: {
568
- readonly kind: "TypeDiscriminant";
595
+ readonly kind: "Discriminant";
569
596
  readonly type: () => {
570
597
  kind: "TypeDiscriminant";
571
598
  ownValues: string[];
@@ -593,11 +620,7 @@ export declare namespace PropertyGroup {
593
620
  };
594
621
  };
595
622
  };
596
- function $toRdf(_propertyGroup: PropertyGroup, options?: {
597
- ignoreRdfType?: boolean;
598
- graph?: Exclude<Quad_Graph, Variable>;
599
- resourceSet?: ResourceSet;
600
- }): Resource;
623
+ function $toRdfResource(_propertyGroup: PropertyGroup, options?: Parameters<$ToRdfResourceFunction<PropertyGroup>>[1]): Resource;
601
624
  }
602
625
  export interface Ontology {
603
626
  readonly $identifier: Ontology.$Identifier;
@@ -615,10 +638,11 @@ export declare namespace Ontology {
615
638
  readonly $identifier?: $IdentifierFilter;
616
639
  readonly labels?: $CollectionFilter<$StringFilter>;
617
640
  };
618
- function $fromRdf(resource: Resource, options?: $FromRdfOptions): Either<Error, Ontology>;
641
+ const $fromRdfResource: $FromRdfResourceFunction<Ontology>;
642
+ const $fromRdfResourceValues: $FromRdfResourceValuesFunction<Ontology>;
619
643
  const $fromRdfType: NamedNode<string>;
620
644
  function isOntology(object: $Object): object is Ontology;
621
- function $propertiesFromRdf($parameters: $PropertiesFromRdfParameters): Either<Error, {
645
+ const $propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
622
646
  $identifier: BlankNode | NamedNode;
623
647
  $type: "Ontology";
624
648
  labels: readonly string[];
@@ -632,7 +656,7 @@ export declare namespace Ontology {
632
656
  };
633
657
  };
634
658
  readonly $type: {
635
- readonly kind: "TypeDiscriminant";
659
+ readonly kind: "Discriminant";
636
660
  readonly type: () => {
637
661
  kind: "TypeDiscriminant";
638
662
  ownValues: string[];
@@ -650,11 +674,7 @@ export declare namespace Ontology {
650
674
  };
651
675
  };
652
676
  };
653
- function $toRdf(_ontology: Ontology, options?: {
654
- ignoreRdfType?: boolean;
655
- graph?: Exclude<Quad_Graph, Variable>;
656
- resourceSet?: ResourceSet;
657
- }): Resource;
677
+ function $toRdfResource(_ontology: Ontology, options?: Parameters<$ToRdfResourceFunction<Ontology>>[1]): Resource;
658
678
  }
659
679
  export interface NodeShape {
660
680
  readonly $identifier: NodeShape.$Identifier;
@@ -726,10 +746,11 @@ export declare namespace NodeShape {
726
746
  readonly properties?: $CollectionFilter<$IdentifierFilter>;
727
747
  readonly xone?: $CollectionFilter<$CollectionFilter<$IdentifierFilter>>;
728
748
  };
729
- function $fromRdf(resource: Resource, options?: $FromRdfOptions): Either<Error, NodeShape>;
749
+ const $fromRdfResource: $FromRdfResourceFunction<NodeShape>;
750
+ const $fromRdfResourceValues: $FromRdfResourceValuesFunction<NodeShape>;
730
751
  const $fromRdfType: NamedNode<string>;
731
752
  function isNodeShape(object: $Object): object is NodeShape;
732
- function $propertiesFromRdf($parameters: $PropertiesFromRdfParameters): Either<Error, {
753
+ const $propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
733
754
  $identifier: BlankNode | NamedNode;
734
755
  $type: "NodeShape";
735
756
  and: readonly (readonly (BlankNode | NamedNode)[])[];
@@ -770,7 +791,7 @@ export declare namespace NodeShape {
770
791
  };
771
792
  };
772
793
  readonly $type: {
773
- readonly kind: "TypeDiscriminant";
794
+ readonly kind: "Discriminant";
774
795
  readonly type: () => {
775
796
  kind: "TypeDiscriminant";
776
797
  ownValues: string[];
@@ -1077,30 +1098,700 @@ export declare namespace NodeShape {
1077
1098
  };
1078
1099
  };
1079
1100
  };
1080
- function $toRdf(_nodeShape: NodeShape, options?: {
1081
- ignoreRdfType?: boolean;
1082
- graph?: Exclude<Quad_Graph, Variable>;
1083
- resourceSet?: ResourceSet;
1084
- }): Resource;
1101
+ function $toRdfResource(_nodeShape: NodeShape, options?: Parameters<$ToRdfResourceFunction<NodeShape>>[1]): Resource;
1085
1102
  }
1086
1103
  export type Shape = NodeShape | PropertyShape;
1087
1104
  export declare namespace Shape {
1105
+ const $toRdfResource: $ToRdfResourceFunction<Shape>;
1106
+ const $filter: (filter: Shape.$Filter, value: Shape) => boolean;
1107
+ type $Filter = {
1108
+ readonly $identifier?: $IdentifierFilter;
1109
+ readonly on?: {
1110
+ readonly NodeShape?: NodeShape.$Filter;
1111
+ readonly PropertyShape?: PropertyShape.$Filter;
1112
+ };
1113
+ };
1114
+ const $fromRdfResource: $FromRdfResourceFunction<Shape>;
1115
+ const $fromRdfResourceValues: $FromRdfResourceValuesFunction<Shape>;
1088
1116
  type $Identifier = BlankNode | NamedNode;
1089
1117
  namespace $Identifier {
1090
1118
  const fromString: typeof $identifierFromString;
1091
1119
  const toString: typeof import("rdfjs-resource/dist/Identifier.js").Identifier.toString;
1092
1120
  }
1093
- function $filter(filter: Shape.$Filter, value: Shape): boolean;
1094
- interface $Filter {
1095
- readonly $identifier?: $IdentifierFilter;
1096
- readonly on?: {
1097
- readonly NodeShape?: Omit<NodeShape.$Filter, "$identifier">;
1098
- readonly PropertyShape?: Omit<PropertyShape.$Filter, "$identifier">;
1099
- };
1100
- }
1101
- function $fromRdf(resource: Resource, options?: $FromRdfOptions): Either<Error, Shape>;
1102
- function isShape(object: $Object): object is Shape;
1103
1121
  const $schema: {
1122
+ readonly kind: "NamedObjectUnion";
1123
+ readonly members: {
1124
+ readonly NodeShape: {
1125
+ readonly discriminantValues: readonly ["NodeShape"];
1126
+ readonly type: {
1127
+ readonly properties: {
1128
+ readonly $identifier: {
1129
+ readonly kind: "Identifier";
1130
+ readonly type: () => {
1131
+ kind: "Identifier";
1132
+ };
1133
+ };
1134
+ readonly $type: {
1135
+ readonly kind: "Discriminant";
1136
+ readonly type: () => {
1137
+ kind: "TypeDiscriminant";
1138
+ ownValues: string[];
1139
+ };
1140
+ };
1141
+ readonly and: {
1142
+ readonly kind: "Shacl";
1143
+ readonly type: () => {
1144
+ kind: "Set";
1145
+ item: () => {
1146
+ kind: "List";
1147
+ item: () => {
1148
+ kind: "Identifier";
1149
+ };
1150
+ };
1151
+ };
1152
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#and">;
1153
+ };
1154
+ readonly classes: {
1155
+ readonly kind: "Shacl";
1156
+ readonly type: () => {
1157
+ kind: "Set";
1158
+ item: () => {
1159
+ kind: "Iri";
1160
+ };
1161
+ };
1162
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#class">;
1163
+ };
1164
+ readonly closed: {
1165
+ readonly kind: "Shacl";
1166
+ readonly type: () => {
1167
+ kind: "Maybe";
1168
+ item: () => {
1169
+ kind: "Boolean";
1170
+ };
1171
+ };
1172
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#closed">;
1173
+ };
1174
+ readonly comments: {
1175
+ readonly kind: "Shacl";
1176
+ readonly type: () => {
1177
+ kind: "Set";
1178
+ item: () => {
1179
+ kind: "String";
1180
+ };
1181
+ };
1182
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#comment">;
1183
+ };
1184
+ readonly datatype: {
1185
+ readonly kind: "Shacl";
1186
+ readonly type: () => {
1187
+ kind: "Maybe";
1188
+ item: () => {
1189
+ kind: "Iri";
1190
+ };
1191
+ };
1192
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#datatype">;
1193
+ };
1194
+ readonly deactivated: {
1195
+ readonly kind: "Shacl";
1196
+ readonly type: () => {
1197
+ kind: "Maybe";
1198
+ item: () => {
1199
+ kind: "Boolean";
1200
+ };
1201
+ };
1202
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#deactivated">;
1203
+ };
1204
+ readonly flags: {
1205
+ readonly kind: "Shacl";
1206
+ readonly type: () => {
1207
+ kind: "Set";
1208
+ item: () => {
1209
+ kind: "String";
1210
+ };
1211
+ };
1212
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#flags">;
1213
+ };
1214
+ readonly hasValues: {
1215
+ readonly kind: "Shacl";
1216
+ readonly type: () => {
1217
+ kind: "Set";
1218
+ item: () => {
1219
+ kind: "Term";
1220
+ };
1221
+ };
1222
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#hasValue">;
1223
+ };
1224
+ readonly ignoredProperties: {
1225
+ readonly kind: "Shacl";
1226
+ readonly type: () => {
1227
+ kind: "Maybe";
1228
+ item: () => {
1229
+ kind: "List";
1230
+ item: () => {
1231
+ kind: "Iri";
1232
+ };
1233
+ };
1234
+ };
1235
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#ignoredProperties">;
1236
+ };
1237
+ readonly in_: {
1238
+ readonly kind: "Shacl";
1239
+ readonly type: () => {
1240
+ kind: "Maybe";
1241
+ item: () => {
1242
+ kind: "List";
1243
+ item: () => {
1244
+ kind: "Term";
1245
+ };
1246
+ };
1247
+ };
1248
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#in">;
1249
+ };
1250
+ readonly isDefinedBy: {
1251
+ readonly kind: "Shacl";
1252
+ readonly type: () => {
1253
+ kind: "Maybe";
1254
+ item: () => {
1255
+ kind: "Identifier";
1256
+ };
1257
+ };
1258
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#isDefinedBy">;
1259
+ };
1260
+ readonly labels: {
1261
+ readonly kind: "Shacl";
1262
+ readonly type: () => {
1263
+ kind: "Set";
1264
+ item: () => {
1265
+ kind: "String";
1266
+ };
1267
+ };
1268
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#label">;
1269
+ };
1270
+ readonly languageIn: {
1271
+ readonly kind: "Shacl";
1272
+ readonly type: () => {
1273
+ kind: "Maybe";
1274
+ item: () => {
1275
+ kind: "List";
1276
+ item: () => {
1277
+ kind: "String";
1278
+ };
1279
+ };
1280
+ };
1281
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#languageIn">;
1282
+ };
1283
+ readonly maxCount: {
1284
+ readonly kind: "Shacl";
1285
+ readonly type: () => {
1286
+ kind: "Maybe";
1287
+ item: () => {
1288
+ kind: "Int";
1289
+ };
1290
+ };
1291
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxCount">;
1292
+ };
1293
+ readonly maxExclusive: {
1294
+ readonly kind: "Shacl";
1295
+ readonly type: () => {
1296
+ kind: "Maybe";
1297
+ item: () => {
1298
+ kind: "Literal";
1299
+ };
1300
+ };
1301
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxExclusive">;
1302
+ };
1303
+ readonly maxInclusive: {
1304
+ readonly kind: "Shacl";
1305
+ readonly type: () => {
1306
+ kind: "Maybe";
1307
+ item: () => {
1308
+ kind: "Literal";
1309
+ };
1310
+ };
1311
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxInclusive">;
1312
+ };
1313
+ readonly maxLength: {
1314
+ readonly kind: "Shacl";
1315
+ readonly type: () => {
1316
+ kind: "Maybe";
1317
+ item: () => {
1318
+ kind: "Int";
1319
+ };
1320
+ };
1321
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxLength">;
1322
+ };
1323
+ readonly minCount: {
1324
+ readonly kind: "Shacl";
1325
+ readonly type: () => {
1326
+ kind: "Maybe";
1327
+ item: () => {
1328
+ kind: "Int";
1329
+ };
1330
+ };
1331
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minCount">;
1332
+ };
1333
+ readonly minExclusive: {
1334
+ readonly kind: "Shacl";
1335
+ readonly type: () => {
1336
+ kind: "Maybe";
1337
+ item: () => {
1338
+ kind: "Literal";
1339
+ };
1340
+ };
1341
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minExclusive">;
1342
+ };
1343
+ readonly minInclusive: {
1344
+ readonly kind: "Shacl";
1345
+ readonly type: () => {
1346
+ kind: "Maybe";
1347
+ item: () => {
1348
+ kind: "Literal";
1349
+ };
1350
+ };
1351
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minInclusive">;
1352
+ };
1353
+ readonly minLength: {
1354
+ readonly kind: "Shacl";
1355
+ readonly type: () => {
1356
+ kind: "Maybe";
1357
+ item: () => {
1358
+ kind: "Int";
1359
+ };
1360
+ };
1361
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minLength">;
1362
+ };
1363
+ readonly nodeKind: {
1364
+ readonly kind: "Shacl";
1365
+ readonly type: () => {
1366
+ kind: "Maybe";
1367
+ item: () => {
1368
+ kind: "Iri";
1369
+ in: (NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#IRI"> | NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1370
+ };
1371
+ };
1372
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1373
+ };
1374
+ readonly nodes: {
1375
+ readonly kind: "Shacl";
1376
+ readonly type: () => {
1377
+ kind: "Set";
1378
+ item: () => {
1379
+ kind: "Identifier";
1380
+ };
1381
+ };
1382
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#node">;
1383
+ };
1384
+ readonly not: {
1385
+ readonly kind: "Shacl";
1386
+ readonly type: () => {
1387
+ kind: "Set";
1388
+ item: () => {
1389
+ kind: "Identifier";
1390
+ };
1391
+ };
1392
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#not">;
1393
+ };
1394
+ readonly or: {
1395
+ readonly kind: "Shacl";
1396
+ readonly type: () => {
1397
+ kind: "Set";
1398
+ item: () => {
1399
+ kind: "List";
1400
+ item: () => {
1401
+ kind: "Identifier";
1402
+ };
1403
+ };
1404
+ };
1405
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#or">;
1406
+ };
1407
+ readonly patterns: {
1408
+ readonly kind: "Shacl";
1409
+ readonly type: () => {
1410
+ kind: "Set";
1411
+ item: () => {
1412
+ kind: "String";
1413
+ };
1414
+ };
1415
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#pattern">;
1416
+ };
1417
+ readonly properties: {
1418
+ readonly kind: "Shacl";
1419
+ readonly type: () => {
1420
+ kind: "Set";
1421
+ item: () => {
1422
+ kind: "Identifier";
1423
+ };
1424
+ };
1425
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#property">;
1426
+ };
1427
+ readonly xone: {
1428
+ readonly kind: "Shacl";
1429
+ readonly type: () => {
1430
+ kind: "Set";
1431
+ item: () => {
1432
+ kind: "List";
1433
+ item: () => {
1434
+ kind: "Identifier";
1435
+ };
1436
+ };
1437
+ };
1438
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#xone">;
1439
+ };
1440
+ };
1441
+ };
1442
+ };
1443
+ readonly PropertyShape: {
1444
+ readonly discriminantValues: readonly ["PropertyShape"];
1445
+ readonly type: {
1446
+ readonly properties: {
1447
+ readonly $identifier: {
1448
+ readonly kind: "Identifier";
1449
+ readonly type: () => {
1450
+ kind: "Identifier";
1451
+ };
1452
+ };
1453
+ readonly $type: {
1454
+ readonly kind: "Discriminant";
1455
+ readonly type: () => {
1456
+ kind: "TypeDiscriminant";
1457
+ ownValues: string[];
1458
+ };
1459
+ };
1460
+ readonly and: {
1461
+ readonly kind: "Shacl";
1462
+ readonly type: () => {
1463
+ kind: "Set";
1464
+ item: () => {
1465
+ kind: "List";
1466
+ item: () => {
1467
+ kind: "Identifier";
1468
+ };
1469
+ };
1470
+ };
1471
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#and">;
1472
+ };
1473
+ readonly classes: {
1474
+ readonly kind: "Shacl";
1475
+ readonly type: () => {
1476
+ kind: "Set";
1477
+ item: () => {
1478
+ kind: "Iri";
1479
+ };
1480
+ };
1481
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#class">;
1482
+ };
1483
+ readonly comments: {
1484
+ readonly kind: "Shacl";
1485
+ readonly type: () => {
1486
+ kind: "Set";
1487
+ item: () => {
1488
+ kind: "String";
1489
+ };
1490
+ };
1491
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#comment">;
1492
+ };
1493
+ readonly datatype: {
1494
+ readonly kind: "Shacl";
1495
+ readonly type: () => {
1496
+ kind: "Maybe";
1497
+ item: () => {
1498
+ kind: "Iri";
1499
+ };
1500
+ };
1501
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#datatype">;
1502
+ };
1503
+ readonly deactivated: {
1504
+ readonly kind: "Shacl";
1505
+ readonly type: () => {
1506
+ kind: "Maybe";
1507
+ item: () => {
1508
+ kind: "Boolean";
1509
+ };
1510
+ };
1511
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#deactivated">;
1512
+ };
1513
+ readonly defaultValue: {
1514
+ readonly kind: "Shacl";
1515
+ readonly type: () => {
1516
+ kind: "Maybe";
1517
+ item: () => {
1518
+ kind: "Term";
1519
+ };
1520
+ };
1521
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#defaultValue">;
1522
+ };
1523
+ readonly descriptions: {
1524
+ readonly kind: "Shacl";
1525
+ readonly type: () => {
1526
+ kind: "Set";
1527
+ item: () => {
1528
+ kind: "String";
1529
+ };
1530
+ };
1531
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#description">;
1532
+ };
1533
+ readonly flags: {
1534
+ readonly kind: "Shacl";
1535
+ readonly type: () => {
1536
+ kind: "Set";
1537
+ item: () => {
1538
+ kind: "String";
1539
+ };
1540
+ };
1541
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#flags">;
1542
+ };
1543
+ readonly groups: {
1544
+ readonly kind: "Shacl";
1545
+ readonly type: () => {
1546
+ kind: "Set";
1547
+ item: () => {
1548
+ kind: "Identifier";
1549
+ };
1550
+ };
1551
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#group">;
1552
+ };
1553
+ readonly hasValues: {
1554
+ readonly kind: "Shacl";
1555
+ readonly type: () => {
1556
+ kind: "Set";
1557
+ item: () => {
1558
+ kind: "Term";
1559
+ };
1560
+ };
1561
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#hasValue">;
1562
+ };
1563
+ readonly in_: {
1564
+ readonly kind: "Shacl";
1565
+ readonly type: () => {
1566
+ kind: "Maybe";
1567
+ item: () => {
1568
+ kind: "List";
1569
+ item: () => {
1570
+ kind: "Term";
1571
+ };
1572
+ };
1573
+ };
1574
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#in">;
1575
+ };
1576
+ readonly isDefinedBy: {
1577
+ readonly kind: "Shacl";
1578
+ readonly type: () => {
1579
+ kind: "Maybe";
1580
+ item: () => {
1581
+ kind: "Identifier";
1582
+ };
1583
+ };
1584
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#isDefinedBy">;
1585
+ };
1586
+ readonly labels: {
1587
+ readonly kind: "Shacl";
1588
+ readonly type: () => {
1589
+ kind: "Set";
1590
+ item: () => {
1591
+ kind: "String";
1592
+ };
1593
+ };
1594
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#label">;
1595
+ };
1596
+ readonly languageIn: {
1597
+ readonly kind: "Shacl";
1598
+ readonly type: () => {
1599
+ kind: "Maybe";
1600
+ item: () => {
1601
+ kind: "List";
1602
+ item: () => {
1603
+ kind: "String";
1604
+ };
1605
+ };
1606
+ };
1607
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#languageIn">;
1608
+ };
1609
+ readonly maxCount: {
1610
+ readonly kind: "Shacl";
1611
+ readonly type: () => {
1612
+ kind: "Maybe";
1613
+ item: () => {
1614
+ kind: "Int";
1615
+ };
1616
+ };
1617
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxCount">;
1618
+ };
1619
+ readonly maxExclusive: {
1620
+ readonly kind: "Shacl";
1621
+ readonly type: () => {
1622
+ kind: "Maybe";
1623
+ item: () => {
1624
+ kind: "Literal";
1625
+ };
1626
+ };
1627
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxExclusive">;
1628
+ };
1629
+ readonly maxInclusive: {
1630
+ readonly kind: "Shacl";
1631
+ readonly type: () => {
1632
+ kind: "Maybe";
1633
+ item: () => {
1634
+ kind: "Literal";
1635
+ };
1636
+ };
1637
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxInclusive">;
1638
+ };
1639
+ readonly maxLength: {
1640
+ readonly kind: "Shacl";
1641
+ readonly type: () => {
1642
+ kind: "Maybe";
1643
+ item: () => {
1644
+ kind: "Int";
1645
+ };
1646
+ };
1647
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxLength">;
1648
+ };
1649
+ readonly minCount: {
1650
+ readonly kind: "Shacl";
1651
+ readonly type: () => {
1652
+ kind: "Maybe";
1653
+ item: () => {
1654
+ kind: "Int";
1655
+ };
1656
+ };
1657
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minCount">;
1658
+ };
1659
+ readonly minExclusive: {
1660
+ readonly kind: "Shacl";
1661
+ readonly type: () => {
1662
+ kind: "Maybe";
1663
+ item: () => {
1664
+ kind: "Literal";
1665
+ };
1666
+ };
1667
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minExclusive">;
1668
+ };
1669
+ readonly minInclusive: {
1670
+ readonly kind: "Shacl";
1671
+ readonly type: () => {
1672
+ kind: "Maybe";
1673
+ item: () => {
1674
+ kind: "Literal";
1675
+ };
1676
+ };
1677
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minInclusive">;
1678
+ };
1679
+ readonly minLength: {
1680
+ readonly kind: "Shacl";
1681
+ readonly type: () => {
1682
+ kind: "Maybe";
1683
+ item: () => {
1684
+ kind: "Int";
1685
+ };
1686
+ };
1687
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minLength">;
1688
+ };
1689
+ readonly names: {
1690
+ readonly kind: "Shacl";
1691
+ readonly type: () => {
1692
+ kind: "Set";
1693
+ item: () => {
1694
+ kind: "String";
1695
+ };
1696
+ };
1697
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#name">;
1698
+ };
1699
+ readonly nodeKind: {
1700
+ readonly kind: "Shacl";
1701
+ readonly type: () => {
1702
+ kind: "Maybe";
1703
+ item: () => {
1704
+ kind: "Iri";
1705
+ in: (NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#IRI"> | NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1706
+ };
1707
+ };
1708
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1709
+ };
1710
+ readonly nodes: {
1711
+ readonly kind: "Shacl";
1712
+ readonly type: () => {
1713
+ kind: "Set";
1714
+ item: () => {
1715
+ kind: "Identifier";
1716
+ };
1717
+ };
1718
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#node">;
1719
+ };
1720
+ readonly not: {
1721
+ readonly kind: "Shacl";
1722
+ readonly type: () => {
1723
+ kind: "Set";
1724
+ item: () => {
1725
+ kind: "Identifier";
1726
+ };
1727
+ };
1728
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#not">;
1729
+ };
1730
+ readonly or: {
1731
+ readonly kind: "Shacl";
1732
+ readonly type: () => {
1733
+ kind: "Set";
1734
+ item: () => {
1735
+ kind: "List";
1736
+ item: () => {
1737
+ kind: "Identifier";
1738
+ };
1739
+ };
1740
+ };
1741
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#or">;
1742
+ };
1743
+ readonly order: {
1744
+ readonly kind: "Shacl";
1745
+ readonly type: () => {
1746
+ kind: "Maybe";
1747
+ item: () => {
1748
+ kind: "Float";
1749
+ };
1750
+ };
1751
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#order">;
1752
+ };
1753
+ readonly path: {
1754
+ readonly kind: "Shacl";
1755
+ readonly type: () => object;
1756
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#path">;
1757
+ };
1758
+ readonly patterns: {
1759
+ readonly kind: "Shacl";
1760
+ readonly type: () => {
1761
+ kind: "Set";
1762
+ item: () => {
1763
+ kind: "String";
1764
+ };
1765
+ };
1766
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#pattern">;
1767
+ };
1768
+ readonly uniqueLang: {
1769
+ readonly kind: "Shacl";
1770
+ readonly type: () => {
1771
+ kind: "Maybe";
1772
+ item: () => {
1773
+ kind: "Boolean";
1774
+ };
1775
+ };
1776
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#uniqueLang">;
1777
+ };
1778
+ readonly xone: {
1779
+ readonly kind: "Shacl";
1780
+ readonly type: () => {
1781
+ kind: "Set";
1782
+ item: () => {
1783
+ kind: "List";
1784
+ item: () => {
1785
+ kind: "Identifier";
1786
+ };
1787
+ };
1788
+ };
1789
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#xone">;
1790
+ };
1791
+ };
1792
+ };
1793
+ };
1794
+ };
1104
1795
  readonly properties: {
1105
1796
  readonly and: {
1106
1797
  readonly kind: "Shacl";
@@ -1370,30 +2061,773 @@ export declare namespace Shape {
1370
2061
  };
1371
2062
  };
1372
2063
  };
1373
- function $toRdf(_shape: Shape, _parameters?: {
1374
- graph?: Exclude<Quad_Graph, Variable>;
1375
- resourceSet?: ResourceSet;
1376
- }): Resource;
2064
+ const $toRdfResourceValues: $ToRdfResourceValuesFunction<Shape>;
2065
+ function isShape(object: $Object): object is Shape;
1377
2066
  }
1378
2067
  export type $Object = NodeShape | Ontology | PropertyGroup | PropertyShape;
1379
2068
  export declare namespace $Object {
2069
+ const $toRdfResource: $ToRdfResourceFunction<$Object>;
2070
+ const $filter: (filter: $Object.$Filter, value: $Object) => boolean;
2071
+ type $Filter = {
2072
+ readonly $identifier?: $IdentifierFilter;
2073
+ readonly on?: {
2074
+ readonly NodeShape?: NodeShape.$Filter;
2075
+ readonly Ontology?: Ontology.$Filter;
2076
+ readonly PropertyGroup?: PropertyGroup.$Filter;
2077
+ readonly PropertyShape?: PropertyShape.$Filter;
2078
+ };
2079
+ };
2080
+ const $fromRdfResource: $FromRdfResourceFunction<$Object>;
2081
+ const $fromRdfResourceValues: $FromRdfResourceValuesFunction<$Object>;
1380
2082
  type $Identifier = BlankNode | NamedNode;
1381
2083
  namespace $Identifier {
1382
2084
  const fromString: typeof $identifierFromString;
1383
2085
  const toString: typeof import("rdfjs-resource/dist/Identifier.js").Identifier.toString;
1384
2086
  }
1385
- function $filter(filter: $Object.$Filter, value: $Object): boolean;
1386
- interface $Filter {
1387
- readonly $identifier?: $IdentifierFilter;
1388
- readonly on?: {
1389
- readonly NodeShape?: Omit<NodeShape.$Filter, "$identifier">;
1390
- readonly Ontology?: Omit<Ontology.$Filter, "$identifier">;
1391
- readonly PropertyGroup?: Omit<PropertyGroup.$Filter, "$identifier">;
1392
- readonly PropertyShape?: Omit<PropertyShape.$Filter, "$identifier">;
1393
- };
1394
- }
1395
- function $fromRdf(resource: Resource, options?: $FromRdfOptions): Either<Error, $Object>;
1396
2087
  const $schema: {
2088
+ readonly kind: "NamedObjectUnion";
2089
+ readonly members: {
2090
+ readonly NodeShape: {
2091
+ readonly discriminantValues: readonly ["NodeShape"];
2092
+ readonly type: {
2093
+ readonly properties: {
2094
+ readonly $identifier: {
2095
+ readonly kind: "Identifier";
2096
+ readonly type: () => {
2097
+ kind: "Identifier";
2098
+ };
2099
+ };
2100
+ readonly $type: {
2101
+ readonly kind: "Discriminant";
2102
+ readonly type: () => {
2103
+ kind: "TypeDiscriminant";
2104
+ ownValues: string[];
2105
+ };
2106
+ };
2107
+ readonly and: {
2108
+ readonly kind: "Shacl";
2109
+ readonly type: () => {
2110
+ kind: "Set";
2111
+ item: () => {
2112
+ kind: "List";
2113
+ item: () => {
2114
+ kind: "Identifier";
2115
+ };
2116
+ };
2117
+ };
2118
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#and">;
2119
+ };
2120
+ readonly classes: {
2121
+ readonly kind: "Shacl";
2122
+ readonly type: () => {
2123
+ kind: "Set";
2124
+ item: () => {
2125
+ kind: "Iri";
2126
+ };
2127
+ };
2128
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#class">;
2129
+ };
2130
+ readonly closed: {
2131
+ readonly kind: "Shacl";
2132
+ readonly type: () => {
2133
+ kind: "Maybe";
2134
+ item: () => {
2135
+ kind: "Boolean";
2136
+ };
2137
+ };
2138
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#closed">;
2139
+ };
2140
+ readonly comments: {
2141
+ readonly kind: "Shacl";
2142
+ readonly type: () => {
2143
+ kind: "Set";
2144
+ item: () => {
2145
+ kind: "String";
2146
+ };
2147
+ };
2148
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#comment">;
2149
+ };
2150
+ readonly datatype: {
2151
+ readonly kind: "Shacl";
2152
+ readonly type: () => {
2153
+ kind: "Maybe";
2154
+ item: () => {
2155
+ kind: "Iri";
2156
+ };
2157
+ };
2158
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#datatype">;
2159
+ };
2160
+ readonly deactivated: {
2161
+ readonly kind: "Shacl";
2162
+ readonly type: () => {
2163
+ kind: "Maybe";
2164
+ item: () => {
2165
+ kind: "Boolean";
2166
+ };
2167
+ };
2168
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#deactivated">;
2169
+ };
2170
+ readonly flags: {
2171
+ readonly kind: "Shacl";
2172
+ readonly type: () => {
2173
+ kind: "Set";
2174
+ item: () => {
2175
+ kind: "String";
2176
+ };
2177
+ };
2178
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#flags">;
2179
+ };
2180
+ readonly hasValues: {
2181
+ readonly kind: "Shacl";
2182
+ readonly type: () => {
2183
+ kind: "Set";
2184
+ item: () => {
2185
+ kind: "Term";
2186
+ };
2187
+ };
2188
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#hasValue">;
2189
+ };
2190
+ readonly ignoredProperties: {
2191
+ readonly kind: "Shacl";
2192
+ readonly type: () => {
2193
+ kind: "Maybe";
2194
+ item: () => {
2195
+ kind: "List";
2196
+ item: () => {
2197
+ kind: "Iri";
2198
+ };
2199
+ };
2200
+ };
2201
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#ignoredProperties">;
2202
+ };
2203
+ readonly in_: {
2204
+ readonly kind: "Shacl";
2205
+ readonly type: () => {
2206
+ kind: "Maybe";
2207
+ item: () => {
2208
+ kind: "List";
2209
+ item: () => {
2210
+ kind: "Term";
2211
+ };
2212
+ };
2213
+ };
2214
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#in">;
2215
+ };
2216
+ readonly isDefinedBy: {
2217
+ readonly kind: "Shacl";
2218
+ readonly type: () => {
2219
+ kind: "Maybe";
2220
+ item: () => {
2221
+ kind: "Identifier";
2222
+ };
2223
+ };
2224
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#isDefinedBy">;
2225
+ };
2226
+ readonly labels: {
2227
+ readonly kind: "Shacl";
2228
+ readonly type: () => {
2229
+ kind: "Set";
2230
+ item: () => {
2231
+ kind: "String";
2232
+ };
2233
+ };
2234
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#label">;
2235
+ };
2236
+ readonly languageIn: {
2237
+ readonly kind: "Shacl";
2238
+ readonly type: () => {
2239
+ kind: "Maybe";
2240
+ item: () => {
2241
+ kind: "List";
2242
+ item: () => {
2243
+ kind: "String";
2244
+ };
2245
+ };
2246
+ };
2247
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#languageIn">;
2248
+ };
2249
+ readonly maxCount: {
2250
+ readonly kind: "Shacl";
2251
+ readonly type: () => {
2252
+ kind: "Maybe";
2253
+ item: () => {
2254
+ kind: "Int";
2255
+ };
2256
+ };
2257
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxCount">;
2258
+ };
2259
+ readonly maxExclusive: {
2260
+ readonly kind: "Shacl";
2261
+ readonly type: () => {
2262
+ kind: "Maybe";
2263
+ item: () => {
2264
+ kind: "Literal";
2265
+ };
2266
+ };
2267
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxExclusive">;
2268
+ };
2269
+ readonly maxInclusive: {
2270
+ readonly kind: "Shacl";
2271
+ readonly type: () => {
2272
+ kind: "Maybe";
2273
+ item: () => {
2274
+ kind: "Literal";
2275
+ };
2276
+ };
2277
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxInclusive">;
2278
+ };
2279
+ readonly maxLength: {
2280
+ readonly kind: "Shacl";
2281
+ readonly type: () => {
2282
+ kind: "Maybe";
2283
+ item: () => {
2284
+ kind: "Int";
2285
+ };
2286
+ };
2287
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxLength">;
2288
+ };
2289
+ readonly minCount: {
2290
+ readonly kind: "Shacl";
2291
+ readonly type: () => {
2292
+ kind: "Maybe";
2293
+ item: () => {
2294
+ kind: "Int";
2295
+ };
2296
+ };
2297
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minCount">;
2298
+ };
2299
+ readonly minExclusive: {
2300
+ readonly kind: "Shacl";
2301
+ readonly type: () => {
2302
+ kind: "Maybe";
2303
+ item: () => {
2304
+ kind: "Literal";
2305
+ };
2306
+ };
2307
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minExclusive">;
2308
+ };
2309
+ readonly minInclusive: {
2310
+ readonly kind: "Shacl";
2311
+ readonly type: () => {
2312
+ kind: "Maybe";
2313
+ item: () => {
2314
+ kind: "Literal";
2315
+ };
2316
+ };
2317
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minInclusive">;
2318
+ };
2319
+ readonly minLength: {
2320
+ readonly kind: "Shacl";
2321
+ readonly type: () => {
2322
+ kind: "Maybe";
2323
+ item: () => {
2324
+ kind: "Int";
2325
+ };
2326
+ };
2327
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minLength">;
2328
+ };
2329
+ readonly nodeKind: {
2330
+ readonly kind: "Shacl";
2331
+ readonly type: () => {
2332
+ kind: "Maybe";
2333
+ item: () => {
2334
+ kind: "Iri";
2335
+ in: (NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#IRI"> | NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2336
+ };
2337
+ };
2338
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2339
+ };
2340
+ readonly nodes: {
2341
+ readonly kind: "Shacl";
2342
+ readonly type: () => {
2343
+ kind: "Set";
2344
+ item: () => {
2345
+ kind: "Identifier";
2346
+ };
2347
+ };
2348
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#node">;
2349
+ };
2350
+ readonly not: {
2351
+ readonly kind: "Shacl";
2352
+ readonly type: () => {
2353
+ kind: "Set";
2354
+ item: () => {
2355
+ kind: "Identifier";
2356
+ };
2357
+ };
2358
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#not">;
2359
+ };
2360
+ readonly or: {
2361
+ readonly kind: "Shacl";
2362
+ readonly type: () => {
2363
+ kind: "Set";
2364
+ item: () => {
2365
+ kind: "List";
2366
+ item: () => {
2367
+ kind: "Identifier";
2368
+ };
2369
+ };
2370
+ };
2371
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#or">;
2372
+ };
2373
+ readonly patterns: {
2374
+ readonly kind: "Shacl";
2375
+ readonly type: () => {
2376
+ kind: "Set";
2377
+ item: () => {
2378
+ kind: "String";
2379
+ };
2380
+ };
2381
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#pattern">;
2382
+ };
2383
+ readonly properties: {
2384
+ readonly kind: "Shacl";
2385
+ readonly type: () => {
2386
+ kind: "Set";
2387
+ item: () => {
2388
+ kind: "Identifier";
2389
+ };
2390
+ };
2391
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#property">;
2392
+ };
2393
+ readonly xone: {
2394
+ readonly kind: "Shacl";
2395
+ readonly type: () => {
2396
+ kind: "Set";
2397
+ item: () => {
2398
+ kind: "List";
2399
+ item: () => {
2400
+ kind: "Identifier";
2401
+ };
2402
+ };
2403
+ };
2404
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#xone">;
2405
+ };
2406
+ };
2407
+ };
2408
+ };
2409
+ readonly Ontology: {
2410
+ readonly discriminantValues: readonly ["Ontology"];
2411
+ readonly type: {
2412
+ readonly properties: {
2413
+ readonly $identifier: {
2414
+ readonly kind: "Identifier";
2415
+ readonly type: () => {
2416
+ kind: "Identifier";
2417
+ };
2418
+ };
2419
+ readonly $type: {
2420
+ readonly kind: "Discriminant";
2421
+ readonly type: () => {
2422
+ kind: "TypeDiscriminant";
2423
+ ownValues: string[];
2424
+ };
2425
+ };
2426
+ readonly labels: {
2427
+ readonly kind: "Shacl";
2428
+ readonly type: () => {
2429
+ kind: "Set";
2430
+ item: () => {
2431
+ kind: "String";
2432
+ };
2433
+ };
2434
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#label">;
2435
+ };
2436
+ };
2437
+ };
2438
+ };
2439
+ readonly PropertyGroup: {
2440
+ readonly discriminantValues: readonly ["PropertyGroup"];
2441
+ readonly type: {
2442
+ readonly properties: {
2443
+ readonly $identifier: {
2444
+ readonly kind: "Identifier";
2445
+ readonly type: () => {
2446
+ kind: "Identifier";
2447
+ };
2448
+ };
2449
+ readonly $type: {
2450
+ readonly kind: "Discriminant";
2451
+ readonly type: () => {
2452
+ kind: "TypeDiscriminant";
2453
+ ownValues: string[];
2454
+ };
2455
+ };
2456
+ readonly comments: {
2457
+ readonly kind: "Shacl";
2458
+ readonly type: () => {
2459
+ kind: "Set";
2460
+ item: () => {
2461
+ kind: "String";
2462
+ };
2463
+ };
2464
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#comment">;
2465
+ };
2466
+ readonly labels: {
2467
+ readonly kind: "Shacl";
2468
+ readonly type: () => {
2469
+ kind: "Set";
2470
+ item: () => {
2471
+ kind: "String";
2472
+ };
2473
+ };
2474
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#label">;
2475
+ };
2476
+ };
2477
+ };
2478
+ };
2479
+ readonly PropertyShape: {
2480
+ readonly discriminantValues: readonly ["PropertyShape"];
2481
+ readonly type: {
2482
+ readonly properties: {
2483
+ readonly $identifier: {
2484
+ readonly kind: "Identifier";
2485
+ readonly type: () => {
2486
+ kind: "Identifier";
2487
+ };
2488
+ };
2489
+ readonly $type: {
2490
+ readonly kind: "Discriminant";
2491
+ readonly type: () => {
2492
+ kind: "TypeDiscriminant";
2493
+ ownValues: string[];
2494
+ };
2495
+ };
2496
+ readonly and: {
2497
+ readonly kind: "Shacl";
2498
+ readonly type: () => {
2499
+ kind: "Set";
2500
+ item: () => {
2501
+ kind: "List";
2502
+ item: () => {
2503
+ kind: "Identifier";
2504
+ };
2505
+ };
2506
+ };
2507
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#and">;
2508
+ };
2509
+ readonly classes: {
2510
+ readonly kind: "Shacl";
2511
+ readonly type: () => {
2512
+ kind: "Set";
2513
+ item: () => {
2514
+ kind: "Iri";
2515
+ };
2516
+ };
2517
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#class">;
2518
+ };
2519
+ readonly comments: {
2520
+ readonly kind: "Shacl";
2521
+ readonly type: () => {
2522
+ kind: "Set";
2523
+ item: () => {
2524
+ kind: "String";
2525
+ };
2526
+ };
2527
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#comment">;
2528
+ };
2529
+ readonly datatype: {
2530
+ readonly kind: "Shacl";
2531
+ readonly type: () => {
2532
+ kind: "Maybe";
2533
+ item: () => {
2534
+ kind: "Iri";
2535
+ };
2536
+ };
2537
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#datatype">;
2538
+ };
2539
+ readonly deactivated: {
2540
+ readonly kind: "Shacl";
2541
+ readonly type: () => {
2542
+ kind: "Maybe";
2543
+ item: () => {
2544
+ kind: "Boolean";
2545
+ };
2546
+ };
2547
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#deactivated">;
2548
+ };
2549
+ readonly defaultValue: {
2550
+ readonly kind: "Shacl";
2551
+ readonly type: () => {
2552
+ kind: "Maybe";
2553
+ item: () => {
2554
+ kind: "Term";
2555
+ };
2556
+ };
2557
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#defaultValue">;
2558
+ };
2559
+ readonly descriptions: {
2560
+ readonly kind: "Shacl";
2561
+ readonly type: () => {
2562
+ kind: "Set";
2563
+ item: () => {
2564
+ kind: "String";
2565
+ };
2566
+ };
2567
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#description">;
2568
+ };
2569
+ readonly flags: {
2570
+ readonly kind: "Shacl";
2571
+ readonly type: () => {
2572
+ kind: "Set";
2573
+ item: () => {
2574
+ kind: "String";
2575
+ };
2576
+ };
2577
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#flags">;
2578
+ };
2579
+ readonly groups: {
2580
+ readonly kind: "Shacl";
2581
+ readonly type: () => {
2582
+ kind: "Set";
2583
+ item: () => {
2584
+ kind: "Identifier";
2585
+ };
2586
+ };
2587
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#group">;
2588
+ };
2589
+ readonly hasValues: {
2590
+ readonly kind: "Shacl";
2591
+ readonly type: () => {
2592
+ kind: "Set";
2593
+ item: () => {
2594
+ kind: "Term";
2595
+ };
2596
+ };
2597
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#hasValue">;
2598
+ };
2599
+ readonly in_: {
2600
+ readonly kind: "Shacl";
2601
+ readonly type: () => {
2602
+ kind: "Maybe";
2603
+ item: () => {
2604
+ kind: "List";
2605
+ item: () => {
2606
+ kind: "Term";
2607
+ };
2608
+ };
2609
+ };
2610
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#in">;
2611
+ };
2612
+ readonly isDefinedBy: {
2613
+ readonly kind: "Shacl";
2614
+ readonly type: () => {
2615
+ kind: "Maybe";
2616
+ item: () => {
2617
+ kind: "Identifier";
2618
+ };
2619
+ };
2620
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#isDefinedBy">;
2621
+ };
2622
+ readonly labels: {
2623
+ readonly kind: "Shacl";
2624
+ readonly type: () => {
2625
+ kind: "Set";
2626
+ item: () => {
2627
+ kind: "String";
2628
+ };
2629
+ };
2630
+ readonly path: NamedNode<"http://www.w3.org/2000/01/rdf-schema#label">;
2631
+ };
2632
+ readonly languageIn: {
2633
+ readonly kind: "Shacl";
2634
+ readonly type: () => {
2635
+ kind: "Maybe";
2636
+ item: () => {
2637
+ kind: "List";
2638
+ item: () => {
2639
+ kind: "String";
2640
+ };
2641
+ };
2642
+ };
2643
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#languageIn">;
2644
+ };
2645
+ readonly maxCount: {
2646
+ readonly kind: "Shacl";
2647
+ readonly type: () => {
2648
+ kind: "Maybe";
2649
+ item: () => {
2650
+ kind: "Int";
2651
+ };
2652
+ };
2653
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxCount">;
2654
+ };
2655
+ readonly maxExclusive: {
2656
+ readonly kind: "Shacl";
2657
+ readonly type: () => {
2658
+ kind: "Maybe";
2659
+ item: () => {
2660
+ kind: "Literal";
2661
+ };
2662
+ };
2663
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxExclusive">;
2664
+ };
2665
+ readonly maxInclusive: {
2666
+ readonly kind: "Shacl";
2667
+ readonly type: () => {
2668
+ kind: "Maybe";
2669
+ item: () => {
2670
+ kind: "Literal";
2671
+ };
2672
+ };
2673
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxInclusive">;
2674
+ };
2675
+ readonly maxLength: {
2676
+ readonly kind: "Shacl";
2677
+ readonly type: () => {
2678
+ kind: "Maybe";
2679
+ item: () => {
2680
+ kind: "Int";
2681
+ };
2682
+ };
2683
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#maxLength">;
2684
+ };
2685
+ readonly minCount: {
2686
+ readonly kind: "Shacl";
2687
+ readonly type: () => {
2688
+ kind: "Maybe";
2689
+ item: () => {
2690
+ kind: "Int";
2691
+ };
2692
+ };
2693
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minCount">;
2694
+ };
2695
+ readonly minExclusive: {
2696
+ readonly kind: "Shacl";
2697
+ readonly type: () => {
2698
+ kind: "Maybe";
2699
+ item: () => {
2700
+ kind: "Literal";
2701
+ };
2702
+ };
2703
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minExclusive">;
2704
+ };
2705
+ readonly minInclusive: {
2706
+ readonly kind: "Shacl";
2707
+ readonly type: () => {
2708
+ kind: "Maybe";
2709
+ item: () => {
2710
+ kind: "Literal";
2711
+ };
2712
+ };
2713
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minInclusive">;
2714
+ };
2715
+ readonly minLength: {
2716
+ readonly kind: "Shacl";
2717
+ readonly type: () => {
2718
+ kind: "Maybe";
2719
+ item: () => {
2720
+ kind: "Int";
2721
+ };
2722
+ };
2723
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#minLength">;
2724
+ };
2725
+ readonly names: {
2726
+ readonly kind: "Shacl";
2727
+ readonly type: () => {
2728
+ kind: "Set";
2729
+ item: () => {
2730
+ kind: "String";
2731
+ };
2732
+ };
2733
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#name">;
2734
+ };
2735
+ readonly nodeKind: {
2736
+ readonly kind: "Shacl";
2737
+ readonly type: () => {
2738
+ kind: "Maybe";
2739
+ item: () => {
2740
+ kind: "Iri";
2741
+ in: (NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#IRI"> | NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2742
+ };
2743
+ };
2744
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2745
+ };
2746
+ readonly nodes: {
2747
+ readonly kind: "Shacl";
2748
+ readonly type: () => {
2749
+ kind: "Set";
2750
+ item: () => {
2751
+ kind: "Identifier";
2752
+ };
2753
+ };
2754
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#node">;
2755
+ };
2756
+ readonly not: {
2757
+ readonly kind: "Shacl";
2758
+ readonly type: () => {
2759
+ kind: "Set";
2760
+ item: () => {
2761
+ kind: "Identifier";
2762
+ };
2763
+ };
2764
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#not">;
2765
+ };
2766
+ readonly or: {
2767
+ readonly kind: "Shacl";
2768
+ readonly type: () => {
2769
+ kind: "Set";
2770
+ item: () => {
2771
+ kind: "List";
2772
+ item: () => {
2773
+ kind: "Identifier";
2774
+ };
2775
+ };
2776
+ };
2777
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#or">;
2778
+ };
2779
+ readonly order: {
2780
+ readonly kind: "Shacl";
2781
+ readonly type: () => {
2782
+ kind: "Maybe";
2783
+ item: () => {
2784
+ kind: "Float";
2785
+ };
2786
+ };
2787
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#order">;
2788
+ };
2789
+ readonly path: {
2790
+ readonly kind: "Shacl";
2791
+ readonly type: () => object;
2792
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#path">;
2793
+ };
2794
+ readonly patterns: {
2795
+ readonly kind: "Shacl";
2796
+ readonly type: () => {
2797
+ kind: "Set";
2798
+ item: () => {
2799
+ kind: "String";
2800
+ };
2801
+ };
2802
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#pattern">;
2803
+ };
2804
+ readonly uniqueLang: {
2805
+ readonly kind: "Shacl";
2806
+ readonly type: () => {
2807
+ kind: "Maybe";
2808
+ item: () => {
2809
+ kind: "Boolean";
2810
+ };
2811
+ };
2812
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#uniqueLang">;
2813
+ };
2814
+ readonly xone: {
2815
+ readonly kind: "Shacl";
2816
+ readonly type: () => {
2817
+ kind: "Set";
2818
+ item: () => {
2819
+ kind: "List";
2820
+ item: () => {
2821
+ kind: "Identifier";
2822
+ };
2823
+ };
2824
+ };
2825
+ readonly path: NamedNode<"http://www.w3.org/ns/shacl#xone">;
2826
+ };
2827
+ };
2828
+ };
2829
+ };
2830
+ };
1397
2831
  readonly properties: {
1398
2832
  readonly labels: {
1399
2833
  readonly kind: "Shacl";
@@ -1407,10 +2841,7 @@ export declare namespace $Object {
1407
2841
  };
1408
2842
  };
1409
2843
  };
1410
- function $toRdf(_object: $Object, _parameters?: {
1411
- graph?: Exclude<Quad_Graph, Variable>;
1412
- resourceSet?: ResourceSet;
1413
- }): Resource;
2844
+ const $toRdfResourceValues: $ToRdfResourceValuesFunction<$Object>;
1414
2845
  }
1415
2846
  export interface $ObjectSet {
1416
2847
  nodeShape(identifier: NodeShape.$Identifier, options?: {
@@ -1544,14 +2975,14 @@ export declare class $RdfjsDatasetObjectSet implements $ObjectSet {
1544
2975
  readonly $identifier: ObjectIdentifierT;
1545
2976
  }, ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode>(objectType: {
1546
2977
  $filter: (filter: ObjectFilterT, value: ObjectT) => boolean;
1547
- $fromRdf: (resource: Resource, options?: $FromRdfOptions) => Either<Error, ObjectT>;
2978
+ $fromRdfResource: $FromRdfResourceFunction<ObjectT>;
1548
2979
  $fromRdfTypes: readonly NamedNode[];
1549
2980
  }, query?: $ObjectSet.Query<ObjectFilterT, ObjectIdentifierT>): Either<Error, readonly ObjectT[]>;
1550
2981
  protected $objectUnionsSync<ObjectT extends {
1551
2982
  readonly $identifier: ObjectIdentifierT;
1552
2983
  }, ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode>(objectTypes: readonly {
1553
2984
  $filter: (filter: ObjectFilterT, value: ObjectT) => boolean;
1554
- $fromRdf: (resource: Resource, options?: $FromRdfOptions) => Either<Error, ObjectT>;
2985
+ $fromRdfResource: $FromRdfResourceFunction<ObjectT>;
1555
2986
  $fromRdfTypes: readonly NamedNode[];
1556
2987
  }[], query?: $ObjectSet.Query<ObjectFilterT, ObjectIdentifierT>): Either<Error, readonly ObjectT[]>;
1557
2988
  }