@lde/pipeline-void 0.25.0 → 0.26.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/README.md CHANGED
@@ -72,4 +72,4 @@ Global and domain-specific factories accept `VoidStageOptions` (`timeout`) and r
72
72
  ## Executor decorators
73
73
 
74
74
  - `VocabularyExecutor` — Wraps an executor; detects known vocabulary namespace prefixes in `void:property` quads and appends `void:vocabulary` triples.
75
- - `UriSpaceExecutor` — Wraps an executor; consumes `void:Linkset` quads, matches `void:objectsTarget` against configured URI spaces, and emits aggregated linksets.
75
+ - `UriSpaceExecutor` — Wraps an executor; consumes `void:Linkset` quads, matches each `void:objectsTarget` against configured URI space prefixes using `startsWith`, and aggregates triple counts per matched space. Emits `void:objectsTarget` pointing to the target dataset IRI (taken from the metadata quad subjects), not the raw prefix. Unmatched linksets are discarded.
@@ -3,10 +3,11 @@ import { NotSupported, type Executor, type ExecuteOptions } from '@lde/pipeline'
3
3
  import type { Quad } from '@rdfjs/types';
4
4
  /**
5
5
  * Executor decorator that consumes `void:Linkset` quads from the inner executor,
6
- * matches each `void:objectsTarget` against configured URI spaces using `startsWith`,
7
- * aggregates triple counts per matched space, and emits filtered `void:Linkset` quads.
6
+ * matches each `void:objectsTarget` against configured URI space prefixes using
7
+ * `startsWith`, and aggregates triple counts per matched space.
8
8
  *
9
- * Inner quads are consumed and replaced with aggregated output unmatched URI spaces
9
+ * Emitted `void:objectsTarget` values point to the target dataset IRI (taken from
10
+ * the metadata quad subjects), not the raw URI space prefix. Unmatched linksets
10
11
  * are discarded.
11
12
  */
12
13
  export declare class UriSpaceExecutor implements Executor {
@@ -1 +1 @@
1
- {"version":3,"file":"uriSpaceExecutor.d.ts","sourceRoot":"","sources":["../src/uriSpaceExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAgBzC;;;;;;;GAOG;AACH,qBAAa,gBAAiB,YAAW,QAAQ;IAE7C,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBADT,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;IAG5D,OAAO,CACX,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC;CAO/C"}
1
+ {"version":3,"file":"uriSpaceExecutor.d.ts","sourceRoot":"","sources":["../src/uriSpaceExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAgBzC;;;;;;;;GAQG;AACH,qBAAa,gBAAiB,YAAW,QAAQ;IAE7C,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBADT,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC;IAG5D,OAAO,CACX,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC;CAO/C"}
@@ -12,10 +12,11 @@ const voidTriples = namedNode(`${VOID}triples`);
12
12
  const xsdInteger = namedNode(`${XSD}integer`);
13
13
  /**
14
14
  * Executor decorator that consumes `void:Linkset` quads from the inner executor,
15
- * matches each `void:objectsTarget` against configured URI spaces using `startsWith`,
16
- * aggregates triple counts per matched space, and emits filtered `void:Linkset` quads.
15
+ * matches each `void:objectsTarget` against configured URI space prefixes using
16
+ * `startsWith`, and aggregates triple counts per matched space.
17
17
  *
18
- * Inner quads are consumed and replaced with aggregated output unmatched URI spaces
18
+ * Emitted `void:objectsTarget` values point to the target dataset IRI (taken from
19
+ * the metadata quad subjects), not the raw URI space prefix. Unmatched linksets
19
20
  * are discarded.
20
21
  */
21
22
  export class UriSpaceExecutor {
@@ -67,12 +68,12 @@ async function* withUriSpaces(quads, datasetIri, uriSpaces) {
67
68
  }
68
69
  // Emit aggregated Linkset quads.
69
70
  const datasetNode = namedNode(datasetIri);
70
- for (const [uriSpace, { count, metadata }] of aggregated) {
71
+ for (const [, { count, metadata }] of aggregated) {
71
72
  const linksetNode = blankNode();
72
- const uriSpaceNode = namedNode(uriSpace);
73
+ const targetDatasetNode = metadata[0].subject;
73
74
  yield quad(linksetNode, rdfType, voidLinkset);
74
75
  yield quad(linksetNode, voidSubjectsTarget, datasetNode);
75
- yield quad(linksetNode, voidObjectsTarget, uriSpaceNode);
76
+ yield quad(linksetNode, voidObjectsTarget, targetDatasetNode);
76
77
  yield quad(linksetNode, voidTriples, literal(count.toString(), xsdInteger));
77
78
  for (const metadataQuad of metadata) {
78
79
  yield metadataQuad;
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@lde/pipeline-void",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "VOiD (Vocabulary of Interlinked Datasets) statistical analysis for RDF datasets",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/ldelements/lde.git",
7
7
  "directory": "packages/pipeline-void"
8
8
  },
9
+ "license": "MIT",
9
10
  "type": "module",
10
11
  "exports": {
11
12
  "./package.json": "./package.json",
@@ -32,6 +33,6 @@
32
33
  },
33
34
  "peerDependencies": {
34
35
  "@lde/dataset": "0.7.2",
35
- "@lde/pipeline": "0.27.0"
36
+ "@lde/pipeline": "0.28.0"
36
37
  }
37
38
  }