@comunica/actor-query-operation-update-load 1.21.1 → 2.0.1-alpha.6.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 +6 -6
- package/components/ActorQueryOperationLoad.jsonld +179 -0
- package/components/components.jsonld +5 -3
- package/components/context.jsonld +46 -6
- package/lib/ActorQueryOperationLoad.d.ts +11 -10
- package/lib/ActorQueryOperationLoad.js +12 -17
- package/lib/index.d.ts +1 -0
- package/{index.js → lib/index.js} +1 -1
- package/package.json +13 -36
- package/components/Actor/QueryOperation/Load.jsonld +0 -35
- package/index.d.ts +0 -1
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
|
@@ -23,15 +23,15 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
23
23
|
{
|
|
24
24
|
"@context": [
|
|
25
25
|
...
|
|
26
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-load/^
|
|
26
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-load/^2.0.0/components/context.jsonld"
|
|
27
27
|
],
|
|
28
28
|
"actors": [
|
|
29
29
|
...
|
|
30
30
|
{
|
|
31
|
-
"@id": "
|
|
31
|
+
"@id": "urn:comunica:default:query-operation/actors#update-load",
|
|
32
32
|
"@type": "ActorQueryOperationLoad",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"mediatorQueryOperation": { "@id": "urn:comunica:default:query-operation/mediators#main" },
|
|
34
|
+
"mediatorUpdateQuads": { "@id": "urn:comunica:default:rdf-update-quads/mediators#main" }
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
37
|
}
|
|
@@ -39,5 +39,5 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
39
39
|
|
|
40
40
|
### Config Parameters
|
|
41
41
|
|
|
42
|
-
* `
|
|
43
|
-
* `
|
|
42
|
+
* `mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
|
|
43
|
+
* `mediatorUpdateQuads`: A mediator over the [RDF Update Quads bus](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-update-quads).
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-load/^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-update-load",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad",
|
|
11
|
+
"@type": "Class",
|
|
12
|
+
"requireElement": "ActorQueryOperationLoad",
|
|
13
|
+
"extends": [
|
|
14
|
+
{
|
|
15
|
+
"@type": "GenericComponentExtension",
|
|
16
|
+
"component": "cbqo:components/ActorQueryOperationTypedMediated.jsonld#ActorQueryOperationTypedMediated",
|
|
17
|
+
"genericTypeInstances": [
|
|
18
|
+
"urn:npm:sparqlalgebrajs:Load"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"comment": "A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor that handles SPARQL load operations.",
|
|
23
|
+
"parameters": [
|
|
24
|
+
{
|
|
25
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorUpdateQuads",
|
|
26
|
+
"range": "cc:components/Mediator.jsonld#Mediator",
|
|
27
|
+
"comment": "The RDF Update Quads mediator"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorQueryOperation",
|
|
31
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_name",
|
|
35
|
+
"range": "xsd:string",
|
|
36
|
+
"default": {
|
|
37
|
+
"@id": "rdf:subject"
|
|
38
|
+
},
|
|
39
|
+
"comment": "The name for this actor."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_bus",
|
|
43
|
+
"range": {
|
|
44
|
+
"@type": "ParameterRangeGenericComponent",
|
|
45
|
+
"component": "cc:components/Bus.jsonld#Bus",
|
|
46
|
+
"genericTypeInstances": [
|
|
47
|
+
{
|
|
48
|
+
"@type": "ParameterRangeGenericComponent",
|
|
49
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
50
|
+
"genericTypeInstances": [
|
|
51
|
+
{
|
|
52
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
53
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
57
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
61
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
67
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
71
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
75
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"default": {
|
|
80
|
+
"@id": "cbqo:components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus",
|
|
81
|
+
"@type": "cc:components/Bus.jsonld#Bus"
|
|
82
|
+
},
|
|
83
|
+
"comment": "The bus this actor subscribes to."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_beforeActors",
|
|
87
|
+
"range": {
|
|
88
|
+
"@type": "ParameterRangeUnion",
|
|
89
|
+
"parameterRangeElements": [
|
|
90
|
+
{
|
|
91
|
+
"@type": "ParameterRangeArray",
|
|
92
|
+
"parameterRangeValue": {
|
|
93
|
+
"@type": "ParameterRangeGenericComponent",
|
|
94
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
95
|
+
"genericTypeInstances": [
|
|
96
|
+
{
|
|
97
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
98
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
102
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
106
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"@type": "ParameterRangeUndefined"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"comment": "Actor that must be registered in the bus before this actor."
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"memberKeys": [
|
|
120
|
+
"mediatorUpdateQuads",
|
|
121
|
+
"factory",
|
|
122
|
+
"constructOperation",
|
|
123
|
+
"constructor",
|
|
124
|
+
"testOperation",
|
|
125
|
+
"runOperation"
|
|
126
|
+
],
|
|
127
|
+
"constructorArguments": [
|
|
128
|
+
{
|
|
129
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args__constructorArgument",
|
|
130
|
+
"fields": [
|
|
131
|
+
{
|
|
132
|
+
"keyRaw": "mediatorUpdateQuads",
|
|
133
|
+
"value": {
|
|
134
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorUpdateQuads"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"keyRaw": "mediatorQueryOperation",
|
|
139
|
+
"value": {
|
|
140
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorQueryOperation"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"keyRaw": "name",
|
|
145
|
+
"value": {
|
|
146
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_name"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"keyRaw": "bus",
|
|
151
|
+
"value": {
|
|
152
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_bus"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"keyRaw": "beforeActors",
|
|
157
|
+
"value": {
|
|
158
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_beforeActors"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#IActorQueryOperationLoadArgs",
|
|
167
|
+
"@type": "AbstractClass",
|
|
168
|
+
"requireElement": "IActorQueryOperationLoadArgs",
|
|
169
|
+
"extends": [
|
|
170
|
+
"cbqo:components/ActorQueryOperationTypedMediated.jsonld#IActorQueryOperationTypedMediatedArgs"
|
|
171
|
+
],
|
|
172
|
+
"parameters": [],
|
|
173
|
+
"memberKeys": [
|
|
174
|
+
"mediatorUpdateQuads"
|
|
175
|
+
],
|
|
176
|
+
"constructorArguments": []
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@context":
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-load/^2.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
3
5
|
"@id": "npmd:@comunica/actor-query-operation-update-load",
|
|
4
6
|
"@type": "Module",
|
|
5
7
|
"requireName": "@comunica/actor-query-operation-update-load",
|
|
6
8
|
"import": [
|
|
7
|
-
"
|
|
9
|
+
"caqoul:components/ActorQueryOperationLoad.jsonld"
|
|
8
10
|
]
|
|
9
|
-
}
|
|
11
|
+
}
|
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"caqoul": "npmd:@comunica/actor-query-operation-update-load/",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"caqoul": "npmd:@comunica/actor-query-operation-update-load/^2.0.0/",
|
|
7
|
+
"ActorQueryOperationLoad": {
|
|
8
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad",
|
|
9
|
+
"@prefix": true,
|
|
10
|
+
"@context": {
|
|
11
|
+
"args_mediatorUpdateQuads": {
|
|
12
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorUpdateQuads"
|
|
13
|
+
},
|
|
14
|
+
"args_mediatorQueryOperation": {
|
|
15
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorQueryOperation"
|
|
16
|
+
},
|
|
17
|
+
"args_name": {
|
|
18
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_name"
|
|
19
|
+
},
|
|
20
|
+
"args_bus": {
|
|
21
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_bus"
|
|
22
|
+
},
|
|
23
|
+
"args_beforeActors": {
|
|
24
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_beforeActors",
|
|
25
|
+
"@container": "@list"
|
|
26
|
+
},
|
|
27
|
+
"mediatorUpdateQuads": {
|
|
28
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorUpdateQuads"
|
|
29
|
+
},
|
|
30
|
+
"mediatorQueryOperation": {
|
|
31
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_mediatorQueryOperation"
|
|
32
|
+
},
|
|
33
|
+
"name": {
|
|
34
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_name"
|
|
35
|
+
},
|
|
36
|
+
"bus": {
|
|
37
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_bus"
|
|
38
|
+
},
|
|
39
|
+
"beforeActors": {
|
|
40
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#ActorQueryOperationLoad_args_beforeActors",
|
|
41
|
+
"@container": "@list"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"IActorQueryOperationLoadArgs": {
|
|
46
|
+
"@id": "caqoul:components/ActorQueryOperationLoad.jsonld#IActorQueryOperationLoadArgs",
|
|
47
|
+
"@prefix": true,
|
|
48
|
+
"@context": {}
|
|
49
|
+
}
|
|
10
50
|
}
|
|
11
51
|
]
|
|
12
|
-
}
|
|
52
|
+
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
|
|
2
2
|
import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
3
|
+
import type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';
|
|
4
|
+
import type { IActorTest } from '@comunica/core';
|
|
5
|
+
import type { IActionContext, IQueryOperationResult } from '@comunica/types';
|
|
6
6
|
import type { Algebra } from 'sparqlalgebrajs';
|
|
7
7
|
/**
|
|
8
8
|
* A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor
|
|
9
9
|
* that handles SPARQL load operations.
|
|
10
10
|
*/
|
|
11
11
|
export declare class ActorQueryOperationLoad extends ActorQueryOperationTypedMediated<Algebra.Load> {
|
|
12
|
-
readonly mediatorUpdateQuads:
|
|
12
|
+
readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;
|
|
13
13
|
private readonly factory;
|
|
14
14
|
private readonly constructOperation;
|
|
15
15
|
constructor(args: IActorQueryOperationLoadArgs);
|
|
16
|
-
testOperation(
|
|
17
|
-
runOperation(
|
|
16
|
+
testOperation(operation: Algebra.Load, context: IActionContext): Promise<IActorTest>;
|
|
17
|
+
runOperation(operation: Algebra.Load, context: IActionContext): Promise<IQueryOperationResult>;
|
|
18
18
|
}
|
|
19
19
|
export interface IActorQueryOperationLoadArgs extends IActorQueryOperationTypedMediatedArgs {
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The RDF Update Quads mediator
|
|
22
|
+
*/
|
|
23
|
+
mediatorUpdateQuads: MediatorRdfUpdateQuads;
|
|
21
24
|
}
|
|
22
|
-
export declare const KEY_CONTEXT_SOURCES = "@comunica/bus-rdf-resolve-quad-pattern:sources";
|
|
23
|
-
export declare const KEY_CONTEXT_LENIENT = "@comunica/actor-init-sparql:lenient";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ActorQueryOperationLoad = void 0;
|
|
4
4
|
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
5
|
-
const
|
|
5
|
+
const context_entries_1 = require("@comunica/context-entries");
|
|
6
6
|
const rdf_data_factory_1 = require("rdf-data-factory");
|
|
7
7
|
const sparqlalgebrajs_1 = require("sparqlalgebrajs");
|
|
8
8
|
const DF = new rdf_data_factory_1.DataFactory();
|
|
@@ -16,18 +16,15 @@ class ActorQueryOperationLoad extends bus_query_operation_1.ActorQueryOperationT
|
|
|
16
16
|
this.factory = new sparqlalgebrajs_1.Factory();
|
|
17
17
|
this.constructOperation = this.factory.createConstruct(this.factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o')), [this.factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'))]);
|
|
18
18
|
}
|
|
19
|
-
async testOperation(
|
|
19
|
+
async testOperation(operation, context) {
|
|
20
20
|
bus_query_operation_1.ActorQueryOperation.throwOnReadOnly(context);
|
|
21
21
|
return true;
|
|
22
22
|
}
|
|
23
|
-
async runOperation(
|
|
23
|
+
async runOperation(operation, context) {
|
|
24
24
|
// Create CONSTRUCT query on the given source
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
let subContext = context.set(exports.KEY_CONTEXT_SOURCES, [pattern.source.value]);
|
|
29
|
-
if (pattern.silent) {
|
|
30
|
-
subContext = subContext.set(exports.KEY_CONTEXT_LENIENT, true);
|
|
25
|
+
let subContext = context.set(context_entries_1.KeysRdfResolveQuadPattern.sources, [operation.source.value]);
|
|
26
|
+
if (operation.silent) {
|
|
27
|
+
subContext = subContext.set(context_entries_1.KeysInitQuery.lenient, true);
|
|
31
28
|
}
|
|
32
29
|
const output = ActorQueryOperationLoad.getSafeQuads(await this.mediatorQueryOperation.mediate({
|
|
33
30
|
operation: this.constructOperation,
|
|
@@ -35,21 +32,19 @@ class ActorQueryOperationLoad extends bus_query_operation_1.ActorQueryOperationT
|
|
|
35
32
|
}));
|
|
36
33
|
// Determine quad stream to insert
|
|
37
34
|
let quadStream = output.quadStream;
|
|
38
|
-
if (
|
|
39
|
-
quadStream = quadStream.map(quad => DF.quad(quad.subject, quad.predicate, quad.object,
|
|
35
|
+
if (operation.destination) {
|
|
36
|
+
quadStream = quadStream.map(quad => DF.quad(quad.subject, quad.predicate, quad.object, operation.destination));
|
|
40
37
|
}
|
|
41
38
|
// Insert quad stream
|
|
42
|
-
const {
|
|
39
|
+
const { execute } = await this.mediatorUpdateQuads.mediate({
|
|
43
40
|
quadStreamInsert: quadStream,
|
|
44
41
|
context,
|
|
45
42
|
});
|
|
46
43
|
return {
|
|
47
|
-
type: '
|
|
48
|
-
|
|
44
|
+
type: 'void',
|
|
45
|
+
execute,
|
|
49
46
|
};
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
exports.ActorQueryOperationLoad = ActorQueryOperationLoad;
|
|
53
|
-
exports.KEY_CONTEXT_SOURCES = '@comunica/bus-rdf-resolve-quad-pattern:sources';
|
|
54
|
-
exports.KEY_CONTEXT_LENIENT = '@comunica/actor-init-sparql:lenient';
|
|
55
50
|
//# sourceMappingURL=ActorQueryOperationLoad.js.map
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActorQueryOperationLoad';
|
|
@@ -10,5 +10,5 @@ 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("./
|
|
13
|
+
__exportStar(require("./ActorQueryOperationLoad"), exports);
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-update-load",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.0.1-alpha.6.0",
|
|
4
4
|
"description": "A load 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",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
+
"sideEffects": false,
|
|
16
17
|
"keywords": [
|
|
17
18
|
"comunica",
|
|
18
19
|
"actor",
|
|
@@ -27,43 +28,19 @@
|
|
|
27
28
|
"files": [
|
|
28
29
|
"components",
|
|
29
30
|
"lib/**/*.d.ts",
|
|
30
|
-
"lib/**/*.js"
|
|
31
|
-
"index.d.ts",
|
|
32
|
-
"index.js"
|
|
31
|
+
"lib/**/*.js"
|
|
33
32
|
],
|
|
34
33
|
"dependencies": {
|
|
34
|
+
"@comunica/bus-query-operation": "2.0.1-alpha.6.0",
|
|
35
|
+
"@comunica/context-entries": "2.0.1-alpha.6.0",
|
|
36
|
+
"@comunica/core": "2.0.1-alpha.6.0",
|
|
35
37
|
"rdf-data-factory": "^1.0.4",
|
|
36
|
-
"sparqlalgebrajs": "^
|
|
37
|
-
},
|
|
38
|
-
"peerDependencies": {
|
|
39
|
-
"@comunica/bus-query-operation": "^1.19.2",
|
|
40
|
-
"@comunica/core": "^1.19.2"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@comunica/bus-query-operation": "^1.21.1",
|
|
44
|
-
"@comunica/core": "^1.21.1"
|
|
45
|
-
},
|
|
46
|
-
"jest": {
|
|
47
|
-
"globals": {
|
|
48
|
-
"ts-jest": {
|
|
49
|
-
"tsConfig": "../../tsconfig.json"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"transform": {
|
|
53
|
-
"^.+\\.ts$": "ts-jest"
|
|
54
|
-
},
|
|
55
|
-
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
|
|
56
|
-
"moduleFileExtensions": [
|
|
57
|
-
"ts",
|
|
58
|
-
"js"
|
|
59
|
-
],
|
|
60
|
-
"collectCoverage": true
|
|
38
|
+
"sparqlalgebrajs": "^4.0.0"
|
|
61
39
|
},
|
|
62
40
|
"scripts": {
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"build": "
|
|
66
|
-
"validate": "npm ls"
|
|
41
|
+
"build": "npm run build:ts && npm run build:components",
|
|
42
|
+
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
|
|
43
|
+
"build:components": "componentsjs-generator"
|
|
67
44
|
},
|
|
68
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "bbf46a068e635256495a40e784a4691b22e88bd3"
|
|
69
46
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-load/^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-update-load",
|
|
7
|
-
"components": [
|
|
8
|
-
{
|
|
9
|
-
"@id": "caqoul:Actor/QueryOperation/Load",
|
|
10
|
-
"@type": "Class",
|
|
11
|
-
"extends": "cbqo:Actor/QueryOperationTypedMediated",
|
|
12
|
-
"requireElement": "ActorQueryOperationLoad",
|
|
13
|
-
"comment": "A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor that handles SPARQL load operations.",
|
|
14
|
-
"parameters": [
|
|
15
|
-
{
|
|
16
|
-
"@id": "caqoul:mediatorUpdateQuads",
|
|
17
|
-
"comment": "The RDF Update Quads mediator",
|
|
18
|
-
"required": true,
|
|
19
|
-
"unique": true
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"constructorArguments": [
|
|
23
|
-
{
|
|
24
|
-
"extends": "cbqo:Actor/QueryOperationTypedMediated/constructorArgumentsObject",
|
|
25
|
-
"fields": [
|
|
26
|
-
{
|
|
27
|
-
"keyRaw": "mediatorUpdateQuads",
|
|
28
|
-
"value": "caqoul:mediatorUpdateQuads"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/ActorQueryOperationLoad';
|