@comunica/actor-rdf-join-inner-none 3.3.0 → 4.0.1

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
@@ -23,7 +23,7 @@ After installing, this package can be added to your engine's configuration as fo
23
23
  {
24
24
  "@context": [
25
25
  ...
26
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-none/^3.0.0/components/context.jsonld"
26
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-none/^4.0.0/components/context.jsonld"
27
27
  ],
28
28
  "actors": [
29
29
  ...
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-none/^3.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^3.0.0/components/context.jsonld",
5
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-none/^4.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^4.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/actor-rdf-join-inner-none",
8
8
  "components": [
@@ -44,29 +44,37 @@
44
44
  "genericTypeInstances": [
45
45
  {
46
46
  "@type": "ParameterRangeGenericTypeReference",
47
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
47
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
48
48
  },
49
49
  {
50
50
  "@type": "ParameterRangeGenericTypeReference",
51
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
51
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
52
52
  },
53
53
  {
54
54
  "@type": "ParameterRangeGenericTypeReference",
55
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
55
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
56
+ },
57
+ {
58
+ "@type": "ParameterRangeGenericTypeReference",
59
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
56
60
  }
57
61
  ]
58
62
  },
59
63
  {
60
64
  "@type": "ParameterRangeGenericTypeReference",
61
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
66
+ },
67
+ {
68
+ "@type": "ParameterRangeGenericTypeReference",
69
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
62
70
  },
63
71
  {
64
72
  "@type": "ParameterRangeGenericTypeReference",
65
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
73
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
66
74
  },
67
75
  {
68
76
  "@type": "ParameterRangeGenericTypeReference",
69
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
77
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
70
78
  }
71
79
  ]
72
80
  },
@@ -76,6 +84,20 @@
76
84
  },
77
85
  "comment": "The bus this actor subscribes to."
78
86
  },
87
+ {
88
+ "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_busFailMessage",
89
+ "range": {
90
+ "@type": "ParameterRangeUnion",
91
+ "parameterRangeElements": [
92
+ "xsd:string",
93
+ {
94
+ "@type": "ParameterRangeUndefined"
95
+ }
96
+ ]
97
+ },
98
+ "default": "RDF joining failed: none of the configured actors were able to handle the join type ${action.type}",
99
+ "comment": "The message that will be configured in the bus for reporting failures. This message may be a template string that contains references to the executed `action`. For example, the following templated string is allowed: \"RDF dereferencing failed: no actors could handle ${action.handle.mediaType}\""
100
+ },
79
101
  {
80
102
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_beforeActors",
81
103
  "range": {
@@ -89,15 +111,19 @@
89
111
  "genericTypeInstances": [
90
112
  {
91
113
  "@type": "ParameterRangeGenericTypeReference",
92
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
114
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
93
115
  },
94
116
  {
95
117
  "@type": "ParameterRangeGenericTypeReference",
96
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
118
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
97
119
  },
98
120
  {
99
121
  "@type": "ParameterRangeGenericTypeReference",
100
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
122
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
123
+ },
124
+ {
125
+ "@type": "ParameterRangeGenericTypeReference",
126
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
101
127
  }
102
128
  ]
103
129
  }
@@ -161,6 +187,12 @@
161
187
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_bus"
162
188
  }
163
189
  },
