@_linked/core 2.31.0 → 2.33.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/CHANGELOG.md +38 -0
- package/README.md +61 -61
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/ontologies/linked-core.d.ts +1 -0
- package/lib/esm/ontologies/linked-core.js +8 -2
- package/lib/esm/ontologies/linked-core.js.map +1 -1
- package/lib/esm/ontologies/shacl.d.ts +3 -0
- package/lib/esm/ontologies/shacl.js +6 -0
- package/lib/esm/ontologies/shacl.js.map +1 -1
- package/lib/esm/shapes/List.class.d.ts +3 -3
- package/lib/esm/shapes/List.class.js +3 -3
- package/lib/esm/shapes/List.class.js.map +1 -1
- package/lib/esm/shapes/PathList.d.ts +5 -8
- package/lib/esm/shapes/PathList.js +6 -9
- package/lib/esm/shapes/PathList.js.map +1 -1
- package/lib/esm/shapes/PathNode.d.ts +1 -3
- package/lib/esm/shapes/PathNode.js +6 -8
- package/lib/esm/shapes/PathNode.js.map +1 -1
- package/lib/esm/shapes/SHACL.d.ts +15 -13
- package/lib/esm/shapes/SHACL.js +8 -0
- package/lib/esm/shapes/SHACL.js.map +1 -1
- package/lib/esm/shapes/nodeShapeData.d.ts +4 -1
- package/lib/esm/shapes/nodeShapeData.js.map +1 -1
- package/lib/esm/shapes/singleOwnerConstraint.d.ts +5 -7
- package/lib/esm/shapes/singleOwnerConstraint.js +65 -21
- package/lib/esm/shapes/singleOwnerConstraint.js.map +1 -1
- package/lib/esm/shapes/syncShapes.d.ts +54 -3
- package/lib/esm/shapes/syncShapes.js +141 -13
- package/lib/esm/shapes/syncShapes.js.map +1 -1
- package/lib/esm/sparql/irToAlgebra.d.ts +15 -38
- package/lib/esm/sparql/irToAlgebra.js +406 -391
- package/lib/esm/sparql/irToAlgebra.js.map +1 -1
- package/lib/esm/sparql/ownedLinkCheck.d.ts +6 -10
- package/lib/esm/sparql/ownedLinkCheck.js +10 -11
- package/lib/esm/sparql/ownedLinkCheck.js.map +1 -1
- package/lib/esm/utils/Package.d.ts +3 -2
- package/lib/esm/utils/Package.js +21 -8
- package/lib/esm/utils/Package.js.map +1 -1
- package/lib/esm/utils/sha256.d.ts +8 -0
- package/lib/esm/utils/sha256.js +80 -0
- package/lib/esm/utils/sha256.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.33.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#340](https://github.com/linked-fw/core/pull/340) [`666e74c`](https://github.com/linked-fw/core/commit/666e74c8fc0b92d76c1cbcd4941738cd0c82ab5c) Thanks [@flyon](https://github.com/flyon)! - Shape sync skips unchanged shapes. Each synced NodeShape now stores `core:shapeHash`, a SHA-256 of the canonical data the sync writes for it (property shapes, `sh:in` lists, paths and generated single-owner shapes included). `syncShapes()` reads the stored hashes of all code shapes in one select and returns a delete→create thunk only for shapes whose hash is missing or differs, so syncing an unchanged app writes nothing and the plan length is the number of shapes actually written (plus pruned orphans). `syncShape()` does the same check inside its thunk. Shapes stored by earlier versions have no hash and are rewritten once. New option `force: true` (on `syncShapes` options and as a third `syncShape` argument) rewrites regardless — use it to repair a shape whose stored subtree was changed outside shape sync, which the hash does not detect.
|
|
8
|
+
|
|
9
|
+
## 2.32.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#338](https://github.com/linked-fw/core/pull/338) [`83e9a51`](https://github.com/linked-fw/core/commit/83e9a519593c92448bb1492af92a3701d46d9750) Thanks [@flyon](https://github.com/flyon)! - Ownership of `contains` values is now decided **per property**, everywhere. Until now a property owned its values when *any* registered shape declared its predicate `contains`, so a plain property on such a predicate (say a user shape's `schema:image`, which `@_linked/schema` declares `contains` on `Thing.image`) deleted its old value on replace and class-checked links.
|
|
14
|
+
|
|
15
|
+
**A plain property on a predicate another shape declares `contains` no longer deletes or class-checks.** Replacing, unsetting or set-removing its value only changes the edge; deleting its subject leaves the value in place; linking any `{id}` through it is allowed. To keep the old behaviour for such a property, declare `contains: true` (with a `shape`) on it.
|
|
16
|
+
|
|
17
|
+
**Deleting an owner deletes everything it owns.** The cleanup walks shapes, not predicates: from the owner's shape it follows that shape's `contains` properties to their value shapes, then their `contains` properties, and so on. Deeper owned values now go with their owner even when their shape is not `dependent` (before, only `dependent`-typed descendants were deleted below the first level). When a value is typed with a registered sub-shape of the declared value shape, the `contains` properties that sub-shape adds are followed too, from nodes of that class only. Such a property is not followed through the parent (warned once with the cause) when the sub-shape has no `targetClass`, shares it with a super-shape, or shares it with another shape that holds the same predicate as a plain property through a simple path. A copy of a sub-shape that adds nothing (same class, or no `targetClass`) is skipped silently.
|
|
18
|
+
|
|
19
|
+
Recursion: a shape owning its own kind (list cells, replies) is followed to any depth; any other cycle is followed hop by hop, each hop checked against the declaring class, for at most `MAX_OWNED_RECURSION` (4) re-entries per path — deeper values are left in place. `rdf:nil` is never deleted. A delete whose owned walk exceeds `OWNED_BRANCH_WARNING` (64) branches logs a warning. Both constants are exported from `@_linked/core/sparql/irToAlgebra`.
|
|
20
|
+
|
|
21
|
+
**`contains` without a `shape` now throws** when the class is decorated: the walk needs a value shape to follow. Add the value's `shape`, or drop `contains` — a blank value is deleted through a blank-capable `nodeKind` without it. Core's own `PropertyShape.path` and the shape-less `PathNode` slots no longer declare `contains`.
|
|
22
|
+
|
|
23
|
+
**`dependent` is deprecated** and has no effect. It is still accepted, and shape sync still persists it as `core:dependent`. Core's own shapes no longer declare it.
|
|
24
|
+
|
|
25
|
+
**The generated single-owner constraint counts only owners of the declaring class.** `sh:maxCount 1` (every subject counted) becomes a qualified count over the declaring `targetClass` and every registered sub-shape's class, so a plain reference from another class conforms:
|
|
26
|
+
|
|
27
|
+
```turtle
|
|
28
|
+
<…/Thing/image.singleOwner/owners> sh:path [ sh:inversePath schema:image ] ;
|
|
29
|
+
sh:qualifiedValueShape [ sh:or ( [ sh:class schema:Thing ] [ sh:class ex:Project ] ) ] ;
|
|
30
|
+
sh:qualifiedMaxCount 1 .
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
With one class the qualified shape is `[ sh:class C ]`. A declaring shape without `targetClass` gets no constraint (sync warns once). Re-sync to rewrite stored constraints. New metamodel accessors: `PropertyShape.qualifiedValueShape`, `PropertyShape.qualifiedMaxCount`, `NodeShape.class`, `NodeShape.orShapes` (`sh:or`), and the `shacl.qualifiedValueShape` / `qualifiedMaxCount` / `or` terms.
|
|
34
|
+
|
|
35
|
+
**Removed:** `collectContainment` and `buildOwnedCascade` (exported from `@_linked/core/sparql/irToAlgebra`), which implemented the predicate rule, and the `sharedPredicate` field of `OwnedLink`. Nothing replaces them; to ask whether a property owns its value, read its own `contains`.
|
|
36
|
+
|
|
37
|
+
**No longer done:** the next sync no longer deletes the IRI-named path nodes versions before 2.30 wrote; it leaves them unreferenced.
|
|
38
|
+
|
|
39
|
+
See README "Owned properties" and `docs/architecture/owned-values.md`.
|
|
40
|
+
|
|
3
41
|
## 2.31.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -252,6 +252,11 @@ value. Whenever that edge goes away, the owned node is deleted with it:
|
|
|
252
252
|
orphaned.
|
|
253
253
|
- `update({ownedProp: {remove: [x]}})` deletes `x` itself, not just the link.
|
|
254
254
|
|
|
255
|
+
Ownership belongs to the property, not to its predicate. A plain property of another shape on
|
|
256
|
+
the same predicate (say `ex:avatar` without `contains`) is a reference: replacing it or deleting
|
|
257
|
+
its subject never deletes the value, and it is not class-checked. A `contains` property needs a
|
|
258
|
+
`shape`; declaring one without it throws when the class is decorated.
|
|
259
|
+
|
|
255
260
|
```typescript
|
|
256
261
|
@linkedShape
|
|
257
262
|
export class Person extends Shape {
|
|
@@ -287,12 +292,10 @@ patch: it deletes all of that node's triples and writes the new ones.
|
|
|
287
292
|
`{avatar: {id: uploadedId}}`. The link transfers ownership: the linked node is deleted when it is
|
|
288
293
|
replaced, removed, or when the owner is deleted.
|
|
289
294
|
|
|
290
|
-
Because of that, core checks the class of every id linked into a property that
|
|
291
|
-
declares a `shape`.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
refused, and nothing is written, when the store already types the node and none of its types is
|
|
295
|
-
the shape's `targetClass`, a registered sub-shape's `targetClass`, or the property's `sh:class`:
|
|
295
|
+
Because of that, core checks the class of every id linked into a `contains` property that
|
|
296
|
+
declares a `shape`. A link is refused, and nothing is written, when the store already types the
|
|
297
|
+
node and none of its types is the shape's `targetClass`, a registered sub-shape's `targetClass`, or
|
|
298
|
+
the property's `sh:class`:
|
|
296
299
|
|
|
297
300
|
```
|
|
298
301
|
Cannot link <https://my.app/alice> into the contains property "avatar" of <…/shape/my-pkg/Person>:
|
|
@@ -301,7 +304,7 @@ it is typed <https://example.org/Person>, but "avatar" only owns instances of <h
|
|
|
301
304
|
|
|
302
305
|
Ids that do not exist yet, or have no `rdf:type`, are allowed, so upload-then-attach works in
|
|
303
306
|
either write order. The check runs in `SparqlDataset` (one `SELECT` per mutation that links owned
|
|
304
|
-
ids, none otherwise). Plain references
|
|
307
|
+
ids, none otherwise). Plain references are never checked. A node
|
|
305
308
|
whose type comes from a subclass that has no registered shape is refused unless the store also
|
|
306
309
|
holds the expected type (an RDFS-inferring store adds it); register a shape for that class, or
|
|
307
310
|
declare `sh:class`, to accept it.
|
|
@@ -311,24 +314,31 @@ Nor is a node typed by another request between the check's `SELECT` and the `UPD
|
|
|
311
314
|
follows it: the two are separate requests, not one transaction. Raw SPARQL updates bypass the
|
|
312
315
|
check altogether. SHACL validation of `sh:class` is the backstop for all three.
|
|
313
316
|
|
|
314
|
-
**What a delete removes.**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
317
|
+
**What a delete removes.** Deleting an owner deletes everything it owns (see the recursion
|
|
318
|
+
limit below): the values of its `contains` properties (own and inherited), the values *their* shapes own, and so on. A
|
|
319
|
+
replace or set-remove does the same below the old value. The walk follows the shapes, not the
|
|
320
|
+
predicates: from the owner's shape it follows that shape's `contains` properties to their value
|
|
321
|
+
shapes, then those shapes' `contains` properties. When a value is typed with a registered
|
|
322
|
+
sub-shape of the declared value shape, the `contains` properties the sub-shape adds are followed
|
|
323
|
+
too, but only from nodes of that sub-shape's class (`?img a ex:Photo . ?img ex:thumbnail ?t`).
|
|
324
|
+
The class must tell those nodes apart: an added property is not followed through the parent
|
|
325
|
+
(core warns once) when the sub-shape has no `targetClass`, shares it with one of its
|
|
326
|
+
super-shapes, or shares it with another shape that holds the same predicate as a plain property
|
|
327
|
+
(through a simple path). Another shape that merely shares the class, without that predicate,
|
|
328
|
+
changes nothing. A copy of a sub-shape that adds nothing of its own, with the same class (a
|
|
329
|
+
"profile") or with no `targetClass` at all, is skipped silently: its parent's entry covers it.
|
|
330
|
+
When a sub-shape redeclares an inherited `contains` property without `contains`, the inherited
|
|
331
|
+
ownership still applies.
|
|
332
|
+
|
|
333
|
+
Recursion has a limit. A shape that owns its own kind (a list cell owning the next cell through
|
|
334
|
+
`rdf:rest`, a comment owning its replies) is followed to any depth (`rdf:rest*`). Any other cycle
|
|
335
|
+
(A owns B owns A, or a sub-shape's property leading back into its own kind) is followed hop by
|
|
336
|
+
hop, each hop checked against the class that declares it, for at most `MAX_OWNED_RECURSION` (4)
|
|
337
|
+
re-entries per path; values deeper than that are left in place, and so is anything behind an
|
|
338
|
+
untyped node on such a cycle. `rdf:nil`, the end of every list, is never deleted.
|
|
339
|
+
|
|
340
|
+
The bulk deletes (`.all()`, `.where(...)`) remove the same subtree for every matched subject; they
|
|
341
|
+
do not delete incoming references to the subjects, which a delete by id does.
|
|
332
342
|
|
|
333
343
|
Non-owning references to an owned node, through other properties or from other subjects, are
|
|
334
344
|
allowed. They are not cleaned up: after the owner is deleted they dangle. The same holds when two
|
|
@@ -336,12 +346,13 @@ subjects own one node (an `{id}` linked into a second owner, which breaks the si
|
|
|
336
346
|
below): deleting either owner deletes the node, and the other owner's edge dangles.
|
|
337
347
|
|
|
338
348
|
**The single-owner constraint.** An owned node has at most one owner. Shape sync persists this as
|
|
339
|
-
one generated SHACL NodeShape per `contains` property
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
`Thing.image
|
|
349
|
+
one generated SHACL NodeShape per `contains` property (simple paths only). It is written only by
|
|
350
|
+
the class that declares the property, at the property shape's IRI plus `.singleOwner`:
|
|
351
|
+
`Thing.image` gets one constraint at `Thing`, not one per subclass. It is marked `core:generated
|
|
352
|
+
true` and has no `sh:targetClass`, so catalog readers can skip it, and it is never registered in
|
|
353
|
+
memory. It counts only subjects of the declaring class and of every registered sub-shape's class,
|
|
354
|
+
so a plain reference through the same predicate from another class is allowed. For `Thing.image`,
|
|
355
|
+
with a registered `Project extends Thing`:
|
|
345
356
|
|
|
346
357
|
```turtle
|
|
347
358
|
<…/shape/my-pkg/Thing/image.singleOwner> a sh:NodeShape ;
|
|
@@ -351,23 +362,24 @@ constraint at `Thing`, not one per subclass. It is marked `core:generated true`
|
|
|
351
362
|
|
|
352
363
|
<…/Thing/image.singleOwner/owners> a sh:PropertyShape ;
|
|
353
364
|
rdfs:label "owners" ;
|
|
354
|
-
sh:
|
|
355
|
-
sh:
|
|
365
|
+
sh:path [ sh:inversePath schema:image ] ;
|
|
366
|
+
sh:qualifiedValueShape [ sh:or ( [ sh:class schema:Thing ] [ sh:class ex:Project ] ) ] ;
|
|
367
|
+
sh:qualifiedMaxCount 1 .
|
|
356
368
|
```
|
|
357
369
|
|
|
370
|
+
The classes are listed because `sh:class` matches a subclass instance only through
|
|
371
|
+
`rdfs:subClassOf` triples, which a dataset without inference lacks. With one class the qualified
|
|
372
|
+
shape is `[ sh:class C ]`. Sub-shapes registered only in another process are missing until a
|
|
373
|
+
process that knows them syncs; a declaring shape without `targetClass` gets no constraint (sync
|
|
374
|
+
logs it once). Versions before this one wrote `sh:maxCount 1` (every subject counted); the next
|
|
375
|
+
sync rewrites the constraint.
|
|
376
|
+
|
|
358
377
|
The inverse path is stored as an untyped blank node, as is every complex `sh:path` shape sync
|
|
359
378
|
writes (inverse, alternative, sequence, `*`/`+`/`?`): an IRI in `sh:path` is a predicate path to a
|
|
360
379
|
SHACL validator. Nothing marks them: `PropertyShape.path` and the path operator slots are
|
|
361
|
-
declared `sh:BlankNodeOrIRI`, see [Blank-node values](#blank-node-values-nodekind). Versions before 2.30 wrote IRI-named nodes (`…/owners/inv`)
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
```sparql
|
|
366
|
-
DELETE { ?n ?p ?o } WHERE {
|
|
367
|
-
?n a <https://linked.cm/ont/core/PathNode> ; ?p ?o .
|
|
368
|
-
FILTER(isIRI(?n)) FILTER NOT EXISTS { ?x ?y ?n }
|
|
369
|
-
}
|
|
370
|
-
```
|
|
380
|
+
declared `sh:BlankNodeOrIRI`, see [Blank-node values](#blank-node-values-nodekind). Versions before 2.30 wrote IRI-named, typed path nodes (`…/owners/inv`, `…/region/seq/0`). The
|
|
381
|
+
next sync writes blank nodes and leaves those behind, unreferenced; re-create the dataset, or
|
|
382
|
+
delete them by IRI prefix (`…/owners/inv`, `…/seq/…`), to remove them.
|
|
371
383
|
|
|
372
384
|
Read a stored path's structure in the same query that finds it (`?ps sh:path ?p .
|
|
373
385
|
?p sh:inversePath ?x`): a blank node's label is not stable across queries.
|
|
@@ -375,7 +387,7 @@ Read a stored path's structure in the same query that finds it (`?ps sh:path ?p
|
|
|
375
387
|
The declaring shape owns its generated shapes through `core:generatedShape`, a `contains` edge:
|
|
376
388
|
`<…/Thing> core:generatedShape <…/Thing/image.singleOwner>`. Syncing a shape is still two
|
|
377
389
|
requests: deleting the shape deletes the generated shapes with it (their own triples, property
|
|
378
|
-
shapes and blank path nodes, never the predicate IRI), and the create writes the current ones nested in
|
|
390
|
+
shapes and their blank path and qualified-shape nodes, never the predicate IRI), and the create writes the current ones nested in
|
|
379
391
|
the same request. A removed or renamed accessor therefore loses its constraint, a pruned shape
|
|
380
392
|
takes its constraints with it, and a NodeShape the shape does not own is never touched.
|
|
381
393
|
`singleOwnerShapeIri`, `singleOwnerProperties` and `buildSingleOwnerConstraints` are exported if
|
|
@@ -391,21 +403,9 @@ typed link.
|
|
|
391
403
|
> write either: a dataset exposes only query, update and graph-store services. Run a SHACL
|
|
392
404
|
> validator (Jena SHACL, pySHACL, …) against the persisted shapes to enforce them.
|
|
393
405
|
|
|
394
|
-
**`dependent: true` on a shape**
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
nodes). It is **not** required for the replace/remove cleanup above — a `contains` edge alone
|
|
398
|
-
is sufficient for the immediately-owned node; `dependent` extends the cascade to owned
|
|
399
|
-
*descendants* several hops deep.
|
|
400
|
-
|
|
401
|
-
```typescript
|
|
402
|
-
@linkedShape({dependent: true})
|
|
403
|
-
export class ListCell extends Shape { /* ... */ }
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
> Rule of thumb: put `contains` on the **property** that owns the value; put `dependent` on the
|
|
407
|
-
> **shape** whose instances never stand alone. They are separate mechanisms — `contains` decides
|
|
408
|
-
> *what to follow*, `dependent` decides *what may be deleted when reached*.
|
|
406
|
+
**`dependent: true` on a shape** is deprecated and has no effect: every node a `contains` property
|
|
407
|
+
reaches is deleted with its owner, whether or not its shape is `dependent`. It is still accepted,
|
|
408
|
+
and shape sync still persists it (`core:dependent`).
|
|
409
409
|
|
|
410
410
|
### Blank-node values (`nodeKind`)
|
|
411
411
|
|
|
@@ -440,8 +440,8 @@ from its own copy of the shape. Core uses this for SHACL paths: `PropertyShape.p
|
|
|
440
440
|
`{id}`) stays an IRI and every operator node and list cell becomes a blank node.
|
|
441
441
|
|
|
442
442
|
A blank value goes with what holds it. Deleting the subject (by id, `.all()`, `.where()`),
|
|
443
|
-
replacing or unsetting the property, deleting or replacing an owned (`contains`)
|
|
444
|
-
|
|
443
|
+
replacing or unsetting the property, and deleting or replacing an owned (`contains`) value at any
|
|
444
|
+
depth delete the blank value and the blank nodes below it, following only blank-capable properties.
|
|
445
445
|
Only blank nodes are deleted: an IRI the structure refers to (`schema:image` in
|
|
446
446
|
`[ sh:inversePath schema:image ]`, an entity a list lists) is never touched, nor is a blank node
|
|
447
447
|
reached through one. `contains` is not needed for this.
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './shapes/index.js';
|
|
2
2
|
import './live.js';
|
|
3
3
|
export { syncShapes, syncShape } from './shapes/syncShapes.js';
|
|
4
|
+
export type { SyncShapesOptions, SyncShapeOptions } from './shapes/syncShapes.js';
|
|
4
5
|
export { singleOwnerShapeIri, singleOwnerProperties, buildSingleOwnerConstraints, } from './shapes/singleOwnerConstraint.js';
|
|
5
6
|
export { rdfList } from './shapes/List.js';
|
|
6
7
|
export { serializePathToNodeData } from './shapes/serializePathToNodeData.js';
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,0DAA0D;AAC1D,OAAO,mBAAmB,CAAC;AAC3B,8EAA8E;AAC9E,OAAO,WAAW,CAAC;AACnB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,0DAA0D;AAC1D,OAAO,mBAAmB,CAAC;AAC3B,8EAA8E;AAC9E,OAAO,WAAW,CAAC;AACnB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAE7D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AAM,4BAA4B,CAAC;AAGzD,8CAA8C;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAe3C,sEAAsE;AACtE,OAAO,EACL,cAAc,EACd,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AAWxC,0FAA0F;AAC1F,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAEhE,mDAAmD;AACnD,OAAO,EAAC,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAC","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n// Registers every shape core defines (side effects only).\nimport './shapes/index.js';\n// Registers the live-query store so `query.live()` works (side effects only).\nimport './live.js';\nexport {syncShapes, syncShape} from './shapes/syncShapes.js';\nexport type {SyncShapesOptions, SyncShapeOptions} from './shapes/syncShapes.js';\nexport {\n singleOwnerShapeIri,\n singleOwnerProperties,\n buildSingleOwnerConstraints,\n} from './shapes/singleOwnerConstraint.js';\nexport {rdfList} from './shapes/List.js';\nexport {serializePathToNodeData} from './shapes/serializePathToNodeData.js';\n// Core public API surface (documented as root imports in the README).\nexport {Shape} from './shapes/Shape.js';\n// SHACL-aligned validation of plain data objects against a shape.\nexport {validate, assertValid, ShapeValidationError} from './shapes/validation.js';\nexport type {\n ValidationReport,\n ValidationResult,\n ValidationMode,\n ValidateOptions,\n ValidatableShape,\n} from './shapes/validation.js';\nexport {LinkedStorage} from './utils/LinkedStorage.js';\n// New dynamic query building API (Phase 2)\nexport {SelectBuilder, QueryBuilder} from './queries/QueryBuilder.js';\nexport {lower} from './queries/lower.js';\nexport type {LowerableQuery} from './queries/lower.js';\nexport {fromJSON} from './queries/fromJSON.js';\nexport type {QueryJSON} from './queries/fromJSON.js';\nexport {\n getQueryContext,\n setQueryContext,\n subscribeQueryContext,\n PendingQueryContext,\n UnresolvedContextError,\n} from './queries/QueryContext.js';\nexport {subscribeQueryDispatch} from './queries/queryDispatch.js';\nexport type {QueryDispatchEvent, QueryDispatchListener} from './queries/queryDispatch.js';\nexport {\n CONTEXT_REF_KEY,\n encodeContextRef,\n isContextRefJSON,\n resolveContextId,\n} from './queries/ContextRef.js';\nexport type {ContextRefJSON} from './queries/ContextRef.js';\nexport {PropertyPath, walkPropertyPath} from './queries/PropertyPath.js';\n\n// Phase 3a — FieldSet\nexport {FieldSet} from './queries/FieldSet.js';\nexport type {FieldSetEntry, FieldSetInput, FieldSetJSON, FieldSetFieldJSON} from './queries/FieldSet.js';\n\n// Phase 4 — Serialization types\nexport type {QueryBuilderJSON} from './queries/QueryBuilder.js';\n\n// Phase 3b — Mutation builders\nexport {AskBuilder, isAskQuery} from './queries/AskBuilder.js';\nexport type {AskSpec} from './queries/AskBuilder.js';\nexport type {AskQuery, AskQueryJSON, RawAskInput} from './queries/AskQuery.js';\nexport {CountBuilder, isCountQuery} from './queries/CountBuilder.js';\nexport type {CountSpec} from './queries/CountBuilder.js';\nexport type {CountQuery, CountQueryJSON, RawCountInput} from './queries/CountQuery.js';\nexport {CreateBuilder} from './queries/CreateBuilder.js';\nexport {UpdateBuilder} from './queries/UpdateBuilder.js';\nexport {DeleteBuilder} from './queries/DeleteBuilder.js';\nexport type {DeleteId} from './queries/DeleteBuilder.js';\n\n// Expressions — computed fields and functions\nexport {ExpressionNode} from './expressions/ExpressionNode.js';\nexport type {ExpressionInput, PropertyRefMap} from './expressions/ExpressionNode.js';\nexport {Expr} from './expressions/Expr.js';\nexport type {\n ExpressionUpdateProxy,\n ExpressionUpdateResult,\n BaseExpressionMethods,\n NumericExpressionMethods,\n StringExpressionMethods,\n DateExpressionMethods,\n BooleanExpressionMethods,\n} from './expressions/ExpressionMethods.js';\n\n// Phase 5 — Component query integration\nexport type {LinkedComponentInterface, QueryComponentLike} from './queries/SelectQuery.js';\n\n\n// Mutation DSL-JSON serialization (create/update/delete to/from JSON)\nexport {\n encodeNodeData,\n encodeValue,\n} from './queries/MutationSerialization.js';\nexport {\n decodeNodeData,\n lowerMutationJSON,\n} from './queries/lowerMutationJSON.js';\nexport type {\n MutationJSON,\n CreateMutationJSON,\n UpdateMutationJSON,\n DeleteMutationJSON,\n MutationValueJSON,\n MutationNodeDataJSON,\n} from './queries/MutationSerialization.js';\n\n\n// Live-query dependency helpers — what a query reads and a mutation writes, as predicates\nexport {queryDependencies, mutationEffects} from './queries/queryDependencies.js';\nexport type {QueryDependencies, MutationEffects} from './queries/queryDependencies.js';\nexport {findPropertyShapeById} from './shapes/nodeShapeData.js';\n\n// Live queries — see documentation/live-queries.md\nexport {LiveQueryStore, getLiveQueryStore, resetLiveQueryStore, publishChange, invalidate} from './live/LiveQueryStore.js';\nexport type {ChangeEvent} from './live/changes.js';\nexport type {\n LiveQuery,\n LiveState,\n LiveStatus,\n LiveListener,\n LiveQueryOptions,\n LiveQueryStoreOptions,\n} from './live/LiveQueryStore.js';\n"]}
|
|
@@ -21,8 +21,9 @@ const usesShapeClass = ns('usesShapeClass');
|
|
|
21
21
|
const editInline = ns('editInline');
|
|
22
22
|
const isExtending = ns('isExtending');
|
|
23
23
|
// Containment / lifecycle vocabulary.
|
|
24
|
-
// contains — property characteristic: the
|
|
25
|
-
//
|
|
24
|
+
// contains — property characteristic: the subject owns the value through this property
|
|
25
|
+
// (composition); the owned walk follows it.
|
|
26
|
+
// dependent — shape characteristic, deprecated: no effect (persisted for older shapes).
|
|
26
27
|
// PathNode — class for SHACL property-path operator nodes (sh:inversePath/alternativePath/…).
|
|
27
28
|
const contains = ns('contains');
|
|
28
29
|
const dependent = ns('dependent');
|
|
@@ -47,6 +48,10 @@ const generated = ns('generated');
|
|
|
47
48
|
// single-owner constraint of each `contains` property). It is `contains`, so deleting the
|
|
48
49
|
// shape deletes them, and sync writes them nested in the shape's own create.
|
|
49
50
|
const generatedShape = ns('generatedShape');
|
|
51
|
+
// Content hash of everything shape sync writes for a NodeShape (the shape, its property shapes,
|
|
52
|
+
// lists, paths and generated shapes), stored on the NodeShape. A sync skips a shape whose stored
|
|
53
|
+
// hash equals the hash of what it would write.
|
|
54
|
+
const shapeHash = ns('shapeHash');
|
|
50
55
|
export const coreOntology = {
|
|
51
56
|
Package,
|
|
52
57
|
ShapeClass,
|
|
@@ -62,5 +67,6 @@ export const coreOntology = {
|
|
|
62
67
|
displayHidden,
|
|
63
68
|
generated,
|
|
64
69
|
generatedShape,
|
|
70
|
+
shapeHash,
|
|
65
71
|
};
|
|
66
72
|
//# sourceMappingURL=linked-core.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked-core.js","sourceRoot":"","sources":["../../../src/ontologies/linked-core.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C,sFAAsF;AACtF,wCAAwC;AACxC,qDAAqD;AACrD,6FAA6F;AAC7F,gGAAgG;AAChG,oEAAoE;AACpE,MAAM,CAAC,MAAM,EAAE,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,KAAK,GAAuB,EAAE,CAAC,EAAE,CAAC,CAAC;AAChD,6FAA6F;AAC7F,0FAA0F;AAC1F,oEAAoE;AACpE,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AACpC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AAE7B,MAAM,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC9B,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AM,UAAU,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC;AACpC,MAAM,WAAW,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC;AAEtC,sCAAsC;AACtC,0FAA0F;AAC1F,0DAA0D;AAC1D,0FAA0F;AAC1F,iGAAiG;AACjG,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;AAClC,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AAEhC,oFAAoF;AACpF,oFAAoF;AACpF,mFAAmF;AACnF,oFAAoF;AACpF,mFAAmF;AACnF,0EAA0E;AAC1E,EAAE;AACF,mFAAmF;AACnF,kFAAkF;AAClF,qFAAqF;AACrF,MAAM,WAAW,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC;AACtC,MAAM,aAAa,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAE1C,uFAAuF;AACvF,kGAAkG;AAClG,8EAA8E;AAC9E,MAAM,SAAS,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;AAElC,yFAAyF;AACzF,0FAA0F;AAC1F,6EAA6E;AAC7E,MAAM,cAAc,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC;AAE5C,gGAAgG;AAChG,iGAAiG;AACjG,+CAA+C;AAC/C,MAAM,SAAS,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO;IACP,UAAU;IACV,YAAY;IACZ,MAAM,EAAE,cAAc;IACtB,cAAc;IACd,UAAU;IACV,WAAW;IACX,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,WAAW;IACX,aAAa;IACb,SAAS;IACT,cAAc;IACd,SAAS;CACV,CAAC","sourcesContent":["import type {NodeReferenceValue} from '../utils/NodeReference.js';\nimport {createNameSpace} from '../utils/NameSpace.js';\nimport {Prefix} from '../utils/Prefix.js';\n\n// The @_linked/core framework vocabulary. First-party ontology IRIs follow Create Now\n// arch-02 §\"Public ontology namespace\":\n// https://linked.cm/ont/{ontologySlug}/{localName}\n// where ontologySlug defaults to the owning package's publicSlug (`@_linked/core` -> `core`)\n// and the prefix label equals the ontologySlug. Previously `https://linked.cm/ont/linked-core/`\n// (prefix `linked_core`), a leftover of a reverted slug derivation.\nexport const ns = createNameSpace('https://linked.cm/ont/core/');\nexport const _self: NodeReferenceValue = ns('');\n// @deprecated prefix alias: keeps `linked_core:` prefixed names resolving (to the NEW IRIs).\n// It does not make the old full IRIs match. Registered BEFORE `core` because the last add\n// wins for IRI -> prefix compaction, so output always uses `core:`.\nPrefix.add('linked_core', _self.id);\nPrefix.add('core', _self.id);\n\nconst Package = ns('Package');\nconst ShapeClass = ns('ShapeClass');\nconst definesShape = ns('definesShape');\nconst moduleProperty = ns('module');\nconst usesShapeClass = ns('usesShapeClass');\nconst editInline = ns('editInline');\nconst isExtending = ns('isExtending');\n\n// Containment / lifecycle vocabulary.\n// contains — property characteristic: the subject owns the value through this property\n// (composition); the owned walk follows it.\n// dependent — shape characteristic, deprecated: no effect (persisted for older shapes).\n// PathNode — class for SHACL property-path operator nodes (sh:inversePath/alternativePath/…).\nconst contains = ns('contains');\nconst dependent = ns('dependent');\nconst PathNode = ns('PathNode');\n\n// Display vocabulary. SHACL has `sh:order` and `sh:group`, which say how properties\n// are arranged; it has no way to say how *important* a property is, which is what a\n// renderer needs when it can only show one, three or six of them. `displayRank` is\n// that: a single linear rank per property, lower = more important, from which every\n// truncated context (\"show the top 3\") derives. `displayHidden` removes a property\n// from generic rendering without changing its cardinality or its meaning.\n//\n// Placement is deliberate (backlog-029): this is an ecosystem SHACL extension that\n// materializes onto the pure `sh:NodeShape` and therefore travels with an ejected\n// app — NOT the CN-proprietary `code:` vocab, which describes source-code structure.\nconst displayRank = ns('displayRank');\nconst displayHidden = ns('displayHidden');\n\n// Provenance marker: a NodeShape core generates at sync time from another shape's code\n// (today the `<propertyShape>.singleOwner` constraint derived from `contains`), rather than one a\n// developer declared. Catalog readers skip shapes with `core:generated true`.\nconst generated = ns('generated');\n\n// Ownership edge from a NodeShape to the shapes core generated from it at sync time (the\n// single-owner constraint of each `contains` property). It is `contains`, so deleting the\n// shape deletes them, and sync writes them nested in the shape's own create.\nconst generatedShape = ns('generatedShape');\n\n// Content hash of everything shape sync writes for a NodeShape (the shape, its property shapes,\n// lists, paths and generated shapes), stored on the NodeShape. A sync skips a shape whose stored\n// hash equals the hash of what it would write.\nconst shapeHash = ns('shapeHash');\n\nexport const coreOntology = {\n Package,\n ShapeClass,\n definesShape,\n module: moduleProperty,\n usesShapeClass,\n editInline,\n isExtending,\n contains,\n dependent,\n PathNode,\n displayRank,\n displayHidden,\n generated,\n generatedShape,\n shapeHash,\n};\n"]}
|
|
@@ -69,6 +69,9 @@ export declare const shacl: {
|
|
|
69
69
|
targetClass: NodeReferenceValue;
|
|
70
70
|
targetNode: NodeReferenceValue;
|
|
71
71
|
targetObjectsOf: NodeReferenceValue;
|
|
72
|
+
qualifiedValueShape: NodeReferenceValue;
|
|
73
|
+
qualifiedMaxCount: NodeReferenceValue;
|
|
74
|
+
or: NodeReferenceValue;
|
|
72
75
|
BlankNode: NodeReferenceValue;
|
|
73
76
|
IRI: NodeReferenceValue;
|
|
74
77
|
Literal: NodeReferenceValue;
|
|
@@ -25,6 +25,9 @@ const PropertyShape = ns('PropertyShape');
|
|
|
25
25
|
const targetClass = ns('targetClass');
|
|
26
26
|
const targetNode = ns('targetNode');
|
|
27
27
|
const targetObjectsOf = ns('targetObjectsOf');
|
|
28
|
+
const qualifiedValueShape = ns('qualifiedValueShape');
|
|
29
|
+
const qualifiedMaxCount = ns('qualifiedMaxCount');
|
|
30
|
+
const or = ns('or');
|
|
28
31
|
const node = ns('node');
|
|
29
32
|
const nodeKind = ns('nodeKind');
|
|
30
33
|
const Shape = ns('Shape');
|
|
@@ -116,6 +119,9 @@ export const shacl = {
|
|
|
116
119
|
targetClass,
|
|
117
120
|
targetNode,
|
|
118
121
|
targetObjectsOf,
|
|
122
|
+
qualifiedValueShape,
|
|
123
|
+
qualifiedMaxCount,
|
|
124
|
+
or,
|
|
119
125
|
BlankNode,
|
|
120
126
|
IRI,
|
|
121
127
|
Literal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shacl.js","sourceRoot":"","sources":["../../../src/ontologies/shacl.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAEtD,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAuB,EAAC,EAAE,EAAE,IAAI,EAAC,CAAC;AAChE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;AAExC,8BAA8B;AAC9B,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;AAC3B,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AAChC,MAAM,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC9B,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AACrB,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AAChC,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;AAChC,MAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,IAAI,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC;AACtC,MAAM,SAAS,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;AAClC,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;A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;IACT,QAAQ;IACR,SAAS;IACT,iBAAiB;IACjB,IAAI;IACJ,MAAM;IACN,QAAQ;IACR,aAAa;IACb,KAAK;IACL,WAAW;IACX,UAAU;IACV,eAAe;IACf,SAAS;IACT,GAAG;IACH,OAAO;IACP,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,KAAK;IACL,KAAK;IACL,MAAM;IACN,iBAAiB;IACjB,UAAU;IACV,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,OAAO;IACP,UAAU;IACV,gBAAgB;IAChB,QAAQ;IACR,gBAAgB;IAChB,SAAS;IACT,WAAW;IACX,cAAc;IACd,UAAU;IACV,KAAK;IACL,OAAO;IACP,aAAa;IACb,MAAM;IACN,SAAS;IACT,yBAAyB;IACzB,wBAAwB;IACxB,uBAAuB;IACvB,2BAA2B;IAC3B,4BAA4B;IAC5B,4BAA4B;IAC5B,2BAA2B;IAC3B,2BAA2B;IAC3B,+BAA+B;IAC/B,+BAA+B;IAC/B,+BAA+B;IAC/B,+BAA+B;IAC/B,0BAA0B;IAC1B,qBAAqB;IACrB,2BAA2B;IAC3B,yBAAyB;IACzB,OAAO;IACP,IAAI;IACJ,cAAc;IACd,MAAM;IACN,eAAe;IACf,WAAW;IACX,cAAc;IACd,aAAa;IACb,aAAa;CACd,CAAC","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport type {NodeReferenceValue} from '../utils/NodeReference.js';\nimport {Prefix} from '../utils/Prefix.js';\nimport {createNameSpace} from '../utils/NameSpace.js';\n\nconst base = 'http://www.w3.org/ns/shacl#';\nexport const _ontologyResource: NodeReferenceValue = {id: base};\nPrefix.add('shacl', base);\n\nexport const ns = createNameSpace(base);\n\n//add your ontology nodes here\nconst _class = ns('class');\nconst datatype = ns('datatype');\nconst declare = ns('declare');\nconst _in = ns('in');\nconst maxCount = ns('maxCount');\nconst minCount = ns('minCount');\nconst inList = ns('inList');\nconst name = ns('name');\nconst description = ns('description');\nconst NodeShape = ns('NodeShape');\nconst optional = ns('optional');\nconst Parameter = ns('Parameter');\nconst PrefixDeclaration = ns('PrefixDeclaration');\nconst path = ns('path');\nconst property = ns('property');\nconst prefix = ns('prefix');\nconst PropertyShape = ns('PropertyShape');\nconst targetClass = ns('targetClass');\nconst targetNode = ns('targetNode');\nconst targetObjectsOf = ns('targetObjectsOf');\nconst node = ns('node');\nconst nodeKind = ns('nodeKind');\nconst Shape = ns('Shape');\n\nconst equals = ns('equals');\nconst disjoint = ns('disjoint');\nconst hasValue = ns('hasValue');\nconst defaultValue = ns('defaultValue');\nconst order = ns('order');\nconst group = ns('group');\nconst closed = ns('closed');\nconst ignoredProperties = ns('ignoredProperties');\n\nconst alternativePath = ns('alternativePath');\nconst inversePath = ns('inversePath');\nconst zeroOrMorePath = ns('zeroOrMorePath');\nconst oneOrMorePath = ns('oneOrMorePath');\nconst zeroOrOnePath = ns('zeroOrOnePath');\n\nconst BlankNode = ns('BlankNode');\nconst IRI = ns('IRI');\nconst Literal = ns('Literal');\nconst BlankNodeOrIRI = ns('BlankNodeOrIRI');\nconst BlankNodeOrLiteral = ns('BlankNodeOrLiteral');\nconst IRIOrLiteral = ns('IRIOrLiteral');\n\nexport const languageIn = ns('languageIn');\nexport const lessThan = ns('lessThan');\nexport const lessThanOrEquals = ns('lessThanOrEquals');\nexport const maxExclusive = ns('maxExclusive');\nexport const maxInclusive = ns('maxInclusive');\nexport const maxLength = ns('maxLength');\nexport const minExclusive = ns('minExclusive');\nexport const minInclusive = ns('minInclusive');\nexport const minLength = ns('minLength');\nexport const pattern = ns('pattern');\nexport const uniqueLang = ns('uniqueLang');\nexport const ValidationReport = ns('ValidationReport');\nexport const conforms = ns('conforms');\nexport const ValidationResult = ns('ValidationResult');\nexport const focusNode = ns('focusNode');\nexport const sourceShape = ns('sourceShape');\nexport const resultSeverity = ns('resultSeverity');\nexport const resultPath = ns('resultPath');\nexport const value = ns('value');\n/** `sh:message` — a custom message declared on a shape or constraint. */\nexport const message = ns('message');\n/** `sh:resultMessage` — the message carried by a validation result. */\nexport const resultMessage = ns('resultMessage');\n/** `sh:detail` — links a validation result to the results that explain it. */\nexport const detail = ns('detail');\nexport const Violation = ns('Violation');\nexport const AbstractResult = ns('AbstractResult');\nexport const sourceConstraintComponent = ns('sourceConstraintComponent');\nexport const ClassConstraintComponent = ns('ClassConstraintComponent');\nexport const NodeConstraintComponent = ns('NodeConstraintComponent');\nexport const DatatypeConstraintComponent = ns('DatatypeConstraintComponent');\nexport const MinLengthConstraintComponent = ns('MinLengthConstraintComponent');\nexport const MaxLengthConstraintComponent = ns('MaxLengthConstraintComponent');\nexport const MinInclusiveConstraintComponent = ns('MinInclusiveConstraintComponent');\nexport const MaxInclusiveConstraintComponent = ns('MaxInclusiveConstraintComponent');\nexport const MinExclusiveConstraintComponent = ns('MinExclusiveConstraintComponent');\nexport const MaxExclusiveConstraintComponent = ns('MaxExclusiveConstraintComponent');\nexport const PatternConstraintComponent = ns('PatternConstraintComponent');\nexport const InConstraintComponent = ns('InConstraintComponent');\nexport const MinCountConstraintComponent = ns('MinCountConstraintComponent');\nexport const MaxCountConstraintComponent = ns('MaxCountConstraintComponent');\nexport const NodeKindConstraintComponent = ns('NodeKindConstraintComponent');\nexport const ClosedConstraintComponent = ns('ClosedConstraintComponent');\nexport const Warning = ns('Warning');\nexport const Info = ns('Info');\nexport const result = ns('result');\n\n//make sure every node is also exported here\nexport const shacl = {\n class: _class,\n datatype,\n declare,\n in: _in,\n maxCount,\n minCount,\n name,\n description,\n node,\n NodeShape,\n optional,\n Parameter,\n PrefixDeclaration,\n path,\n prefix,\n property,\n PropertyShape,\n Shape,\n targetClass,\n targetNode,\n targetObjectsOf,\n BlankNode,\n IRI,\n Literal,\n BlankNodeOrIRI,\n BlankNodeOrLiteral,\n IRIOrLiteral,\n nodeKind,\n inList,\n equals,\n disjoint,\n hasValue,\n defaultValue,\n order,\n group,\n closed,\n ignoredProperties,\n languageIn,\n lessThan,\n lessThanOrEquals,\n maxExclusive,\n maxInclusive,\n maxLength,\n minExclusive,\n minInclusive,\n minLength,\n pattern,\n uniqueLang,\n ValidationReport,\n conforms,\n ValidationResult,\n focusNode,\n sourceShape,\n resultSeverity,\n resultPath,\n value,\n message,\n resultMessage,\n detail,\n Violation,\n sourceConstraintComponent,\n ClassConstraintComponent,\n NodeConstraintComponent,\n DatatypeConstraintComponent,\n MinLengthConstraintComponent,\n MaxLengthConstraintComponent,\n MinCountConstraintComponent,\n MaxCountConstraintComponent,\n MinInclusiveConstraintComponent,\n MaxInclusiveConstraintComponent,\n MinExclusiveConstraintComponent,\n MaxExclusiveConstraintComponent,\n PatternConstraintComponent,\n InConstraintComponent,\n NodeKindConstraintComponent,\n ClosedConstraintComponent,\n Warning,\n Info,\n AbstractResult,\n result,\n alternativePath,\n inversePath,\n zeroOrMorePath,\n oneOrMorePath,\n zeroOrOnePath,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"shacl.js","sourceRoot":"","sources":["../../../src/ontologies/shacl.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAEtD,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAuB,EAAC,EAAE,EAAE,IAAI,EAAC,CAAC;AAChE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;AAExC,8BAA8B;AAC9B,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC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,QAAQ;IACR,gBAAgB;IAChB,SAAS;IACT,WAAW;IACX,cAAc;IACd,UAAU;IACV,KAAK;IACL,OAAO;IACP,aAAa;IACb,MAAM;IACN,SAAS;IACT,yBAAyB;IACzB,wBAAwB;IACxB,uBAAuB;IACvB,2BAA2B;IAC3B,4BAA4B;IAC5B,4BAA4B;IAC5B,2BAA2B;IAC3B,2BAA2B;IAC3B,+BAA+B;IAC/B,+BAA+B;IAC/B,+BAA+B;IAC/B,+BAA+B;IAC/B,0BAA0B;IAC1B,qBAAqB;IACrB,2BAA2B;IAC3B,yBAAyB;IACzB,OAAO;IACP,IAAI;IACJ,cAAc;IACd,MAAM;IACN,eAAe;IACf,WAAW;IACX,cAAc;IACd,aAAa;IACb,aAAa;CACd,CAAC","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport type {NodeReferenceValue} from '../utils/NodeReference.js';\nimport {Prefix} from '../utils/Prefix.js';\nimport {createNameSpace} from '../utils/NameSpace.js';\n\nconst base = 'http://www.w3.org/ns/shacl#';\nexport const _ontologyResource: NodeReferenceValue = {id: base};\nPrefix.add('shacl', base);\n\nexport const ns = createNameSpace(base);\n\n//add your ontology nodes here\nconst _class = ns('class');\nconst datatype = ns('datatype');\nconst declare = ns('declare');\nconst _in = ns('in');\nconst maxCount = ns('maxCount');\nconst minCount = ns('minCount');\nconst inList = ns('inList');\nconst name = ns('name');\nconst description = ns('description');\nconst NodeShape = ns('NodeShape');\nconst optional = ns('optional');\nconst Parameter = ns('Parameter');\nconst PrefixDeclaration = ns('PrefixDeclaration');\nconst path = ns('path');\nconst property = ns('property');\nconst prefix = ns('prefix');\nconst PropertyShape = ns('PropertyShape');\nconst targetClass = ns('targetClass');\nconst targetNode = ns('targetNode');\nconst targetObjectsOf = ns('targetObjectsOf');\nconst qualifiedValueShape = ns('qualifiedValueShape');\nconst qualifiedMaxCount = ns('qualifiedMaxCount');\nconst or = ns('or');\nconst node = ns('node');\nconst nodeKind = ns('nodeKind');\nconst Shape = ns('Shape');\n\nconst equals = ns('equals');\nconst disjoint = ns('disjoint');\nconst hasValue = ns('hasValue');\nconst defaultValue = ns('defaultValue');\nconst order = ns('order');\nconst group = ns('group');\nconst closed = ns('closed');\nconst ignoredProperties = ns('ignoredProperties');\n\nconst alternativePath = ns('alternativePath');\nconst inversePath = ns('inversePath');\nconst zeroOrMorePath = ns('zeroOrMorePath');\nconst oneOrMorePath = ns('oneOrMorePath');\nconst zeroOrOnePath = ns('zeroOrOnePath');\n\nconst BlankNode = ns('BlankNode');\nconst IRI = ns('IRI');\nconst Literal = ns('Literal');\nconst BlankNodeOrIRI = ns('BlankNodeOrIRI');\nconst BlankNodeOrLiteral = ns('BlankNodeOrLiteral');\nconst IRIOrLiteral = ns('IRIOrLiteral');\n\nexport const languageIn = ns('languageIn');\nexport const lessThan = ns('lessThan');\nexport const lessThanOrEquals = ns('lessThanOrEquals');\nexport const maxExclusive = ns('maxExclusive');\nexport const maxInclusive = ns('maxInclusive');\nexport const maxLength = ns('maxLength');\nexport const minExclusive = ns('minExclusive');\nexport const minInclusive = ns('minInclusive');\nexport const minLength = ns('minLength');\nexport const pattern = ns('pattern');\nexport const uniqueLang = ns('uniqueLang');\nexport const ValidationReport = ns('ValidationReport');\nexport const conforms = ns('conforms');\nexport const ValidationResult = ns('ValidationResult');\nexport const focusNode = ns('focusNode');\nexport const sourceShape = ns('sourceShape');\nexport const resultSeverity = ns('resultSeverity');\nexport const resultPath = ns('resultPath');\nexport const value = ns('value');\n/** `sh:message` — a custom message declared on a shape or constraint. */\nexport const message = ns('message');\n/** `sh:resultMessage` — the message carried by a validation result. */\nexport const resultMessage = ns('resultMessage');\n/** `sh:detail` — links a validation result to the results that explain it. */\nexport const detail = ns('detail');\nexport const Violation = ns('Violation');\nexport const AbstractResult = ns('AbstractResult');\nexport const sourceConstraintComponent = ns('sourceConstraintComponent');\nexport const ClassConstraintComponent = ns('ClassConstraintComponent');\nexport const NodeConstraintComponent = ns('NodeConstraintComponent');\nexport const DatatypeConstraintComponent = ns('DatatypeConstraintComponent');\nexport const MinLengthConstraintComponent = ns('MinLengthConstraintComponent');\nexport const MaxLengthConstraintComponent = ns('MaxLengthConstraintComponent');\nexport const MinInclusiveConstraintComponent = ns('MinInclusiveConstraintComponent');\nexport const MaxInclusiveConstraintComponent = ns('MaxInclusiveConstraintComponent');\nexport const MinExclusiveConstraintComponent = ns('MinExclusiveConstraintComponent');\nexport const MaxExclusiveConstraintComponent = ns('MaxExclusiveConstraintComponent');\nexport const PatternConstraintComponent = ns('PatternConstraintComponent');\nexport const InConstraintComponent = ns('InConstraintComponent');\nexport const MinCountConstraintComponent = ns('MinCountConstraintComponent');\nexport const MaxCountConstraintComponent = ns('MaxCountConstraintComponent');\nexport const NodeKindConstraintComponent = ns('NodeKindConstraintComponent');\nexport const ClosedConstraintComponent = ns('ClosedConstraintComponent');\nexport const Warning = ns('Warning');\nexport const Info = ns('Info');\nexport const result = ns('result');\n\n//make sure every node is also exported here\nexport const shacl = {\n class: _class,\n datatype,\n declare,\n in: _in,\n maxCount,\n minCount,\n name,\n description,\n node,\n NodeShape,\n optional,\n Parameter,\n PrefixDeclaration,\n path,\n prefix,\n property,\n PropertyShape,\n Shape,\n targetClass,\n targetNode,\n targetObjectsOf,\n qualifiedValueShape,\n qualifiedMaxCount,\n or,\n BlankNode,\n IRI,\n Literal,\n BlankNodeOrIRI,\n BlankNodeOrLiteral,\n IRIOrLiteral,\n nodeKind,\n inList,\n equals,\n disjoint,\n hasValue,\n defaultValue,\n order,\n group,\n closed,\n ignoredProperties,\n languageIn,\n lessThan,\n lessThanOrEquals,\n maxExclusive,\n maxInclusive,\n maxLength,\n minExclusive,\n minInclusive,\n minLength,\n pattern,\n uniqueLang,\n ValidationReport,\n conforms,\n ValidationResult,\n focusNode,\n sourceShape,\n resultSeverity,\n resultPath,\n value,\n message,\n resultMessage,\n detail,\n Violation,\n sourceConstraintComponent,\n ClassConstraintComponent,\n NodeConstraintComponent,\n DatatypeConstraintComponent,\n MinLengthConstraintComponent,\n MaxLengthConstraintComponent,\n MinCountConstraintComponent,\n MaxCountConstraintComponent,\n MinInclusiveConstraintComponent,\n MaxInclusiveConstraintComponent,\n MinExclusiveConstraintComponent,\n MaxExclusiveConstraintComponent,\n PatternConstraintComponent,\n InConstraintComponent,\n NodeKindConstraintComponent,\n ClosedConstraintComponent,\n Warning,\n Info,\n AbstractResult,\n result,\n alternativePath,\n inversePath,\n zeroOrMorePath,\n oneOrMorePath,\n zeroOrOnePath,\n};\n"]}
|
|
@@ -3,9 +3,9 @@ import { Shape } from './Shape.js';
|
|
|
3
3
|
* SHACL/RDF ordered-list cell shape (`rdf:List`).
|
|
4
4
|
*
|
|
5
5
|
* A list is a chain of cells: `first` holds the value, `rest` points to the next cell
|
|
6
|
-
* (or `rdf:nil`).
|
|
7
|
-
* a `contains` edge, so
|
|
8
|
-
*
|
|
6
|
+
* (or `rdf:nil`). `rest` is a `contains` edge, so deleting / replacing a list's owner deletes
|
|
7
|
+
* the whole spine (`rdf:rest*`) — while `first` is NOT a `contains` edge, so the list's
|
|
8
|
+
* *contents* (shared IRIs / values) are kept.
|
|
9
9
|
*
|
|
10
10
|
* This module holds the class only, and must never import `package.js`: `utils/Package.ts`
|
|
11
11
|
* imports it to register `List` by value (as it does NodeShape and PropertyShape) and to use
|
|
@@ -16,9 +16,9 @@ import { rdf } from '../ontologies/rdf.js';
|
|
|
16
16
|
* SHACL/RDF ordered-list cell shape (`rdf:List`).
|
|
17
17
|
*
|
|
18
18
|
* A list is a chain of cells: `first` holds the value, `rest` points to the next cell
|
|
19
|
-
* (or `rdf:nil`).
|
|
20
|
-
* a `contains` edge, so
|
|
21
|
-
*
|
|
19
|
+
* (or `rdf:nil`). `rest` is a `contains` edge, so deleting / replacing a list's owner deletes
|
|
20
|
+
* the whole spine (`rdf:rest*`) — while `first` is NOT a `contains` edge, so the list's
|
|
21
|
+
* *contents* (shared IRIs / values) are kept.
|
|
22
22
|
*
|
|
23
23
|
* This module holds the class only, and must never import `package.js`: `utils/Package.ts`
|
|
24
24
|
* imports it to register `List` by value (as it does NodeShape and PropertyShape) and to use
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.class.js","sourceRoot":"","sources":["../../../src/shapes/List.class.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,IAAkB,SAAQ,KAAK;IAI1C,IAAI,KAAK;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAGD,IAAI,IAAI;QACN,OAAO,IAAI,CAAC;IACd,CAAC;;AAVM,gBAAW,GAAG,GAAG,CAAC,IAAI,CAAC;AAG9B;IADC,cAAc,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAC,CAAC;iCAG9C;AAGD;IADC,cAAc,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;gCAG1E","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport {Shape} from './Shape.js';\nimport {linkedProperty, objectProperty} from './SHACL.js';\nimport {rdf} from '../ontologies/rdf.js';\n\n/**\n * SHACL/RDF ordered-list cell shape (`rdf:List`).\n *\n * A list is a chain of cells: `first` holds the value, `rest` points to the next cell\n * (or `rdf:nil`).
|
|
1
|
+
{"version":3,"file":"List.class.js","sourceRoot":"","sources":["../../../src/shapes/List.class.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,IAAkB,SAAQ,KAAK;IAI1C,IAAI,KAAK;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAGD,IAAI,IAAI;QACN,OAAO,IAAI,CAAC;IACd,CAAC;;AAVM,gBAAW,GAAG,GAAG,CAAC,IAAI,CAAC;AAG9B;IADC,cAAc,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAC,CAAC;iCAG9C;AAGD;IADC,cAAc,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;gCAG1E","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport {Shape} from './Shape.js';\nimport {linkedProperty, objectProperty} from './SHACL.js';\nimport {rdf} from '../ontologies/rdf.js';\n\n/**\n * SHACL/RDF ordered-list cell shape (`rdf:List`).\n *\n * A list is a chain of cells: `first` holds the value, `rest` points to the next cell\n * (or `rdf:nil`). `rest` is a `contains` edge, so deleting / replacing a list's owner deletes\n * the whole spine (`rdf:rest*`) — while `first` is NOT a `contains` edge, so the list's\n * *contents* (shared IRIs / values) are kept.\n *\n * This module holds the class only, and must never import `package.js`: `utils/Package.ts`\n * imports it to register `List` by value (as it does NodeShape and PropertyShape) and to use\n * it as the value shape of `PropertyShape.in`. Importing `package.js` from here would be a\n * cycle, with `corePackage` still uninitialised when this module evaluates. The public module\n * is `List.ts`, which loads the registration.\n */\nexport class List<T = unknown> extends Shape {\n static targetClass = rdf.List;\n\n @linkedProperty({path: rdf.first, maxCount: 1})\n get first(): T {\n return null;\n }\n\n @objectProperty({path: rdf.rest, maxCount: 1, shape: List, contains: true})\n get rest(): List<T> {\n return null;\n }\n}\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Shape } from './Shape.js';
|
|
2
2
|
/**
|
|
3
|
-
* A
|
|
4
|
-
* operand of `sh:alternativePath
|
|
3
|
+
* A blank `rdf:List` cell of SHACL structure core writes: the members of a sequence path, the
|
|
4
|
+
* operand of `sh:alternativePath`, and the `sh:or` list of a generated single-owner constraint
|
|
5
|
+
* (`singleOwnerConstraint.ts`).
|
|
5
6
|
*
|
|
6
7
|
* Both properties are `sh:BlankNodeOrIRI`, so a cell written without an id is a blank node, and so
|
|
7
8
|
* is an operator node (`PathNode`) held by `first`. That keeps a sequence path a blank list, which
|
|
@@ -11,16 +12,12 @@ import { Shape } from './Shape.js';
|
|
|
11
12
|
* cannot be declared node-only, and making `List.rest` blank-capable would turn the tail cells of
|
|
12
13
|
* every list built without ids into blank nodes. Both shapes target `rdf:List`; `List` is
|
|
13
14
|
* registered first, so a lookup by `rdf:List` still returns `List`.
|
|
14
|
-
*
|
|
15
|
-
* `dependent` and the `contains` on `rest` keep removing the IRI-named, typed list cells of
|
|
16
|
-
* versions before 2.30 through the typed cascade.
|
|
17
15
|
*/
|
|
18
16
|
export declare class PathList extends Shape {
|
|
19
17
|
static targetClass: import("../utils/NodeReference.js").NodeReferenceValue;
|
|
20
18
|
/**
|
|
21
|
-
* A predicate IRI, or an operator node (`PathNode`). Not `contains`:
|
|
22
|
-
*
|
|
23
|
-
* does not own. The blank-node cascade follows it anyway, because it is blank-capable.
|
|
19
|
+
* A predicate IRI, or an operator node (`PathNode`). Not `contains`: a predicate IRI is
|
|
20
|
+
* shared. The blank-node cascade follows it, because it is blank-capable.
|
|
24
21
|
*/
|
|
25
22
|
get first(): unknown;
|
|
26
23
|
get rest(): PathList;
|
|
@@ -15,8 +15,9 @@ import { objectProperty } from './SHACL.js';
|
|
|
15
15
|
import { shacl } from '../ontologies/shacl.js';
|
|
16
16
|
import { rdf } from '../ontologies/rdf.js';
|
|
17
17
|
/**
|
|
18
|
-
* A
|
|
19
|
-
* operand of `sh:alternativePath
|
|
18
|
+
* A blank `rdf:List` cell of SHACL structure core writes: the members of a sequence path, the
|
|
19
|
+
* operand of `sh:alternativePath`, and the `sh:or` list of a generated single-owner constraint
|
|
20
|
+
* (`singleOwnerConstraint.ts`).
|
|
20
21
|
*
|
|
21
22
|
* Both properties are `sh:BlankNodeOrIRI`, so a cell written without an id is a blank node, and so
|
|
22
23
|
* is an operator node (`PathNode`) held by `first`. That keeps a sequence path a blank list, which
|
|
@@ -26,15 +27,11 @@ import { rdf } from '../ontologies/rdf.js';
|
|
|
26
27
|
* cannot be declared node-only, and making `List.rest` blank-capable would turn the tail cells of
|
|
27
28
|
* every list built without ids into blank nodes. Both shapes target `rdf:List`; `List` is
|
|
28
29
|
* registered first, so a lookup by `rdf:List` still returns `List`.
|
|
29
|
-
*
|
|
30
|
-
* `dependent` and the `contains` on `rest` keep removing the IRI-named, typed list cells of
|
|
31
|
-
* versions before 2.30 through the typed cascade.
|
|
32
30
|
*/
|
|
33
31
|
let PathList = class PathList extends Shape {
|
|
34
32
|
/**
|
|
35
|
-
* A predicate IRI, or an operator node (`PathNode`). Not `contains`:
|
|
36
|
-
*
|
|
37
|
-
* does not own. The blank-node cascade follows it anyway, because it is blank-capable.
|
|
33
|
+
* A predicate IRI, or an operator node (`PathNode`). Not `contains`: a predicate IRI is
|
|
34
|
+
* shared. The blank-node cascade follows it, because it is blank-capable.
|
|
38
35
|
*/
|
|
39
36
|
get first() {
|
|
40
37
|
return null;
|
|
@@ -57,7 +54,7 @@ __decorate([
|
|
|
57
54
|
})
|
|
58
55
|
], PathList.prototype, "rest", null);
|
|
59
56
|
PathList = __decorate([
|
|
60
|
-
linkedShape({ name: 'PathList'
|
|
57
|
+
linkedShape({ name: 'PathList' })
|
|
61
58
|
], PathList);
|
|
62
59
|
export { PathList };
|
|
63
60
|
//# sourceMappingURL=PathList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathList.js","sourceRoot":"","sources":["../../../src/shapes/PathList.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"PathList.js","sourceRoot":"","sources":["../../../src/shapes/PathList.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,KAAK;IAGjC;;;OAGG;IAEH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IASD,IAAI,IAAI;QACN,OAAO,IAAI,CAAC;IACd,CAAC;;AApBM,oBAAW,GAAG,GAAG,CAAC,IAAI,AAAX,CAAY;AAO9B;IADC,cAAc,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,cAAc,EAAC,CAAC;qCAG9E;AASD;IAPC,cAAc,CAAC;QACd,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,KAAK,CAAC,cAAc;KAC/B,CAAC;oCAGD;AArBU,QAAQ;IADpB,WAAW,CAAC,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;GACnB,QAAQ,CAsBpB","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport {linkedShape} from '../package.js';\nimport {Shape} from './Shape.js';\nimport {objectProperty} from './SHACL.js';\nimport {shacl} from '../ontologies/shacl.js';\nimport {rdf} from '../ontologies/rdf.js';\n\n/**\n * A blank `rdf:List` cell of SHACL structure core writes: the members of a sequence path, the\n * operand of `sh:alternativePath`, and the `sh:or` list of a generated single-owner constraint\n * (`singleOwnerConstraint.ts`).\n *\n * Both properties are `sh:BlankNodeOrIRI`, so a cell written without an id is a blank node, and so\n * is an operator node (`PathNode`) held by `first`. That keeps a sequence path a blank list, which\n * SHACL §2.3.1 needs: an IRI as the `sh:path` value is a predicate path.\n *\n * It is a separate shape from `List` on purpose. `List.first` also holds literals (`sh:in`), so it\n * cannot be declared node-only, and making `List.rest` blank-capable would turn the tail cells of\n * every list built without ids into blank nodes. Both shapes target `rdf:List`; `List` is\n * registered first, so a lookup by `rdf:List` still returns `List`.\n */\n@linkedShape({name: 'PathList'})\nexport class PathList extends Shape {\n static targetClass = rdf.List;\n\n /**\n * A predicate IRI, or an operator node (`PathNode`). Not `contains`: a predicate IRI is\n * shared. The blank-node cascade follows it, because it is blank-capable.\n */\n @objectProperty({path: rdf.first, maxCount: 1, nodeKind: shacl.BlankNodeOrIRI})\n get first(): unknown {\n return null;\n }\n\n @objectProperty({\n path: rdf.rest,\n maxCount: 1,\n shape: PathList,\n contains: true,\n nodeKind: shacl.BlankNodeOrIRI,\n })\n get rest(): PathList {\n return null;\n }\n}\n"]}
|