@comunica/actor-rdf-join-inner-multi-sequential 2.0.1-alpha.5.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/LICENSE.txt +22 -0
- package/README.md +44 -0
- package/components/ActorRdfJoinMultiSequential.jsonld +194 -0
- package/components/components.jsonld +11 -0
- package/components/context.jsonld +52 -0
- package/lib/ActorRdfJoinMultiSequential.d.ts +22 -0
- package/lib/ActorRdfJoinMultiSequential.js +56 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +14 -0
- package/package.json +46 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
|
|
4
|
+
Comunica Association and Ghent University – imec, Belgium
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Comunica Inner Multi-way Sequential RDF Join Actor
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@comunica/actor-rdf-join-inner-multi-sequential)
|
|
4
|
+
|
|
5
|
+
An [RDF Join](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-join) actor that inner-joins 3 or more streams
|
|
6
|
+
by joining the first two, and joining the result with the remaining streams by delegating back to the [RDF Join bus](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-join).
|
|
7
|
+
|
|
8
|
+
This module is part of the [Comunica framework](https://github.com/comunica/comunica),
|
|
9
|
+
and should only be used by [developers that want to build their own query engine](https://comunica.dev/docs/modify/).
|
|
10
|
+
|
|
11
|
+
[Click here if you just want to query with Comunica](https://comunica.dev/docs/query/).
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
$ yarn add @comunica/actor-rdf-join-inner-multi-sequential
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configure
|
|
20
|
+
|
|
21
|
+
After installing, this package can be added to your engine's configuration as follows:
|
|
22
|
+
```text
|
|
23
|
+
{
|
|
24
|
+
"@context": [
|
|
25
|
+
...
|
|
26
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-sequential/^2.0.0/components/context.jsonld"
|
|
27
|
+
],
|
|
28
|
+
"actors": [
|
|
29
|
+
...
|
|
30
|
+
{
|
|
31
|
+
"@id": "urn:comunica:default:rdf-join/actors#inner-multi-sequential",
|
|
32
|
+
"@type": "ActorRdfJoinMultiSequential",
|
|
33
|
+
"mediatorJoinSelectivity": { "@id": "urn:comunica:default:rdf-join-selectivity/mediators#main" },
|
|
34
|
+
"mediatorJoin": { "@id": "urn:comunica:default:rdf-join/mediators#main" }
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Config Parameters
|
|
41
|
+
|
|
42
|
+
* `mediatorJoinSelectivity`: A mediator over the [RDF Join Selectivity bus](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-join-selectivity).
|
|
43
|
+
* `mediatorJoin`: A mediator over the [RDF Join bus](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-join).
|
|
44
|
+
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-sequential/^2.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^2.0.0/components/context.jsonld"
|
|
6
|
+
],
|
|
7
|
+
"@id": "npmd:@comunica/actor-rdf-join-inner-multi-sequential",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential",
|
|
11
|
+
"@type": "Class",
|
|
12
|
+
"requireElement": "ActorRdfJoinMultiSequential",
|
|
13
|
+
"extends": [
|
|
14
|
+
"cbrj:components/ActorRdfJoin.jsonld#ActorRdfJoin"
|
|
15
|
+
],
|
|
16
|
+
"comment": "A Multi Sequential RDF Join Actor. It accepts 3 or more streams, joins the first two, and joins the result with the remaining streams.",
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoin",
|
|
20
|
+
"range": "cc:components/Mediator.jsonld#Mediator",
|
|
21
|
+
"comment": "A mediator for joining Bindings streams"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoinSelectivity",
|
|
25
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_name",
|
|
29
|
+
"range": "xsd:string",
|
|
30
|
+
"default": {
|
|
31
|
+
"@id": "rdf:subject"
|
|
32
|
+
},
|
|
33
|
+
"comment": "The name for this actor."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_bus",
|
|
37
|
+
"range": {
|
|
38
|
+
"@type": "ParameterRangeGenericComponent",
|
|
39
|
+
"component": "cc:components/Bus.jsonld#Bus",
|
|
40
|
+
"genericTypeInstances": [
|
|
41
|
+
{
|
|
42
|
+
"@type": "ParameterRangeGenericComponent",
|
|
43
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
44
|
+
"genericTypeInstances": [
|
|
45
|
+
{
|
|
46
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
47
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
51
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
55
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
61
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
65
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
69
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"default": {
|
|
74
|
+
"@id": "cbrj:components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus",
|
|
75
|
+
"@type": "cc:components/Bus.jsonld#Bus"
|
|
76
|
+
},
|
|
77
|
+
"comment": "The bus this actor subscribes to."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_beforeActors",
|
|
81
|
+
"range": {
|
|
82
|
+
"@type": "ParameterRangeUnion",
|
|
83
|
+
"parameterRangeElements": [
|
|
84
|
+
{
|
|
85
|
+
"@type": "ParameterRangeArray",
|
|
86
|
+
"parameterRangeValue": {
|
|
87
|
+
"@type": "ParameterRangeGenericComponent",
|
|
88
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
89
|
+
"genericTypeInstances": [
|
|
90
|
+
{
|
|
91
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
92
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
96
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
100
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"@type": "ParameterRangeUndefined"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"comment": "Actor that must be registered in the bus before this actor."
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"memberFields": [
|
|
114
|
+
{
|
|
115
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential__member_mediatorJoin",
|
|
116
|
+
"memberFieldName": "mediatorJoin",
|
|
117
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential__member_FACTORY",
|
|
121
|
+
"memberFieldName": "FACTORY",
|
|
122
|
+
"range": {
|
|
123
|
+
"@type": "ParameterRangeWildcard"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential__member_constructor",
|
|
128
|
+
"memberFieldName": "constructor"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential__member_getOutput",
|
|
132
|
+
"memberFieldName": "getOutput"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential__member_getJoinCoefficients",
|
|
136
|
+
"memberFieldName": "getJoinCoefficients"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"constructorArguments": [
|
|
140
|
+
{
|
|
141
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args__constructorArgument",
|
|
142
|
+
"fields": [
|
|
143
|
+
{
|
|
144
|
+
"keyRaw": "mediatorJoin",
|
|
145
|
+
"value": {
|
|
146
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoin"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"keyRaw": "mediatorJoinSelectivity",
|
|
151
|
+
"value": {
|
|
152
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoinSelectivity"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"keyRaw": "name",
|
|
157
|
+
"value": {
|
|
158
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_name"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"keyRaw": "bus",
|
|
163
|
+
"value": {
|
|
164
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_bus"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"keyRaw": "beforeActors",
|
|
169
|
+
"value": {
|
|
170
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_beforeActors"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#IActorRdfJoinMultiSequentialArgs",
|
|
179
|
+
"@type": "AbstractClass",
|
|
180
|
+
"requireElement": "IActorRdfJoinMultiSequentialArgs",
|
|
181
|
+
"extends": [
|
|
182
|
+
"cbrj:components/ActorRdfJoin.jsonld#IActorRdfJoinArgs"
|
|
183
|
+
],
|
|
184
|
+
"parameters": [],
|
|
185
|
+
"memberFields": [
|
|
186
|
+
{
|
|
187
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#IActorRdfJoinMultiSequentialArgs__member_mediatorJoin",
|
|
188
|
+
"memberFieldName": "mediatorJoin"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"constructorArguments": []
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-inner-multi-sequential/^2.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
5
|
+
"@id": "npmd:@comunica/actor-rdf-join-inner-multi-sequential",
|
|
6
|
+
"@type": "Module",
|
|
7
|
+
"requireName": "@comunica/actor-rdf-join-inner-multi-sequential",
|
|
8
|
+
"import": [
|
|
9
|
+
"carjimse:components/ActorRdfJoinMultiSequential.jsonld"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
|
|
4
|
+
{
|
|
5
|
+
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
+
"carjimse": "npmd:@comunica/actor-rdf-join-inner-multi-sequential/^2.0.0/",
|
|
7
|
+
"ActorRdfJoinMultiSequential": {
|
|
8
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential",
|
|
9
|
+
"@prefix": true,
|
|
10
|
+
"@context": {
|
|
11
|
+
"args_mediatorJoin": {
|
|
12
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoin"
|
|
13
|
+
},
|
|
14
|
+
"args_mediatorJoinSelectivity": {
|
|
15
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoinSelectivity"
|
|
16
|
+
},
|
|
17
|
+
"args_name": {
|
|
18
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_name"
|
|
19
|
+
},
|
|
20
|
+
"args_bus": {
|
|
21
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_bus"
|
|
22
|
+
},
|
|
23
|
+
"args_beforeActors": {
|
|
24
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_beforeActors",
|
|
25
|
+
"@container": "@list"
|
|
26
|
+
},
|
|
27
|
+
"mediatorJoin": {
|
|
28
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoin"
|
|
29
|
+
},
|
|
30
|
+
"mediatorJoinSelectivity": {
|
|
31
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_mediatorJoinSelectivity"
|
|
32
|
+
},
|
|
33
|
+
"name": {
|
|
34
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_name"
|
|
35
|
+
},
|
|
36
|
+
"bus": {
|
|
37
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_bus"
|
|
38
|
+
},
|
|
39
|
+
"beforeActors": {
|
|
40
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#ActorRdfJoinMultiSequential_args_beforeActors",
|
|
41
|
+
"@container": "@list"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"IActorRdfJoinMultiSequentialArgs": {
|
|
46
|
+
"@id": "carjimse:components/ActorRdfJoinMultiSequential.jsonld#IActorRdfJoinMultiSequentialArgs",
|
|
47
|
+
"@prefix": true,
|
|
48
|
+
"@context": {}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs, MediatorRdfJoin } from '@comunica/bus-rdf-join';
|
|
2
|
+
import { ActorRdfJoin } from '@comunica/bus-rdf-join';
|
|
3
|
+
import type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';
|
|
4
|
+
import type { MetadataBindings } from '@comunica/types';
|
|
5
|
+
import { Factory } from 'sparqlalgebrajs';
|
|
6
|
+
/**
|
|
7
|
+
* A Multi Sequential RDF Join Actor.
|
|
8
|
+
* It accepts 3 or more streams, joins the first two, and joins the result with the remaining streams.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ActorRdfJoinMultiSequential extends ActorRdfJoin {
|
|
11
|
+
readonly mediatorJoin: MediatorRdfJoin;
|
|
12
|
+
static readonly FACTORY: Factory;
|
|
13
|
+
constructor(args: IActorRdfJoinMultiSequentialArgs);
|
|
14
|
+
protected getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner>;
|
|
15
|
+
protected getJoinCoefficients(action: IActionRdfJoin, metadatas: MetadataBindings[]): Promise<IMediatorTypeJoinCoefficients>;
|
|
16
|
+
}
|
|
17
|
+
export interface IActorRdfJoinMultiSequentialArgs extends IActorRdfJoinArgs {
|
|
18
|
+
/**
|
|
19
|
+
* A mediator for joining Bindings streams
|
|
20
|
+
*/
|
|
21
|
+
mediatorJoin: MediatorRdfJoin;
|
|
22
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActorRdfJoinMultiSequential = void 0;
|
|
4
|
+
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
5
|
+
const bus_rdf_join_1 = require("@comunica/bus-rdf-join");
|
|
6
|
+
const sparqlalgebrajs_1 = require("sparqlalgebrajs");
|
|
7
|
+
/**
|
|
8
|
+
* A Multi Sequential RDF Join Actor.
|
|
9
|
+
* It accepts 3 or more streams, joins the first two, and joins the result with the remaining streams.
|
|
10
|
+
*/
|
|
11
|
+
class ActorRdfJoinMultiSequential extends bus_rdf_join_1.ActorRdfJoin {
|
|
12
|
+
constructor(args) {
|
|
13
|
+
super(args, {
|
|
14
|
+
logicalType: 'inner',
|
|
15
|
+
physicalName: 'multi-sequential',
|
|
16
|
+
limitEntries: 3,
|
|
17
|
+
limitEntriesMin: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
async getOutput(action) {
|
|
21
|
+
// Join the two first streams, and then join the result with the remaining streams
|
|
22
|
+
const firstEntry = {
|
|
23
|
+
output: bus_query_operation_1.ActorQueryOperation.getSafeBindings(await this.mediatorJoin
|
|
24
|
+
.mediate({ type: action.type, entries: [action.entries[0], action.entries[1]], context: action.context })),
|
|
25
|
+
operation: ActorRdfJoinMultiSequential.FACTORY
|
|
26
|
+
.createJoin([action.entries[0].operation, action.entries[1].operation], false),
|
|
27
|
+
};
|
|
28
|
+
const remainingEntries = action.entries.slice(1);
|
|
29
|
+
remainingEntries[0] = firstEntry;
|
|
30
|
+
return {
|
|
31
|
+
result: await this.mediatorJoin.mediate({
|
|
32
|
+
type: action.type,
|
|
33
|
+
entries: remainingEntries,
|
|
34
|
+
context: action.context,
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
async getJoinCoefficients(action, metadatas) {
|
|
39
|
+
const requestInitialTimes = bus_rdf_join_1.ActorRdfJoin.getRequestInitialTimes(metadatas);
|
|
40
|
+
const requestItemTimes = bus_rdf_join_1.ActorRdfJoin.getRequestItemTimes(metadatas);
|
|
41
|
+
return {
|
|
42
|
+
iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value *
|
|
43
|
+
metadatas.slice(2).reduce((acc, metadata) => acc * metadata.cardinality.value, 1),
|
|
44
|
+
persistedItems: 0,
|
|
45
|
+
blockingItems: 0,
|
|
46
|
+
requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +
|
|
47
|
+
requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1] +
|
|
48
|
+
metadatas.slice(2)
|
|
49
|
+
.reduce((sum, metadata, i) => sum + requestInitialTimes[i] +
|
|
50
|
+
metadata.cardinality.value * requestItemTimes[i], 0),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ActorRdfJoinMultiSequential = ActorRdfJoinMultiSequential;
|
|
55
|
+
ActorRdfJoinMultiSequential.FACTORY = new sparqlalgebrajs_1.Factory();
|
|
56
|
+
//# sourceMappingURL=ActorRdfJoinMultiSequential.js.map
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActorRdfJoinMultiSequential';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./ActorRdfJoinMultiSequential"), exports);
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@comunica/actor-rdf-join-inner-multi-sequential",
|
|
3
|
+
"version": "2.0.1-alpha.5.0",
|
|
4
|
+
"description": "A multi-sequential rdf-join actor",
|
|
5
|
+
"lsd:module": true,
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"typings": "lib/index",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/comunica/comunica.git",
|
|
11
|
+
"directory": "packages/actor-rdf-join-inner-multi-sequential"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"comunica",
|
|
18
|
+
"actor",
|
|
19
|
+
"rdf-join",
|
|
20
|
+
"multi-sequential"
|
|
21
|
+
],
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/comunica/comunica/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://comunica.dev/",
|
|
27
|
+
"files": [
|
|
28
|
+
"components",
|
|
29
|
+
"lib/**/*.d.ts",
|
|
30
|
+
"lib/**/*.js"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@comunica/bus-query-operation": "2.0.1-alpha.5.0",
|
|
34
|
+
"@comunica/bus-rdf-join": "2.0.1-alpha.5.0",
|
|
35
|
+
"@comunica/core": "2.0.1-alpha.5.0",
|
|
36
|
+
"@comunica/mediatortype-join-coefficients": "2.0.1-alpha.5.0",
|
|
37
|
+
"@comunica/types": "2.0.1-alpha.5.0",
|
|
38
|
+
"sparqlalgebrajs": "^4.0.0"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "npm run build:ts && npm run build:components",
|
|
42
|
+
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
|
|
43
|
+
"build:components": "componentsjs-generator"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "e2ae2e9e924bf0656df60cc99774f7e560d47695"
|
|
46
|
+
}
|