190
+ {
191
+ "keyRaw": "busFailMessage",
192
+ "value": {
193
+ "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_busFailMessage"
194
+ }
195
+ },
164
196
  {
165
197
  "keyRaw": "beforeActors",
166
198
  "value": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-none/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-none/^4.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-rdf-join-inner-none",
6
6
  "@type": "Module",
@@ -3,7 +3,7 @@
3
3
  "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
4
4
  {
5
5
  "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
- "carjino": "npmd:@comunica/actor-rdf-join-inner-none/^3.0.0/",
6
+ "carjino": "npmd:@comunica/actor-rdf-join-inner-none/^4.0.0/",
7
7
  "ActorRdfJoinNone": {
8
8
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone",
9
9
  "@prefix": true,
@@ -20,6 +20,9 @@
20
20
  "args_bus": {
21
21
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_bus"
22
22
  },
23
+ "args_busFailMessage": {
24
+ "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_busFailMessage"
25
+ },
23
26
  "args_beforeActors": {
24
27
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_beforeActors",
25
28
  "@container": "@list"
@@ -36,6 +39,9 @@
36
39
  "bus": {
37
40
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_bus"
38
41
  },
42
+ "busFailMessage": {
43
+ "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_busFailMessage"
44
+ },
39
45
  "beforeActors": {
40
46
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_beforeActors",
41
47
  "@container": "@list"
@@ -1,6 +1,7 @@
1
1
  import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';
2
- import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';
2
+ import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs, IActorRdfJoinTestSideData } from '@comunica/bus-rdf-join';
3
3
  import { ActorRdfJoin } from '@comunica/bus-rdf-join';
4
+ import type { TestResult } from '@comunica/core';
4
5
  import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
5
6
  /**
6
7
  * A comunica None RDF Join Actor.
@@ -8,9 +9,9 @@ import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-
8
9
  export declare class ActorRdfJoinNone extends ActorRdfJoin {
9
10
  readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;
10
11
  constructor(args: IActorRdfJoinNoneArgs);
11
- test(action: IActionRdfJoin): Promise<IMediatorTypeJoinCoefficients>;
12
+ test(action: IActionRdfJoin): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>>;
12
13
  protected getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner>;
13
- protected getJoinCoefficients(): Promise<IMediatorTypeJoinCoefficients>;
14
+ protected getJoinCoefficients(action: IActionRdfJoin, sideData: IActorRdfJoinTestSideData): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>>;
14
15
  }
15
16
  export interface IActorRdfJoinNoneArgs extends IActorRdfJoinArgs {
16
17
  /**
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorRdfJoinNone = void 0;
4
- const bindings_factory_1 = require("@comunica/bindings-factory");
5
4
  const bus_rdf_join_1 = require("@comunica/bus-rdf-join");
6
- const metadata_1 = require("@comunica/metadata");
5
+ const context_entries_1 = require("@comunica/context-entries");
6
+ const core_1 = require("@comunica/core");
7
+ const utils_bindings_factory_1 = require("@comunica/utils-bindings-factory");
8
+ const utils_metadata_1 = require("@comunica/utils-metadata");
7
9
  const asynciterator_1 = require("asynciterator");
8
10
  /**
9
11
  * A comunica None RDF Join Actor.
@@ -19,32 +21,32 @@ class ActorRdfJoinNone extends bus_rdf_join_1.ActorRdfJoin {
19
21
  async test(action) {
20
22
  // Allow joining of one or zero streams
21
23
  if (action.entries.length > 0) {
22
- throw new Error(`Actor ${this.name} can only join zero entries`);
24
+ return (0, core_1.failTest)(`Actor ${this.name} can only join zero entries`);
23
25
  }
24
- return await this.getJoinCoefficients();
26
+ return await this.getJoinCoefficients(action, undefined);
25
27
  }
26
28
  async getOutput(action) {
27
- const bindingsFactory = await bindings_factory_1.BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);
29
+ const dataFactory = action.context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
30
+ const bindingsFactory = await utils_bindings_factory_1.BindingsFactory.create(this.mediatorMergeBindingsContext, action.context, dataFactory);
28
31
  return {
29
32
  result: {
30
33
  bindingsStream: new asynciterator_1.ArrayIterator([bindingsFactory.bindings()], { autoStart: false }),
31
34
  metadata: () => Promise.resolve({
32
- state: new metadata_1.MetadataValidationState(),
35
+ state: new utils_metadata_1.MetadataValidationState(),
33
36
  cardinality: { type: 'exact', value: 1 },
34
- canContainUndefs: false,
35
37
  variables: [],
36
38
  }),
37
39
  type: 'bindings',
38
40
  },
39
41
  };
40
42
  }
41
- async getJoinCoefficients() {
42
- return {
43
+ async getJoinCoefficients(action, sideData) {
44
+ return (0, core_1.passTestWithSideData)({
43
45
  iterations: 0,
44
46
  persistedItems: 0,
45
47
  blockingItems: 0,
46
48
  requestTime: 0,
47
- };
49
+ }, sideData);
48
50
  }
49
51
  }
50
52
  exports.ActorRdfJoinNone = ActorRdfJoinNone;
@@ -1 +1 @@
1
- {"version":3,"file":"ActorRdfJoinNone.js","sourceRoot":"","sources":["ActorRdfJoinNone.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,yDAAsD;AAEtD,iDAA6D;AAE7D,iDAA8C;AAE9C;;GAEG;AACH,MAAa,gBAAiB,SAAQ,2BAAY;IAGhD,YAAmB,IAA2B;QAC5C,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,MAAM;YACpB,YAAY,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAEe,KAAK,CAAC,IAAI,CAAC,MAAsB;QAC/C,uCAAuC;QACvC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,6BAA6B,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC1C,CAAC;IAES,KAAK,CAAC,SAAS,CAAC,MAAsB;QAC9C,MAAM,eAAe,GAAG,MAAM,kCAAe,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACxG,OAAO;YACL,MAAM,EAAE;gBACN,cAAc,EAAE,IAAI,6BAAa,CAAe,CAAE,eAAe,CAAC,QAAQ,EAAE,CAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gBACrG,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;oBAC9B,KAAK,EAAE,IAAI,kCAAuB,EAAE;oBACpC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE;oBACxC,gBAAgB,EAAE,KAAK;oBACvB,SAAS,EAAE,EAAE;iBACd,CAAC;gBACF,IAAI,EAAE,UAAU;aACjB;SACF,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,mBAAmB;QACjC,OAAO;YACL,UAAU,EAAE,CAAC;YACb,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;YAChB,WAAW,EAAE,CAAC;SACf,CAAC;IACJ,CAAC;CACF;AA3CD,4CA2CC","sourcesContent":["import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica None RDF Join Actor.\n */\nexport class ActorRdfJoinNone extends ActorRdfJoin {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorRdfJoinNoneArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'none',\n limitEntries: 0,\n });\n }\n\n public override async test(action: IActionRdfJoin): Promise<IMediatorTypeJoinCoefficients> {\n // Allow joining of one or zero streams\n if (action.entries.length > 0) {\n throw new Error(`Actor ${this.name} can only join zero entries`);\n }\n return await this.getJoinCoefficients();\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);\n return {\n result: {\n bindingsStream: new ArrayIterator<RDF.Bindings>([ bindingsFactory.bindings() ], { autoStart: false }),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(): Promise<IMediatorTypeJoinCoefficients> {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n\nexport interface IActorRdfJoinNoneArgs extends IActorRdfJoinArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n"]}
1
+ {"version":3,"file":"ActorRdfJoinNone.js","sourceRoot":"","sources":["ActorRdfJoinNone.ts"],"names":[],"mappings":";;;AAOA,yDAAsD;AACtD,+DAA0D;AAE1D,yCAAgE;AAGhE,6EAAmE;AACnE,6DAAmE;AAEnE,iDAA8C;AAE9C;;GAEG;AACH,MAAa,gBAAiB,SAAQ,2BAAY;IAGhD,YAAmB,IAA2B;QAC5C,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,MAAM;YACpB,YAAY,EAAE,CAAC;SAChB,CAAC,CAAC;IACL,CAAC;IAEe,KAAK,CAAC,IAAI,CACxB,MAAsB;QAEtB,uCAAuC;QACvC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,OAAO,IAAA,eAAQ,EAAC,SAAS,IAAI,CAAC,IAAI,6BAA6B,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,SAAU,CAAC,CAAC;IAC5D,CAAC;IAES,KAAK,CAAC,SAAS,CAAC,MAAsB;QAC9C,MAAM,WAAW,GAAwB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QAC3F,MAAM,eAAe,GAAG,MAAM,wCAAe,CAAC,MAAM,CAClD,IAAI,CAAC,4BAA4B,EACjC,MAAM,CAAC,OAAO,EACd,WAAW,CACZ,CAAC;QACF,OAAO;YACL,MAAM,EAAE;gBACN,cAAc,EAAE,IAAI,6BAAa,CAAe,CAAE,eAAe,CAAC,QAAQ,EAAE,CAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gBACrG,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;oBAC9B,KAAK,EAAE,IAAI,wCAAuB,EAAE;oBACpC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE;oBACxC,SAAS,EAAE,EAAE;iBACd,CAAC;gBACF,IAAI,EAAE,UAAU;aACjB;SACF,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,MAAsB,EACtB,QAAmC;QAEnC,OAAO,IAAA,2BAAoB,EAAC;YAC1B,UAAU,EAAE,CAAC;YACb,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;YAChB,WAAW,EAAE,CAAC;SACf,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;CACF;AApDD,4CAoDC","sourcesContent":["import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n IActorRdfJoinTestSideData,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { TestResult } from '@comunica/core';\nimport { passTestWithSideData, failTest } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { ComunicaDataFactory } from '@comunica/types';\nimport { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport { MetadataValidationState } from '@comunica/utils-metadata';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica None RDF Join Actor.\n */\nexport class ActorRdfJoinNone extends ActorRdfJoin {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorRdfJoinNoneArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'none',\n limitEntries: 0,\n });\n }\n\n public override async test(\n action: IActionRdfJoin,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n // Allow joining of one or zero streams\n if (action.entries.length > 0) {\n return failTest(`Actor ${this.name} can only join zero entries`);\n }\n return await this.getJoinCoefficients(action, undefined!);\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n const dataFactory: ComunicaDataFactory = action.context.getSafe(KeysInitQuery.dataFactory);\n const bindingsFactory = await BindingsFactory.create(\n this.mediatorMergeBindingsContext,\n action.context,\n dataFactory,\n );\n return {\n result: {\n bindingsStream: new ArrayIterator<RDF.Bindings>([ bindingsFactory.bindings() ], { autoStart: false }),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n variables: [],\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n return passTestWithSideData({\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n }, sideData);\n }\n}\n\nexport interface IActorRdfJoinNoneArgs extends IActorRdfJoinArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n"]}
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@comunica/actor-rdf-join-inner-none",
3
- "version": "3.3.0",
3
+ "version": "4.0.1",
4
4
  "description": "A none rdf-join actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
7
+ "funding": {
8
+ "type": "opencollective",
9
+ "url": "https://opencollective.com/comunica-association"
10
+ },
7
11
  "homepage": "https://comunica.dev/",
8
12
  "repository": {
9
13
  "type": "git",
@@ -37,13 +41,16 @@
37
41
  "build:components": "componentsjs-generator"
38
42
  },
39
43
  "dependencies": {
40
- "@comunica/bindings-factory": "^3.3.0",
41
- "@comunica/bus-merge-bindings-context": "^3.3.0",
42
- "@comunica/bus-rdf-join": "^3.3.0",
43
- "@comunica/mediatortype-join-coefficients": "^3.3.0",
44
- "@comunica/metadata": "^3.3.0",
44
+ "@comunica/bus-merge-bindings-context": "^4.0.1",
45
+ "@comunica/bus-rdf-join": "^4.0.1",
46
+ "@comunica/context-entries": "^4.0.1",
47
+ "@comunica/core": "^4.0.1",
48
+ "@comunica/mediatortype-join-coefficients": "^4.0.1",
49
+ "@comunica/types": "^4.0.1",
50
+ "@comunica/utils-bindings-factory": "^4.0.1",
51
+ "@comunica/utils-metadata": "^4.0.1",
45
52
  "@rdfjs/types": "*",
46
53
  "asynciterator": "^3.9.0"
47
54
  },
48
- "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
55
+ "gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
49
56
  }