@comunica/actor-query-operation-construct 1.22.0 → 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 +2 -2
- package/README.md +4 -4
- package/components/ActorQueryOperationConstruct.jsonld +165 -0
- package/components/components.jsonld +5 -3
- package/components/context.jsonld +34 -5
- package/lib/ActorQueryOperationConstruct.d.ts +5 -5
- package/lib/ActorQueryOperationConstruct.js +18 -16
- package/lib/BindingsToQuadsIterator.d.ts +1 -1
- package/lib/BindingsToQuadsIterator.js +4 -4
- package/lib/index.d.ts +2 -0
- package/{index.js → lib/index.js} +2 -2
- package/package.json +14 -39
- package/components/Actor/QueryOperation/Construct.jsonld +0 -21
- package/index.d.ts +0 -2
package/LICENSE.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright © 2017–
|
|
4
|
-
Ghent University – imec, Belgium
|
|
3
|
+
Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
|
|
4
|
+
Comunica Association and Ghent University – imec, Belgium
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -22,14 +22,14 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
22
22
|
{
|
|
23
23
|
"@context": [
|
|
24
24
|
...
|
|
25
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-construct/^
|
|
25
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-construct/^2.0.0/components/context.jsonld"
|
|
26
26
|
],
|
|
27
27
|
"actors": [
|
|
28
28
|
...
|
|
29
29
|
{
|
|
30
|
-
"@id": "
|
|
30
|
+
"@id": "urn:comunica:default:query-operation/actors#construct",
|
|
31
31
|
"@type": "ActorQueryOperationConstruct",
|
|
32
|
-
"
|
|
32
|
+
"mediatorQueryOperation": { "@id": "urn:comunica:default:query-operation/mediators#main" }
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
}
|
|
@@ -37,4 +37,4 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
37
37
|
|
|
38
38
|
### Config Parameters
|
|
39
39
|
|
|
40
|
-
* `
|
|
40
|
+
* `mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-construct/^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-query-operation/^2.0.0/components/context.jsonld"
|
|
6
|
+
],
|
|
7
|
+
"@id": "npmd:@comunica/actor-query-operation-construct",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct",
|
|
11
|
+
"@type": "Class",
|
|
12
|
+
"requireElement": "ActorQueryOperationConstruct",
|
|
13
|
+
"extends": [
|
|
14
|
+
{
|
|
15
|
+
"@type": "GenericComponentExtension",
|
|
16
|
+
"component": "cbqo:components/ActorQueryOperationTypedMediated.jsonld#ActorQueryOperationTypedMediated",
|
|
17
|
+
"genericTypeInstances": [
|
|
18
|
+
"urn:npm:sparqlalgebrajs:Construct"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"comment": "A comunica Construct Query Operation Actor.",
|
|
23
|
+
"parameters": [
|
|
24
|
+
{
|
|
25
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_mediatorQueryOperation",
|
|
26
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_name",
|
|
30
|
+
"range": "xsd:string",
|
|
31
|
+
"default": {
|
|
32
|
+
"@id": "rdf:subject"
|
|
33
|
+
},
|
|
34
|
+
"comment": "The name for this actor."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_bus",
|
|
38
|
+
"range": {
|
|
39
|
+
"@type": "ParameterRangeGenericComponent",
|
|
40
|
+
"component": "cc:components/Bus.jsonld#Bus",
|
|
41
|
+
"genericTypeInstances": [
|
|
42
|
+
{
|
|
43
|
+
"@type": "ParameterRangeGenericComponent",
|
|
44
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
45
|
+
"genericTypeInstances": [
|
|
46
|
+
{
|
|
47
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
48
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
52
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
56
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
62
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
66
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
70
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"default": {
|
|
75
|
+
"@id": "cbqo:components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus",
|
|
76
|
+
"@type": "cc:components/Bus.jsonld#Bus"
|
|
77
|
+
},
|
|
78
|
+
"comment": "The bus this actor subscribes to."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_beforeActors",
|
|
82
|
+
"range": {
|
|
83
|
+
"@type": "ParameterRangeUnion",
|
|
84
|
+
"parameterRangeElements": [
|
|
85
|
+
{
|
|
86
|
+
"@type": "ParameterRangeArray",
|
|
87
|
+
"parameterRangeValue": {
|
|
88
|
+
"@type": "ParameterRangeGenericComponent",
|
|
89
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
90
|
+
"genericTypeInstances": [
|
|
91
|
+
{
|
|
92
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
93
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
97
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
101
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"@type": "ParameterRangeUndefined"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"comment": "Actor that must be registered in the bus before this actor."
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"memberFields": [
|
|
115
|
+
{
|
|
116
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct__member_constructor",
|
|
117
|
+
"memberFieldName": "constructor"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct__member_getVariables",
|
|
121
|
+
"memberFieldName": "getVariables"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct__member_testOperation",
|
|
125
|
+
"memberFieldName": "testOperation"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct__member_runOperation",
|
|
129
|
+
"memberFieldName": "runOperation"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"constructorArguments": [
|
|
133
|
+
{
|
|
134
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args__constructorArgument",
|
|
135
|
+
"fields": [
|
|
136
|
+
{
|
|
137
|
+
"keyRaw": "mediatorQueryOperation",
|
|
138
|
+
"value": {
|
|
139
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_mediatorQueryOperation"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"keyRaw": "name",
|
|
144
|
+
"value": {
|
|
145
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_name"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"keyRaw": "bus",
|
|
150
|
+
"value": {
|
|
151
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_bus"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"keyRaw": "beforeActors",
|
|
156
|
+
"value": {
|
|
157
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_beforeActors"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@context":
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-construct/^2.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
3
5
|
"@id": "npmd:@comunica/actor-query-operation-construct",
|
|
4
6
|
"@type": "Module",
|
|
5
7
|
"requireName": "@comunica/actor-query-operation-construct",
|
|
6
8
|
"import": [
|
|
7
|
-
"
|
|
9
|
+
"caqoc:components/ActorQueryOperationConstruct.jsonld"
|
|
8
10
|
]
|
|
9
|
-
}
|
|
11
|
+
}
|
|
@@ -3,10 +3,39 @@
|
|
|
3
3
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"caqoc": "npmd:@comunica/actor-query-operation-construct/",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"caqoc": "npmd:@comunica/actor-query-operation-construct/^2.0.0/",
|
|
7
|
+
"ActorQueryOperationConstruct": {
|
|
8
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct",
|
|
9
|
+
"@prefix": true,
|
|
10
|
+
"@context": {
|
|
11
|
+
"args_mediatorQueryOperation": {
|
|
12
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_mediatorQueryOperation"
|
|
13
|
+
},
|
|
14
|
+
"args_name": {
|
|
15
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_name"
|
|
16
|
+
},
|
|
17
|
+
"args_bus": {
|
|
18
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_bus"
|
|
19
|
+
},
|
|
20
|
+
"args_beforeActors": {
|
|
21
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_beforeActors",
|
|
22
|
+
"@container": "@list"
|
|
23
|
+
},
|
|
24
|
+
"mediatorQueryOperation": {
|
|
25
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_mediatorQueryOperation"
|
|
26
|
+
},
|
|
27
|
+
"name": {
|
|
28
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_name"
|
|
29
|
+
},
|
|
30
|
+
"bus": {
|
|
31
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_bus"
|
|
32
|
+
},
|
|
33
|
+
"beforeActors": {
|
|
34
|
+
"@id": "caqoc:components/ActorQueryOperationConstruct.jsonld#ActorQueryOperationConstruct_args_beforeActors",
|
|
35
|
+
"@container": "@list"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
10
39
|
}
|
|
11
40
|
]
|
|
12
|
-
}
|
|
41
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
|
|
2
2
|
import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { IActorTest } from '@comunica/core';
|
|
4
|
+
import type { IActionContext, IQueryOperationResult } from '@comunica/types';
|
|
5
5
|
import type * as RDF from '@rdfjs/types';
|
|
6
|
-
import
|
|
6
|
+
import { Algebra } from 'sparqlalgebrajs';
|
|
7
7
|
/**
|
|
8
8
|
* A comunica Construct Query Operation Actor.
|
|
9
9
|
*/
|
|
@@ -15,6 +15,6 @@ export declare class ActorQueryOperationConstruct extends ActorQueryOperationTyp
|
|
|
15
15
|
* @return {RDF.Variable[]} The variables in the triple patterns.
|
|
16
16
|
*/
|
|
17
17
|
static getVariables(patterns: RDF.BaseQuad[]): RDF.Variable[];
|
|
18
|
-
testOperation(
|
|
19
|
-
runOperation(
|
|
18
|
+
testOperation(operation: Algebra.Construct, context: IActionContext): Promise<IActorTest>;
|
|
19
|
+
runOperation(operationOriginal: Algebra.Construct, context: IActionContext): Promise<IQueryOperationResult>;
|
|
20
20
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ActorQueryOperationConstruct = void 0;
|
|
4
4
|
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
5
5
|
const rdf_terms_1 = require("rdf-terms");
|
|
6
|
+
const sparqlalgebrajs_1 = require("sparqlalgebrajs");
|
|
6
7
|
const BindingsToQuadsIterator_1 = require("./BindingsToQuadsIterator");
|
|
7
8
|
/**
|
|
8
9
|
* A comunica Construct Query Operation Actor.
|
|
@@ -17,30 +18,31 @@ class ActorQueryOperationConstruct extends bus_query_operation_1.ActorQueryOpera
|
|
|
17
18
|
* @return {RDF.Variable[]} The variables in the triple patterns.
|
|
18
19
|
*/
|
|
19
20
|
static getVariables(patterns) {
|
|
20
|
-
return rdf_terms_1.uniqTerms([].concat
|
|
21
|
-
.apply([], patterns.map(pattern => rdf_terms_1.getVariables(rdf_terms_1.getTerms(pattern)))));
|
|
21
|
+
return (0, rdf_terms_1.uniqTerms)([].concat
|
|
22
|
+
.apply([], patterns.map(pattern => (0, rdf_terms_1.getVariables)((0, rdf_terms_1.getTerms)(pattern)))));
|
|
22
23
|
}
|
|
23
|
-
async testOperation(
|
|
24
|
+
async testOperation(operation, context) {
|
|
24
25
|
return true;
|
|
25
26
|
}
|
|
26
|
-
async runOperation(
|
|
27
|
+
async runOperation(operationOriginal, context) {
|
|
27
28
|
// Apply a projection on our CONSTRUCT variables first, as the query may contain other variables as well.
|
|
28
|
-
const variables = ActorQueryOperationConstruct.getVariables(
|
|
29
|
-
const operation = { type:
|
|
29
|
+
const variables = ActorQueryOperationConstruct.getVariables(operationOriginal.template);
|
|
30
|
+
const operation = { type: sparqlalgebrajs_1.Algebra.types.PROJECT, input: operationOriginal.input, variables };
|
|
30
31
|
// Evaluate the input query
|
|
31
32
|
const output = bus_query_operation_1.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({ operation, context }));
|
|
32
33
|
// Construct triples using the result based on the pattern.
|
|
33
|
-
const quadStream = new BindingsToQuadsIterator_1.BindingsToQuadsIterator(
|
|
34
|
+
const quadStream = new BindingsToQuadsIterator_1.BindingsToQuadsIterator(operationOriginal.template, output.bindingsStream);
|
|
34
35
|
// Let the final metadata contain the estimated number of triples
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
const metadata = () => output.metadata().then(meta => ({
|
|
37
|
+
...meta,
|
|
38
|
+
order: undefined,
|
|
39
|
+
cardinality: {
|
|
40
|
+
type: meta.cardinality.type,
|
|
41
|
+
value: meta.cardinality.value * operationOriginal.template.length,
|
|
42
|
+
},
|
|
43
|
+
canContainUndefs: false,
|
|
44
|
+
availableOrders: undefined,
|
|
45
|
+
}));
|
|
44
46
|
return {
|
|
45
47
|
metadata,
|
|
46
48
|
quadStream,
|
|
@@ -26,7 +26,7 @@ export declare class BindingsToQuadsIterator extends MultiTransformIterator<Bind
|
|
|
26
26
|
* If the given term is a variable, then the bound term is returned,
|
|
27
27
|
* or a falsy value if it did not exist in the bindings.
|
|
28
28
|
*/
|
|
29
|
-
static bindTerm(bindings: Bindings, term: RDF.Term): RDF.Term;
|
|
29
|
+
static bindTerm(bindings: Bindings, term: RDF.Term): RDF.Term | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Bind the given quad pattern.
|
|
32
32
|
* If one of the terms was a variable AND is not bound in the bindings,
|
|
@@ -33,7 +33,7 @@ class BindingsToQuadsIterator extends asynciterator_1.MultiTransformIterator {
|
|
|
33
33
|
*/
|
|
34
34
|
static bindTerm(bindings, term) {
|
|
35
35
|
if (term.termType === 'Variable') {
|
|
36
|
-
return bindings.get(
|
|
36
|
+
return bindings.get(term);
|
|
37
37
|
}
|
|
38
38
|
return term;
|
|
39
39
|
}
|
|
@@ -47,7 +47,7 @@ class BindingsToQuadsIterator extends asynciterator_1.MultiTransformIterator {
|
|
|
47
47
|
*/
|
|
48
48
|
static bindQuad(bindings, pattern) {
|
|
49
49
|
try {
|
|
50
|
-
return rdf_terms_1.mapTerms(pattern, term => {
|
|
50
|
+
return (0, rdf_terms_1.mapTerms)(pattern, term => {
|
|
51
51
|
const boundTerm = BindingsToQuadsIterator.bindTerm(bindings, term);
|
|
52
52
|
if (!boundTerm) {
|
|
53
53
|
throw new Error('Unbound term');
|
|
@@ -55,7 +55,7 @@ class BindingsToQuadsIterator extends asynciterator_1.MultiTransformIterator {
|
|
|
55
55
|
return boundTerm;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
catch
|
|
58
|
+
catch {
|
|
59
59
|
// Do nothing
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -79,7 +79,7 @@ class BindingsToQuadsIterator extends asynciterator_1.MultiTransformIterator {
|
|
|
79
79
|
* @return {RDF.BaseQuad} A quad.
|
|
80
80
|
*/
|
|
81
81
|
static localizeQuad(blankNodeCounter, pattern) {
|
|
82
|
-
return rdf_terms_1.mapTerms(pattern, term => BindingsToQuadsIterator.localizeBlankNode(blankNodeCounter, term));
|
|
82
|
+
return (0, rdf_terms_1.mapTerms)(pattern, term => BindingsToQuadsIterator.localizeBlankNode(blankNodeCounter, term));
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Convert the given template to a list of quads based on the given bindings.
|
package/lib/index.d.ts
ADDED
|
@@ -10,6 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
14
|
-
__exportStar(require("./
|
|
13
|
+
__exportStar(require("./ActorQueryOperationConstruct"), exports);
|
|
14
|
+
__exportStar(require("./BindingsToQuadsIterator"), exports);
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-construct",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.0.1-alpha.5.0",
|
|
4
4
|
"description": "A construct query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"typings": "index",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"typings": "lib/index",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/comunica/comunica.git",
|
|
@@ -27,48 +27,23 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"components",
|
|
29
29
|
"lib/**/*.d.ts",
|
|
30
|
-
"lib/**/*.js"
|
|
31
|
-
"index.d.ts",
|
|
32
|
-
"index.js"
|
|
30
|
+
"lib/**/*.js"
|
|
33
31
|
],
|
|
34
32
|
"dependencies": {
|
|
35
|
-
"@comunica/
|
|
36
|
-
"@comunica/
|
|
33
|
+
"@comunica/bus-query-operation": "2.0.1-alpha.5.0",
|
|
34
|
+
"@comunica/core": "2.0.1-alpha.5.0",
|
|
35
|
+
"@comunica/data-factory": "2.0.1-alpha.5.0",
|
|
36
|
+
"@comunica/types": "2.0.1-alpha.5.0",
|
|
37
37
|
"@rdfjs/types": "*",
|
|
38
|
-
"asynciterator": "^3.2.
|
|
38
|
+
"asynciterator": "^3.2.1",
|
|
39
39
|
"rdf-data-factory": "^1.0.3",
|
|
40
40
|
"rdf-terms": "^1.6.2",
|
|
41
|
-
"sparqlalgebrajs": "^
|
|
42
|
-
},
|
|
43
|
-
"peerDependencies": {
|
|
44
|
-
"@comunica/bus-query-operation": "^1.0.0",
|
|
45
|
-
"@comunica/core": "^1.0.0"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@comunica/bus-query-operation": "^1.22.0",
|
|
49
|
-
"@comunica/core": "^1.22.0"
|
|
50
|
-
},
|
|
51
|
-
"jest": {
|
|
52
|
-
"globals": {
|
|
53
|
-
"ts-jest": {
|
|
54
|
-
"tsConfig": "../../tsconfig.json"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"transform": {
|
|
58
|
-
"^.+\\.ts$": "ts-jest"
|
|
59
|
-
},
|
|
60
|
-
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
|
|
61
|
-
"moduleFileExtensions": [
|
|
62
|
-
"ts",
|
|
63
|
-
"js"
|
|
64
|
-
],
|
|
65
|
-
"collectCoverage": true
|
|
41
|
+
"sparqlalgebrajs": "^4.0.0"
|
|
66
42
|
},
|
|
67
43
|
"scripts": {
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"build": "
|
|
71
|
-
"validate": "npm ls"
|
|
44
|
+
"build": "npm run build:ts && npm run build:components",
|
|
45
|
+
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
|
|
46
|
+
"build:components": "componentsjs-generator"
|
|
72
47
|
},
|
|
73
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e2ae2e9e924bf0656df60cc99774f7e560d47695"
|
|
74
49
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-construct/^1.0.0/components/context.jsonld",
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^1.0.0/components/context.jsonld"
|
|
5
|
-
],
|
|
6
|
-
"@id": "npmd:@comunica/actor-query-operation-construct",
|
|
7
|
-
"components": [
|
|
8
|
-
{
|
|
9
|
-
"@id": "caqoc:Actor/QueryOperation/Construct",
|
|
10
|
-
"@type": "Class",
|
|
11
|
-
"extends": "cbqo:Actor/QueryOperationTypedMediated",
|
|
12
|
-
"requireElement": "ActorQueryOperationConstruct",
|
|
13
|
-
"comment": "A comunica Construct Query Operation Actor.",
|
|
14
|
-
"constructorArguments": [
|
|
15
|
-
{
|
|
16
|
-
"extends": "cbqo:Actor/QueryOperationTypedMediated/constructorArgumentsObject"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
package/index.d.ts
DELETED