@lde/pipeline-shacl-sampler 0.5.4 → 0.6.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.
@@ -35,13 +35,13 @@ export interface ShaclSampleStagesOptions {
35
35
  */
36
36
  samplesPerClass?: number;
37
37
  /**
38
- * Maximum number of sampled subjects per executor call. Defaults to
38
+ * Maximum number of sampled subjects per reader call. Defaults to
39
39
  * {@link samplesPerClass} so the whole sample fits in one CONSTRUCT
40
40
  * round-trip; lower to spread work across multiple parallel queries.
41
41
  */
42
42
  batchSize?: number;
43
43
  /**
44
- * Maximum concurrent in-flight executor batches per stage. @default 10
44
+ * Maximum concurrent in-flight reader batches per stage. @default 10
45
45
  */
46
46
  maxConcurrency?: number;
47
47
  /**
@@ -88,7 +88,7 @@ export interface ShaclSampleStagesOptions {
88
88
  /**
89
89
  * Build one sampling {@link Stage} per `sh:targetClass` declared in the SHACL
90
90
  * shapes file. Each stage pairs a SELECT-based {@link ItemSelector} that picks
91
- * N instances of its target class with a CONSTRUCT executor that, for every
91
+ * N instances of its target class with a CONSTRUCT reader that, for every
92
92
  * path chain the SHACL declares (recursively, stopping at leaf constraints
93
93
  * or cycles), pulls in the triples reachable along that chain’s terminal
94
94
  * node.
@@ -1,4 +1,4 @@
1
- import { Stage, SparqlConstructExecutor, SparqlItemSelector, } from '@lde/pipeline';
1
+ import { Stage, SparqlConstructReader, SparqlItemSelector, } from '@lde/pipeline';
2
2
  import { assertSafeIri } from '@lde/dataset';
3
3
  import { DataFactory } from 'n3';
4
4
  import { extractTargetShapes } from './pathExtractor.js';
@@ -6,7 +6,7 @@ const { namedNode, quad } = DataFactory;
6
6
  /**
7
7
  * Build one sampling {@link Stage} per `sh:targetClass` declared in the SHACL
8
8
  * shapes file. Each stage pairs a SELECT-based {@link ItemSelector} that picks
9
- * N instances of its target class with a CONSTRUCT executor that, for every
9
+ * N instances of its target class with a CONSTRUCT reader that, for every
10
10
  * path chain the SHACL declares (recursively, stopping at leaf constraints
11
11
  * or cycles), pulls in the triples reachable along that chain’s terminal
12
12
  * node.
@@ -33,7 +33,7 @@ export async function shaclSampleStages(options) {
33
33
  return shapes.map((shape) => new Stage({
34
34
  name: `shacl-sample-${localName(shape.targetClass.value)}`,
35
35
  itemSelector: subjectSelector(shape.targetClass, samplesPerClass, namespaceAliases, options.excludeResources?.(shape.targetClass)),
36
- executors: new SparqlConstructExecutor({
36
+ readers: new SparqlConstructReader({
37
37
  query: buildSampleQuery(shape),
38
38
  }),
39
39
  batchSize,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/pipeline-shacl-sampler",
3
- "version": "0.5.4",
3
+ "version": "0.6.0",
4
4
  "description": "Per-class sampling stages for @lde/pipeline, derived from SHACL shapes",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/ldelements/lde.git",
@@ -32,7 +32,7 @@
32
32
  "tslib": "^2.3.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@lde/dataset": "0.7.7",
36
- "@lde/pipeline": "0.31.4"
35
+ "@lde/dataset": "^0.7.8",
36
+ "@lde/pipeline": "^0.32.0"
37
37
  }
38
38
  }