@comunica/actor-rdf-join-inner-none 3.2.4-alpha.47.0 → 3.3.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.
@@ -53,10 +53,6 @@
53
53
  {
54
54
  "@type": "ParameterRangeGenericTypeReference",
55
55
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
56
- },
57
- {
58
- "@type": "ParameterRangeGenericTypeReference",
59
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
60
56
  }
61
57
  ]
62
58
  },
@@ -71,10 +67,6 @@
71
67
  {
72
68
  "@type": "ParameterRangeGenericTypeReference",
73
69
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
74
- },
75
- {
76
- "@type": "ParameterRangeGenericTypeReference",
77
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
78
70
  }
79
71
  ]
80
72
  },
@@ -84,20 +76,6 @@
84
76
  },
85
77
  "comment": "The bus this actor subscribes to."
86
78
  },
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
- },
101
79
  {
102
80
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_beforeActors",
103
81
  "range": {
@@ -120,10 +98,6 @@
120
98
  {
121
99
  "@type": "ParameterRangeGenericTypeReference",
122
100
  "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
123
- },
124
- {
125
- "@type": "ParameterRangeGenericTypeReference",
126
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
127
101
  }
128
102
  ]
129
103
  }
@@ -187,12 +161,6 @@
187
161
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_bus"
188
162
  }
189
163
  },
190
- {
191
- "keyRaw": "busFailMessage",
192
- "value": {
193
- "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_busFailMessage"
194
- }
195
- },
196
164
  {
197
165
  "keyRaw": "beforeActors",
198
166
  "value": {
@@ -20,9 +20,6 @@
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
- },
26
23
  "args_beforeActors": {
27
24
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_beforeActors",
28
25
  "@container": "@list"
@@ -39,9 +36,6 @@
39
36
  "bus": {
40
37
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_bus"
41
38
  },
42
- "busFailMessage": {
43
- "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_busFailMessage"
44
- },
45
39
  "beforeActors": {
46
40
  "@id": "carjino:components/ActorRdfJoinNone.jsonld#ActorRdfJoinNone_args_beforeActors",
47
41
  "@container": "@list"
@@ -1,7 +1,6 @@
1
1
  import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';
2
- import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs, IActorRdfJoinTestSideData } from '@comunica/bus-rdf-join';
2
+ import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';
3
3
  import { ActorRdfJoin } from '@comunica/bus-rdf-join';
4
- import type { TestResult } from '@comunica/core';
5
4
  import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
6
5
  /**
7
6
  * A comunica None RDF Join Actor.
@@ -9,9 +8,9 @@ import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-
9
8
  export declare class ActorRdfJoinNone extends ActorRdfJoin {
10
9
  readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;
11
10
  constructor(args: IActorRdfJoinNoneArgs);
12
- test(action: IActionRdfJoin): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>>;
11
+ test(action: IActionRdfJoin): Promise<IMediatorTypeJoinCoefficients>;
13
12
  protected getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner>;
14
- protected getJoinCoefficients(action: IActionRdfJoin, sideData: IActorRdfJoinTestSideData): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>>;
13
+ protected getJoinCoefficients(): Promise<IMediatorTypeJoinCoefficients>;
15
14
  }
16
15
  export interface IActorRdfJoinNoneArgs extends IActorRdfJoinArgs {
17
16
  /**
@@ -1,11 +1,9 @@
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");
4
5
  const bus_rdf_join_1 = require("@comunica/bus-rdf-join");
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");
6
+ const metadata_1 = require("@comunica/metadata");
9
7
  const asynciterator_1 = require("asynciterator");
10
8
  /**
11
9
  * A comunica None RDF Join Actor.
@@ -21,32 +19,32 @@ class ActorRdfJoinNone extends bus_rdf_join_1.ActorRdfJoin {
21
19
  async test(action) {
22
20
  // Allow joining of one or zero streams
23
21
  if (action.entries.length > 0) {
24
- return (0, core_1.failTest)(`Actor ${this.name} can only join zero entries`);
22
+ throw new Error(`Actor ${this.name} can only join zero entries`);
25
23
  }
26
- return await this.getJoinCoefficients(action, undefined);
24
+ return await this.getJoinCoefficients();
27
25
  }
28
26
  async getOutput(action) {
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);
27
+ const bindingsFactory = await bindings_factory_1.BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);
31
28
  return {
32
29
  result: {
33
30
  bindingsStream: new asynciterator_1.ArrayIterator([bindingsFactory.bindings()], { autoStart: false }),
34
31
  metadata: () => Promise.resolve({
35
- state: new utils_metadata_1.MetadataValidationState(),
32
+ state: new metadata_1.MetadataValidationState(),
36
33
  cardinality: { type: 'exact', value: 1 },
34
+ canContainUndefs: false,
37
35
  variables: [],
38
36
  }),
39
37
  type: 'bindings',
40
38
  },
41
39
  };
42
40
  }
43
- async getJoinCoefficients(action, sideData) {
44
- return (0, core_1.passTestWithSideData)({
41
+ async getJoinCoefficients() {
42
+ return {
45
43
  iterations: 0,
46
44
  persistedItems: 0,
47
45
  blockingItems: 0,
48
46
  requestTime: 0,
49
- }, sideData);
47
+ };
50
48
  }
51
49
  }
52
50
  exports.ActorRdfJoinNone = ActorRdfJoinNone;
@@ -1 +1 @@
1
- {"version":3,"file":"ActorRdfJoinNone.js","sourceRoot":"","sources":["ActorRdfJoinNone.ts"],"names":[],"m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jB;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"]}
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"]}
package/package.json CHANGED
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "@comunica/actor-rdf-join-inner-none",
3
- "version": "3.2.4-alpha.47.0",
3
+ "version": "3.3.0",
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
- },
11
7
  "homepage": "https://comunica.dev/",
12
8
  "repository": {
13
9
  "type": "git",
@@ -41,16 +37,13 @@
41
37
  "build:components": "componentsjs-generator"
42
38
  },
43
39
  "dependencies": {
44
- "@comunica/bus-merge-bindings-context": "3.2.4-alpha.47.0",
45
- "@comunica/bus-rdf-join": "3.2.4-alpha.47.0",
46
- "@comunica/context-entries": "3.2.4-alpha.47.0",
47
- "@comunica/core": "3.2.4-alpha.47.0",
48
- "@comunica/mediatortype-join-coefficients": "3.2.4-alpha.47.0",
49
- "@comunica/types": "3.2.4-alpha.47.0",
50
- "@comunica/utils-bindings-factory": "3.2.4-alpha.47.0",
51
- "@comunica/utils-metadata": "3.2.4-alpha.47.0",
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",
52
45
  "@rdfjs/types": "*",
53
46
  "asynciterator": "^3.9.0"
54
47
  },
55
- "gitHead": "85bd4c5cf07dfc293ebbc3a1416b70e2db8bfc48"
48
+ "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
56
49
  }