@comunica/actor-rdf-join-inner-multi-sequential 4.5.0 → 5.0.2
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/ActorRdfJoinMultiSequential.jsonld +15 -15
- package/components/components.jsonld +1 -1
- package/components/context.jsonld +1 -1
- package/lib/ActorRdfJoinMultiSequential.d.ts +0 -0
- package/lib/ActorRdfJoinMultiSequential.js +4 -2
- package/lib/ActorRdfJoinMultiSequential.js.map +1 -1
- package/lib/index.d.ts +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/package.json +9 -9
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-multi-sequential/^
|
|
26
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-sequential/^5.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-multi-sequential/^
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^
|
|
5
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-sequential/^5.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^5.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^5.0.0/components/context.jsonld"
|
|
6
6
|
],
|
|
7
7
|
"@id": "npmd:@comunica/actor-rdf-join-inner-multi-sequential",
|
|
8
8
|
"components": [
|
|
@@ -44,37 +44,37 @@
|
|
|
44
44
|
"genericTypeInstances": [
|
|
45
45
|
{
|
|
46
46
|
"@type": "ParameterRangeGenericTypeReference",
|
|
47
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
47
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"@type": "ParameterRangeGenericTypeReference",
|
|
51
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
51
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"@type": "ParameterRangeGenericTypeReference",
|
|
55
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
55
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"@type": "ParameterRangeGenericTypeReference",
|
|
59
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
59
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
60
60
|
}
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"@type": "ParameterRangeGenericTypeReference",
|
|
65
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
65
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"@type": "ParameterRangeGenericTypeReference",
|
|
69
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
69
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
"@type": "ParameterRangeGenericTypeReference",
|
|
73
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
73
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"@type": "ParameterRangeGenericTypeReference",
|
|
77
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
77
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
78
78
|
}
|
|
79
79
|
]
|
|
80
80
|
},
|
|
@@ -111,19 +111,19 @@
|
|
|
111
111
|
"genericTypeInstances": [
|
|
112
112
|
{
|
|
113
113
|
"@type": "ParameterRangeGenericTypeReference",
|
|
114
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
114
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
117
|
"@type": "ParameterRangeGenericTypeReference",
|
|
118
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
118
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"@type": "ParameterRangeGenericTypeReference",
|
|
122
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
122
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"@type": "ParameterRangeGenericTypeReference",
|
|
126
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
126
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
127
127
|
}
|
|
128
128
|
]
|
|
129
129
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-sequential/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-sequential/^5.0.0/components/context.jsonld"
|
|
4
4
|
],
|
|
5
5
|
"@id": "npmd:@comunica/actor-rdf-join-inner-multi-sequential",
|
|
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
|
-
"carjimse": "npmd:@comunica/actor-rdf-join-inner-multi-sequential/^
|
|
6
|
+
"carjimse": "npmd:@comunica/actor-rdf-join-inner-multi-sequential/^5.0.0/",
|
|
7
7
|
"ActorRdfJoinMultiSequential": {
|
|
8
8
|
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential",
|
|
9
9
|
"@prefix": true,
|
|
File without changes
|
|
@@ -4,13 +4,14 @@ exports.ActorRdfJoinMultiSequential = void 0;
|
|
|
4
4
|
const bus_rdf_join_1 = require("@comunica/bus-rdf-join");
|
|
5
5
|
const context_entries_1 = require("@comunica/context-entries");
|
|
6
6
|
const core_1 = require("@comunica/core");
|
|
7
|
+
const utils_algebra_1 = require("@comunica/utils-algebra");
|
|
7
8
|
const utils_query_operation_1 = require("@comunica/utils-query-operation");
|
|
8
|
-
const sparqlalgebrajs_1 = require("sparqlalgebrajs");
|
|
9
9
|
/**
|
|
10
10
|
* A Multi Sequential RDF Join Actor.
|
|
11
11
|
* It accepts 3 or more streams, joins the first two, and joins the result with the remaining streams.
|
|
12
12
|
*/
|
|
13
13
|
class ActorRdfJoinMultiSequential extends bus_rdf_join_1.ActorRdfJoin {
|
|
14
|
+
mediatorJoin;
|
|
14
15
|
constructor(args) {
|
|
15
16
|
super(args, {
|
|
16
17
|
logicalType: 'inner',
|
|
@@ -20,10 +21,11 @@ class ActorRdfJoinMultiSequential extends bus_rdf_join_1.ActorRdfJoin {
|
|
|
20
21
|
canHandleUndefs: true,
|
|
21
22
|
isLeaf: false,
|
|
22
23
|
});
|
|
24
|
+
this.mediatorJoin = args.mediatorJoin;
|
|
23
25
|
}
|
|
24
26
|
async getOutput(action) {
|
|
25
27
|
const dataFactory = action.context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
|
|
26
|
-
const algebraFactory = new
|
|
28
|
+
const algebraFactory = new utils_algebra_1.AlgebraFactory(dataFactory);
|
|
27
29
|
// Join the two first streams, and then join the result with the remaining streams
|
|
28
30
|
const firstEntry = {
|
|
29
31
|
output: (0, utils_query_operation_1.getSafeBindings)(await this.mediatorJoin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorRdfJoinMultiSequential.js","sourceRoot":"","sources":["ActorRdfJoinMultiSequential.ts"],"names":[],"mappings":";;;AAOA,yDAAsD;AACtD,+DAA0D;AAE1D,yCAAsD;AAGtD,
|
|
1
|
+
{"version":3,"file":"ActorRdfJoinMultiSequential.js","sourceRoot":"","sources":["ActorRdfJoinMultiSequential.ts"],"names":[],"mappings":";;;AAOA,yDAAsD;AACtD,+DAA0D;AAE1D,yCAAsD;AAGtD,2DAAyD;AACzD,2EAAkE;AAElE;;;GAGG;AACH,MAAa,2BAA4B,SAAQ,2BAAY;IAC3C,YAAY,CAAkB;IAE9C,YAAmB,IAAsC;QACvD,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,kBAAkB;YAChC,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACxC,CAAC;IAES,KAAK,CAAC,SAAS,CAAC,MAAsB;QAC9C,MAAM,WAAW,GAAwB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QAC3F,MAAM,cAAc,GAAG,IAAI,8BAAc,CAAC,WAAW,CAAC,CAAC;QAEvD,kFAAkF;QAClF,MAAM,UAAU,GAAe;YAC7B,MAAM,EAAE,IAAA,uCAAe,EAAC,MAAM,IAAI,CAAC,YAAY;iBAC5C,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,CAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAC9G,SAAS,EAAE,cAAc;iBACtB,UAAU,CAAC,CAAE,MAAM,CAAC,OAAO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CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC;gBAC7E,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;qBACf,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC,CAAC;oBACxD,QAAQ,CAAC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC3D,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;CACF;AAxDD,kEAwDC","sourcesContent":["import type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\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 } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { IJoinEntry, ComunicaDataFactory } from '@comunica/types';\nimport { AlgebraFactory } from '@comunica/utils-algebra';\nimport { getSafeBindings } from '@comunica/utils-query-operation';\n\n/**\n * A Multi Sequential RDF Join Actor.\n * It accepts 3 or more streams, joins the first two, and joins the result with the remaining streams.\n */\nexport class ActorRdfJoinMultiSequential extends ActorRdfJoin {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorRdfJoinMultiSequentialArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-sequential',\n limitEntries: 3,\n limitEntriesMin: true,\n canHandleUndefs: true,\n isLeaf: false,\n });\n this.mediatorJoin = args.mediatorJoin;\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n const dataFactory: ComunicaDataFactory = action.context.getSafe(KeysInitQuery.dataFactory);\n const algebraFactory = new AlgebraFactory(dataFactory);\n\n // Join the two first streams, and then join the result with the remaining streams\n const firstEntry: IJoinEntry = {\n output: getSafeBindings(await this.mediatorJoin\n .mediate({ type: action.type, entries: [ action.entries[0], action.entries[1] ], context: action.context })),\n operation: algebraFactory\n .createJoin([ action.entries[0].operation, action.entries[1].operation ], false),\n };\n const remainingEntries: IJoinEntry[] = action.entries.slice(1);\n remainingEntries[0] = firstEntry;\n return {\n result: await this.mediatorJoin.mediate({\n type: action.type,\n entries: remainingEntries,\n context: action.context,\n }),\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n const { metadatas } = sideData;\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return passTestWithSideData({\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value *\n metadatas.slice(2).reduce((acc, metadata) => acc * metadata.cardinality.value, 1),\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1] +\n metadatas.slice(2)\n .reduce((sum, metadata, i) => sum + requestInitialTimes[i] +\n metadata.cardinality.value * requestItemTimes[i], 0),\n }, sideData);\n }\n}\n\nexport interface IActorRdfJoinMultiSequentialArgs extends IActorRdfJoinArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
File without changes
|
package/lib/index.js.map
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-rdf-join-inner-multi-sequential",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "A multi-sequential rdf-join actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-rdf-join": "^
|
|
45
|
-
"@comunica/context-entries": "^
|
|
46
|
-
"@comunica/core": "^
|
|
47
|
-
"@comunica/mediatortype-join-coefficients": "^
|
|
48
|
-
"@comunica/types": "^
|
|
49
|
-
"@comunica/utils-
|
|
50
|
-
"
|
|
44
|
+
"@comunica/bus-rdf-join": "^5.0.2",
|
|
45
|
+
"@comunica/context-entries": "^5.0.2",
|
|
46
|
+
"@comunica/core": "^5.0.2",
|
|
47
|
+
"@comunica/mediatortype-join-coefficients": "^5.0.2",
|
|
48
|
+
"@comunica/types": "^5.0.0",
|
|
49
|
+
"@comunica/utils-algebra": "^5.0.0",
|
|
50
|
+
"@comunica/utils-query-operation": "^5.0.2"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "3b29f914010fd2fc56682a0ceff962ef6ff24f32"
|
|
53
53
|
}
|