@comunica/actor-query-operation-join 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 +1 -1
- package/components/ActorQueryOperationJoin.jsonld +44 -12
- package/components/components.jsonld +1 -1
- package/components/context.jsonld +7 -1
- package/lib/ActorQueryOperationJoin.d.ts +2 -2
- package/lib/ActorQueryOperationJoin.js +4 -2
- package/lib/ActorQueryOperationJoin.js.map +1 -1
- package/package.json +12 -7
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-query-operation-join/^
|
|
26
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-join/^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-query-operation-join/^
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^
|
|
5
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-join/^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-query-operation/^4.0.0/components/context.jsonld"
|
|
6
6
|
],
|
|
7
7
|
"@id": "npmd:@comunica/actor-query-operation-join",
|
|
8
8
|
"components": [
|
|
@@ -50,29 +50,37 @@
|
|
|
50
50
|
"genericTypeInstances": [
|
|
51
51
|
{
|
|
52
52
|
"@type": "ParameterRangeGenericTypeReference",
|
|
53
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
53
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"@type": "ParameterRangeGenericTypeReference",
|
|
57
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
57
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"@type": "ParameterRangeGenericTypeReference",
|
|
61
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
61
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
65
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
62
66
|
}
|
|
63
67
|
]
|
|
64
68
|
},
|
|
65
69
|
{
|
|
66
70
|
"@type": "ParameterRangeGenericTypeReference",
|
|
67
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
71
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
75
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
68
76
|
},
|
|
69
77
|
{
|
|
70
78
|
"@type": "ParameterRangeGenericTypeReference",
|
|
71
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
79
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
72
80
|
},
|
|
73
81
|
{
|
|
74
82
|
"@type": "ParameterRangeGenericTypeReference",
|
|
75
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
83
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
76
84
|
}
|
|
77
85
|
]
|
|
78
86
|
},
|
|
@@ -82,6 +90,20 @@
|
|
|
82
90
|
},
|
|
83
91
|
"comment": "The bus this actor subscribes to."
|
|
84
92
|
},
|
|
93
|
+
{
|
|
94
|
+
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_busFailMessage",
|
|
95
|
+
"range": {
|
|
96
|
+
"@type": "ParameterRangeUnion",
|
|
97
|
+
"parameterRangeElements": [
|
|
98
|
+
"xsd:string",
|
|
99
|
+
{
|
|
100
|
+
"@type": "ParameterRangeUndefined"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"default": "Query operation processing failed: none of the configured actors were able to handle the operation type ${action.operation.type}",
|
|
105
|
+
"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}\""
|
|
106
|
+
},
|
|
85
107
|
{
|
|
86
108
|
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_beforeActors",
|
|
87
109
|
"range": {
|
|
@@ -95,15 +117,19 @@
|
|
|
95
117
|
"genericTypeInstances": [
|
|
96
118
|
{
|
|
97
119
|
"@type": "ParameterRangeGenericTypeReference",
|
|
98
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
120
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
99
121
|
},
|
|
100
122
|
{
|
|
101
123
|
"@type": "ParameterRangeGenericTypeReference",
|
|
102
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
124
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
103
125
|
},
|
|
104
126
|
{
|
|
105
127
|
"@type": "ParameterRangeGenericTypeReference",
|
|
106
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
128
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
132
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
107
133
|
}
|
|
108
134
|
]
|
|
109
135
|
}
|
|
@@ -163,6 +189,12 @@
|
|
|
163
189
|
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_bus"
|
|
164
190
|
}
|
|
165
191
|
},
|
|
192
|
+
{
|
|
193
|
+
"keyRaw": "busFailMessage",
|
|
194
|
+
"value": {
|
|
195
|
+
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_busFailMessage"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
166
198
|
{
|
|
167
199
|
"keyRaw": "beforeActors",
|
|
168
200
|
"value": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-join/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-join/^4.0.0/components/context.jsonld"
|
|
4
4
|
],
|
|
5
5
|
"@id": "npmd:@comunica/actor-query-operation-join",
|
|
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
|
-
"caqoj": "npmd:@comunica/actor-query-operation-join/^
|
|
6
|
+
"caqoj": "npmd:@comunica/actor-query-operation-join/^4.0.0/",
|
|
7
7
|
"ActorQueryOperationJoin": {
|
|
8
8
|
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin",
|
|
9
9
|
"@prefix": true,
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"args_bus": {
|
|
21
21
|
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_bus"
|
|
22
22
|
},
|
|
23
|
+
"args_busFailMessage": {
|
|
24
|
+
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_busFailMessage"
|
|
25
|
+
},
|
|
23
26
|
"args_beforeActors": {
|
|
24
27
|
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_beforeActors",
|
|
25
28
|
"@container": "@list"
|
|
@@ -36,6 +39,9 @@
|
|
|
36
39
|
"bus": {
|
|
37
40
|
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_bus"
|
|
38
41
|
},
|
|
42
|
+
"busFailMessage": {
|
|
43
|
+
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_busFailMessage"
|
|
44
|
+
},
|
|
39
45
|
"beforeActors": {
|
|
40
46
|
"@id": "caqoj:components/ActorQueryOperationJoin.jsonld#ActorQueryOperationJoin_args_beforeActors",
|
|
41
47
|
"@container": "@list"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
|
|
2
2
|
import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
|
|
3
3
|
import type { MediatorRdfJoin } from '@comunica/bus-rdf-join';
|
|
4
|
-
import type { IActorTest } from '@comunica/core';
|
|
4
|
+
import type { IActorTest, TestResult } from '@comunica/core';
|
|
5
5
|
import type { IQueryOperationResult, IActionContext } from '@comunica/types';
|
|
6
6
|
import type { Algebra } from 'sparqlalgebrajs';
|
|
7
7
|
/**
|
|
@@ -10,7 +10,7 @@ import type { Algebra } from 'sparqlalgebrajs';
|
|
|
10
10
|
export declare class ActorQueryOperationJoin extends ActorQueryOperationTypedMediated<Algebra.Join> {
|
|
11
11
|
readonly mediatorJoin: MediatorRdfJoin;
|
|
12
12
|
constructor(args: IActorQueryOperationJoinArgs);
|
|
13
|
-
testOperation(_operation: Algebra.Join, _context: IActionContext): Promise<IActorTest
|
|
13
|
+
testOperation(_operation: Algebra.Join, _context: IActionContext): Promise<TestResult<IActorTest>>;
|
|
14
14
|
runOperation(operationOriginal: Algebra.Join, context: IActionContext): Promise<IQueryOperationResult>;
|
|
15
15
|
}
|
|
16
16
|
export interface IActorQueryOperationJoinArgs extends IActorQueryOperationTypedMediatedArgs {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActorQueryOperationJoin = void 0;
|
|
4
4
|
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
5
|
+
const core_1 = require("@comunica/core");
|
|
6
|
+
const utils_query_operation_1 = require("@comunica/utils-query-operation");
|
|
5
7
|
/**
|
|
6
8
|
* A comunica Join Query Operation Actor.
|
|
7
9
|
*/
|
|
@@ -10,7 +12,7 @@ class ActorQueryOperationJoin extends bus_query_operation_1.ActorQueryOperationT
|
|
|
10
12
|
super(args, 'join');
|
|
11
13
|
}
|
|
12
14
|
async testOperation(_operation, _context) {
|
|
13
|
-
return
|
|
15
|
+
return (0, core_1.passTestVoid)();
|
|
14
16
|
}
|
|
15
17
|
async runOperation(operationOriginal, context) {
|
|
16
18
|
const entries = (await Promise.all(operationOriginal.input
|
|
@@ -19,7 +21,7 @@ class ActorQueryOperationJoin extends bus_query_operation_1.ActorQueryOperationT
|
|
|
19
21
|
operation: subOperation,
|
|
20
22
|
}))))
|
|
21
23
|
.map(({ output, operation }) => ({
|
|
22
|
-
output:
|
|
24
|
+
output: (0, utils_query_operation_1.getSafeBindings)(output),
|
|
23
25
|
operation,
|
|
24
26
|
}));
|
|
25
27
|
return this.mediatorJoin.mediate({ type: 'inner', entries, context });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationJoin.js","sourceRoot":"","sources":["ActorQueryOperationJoin.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationJoin.js","sourceRoot":"","sources":["ActorQueryOperationJoin.ts"],"names":[],"mappings":";;;AACA,uEAEuC;AAGvC,yCAA8C;AAE9C,2EAAkE;AAGlE;;GAEG;AACH,MAAa,uBAAwB,SAAQ,sDAA8C;IAGzF,YAAmB,IAAkC;QACnD,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,UAAwB,EAAE,QAAwB;QAC3E,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,iBAA+B,EAC/B,OAAuB;QAEvB,MAAM,OAAO,GAAiB,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK;aACrE,GAAG,CAAC,KAAK,EAAC,YAAY,EAAC,EAAE,CAAC,CAAC;YAC1B,MAAM,EAAE,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;YACvF,SAAS,EAAE,YAAY;SACxB,CAAC,CAAC,CAAC,CAAC;aACJ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;YAC/B,MAAM,EAAE,IAAA,uCAAe,EAAC,MAAM,CAAC;YAC/B,SAAS;SACV,CAAC,CAAC,CAAC;QAEN,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AA3BD,0DA2BC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport { passTestVoid } from '@comunica/core';\nimport type { IQueryOperationResult, IActionContext, IJoinEntry } from '@comunica/types';\nimport { getSafeBindings } from '@comunica/utils-query-operation';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Join Query Operation Actor.\n */\nexport class ActorQueryOperationJoin extends ActorQueryOperationTypedMediated<Algebra.Join> {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationJoinArgs) {\n super(args, 'join');\n }\n\n public async testOperation(_operation: Algebra.Join, _context: IActionContext): Promise<TestResult<IActorTest>> {\n return passTestVoid();\n }\n\n public async runOperation(\n operationOriginal: Algebra.Join,\n context: IActionContext,\n ): Promise<IQueryOperationResult> {\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: getSafeBindings(output),\n operation,\n }));\n\n return this.mediatorJoin.mediate({ type: 'inner', entries, context });\n }\n}\n\nexport interface IActorQueryOperationJoinArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-join",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "A join query-operation 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,11 +41,12 @@
|
|
|
37
41
|
"build:components": "componentsjs-generator"
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
40
|
-
"@comunica/bus-query-operation": "^
|
|
41
|
-
"@comunica/bus-rdf-join": "^
|
|
42
|
-
"@comunica/core": "^
|
|
43
|
-
"@comunica/types": "^
|
|
44
|
-
"
|
|
44
|
+
"@comunica/bus-query-operation": "^4.0.1",
|
|
45
|
+
"@comunica/bus-rdf-join": "^4.0.1",
|
|
46
|
+
"@comunica/core": "^4.0.1",
|
|
47
|
+
"@comunica/types": "^4.0.1",
|
|
48
|
+
"@comunica/utils-query-operation": "^4.0.1",
|
|
49
|
+
"sparqlalgebrajs": "^4.3.8"
|
|
45
50
|
},
|
|
46
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
|
|
47
52
|
}
|