@comunica/actor-bindings-aggregator-factory-min 3.2.4-alpha.47.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 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,35 @@
1
+ # Comunica Bindings Aggregator Factory Min Actor
2
+
3
+ [![npm version](https://badge.fury.io/js/%40comunica%2Factor-bindings-aggregator-factory-min.svg)](https://www.npmjs.com/package/@comunica/actor-bindings-aggregator-factory-min)
4
+
5
+ A comunica bindings aggregator factory for the min aggregator.
6
+
7
+ This module is part of the [Comunica framework](https://github.com/comunica/comunica),
8
+ and should only be used by [developers that want to build their own query engine](https://comunica.dev/docs/modify/).
9
+
10
+ [Click here if you just want to query with Comunica](https://comunica.dev/docs/query/).
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ $ yarn add @comunica/actor-bindings-aggregator-factory-min
16
+ ```
17
+
18
+ ## Configure
19
+
20
+ After installing, this package can be added to your engine's configuration as follows:
21
+ ```text
22
+ {
23
+ "@context": [
24
+ ...
25
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-bindings-aggregator-factory-min/^1.0.0/components/context.jsonld"
26
+ ],
27
+ "actors": [
28
+ ...
29
+ {
30
+ "@id": "urn:comunica:default:bindings-aggregator-factory/actors#min",
31
+ "@type": "ActorBindingsAggregatorFactoryMin"
32
+ }
33
+ ]
34
+ }
35
+ ```
@@ -0,0 +1,216 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-bindings-aggregator-factory-min/^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-bindings-aggregator-factory/^3.0.0/components/context.jsonld"
6
+ ],
7
+ "@id": "npmd:@comunica/actor-bindings-aggregator-factory-min",
8
+ "components": [
9
+ {
10
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin",
11
+ "@type": "Class",
12
+ "requireElement": "ActorBindingsAggregatorFactoryMin",
13
+ "extends": [
14
+ "cbbaf:components/ActorBindingsAggregatorFactory.jsonld#ActorBindingsAggregatorFactory"
15
+ ],
16
+ "comment": "A comunica Min Expression Evaluator Aggregate Actor.",
17
+ "parameters": [
18
+ {
19
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorTermComparatorFactory",
20
+ "range": "cc:components/Mediator.jsonld#Mediator"
21
+ },
22
+ {
23
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorExpressionEvaluatorFactory",
24
+ "range": "cc:components/Mediator.jsonld#Mediator"
25
+ },
26
+ {
27
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_name",
28
+ "range": "xsd:string",
29
+ "default": {
30
+ "@id": "rdf:subject"
31
+ },
32
+ "comment": "The name for this actor."
33
+ },
34
+ {
35
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_bus",
36
+ "range": {
37
+ "@type": "ParameterRangeGenericComponent",
38
+ "component": "cc:components/Bus.jsonld#Bus",
39
+ "genericTypeInstances": [
40
+ {
41
+ "@type": "ParameterRangeGenericComponent",
42
+ "component": "cc:components/Actor.jsonld#Actor",
43
+ "genericTypeInstances": [
44
+ {
45
+ "@type": "ParameterRangeGenericTypeReference",
46
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
47
+ },
48
+ {
49
+ "@type": "ParameterRangeGenericTypeReference",
50
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
51
+ },
52
+ {
53
+ "@type": "ParameterRangeGenericTypeReference",
54
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
55
+ },
56
+ {
57
+ "@type": "ParameterRangeGenericTypeReference",
58
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "@type": "ParameterRangeGenericTypeReference",
64
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
65
+ },
66
+ {
67
+ "@type": "ParameterRangeGenericTypeReference",
68
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
69
+ },
70
+ {
71
+ "@type": "ParameterRangeGenericTypeReference",
72
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
73
+ },
74
+ {
75
+ "@type": "ParameterRangeGenericTypeReference",
76
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
77
+ }
78
+ ]
79
+ },
80
+ "default": {
81
+ "@id": "cbbaf:components/ActorBindingsAggregatorFactory.jsonld#ActorBindingsAggregatorFactory_default_bus",
82
+ "@type": "cc:components/Bus.jsonld#Bus"
83
+ },
84
+ "comment": "The bus this actor subscribes to."
85
+ },
86
+ {
87
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_busFailMessage",
88
+ "range": {
89
+ "@type": "ParameterRangeUnion",
90
+ "parameterRangeElements": [
91
+ "xsd:string",
92
+ {
93
+ "@type": "ParameterRangeUndefined"
94
+ }
95
+ ]
96
+ },
97
+ "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}\""
98
+ },
99
+ {
100
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_beforeActors",
101
+ "range": {
102
+ "@type": "ParameterRangeUnion",
103
+ "parameterRangeElements": [
104
+ {
105
+ "@type": "ParameterRangeArray",
106
+ "parameterRangeValue": {
107
+ "@type": "ParameterRangeGenericComponent",
108
+ "component": "cc:components/Actor.jsonld#Actor",
109
+ "genericTypeInstances": [
110
+ {
111
+ "@type": "ParameterRangeGenericTypeReference",
112
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
113
+ },
114
+ {
115
+ "@type": "ParameterRangeGenericTypeReference",
116
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
117
+ },
118
+ {
119
+ "@type": "ParameterRangeGenericTypeReference",
120
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
121
+ },
122
+ {
123
+ "@type": "ParameterRangeGenericTypeReference",
124
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
125
+ }
126
+ ]
127
+ }
128
+ },
129
+ {
130
+ "@type": "ParameterRangeUndefined"
131
+ }
132
+ ]
133
+ },
134
+ "comment": "Actor that must be registered in the bus before this actor."
135
+ }
136
+ ],
137
+ "memberFields": [
138
+ {
139
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin__member_mediatorTermComparatorFactory",
140
+ "memberFieldName": "mediatorTermComparatorFactory"
141
+ },
142
+ {
143
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin__member_constructor",
144
+ "memberFieldName": "constructor"
145
+ },
146
+ {
147
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin__member_test",
148
+ "memberFieldName": "test"
149
+ },
150
+ {
151
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin__member_run",
152
+ "memberFieldName": "run"
153
+ }
154
+ ],
155
+ "constructorArguments": [
156
+ {
157
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args__constructorArgument",
158
+ "fields": [
159
+ {
160
+ "keyRaw": "mediatorTermComparatorFactory",
161
+ "value": {
162
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorTermComparatorFactory"
163
+ }
164
+ },
165
+ {
166
+ "keyRaw": "mediatorExpressionEvaluatorFactory",
167
+ "value": {
168
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorExpressionEvaluatorFactory"
169
+ }
170
+ },
171
+ {
172
+ "keyRaw": "name",
173
+ "value": {
174
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_name"
175
+ }
176
+ },
177
+ {
178
+ "keyRaw": "bus",
179
+ "value": {
180
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_bus"
181
+ }
182
+ },
183
+ {
184
+ "keyRaw": "busFailMessage",
185
+ "value": {
186
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_busFailMessage"
187
+ }
188
+ },
189
+ {
190
+ "keyRaw": "beforeActors",
191
+ "value": {
192
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_beforeActors"
193
+ }
194
+ }
195
+ ]
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#IActorBindingsAggregatorFactoryMinArgs",
201
+ "@type": "AbstractClass",
202
+ "requireElement": "IActorBindingsAggregatorFactoryMinArgs",
203
+ "extends": [
204
+ "cbbaf:components/ActorBindingsAggregatorFactory.jsonld#IActorBindingsAggregatorFactoryArgs"
205
+ ],
206
+ "parameters": [],
207
+ "memberFields": [
208
+ {
209
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#IActorBindingsAggregatorFactoryMinArgs__member_mediatorTermComparatorFactory",
210
+ "memberFieldName": "mediatorTermComparatorFactory"
211
+ }
212
+ ],
213
+ "constructorArguments": []
214
+ }
215
+ ]
216
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-bindings-aggregator-factory-min/^3.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/types/^3.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-term-comparator-factory/^3.0.0/components/context.jsonld",
6
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-bindings-aggregator-factory/^3.0.0/components/context.jsonld"
7
+ ],
8
+ "@id": "npmd:@comunica/actor-bindings-aggregator-factory-min",
9
+ "components": [
10
+ {
11
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator",
12
+ "@type": "Class",
13
+ "requireElement": "MinAggregator",
14
+ "extends": [
15
+ "cbbaf:components/ActorBindingsAggregatorFactory.jsonld#IBindingsAggregator"
16
+ ],
17
+ "parameters": [
18
+ {
19
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_distinct",
20
+ "range": "xsd:boolean"
21
+ },
22
+ {
23
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_evaluator",
24
+ "range": "ct:components/ExpressionEvaluator.jsonld#IExpressionEvaluator"
25
+ },
26
+ {
27
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_orderByEvaluator",
28
+ "range": "cbtcf:components/ActorTermComparatorFactory.jsonld#ITermComparator"
29
+ },
30
+ {
31
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_throwError",
32
+ "range": {
33
+ "@type": "ParameterRangeUnion",
34
+ "parameterRangeElements": [
35
+ "xsd:boolean",
36
+ {
37
+ "@type": "ParameterRangeUndefined"
38
+ }
39
+ ]
40
+ }
41
+ }
42
+ ],
43
+ "memberFields": [
44
+ {
45
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator__member_orderByEvaluator",
46
+ "memberFieldName": "orderByEvaluator"
47
+ },
48
+ {
49
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator__member_state",
50
+ "memberFieldName": "state"
51
+ },
52
+ {
53
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator__member_constructor",
54
+ "memberFieldName": "constructor"
55
+ },
56
+ {
57
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator__member_putTerm",
58
+ "memberFieldName": "putTerm"
59
+ },
60
+ {
61
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator__member_termResult",
62
+ "memberFieldName": "termResult"
63
+ }
64
+ ],
65
+ "constructorArguments": [
66
+ {
67
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_evaluator"
68
+ },
69
+ {
70
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_distinct"
71
+ },
72
+ {
73
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_orderByEvaluator"
74
+ },
75
+ {
76
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_throwError"
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-bindings-aggregator-factory-min/^3.0.0/components/context.jsonld"
4
+ ],
5
+ "@id": "npmd:@comunica/actor-bindings-aggregator-factory-min",
6
+ "@type": "Module",
7
+ "requireName": "@comunica/actor-bindings-aggregator-factory-min",
8
+ "import": [
9
+ "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld",
10
+ "cabafm:components/MinAggregator.jsonld"
11
+ ]
12
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
4
+ {
5
+ "npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
6
+ "cabafm": "npmd:@comunica/actor-bindings-aggregator-factory-min/^3.0.0/",
7
+ "ActorBindingsAggregatorFactoryMin": {
8
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin",
9
+ "@prefix": true,
10
+ "@context": {
11
+ "args_mediatorTermComparatorFactory": {
12
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorTermComparatorFactory"
13
+ },
14
+ "args_mediatorExpressionEvaluatorFactory": {
15
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorExpressionEvaluatorFactory"
16
+ },
17
+ "args_name": {
18
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_name"
19
+ },
20
+ "args_bus": {
21
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_bus"
22
+ },
23
+ "args_busFailMessage": {
24
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_busFailMessage"
25
+ },
26
+ "args_beforeActors": {
27
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_beforeActors",
28
+ "@container": "@list"
29
+ },
30
+ "mediatorTermComparatorFactory": {
31
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorTermComparatorFactory"
32
+ },
33
+ "mediatorExpressionEvaluatorFactory": {
34
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_mediatorExpressionEvaluatorFactory"
35
+ },
36
+ "name": {
37
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_name"
38
+ },
39
+ "bus": {
40
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_bus"
41
+ },
42
+ "busFailMessage": {
43
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_busFailMessage"
44
+ },
45
+ "beforeActors": {
46
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#ActorBindingsAggregatorFactoryMin_args_beforeActors",
47
+ "@container": "@list"
48
+ }
49
+ }
50
+ },
51
+ "IActorBindingsAggregatorFactoryMinArgs": {
52
+ "@id": "cabafm:components/ActorBindingsAggregatorFactoryMin.jsonld#IActorBindingsAggregatorFactoryMinArgs",
53
+ "@prefix": true,
54
+ "@context": {}
55
+ },
56
+ "MinAggregator": {
57
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator",
58
+ "@prefix": true,
59
+ "@context": {
60
+ "distinct": {
61
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_distinct"
62
+ },
63
+ "evaluator": {
64
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_evaluator"
65
+ },
66
+ "orderByEvaluator": {
67
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_orderByEvaluator"
68
+ },
69
+ "throwError": {
70
+ "@id": "cabafm:components/MinAggregator.jsonld#MinAggregator_throwError"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ ]
76
+ }
@@ -0,0 +1,16 @@
1
+ import type { IActionBindingsAggregatorFactory, IActorBindingsAggregatorFactoryArgs, IActorBindingsAggregatorFactoryOutput } from '@comunica/bus-bindings-aggregator-factory';
2
+ import { ActorBindingsAggregatorFactory } from '@comunica/bus-bindings-aggregator-factory';
3
+ import type { MediatorTermComparatorFactory } from '@comunica/bus-term-comparator-factory';
4
+ import type { IActorTest, TestResult } from '@comunica/core';
5
+ export interface IActorBindingsAggregatorFactoryMinArgs extends IActorBindingsAggregatorFactoryArgs {
6
+ mediatorTermComparatorFactory: MediatorTermComparatorFactory;
7
+ }
8
+ /**
9
+ * A comunica Min Expression Evaluator Aggregate Actor.
10
+ */
11
+ export declare class ActorBindingsAggregatorFactoryMin extends ActorBindingsAggregatorFactory {
12
+ private readonly mediatorTermComparatorFactory;
13
+ constructor(args: IActorBindingsAggregatorFactoryMinArgs);
14
+ test(action: IActionBindingsAggregatorFactory): Promise<TestResult<IActorTest>>;
15
+ run({ context, expr }: IActionBindingsAggregatorFactory): Promise<IActorBindingsAggregatorFactoryOutput>;
16
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActorBindingsAggregatorFactoryMin = void 0;
4
+ const bus_bindings_aggregator_factory_1 = require("@comunica/bus-bindings-aggregator-factory");
5
+ const core_1 = require("@comunica/core");
6
+ const MinAggregator_1 = require("./MinAggregator");
7
+ /**
8
+ * A comunica Min Expression Evaluator Aggregate Actor.
9
+ */
10
+ class ActorBindingsAggregatorFactoryMin extends bus_bindings_aggregator_factory_1.ActorBindingsAggregatorFactory {
11
+ constructor(args) {
12
+ super(args);
13
+ this.mediatorTermComparatorFactory = args.mediatorTermComparatorFactory;
14
+ }
15
+ async test(action) {
16
+ if (action.expr.aggregator !== 'min') {
17
+ return (0, core_1.failTest)('This actor only supports the \'min\' aggregator.');
18
+ }
19
+ return (0, core_1.passTestVoid)();
20
+ }
21
+ async run({ context, expr }) {
22
+ return new MinAggregator_1.MinAggregator(await this.mediatorExpressionEvaluatorFactory.mediate({ algExpr: expr.expression, context }), expr.distinct, await this.mediatorTermComparatorFactory.mediate({ context }));
23
+ }
24
+ }
25
+ exports.ActorBindingsAggregatorFactoryMin = ActorBindingsAggregatorFactoryMin;
26
+ //# sourceMappingURL=ActorBindingsAggregatorFactoryMin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActorBindingsAggregatorFactoryMin.js","sourceRoot":"","sources":["ActorBindingsAggregatorFactoryMin.ts"],"names":[],"mappings":";;;AAKA,+FAEmD;AAGnD,yCAAwD;AACxD,mDAAgD;AAMhD;;GAEG;AACH,MAAa,iCAAkC,SAAQ,gEAA8B;IAGnF,YAAmB,IAA4C;QAC7D,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,6BAA6B,GAAG,IAAI,CAAC,6BAA6B,CAAC;IAC1E,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,MAAwC;QACxD,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;YACrC,OAAO,IAAA,eAAQ,EAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAoC;QAElE,OAAO,IAAI,6BAAa,CACtB,MAAM,IAAI,CAAC,kCAAkC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,CAAC,EAC5F,IAAI,CAAC,QAAQ,EACb,MAAM,IAAI,CAAC,6BAA6B,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF;AAvBD,8EAuBC","sourcesContent":["import type {\n IActionBindingsAggregatorFactory,\n IActorBindingsAggregatorFactoryArgs,\n IActorBindingsAggregatorFactoryOutput,\n} from '@comunica/bus-bindings-aggregator-factory';\nimport {\n ActorBindingsAggregatorFactory,\n} from '@comunica/bus-bindings-aggregator-factory';\nimport type { MediatorTermComparatorFactory } from '@comunica/bus-term-comparator-factory';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport { failTest, passTestVoid } from '@comunica/core';\nimport { MinAggregator } from './MinAggregator';\n\nexport interface IActorBindingsAggregatorFactoryMinArgs extends IActorBindingsAggregatorFactoryArgs {\n mediatorTermComparatorFactory: MediatorTermComparatorFactory;\n}\n\n/**\n * A comunica Min Expression Evaluator Aggregate Actor.\n */\nexport class ActorBindingsAggregatorFactoryMin extends ActorBindingsAggregatorFactory {\n private readonly mediatorTermComparatorFactory: MediatorTermComparatorFactory;\n\n public constructor(args: IActorBindingsAggregatorFactoryMinArgs) {\n super(args);\n this.mediatorTermComparatorFactory = args.mediatorTermComparatorFactory;\n }\n\n public async test(action: IActionBindingsAggregatorFactory): Promise<TestResult<IActorTest>> {\n if (action.expr.aggregator !== 'min') {\n return failTest('This actor only supports the \\'min\\' aggregator.');\n }\n return passTestVoid();\n }\n\n public async run({ context, expr }: IActionBindingsAggregatorFactory):\n Promise<IActorBindingsAggregatorFactoryOutput> {\n return new MinAggregator(\n await this.mediatorExpressionEvaluatorFactory.mediate({ algExpr: expr.expression, context }),\n expr.distinct,\n await this.mediatorTermComparatorFactory.mediate({ context }),\n );\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import type { IBindingsAggregator } from '@comunica/bus-bindings-aggregator-factory';
2
+ import { AggregateEvaluator } from '@comunica/bus-bindings-aggregator-factory';
3
+ import type { ITermComparator } from '@comunica/bus-term-comparator-factory';
4
+ import type { IExpressionEvaluator } from '@comunica/types';
5
+ import type * as RDF from '@rdfjs/types';
6
+ export declare class MinAggregator extends AggregateEvaluator implements IBindingsAggregator {
7
+ private readonly orderByEvaluator;
8
+ private state;
9
+ constructor(evaluator: IExpressionEvaluator, distinct: boolean, orderByEvaluator: ITermComparator, throwError?: boolean);
10
+ putTerm(term: RDF.Term): void;
11
+ termResult(): RDF.Term | undefined;
12
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MinAggregator = void 0;
4
+ const bus_bindings_aggregator_factory_1 = require("@comunica/bus-bindings-aggregator-factory");
5
+ class MinAggregator extends bus_bindings_aggregator_factory_1.AggregateEvaluator {
6
+ constructor(evaluator, distinct, orderByEvaluator, throwError) {
7
+ super(evaluator, distinct, throwError);
8
+ this.orderByEvaluator = orderByEvaluator;
9
+ this.state = undefined;
10
+ }
11
+ putTerm(term) {
12
+ if (term.termType !== 'Literal') {
13
+ throw new Error(`Term with value ${term.value} has type ${term.termType} and is not a literal`);
14
+ }
15
+ if (this.state === undefined) {
16
+ this.state = term;
17
+ }
18
+ else if (this.orderByEvaluator.orderTypes(this.state, term) === 1) {
19
+ this.state = term;
20
+ }
21
+ }
22
+ termResult() {
23
+ if (this.state === undefined) {
24
+ return this.emptyValue();
25
+ }
26
+ return this.state;
27
+ }
28
+ }
29
+ exports.MinAggregator = MinAggregator;
30
+ //# sourceMappingURL=MinAggregator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MinAggregator.js","sourceRoot":"","sources":["MinAggregator.ts"],"names":[],"mappings":";;;AACA,+FAA+E;AAK/E,MAAa,aAAc,SAAQ,oDAAkB;IAGnD,YACE,SAA+B,EAC/B,QAAiB,EACA,gBAAiC,EAClD,UAAoB;QAEpB,KAAK,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAHtB,qBAAgB,GAAhB,gBAAgB,CAAiB;QAL5C,UAAK,GAAyB,SAAS,CAAC;IAShD,CAAC;IAEM,OAAO,CAAC,IAAc;QAC3B,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,QAAQ,uBAAuB,CAAC,CAAC;QAClG,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,CAAC;aAAM,IAAI,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACpE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,CAAC;IACH,CAAC;IAEM,UAAU;QACf,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;QAC3B,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AA7BD,sCA6BC","sourcesContent":["import type { IBindingsAggregator } from '@comunica/bus-bindings-aggregator-factory';\nimport { AggregateEvaluator } from '@comunica/bus-bindings-aggregator-factory';\nimport type { ITermComparator } from '@comunica/bus-term-comparator-factory';\nimport type { IExpressionEvaluator } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\n\nexport class MinAggregator extends AggregateEvaluator implements IBindingsAggregator {\n private state: RDF.Term | undefined = undefined;\n\n public constructor(\n evaluator: IExpressionEvaluator,\n distinct: boolean,\n private readonly orderByEvaluator: ITermComparator,\n throwError?: boolean,\n ) {\n super(evaluator, distinct, throwError);\n }\n\n public putTerm(term: RDF.Term): void {\n if (term.termType !== 'Literal') {\n throw new Error(`Term with value ${term.value} has type ${term.termType} and is not a literal`);\n }\n if (this.state === undefined) {\n this.state = term;\n } else if (this.orderByEvaluator.orderTypes(this.state, term) === 1) {\n this.state = term;\n }\n }\n\n public termResult(): RDF.Term | undefined {\n if (this.state === undefined) {\n return this.emptyValue();\n }\n return this.state;\n }\n}\n"]}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './ActorBindingsAggregatorFactoryMin';
2
+ export * from './MinAggregator';
package/lib/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ActorBindingsAggregatorFactoryMin"), exports);
18
+ __exportStar(require("./MinAggregator"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,kDAAgC","sourcesContent":["export * from './ActorBindingsAggregatorFactoryMin';\nexport * from './MinAggregator';\n"]}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@comunica/actor-bindings-aggregator-factory-min",
3
+ "version": "3.2.4-alpha.47.0",
4
+ "description": "A min expression-evaluator-aggregate actor",
5
+ "lsd:module": true,
6
+ "license": "MIT",
7
+ "homepage": "https://comunica.dev/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/comunica/comunica.git",
11
+ "directory": "packages/actor-bindings-aggregator-factory-min"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/comunica/comunica/issues"
15
+ },
16
+ "keywords": [
17
+ "comunica",
18
+ "actor",
19
+ "expression-evaluator-aggregate",
20
+ "min"
21
+ ],
22
+ "sideEffects": false,
23
+ "main": "lib/index.js",
24
+ "typings": "lib/index",
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "files": [
29
+ "components",
30
+ "lib/**/*.d.ts",
31
+ "lib/**/*.js",
32
+ "lib/**/*.js.map"
33
+ ],
34
+ "scripts": {
35
+ "build": "npm run build:ts && npm run build:components",
36
+ "build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
37
+ "build:components": "componentsjs-generator"
38
+ },
39
+ "dependencies": {
40
+ "@comunica/bus-bindings-aggregator-factory": "3.2.4-alpha.47.0",
41
+ "@comunica/core": "3.2.4-alpha.47.0",
42
+ "@comunica/types": "3.2.4-alpha.47.0",
43
+ "@rdfjs/types": "*"
44
+ },
45
+ "devDependencies": {
46
+ "@comunica/bus-term-comparator-factory": "3.2.4-alpha.47.0"
47
+ },
48
+ "gitHead": "85bd4c5cf07dfc293ebbc3a1416b70e2db8bfc48"
49
+ }