@comunica/actor-query-source-identify-hypermedia-annotate-source 3.3.0 → 4.0.1
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/components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld +44 -12
- package/components/QuerySourceAddSourceAttribution.jsonld +1 -1
- package/components/components.jsonld +1 -1
- package/components/context.jsonld +7 -1
- package/lib/ActorQuerySourceIdentifyHypermediaAnnotateSource.d.ts +2 -1
- package/lib/ActorQuerySourceIdentifyHypermediaAnnotateSource.js +1 -1
- package/lib/ActorQuerySourceIdentifyHypermediaAnnotateSource.js.map +1 -1
- package/lib/QuerySourceAddSourceAttribution.js +2 -2
- package/lib/QuerySourceAddSourceAttribution.js.map +1 -1
- package/package.json +13 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^
|
|
5
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^4.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^4.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^4.0.0/components/context.jsonld"
|
|
6
6
|
],
|
|
7
7
|
"@id": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source",
|
|
8
8
|
"components": [
|
|
@@ -45,29 +45,37 @@
|
|
|
45
45
|
"genericTypeInstances": [
|
|
46
46
|
{
|
|
47
47
|
"@type": "ParameterRangeGenericTypeReference",
|
|
48
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
48
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"@type": "ParameterRangeGenericTypeReference",
|
|
52
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
52
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"@type": "ParameterRangeGenericTypeReference",
|
|
56
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
56
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
60
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
57
61
|
}
|
|
58
62
|
]
|
|
59
63
|
},
|
|
60
64
|
{
|
|
61
65
|
"@type": "ParameterRangeGenericTypeReference",
|
|
62
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
66
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
70
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
63
71
|
},
|
|
64
72
|
{
|
|
65
73
|
"@type": "ParameterRangeGenericTypeReference",
|
|
66
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
74
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
67
75
|
},
|
|
68
76
|
{
|
|
69
77
|
"@type": "ParameterRangeGenericTypeReference",
|
|
70
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
78
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
71
79
|
}
|
|
72
80
|
]
|
|
73
81
|
},
|
|
@@ -77,6 +85,20 @@
|
|
|
77
85
|
},
|
|
78
86
|
"comment": "The bus this actor subscribes to."
|
|
79
87
|
},
|
|
88
|
+
{
|
|
89
|
+
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_busFailMessage",
|
|
90
|
+
"range": {
|
|
91
|
+
"@type": "ParameterRangeUnion",
|
|
92
|
+
"parameterRangeElements": [
|
|
93
|
+
"xsd:string",
|
|
94
|
+
{
|
|
95
|
+
"@type": "ParameterRangeUndefined"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"default": "Query source hypermedia identification failed: none of the configured actors were able to identify ${action.url}",
|
|
100
|
+
"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}\""
|
|
101
|
+
},
|
|
80
102
|
{
|
|
81
103
|
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_beforeActors",
|
|
82
104
|
"range": {
|
|
@@ -90,15 +112,19 @@
|
|
|
90
112
|
"genericTypeInstances": [
|
|
91
113
|
{
|
|
92
114
|
"@type": "ParameterRangeGenericTypeReference",
|
|
93
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
115
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
94
116
|
},
|
|
95
117
|
{
|
|
96
118
|
"@type": "ParameterRangeGenericTypeReference",
|
|
97
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
119
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
98
120
|
},
|
|
99
121
|
{
|
|
100
122
|
"@type": "ParameterRangeGenericTypeReference",
|
|
101
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
123
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
127
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
102
128
|
}
|
|
103
129
|
]
|
|
104
130
|
}
|
|
@@ -163,6 +189,12 @@
|
|
|
163
189
|
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_bus"
|
|
164
190
|
}
|
|
165
191
|
},
|
|
192
|
+
{
|
|
193
|
+
"keyRaw": "busFailMessage",
|
|
194
|
+
"value": {
|
|
195
|
+
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_busFailMessage"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
166
198
|
{
|
|
167
199
|
"keyRaw": "beforeActors",
|
|
168
200
|
"value": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^4.0.0/components/context.jsonld"
|
|
4
4
|
],
|
|
5
5
|
"@id": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source",
|
|
6
6
|
"components": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^4.0.0/components/context.jsonld"
|
|
4
4
|
],
|
|
5
5
|
"@id": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source",
|
|
6
6
|
"@type": "Module",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"caqsihas": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source/^
|
|
6
|
+
"caqsihas": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source/^4.0.0/",
|
|
7
7
|
"ActorQuerySourceIdentifyHypermediaAnnotateSource": {
|
|
8
8
|
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource",
|
|
9
9
|
"@prefix": true,
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"args_bus": {
|
|
21
21
|
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_bus"
|
|
22
22
|
},
|
|
23
|
+
"args_busFailMessage": {
|
|
24
|
+
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_busFailMessage"
|
|
25
|
+
},
|
|
23
26
|
"args_beforeActors": {
|
|
24
27
|
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_beforeActors",
|
|
25
28
|
"@container": "@list"
|
|
@@ -36,6 +39,9 @@
|
|
|
36
39
|
"bus": {
|
|
37
40
|
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_bus"
|
|
38
41
|
},
|
|
42
|
+
"busFailMessage": {
|
|
43
|
+
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_busFailMessage"
|
|
44
|
+
},
|
|
39
45
|
"beforeActors": {
|
|
40
46
|
"@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource_args_beforeActors",
|
|
41
47
|
"@container": "@list"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';
|
|
2
2
|
import type { IActionQuerySourceIdentifyHypermedia, IActorQuerySourceIdentifyHypermediaOutput, IActorQuerySourceIdentifyHypermediaArgs, IActorQuerySourceIdentifyHypermediaTest, MediatorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';
|
|
3
3
|
import { ActorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';
|
|
4
|
+
import type { TestResult } from '@comunica/core';
|
|
4
5
|
import { ActionContextKey } from '@comunica/core';
|
|
5
6
|
/**
|
|
6
7
|
* A comunica None Query Source Identify Hypermedia Actor.
|
|
@@ -9,7 +10,7 @@ export declare class ActorQuerySourceIdentifyHypermediaAnnotateSource extends Ac
|
|
|
9
10
|
readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;
|
|
10
11
|
readonly mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;
|
|
11
12
|
constructor(args: IActorQuerySourceIdentifyHypermediaAnnotateSourceArgs);
|
|
12
|
-
testMetadata(action: IActionQuerySourceIdentifyHypermedia): Promise<IActorQuerySourceIdentifyHypermediaTest
|
|
13
|
+
testMetadata(action: IActionQuerySourceIdentifyHypermedia): Promise<TestResult<IActorQuerySourceIdentifyHypermediaTest>>;
|
|
13
14
|
run(action: IActionQuerySourceIdentifyHypermedia): Promise<IActorQuerySourceIdentifyHypermediaOutput>;
|
|
14
15
|
}
|
|
15
16
|
export interface IActorQuerySourceIdentifyHypermediaAnnotateSourceArgs extends IActorQuerySourceIdentifyHypermediaArgs {
|
|
@@ -15,7 +15,7 @@ class ActorQuerySourceIdentifyHypermediaAnnotateSource extends bus_query_source_
|
|
|
15
15
|
if (action.context.get(exports.KEY_CONTEXT_WRAPPED)) {
|
|
16
16
|
throw new Error('Unable to wrap query source multiple times');
|
|
17
17
|
}
|
|
18
|
-
return { filterFactor: Number.POSITIVE_INFINITY };
|
|
18
|
+
return (0, core_1.passTest)({ filterFactor: Number.POSITIVE_INFINITY });
|
|
19
19
|
}
|
|
20
20
|
async run(action) {
|
|
21
21
|
const context = action.context.set(exports.KEY_CONTEXT_WRAPPED, true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQuerySourceIdentifyHypermediaAnnotateSource.js","sourceRoot":"","sources":["ActorQuerySourceIdentifyHypermediaAnnotateSource.ts"],"names":[],"mappings":";;;AAQA,yGAAoG;
|
|
1
|
+
{"version":3,"file":"ActorQuerySourceIdentifyHypermediaAnnotateSource.js","sourceRoot":"","sources":["ActorQuerySourceIdentifyHypermediaAnnotateSource.ts"],"names":[],"mappings":";;;AAQA,yGAAoG;AAEpG,yCAA4D;AAC5D,uFAAoF;AAEpF;;GAEG;AACH,MAAa,gDAAiD,SAAQ,yEAAkC;IAItG,YAAmB,IAA2D;QAC5E,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,MAA4C;QAE5C,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,2BAAmB,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,IAAA,eAAQ,EAAC,EAAE,YAAY,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,MAA4C;QAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,2BAAmB,EAAE,IAAI,CAAC,CAAC;QAC9D,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAEzB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,qCAAqC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7F,OAAO,EAAE,MAAM,EAAE,IAAI,iEAA+B,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IAC1E,CAAC;CACF;AAxBD,4GAwBC;AAaY,QAAA,mBAAmB,GAAG,IAAI,uBAAgB,CACrD,0EAA0E,CAC3E,CAAC","sourcesContent":["import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentifyHypermedia,\n IActorQuerySourceIdentifyHypermediaOutput,\n IActorQuerySourceIdentifyHypermediaArgs,\n IActorQuerySourceIdentifyHypermediaTest,\n MediatorQuerySourceIdentifyHypermedia,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport { ActorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';\nimport type { TestResult } from '@comunica/core';\nimport { ActionContextKey, passTest } from '@comunica/core';\nimport { QuerySourceAddSourceAttribution } from './QuerySourceAddSourceAttribution';\n\n/**\n * A comunica None Query Source Identify Hypermedia Actor.\n */\nexport class ActorQuerySourceIdentifyHypermediaAnnotateSource extends ActorQuerySourceIdentifyHypermedia {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n\n public constructor(args: IActorQuerySourceIdentifyHypermediaAnnotateSourceArgs) {\n super(args, 'file');\n }\n\n public async testMetadata(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise<TestResult<IActorQuerySourceIdentifyHypermediaTest>> {\n if (action.context.get(KEY_CONTEXT_WRAPPED)) {\n throw new Error('Unable to wrap query source multiple times');\n }\n return passTest({ filterFactor: Number.POSITIVE_INFINITY });\n }\n\n public async run(action: IActionQuerySourceIdentifyHypermedia): Promise<IActorQuerySourceIdentifyHypermediaOutput> {\n const context = action.context.set(KEY_CONTEXT_WRAPPED, true);\n action.context = context;\n\n const { source, dataset } = await this.mediatorQuerySourceIdentifyHypermedia.mediate(action);\n return { source: new QuerySourceAddSourceAttribution(source), dataset };\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaAnnotateSourceArgs extends IActorQuerySourceIdentifyHypermediaArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * A mediator to create the wrapped query source\n */\n mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n}\n\nexport const KEY_CONTEXT_WRAPPED = new ActionContextKey<boolean>(\n '@comunica/actor-query-source-identify-hypermedia-annotate-source:wrapped',\n);\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QuerySourceAddSourceAttribution = void 0;
|
|
4
|
-
const bindings_factory_1 = require("@comunica/bindings-factory");
|
|
5
4
|
const context_entries_1 = require("@comunica/context-entries");
|
|
5
|
+
const utils_bindings_factory_1 = require("@comunica/utils-bindings-factory");
|
|
6
6
|
/**
|
|
7
7
|
* A IQuerySource wrapper that skolemizes outgoing quads and bindings.
|
|
8
8
|
*/
|
|
@@ -18,7 +18,7 @@ class QuerySourceAddSourceAttribution {
|
|
|
18
18
|
}
|
|
19
19
|
addSourceUrlToBindingContext(iterator) {
|
|
20
20
|
const ret = iterator.map((bindings) => {
|
|
21
|
-
if (bindings instanceof
|
|
21
|
+
if (bindings instanceof utils_bindings_factory_1.Bindings) {
|
|
22
22
|
bindings = bindings.setContextEntry(context_entries_1.KeysMergeBindingsContext.sourcesBinding, [this.innerSource.referenceValue]);
|
|
23
23
|
}
|
|
24
24
|
return bindings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuerySourceAddSourceAttribution.js","sourceRoot":"","sources":["QuerySourceAddSourceAttribution.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"QuerySourceAddSourceAttribution.js","sourceRoot":"","sources":["QuerySourceAddSourceAttribution.ts"],"names":[],"mappings":";;;AAAA,+DAAqE;AASrE,6EAA4D;AAK5D;;GAEG;AACH,MAAa,+BAA+B;IAM1C,YAAmB,WAAyB;QAC1C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAuB;QACnD,OAAO,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,aAAa,CAClB,SAA4B,EAC5B,OAAuB,EACvB,OAA0C;QAE1C,OAAO,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IACxG,CAAC;IAEM,4BAA4B,CAAC,QAAwB;QAC1D,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;YACpC,IAAI,QAAQ,YAAY,iCAAQ,EAAE,CAAC;gBACjC,QAAQ,GAAG,QAAQ,CAAC,eAAe,CACjC,0CAAwB,CAAC,cAAc,EACvC,CAAE,IAAI,CAAC,WAAW,CAAC,cAAc,CAAE,CACpC,CAAC;YACJ,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,SAAS,eAAe;YACtB,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,QAA0B,EAAE,EAAE;gBAC9D,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;gBACtC,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC;QACD,eAAe,EAAE,CAAC;QAElB,OAAO,GAAG,CAAC;IACb,CAAC;IAEM,YAAY,CAAC,SAAsB,EAAE,OAAuB;QACjE,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAEM,UAAU,CAAC,SAA4B,EAAE,OAAuB;QACrE,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAEM,SAAS,CAAC,SAAyB,EAAE,OAAuB;QACjE,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;IACzC,CAAC;IAEM,QAAQ;QACb,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC1C,CAAC;CACF;AA/DD,0EA+DC","sourcesContent":["import { KeysMergeBindingsContext } from '@comunica/context-entries';\nimport type {\n BindingsStream,\n FragmentSelectorShape,\n IActionContext,\n IQueryBindingsOptions,\n IQuerySource,\n MetadataBindings,\n} from '@comunica/types';\nimport { Bindings } from '@comunica/utils-bindings-factory';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A IQuerySource wrapper that skolemizes outgoing quads and bindings.\n */\nexport class QuerySourceAddSourceAttribution implements IQuerySource {\n /**\n * The query source to wrap over.\n */\n public readonly innerSource: IQuerySource;\n\n public constructor(innerSource: IQuerySource) {\n this.innerSource = innerSource;\n }\n\n public async getSelectorShape(context: IActionContext): Promise<FragmentSelectorShape> {\n return this.innerSource.getSelectorShape(context);\n }\n\n public queryBindings(\n operation: Algebra.Operation,\n context: IActionContext,\n options: IQueryBindingsOptions | undefined,\n ): BindingsStream {\n return this.addSourceUrlToBindingContext(this.innerSource.queryBindings(operation, context, options));\n }\n\n public addSourceUrlToBindingContext(iterator: BindingsStream): BindingsStream {\n const ret = iterator.map((bindings) => {\n if (bindings instanceof Bindings) {\n bindings = bindings.setContextEntry(\n KeysMergeBindingsContext.sourcesBinding,\n [ this.innerSource.referenceValue ],\n );\n }\n return bindings;\n });\n\n function inheritMetadata(): void {\n iterator.getProperty('metadata', (metadata: MetadataBindings) => {\n ret.setProperty('metadata', metadata);\n metadata.state.addInvalidateListener(inheritMetadata);\n });\n }\n inheritMetadata();\n\n return ret;\n }\n\n public queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise<boolean> {\n return this.innerSource.queryBoolean(operation, context);\n }\n\n public queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator<RDF.Quad> {\n return this.innerSource.queryQuads(operation, context);\n }\n\n public queryVoid(operation: Algebra.Update, context: IActionContext): Promise<void> {\n return this.innerSource.queryVoid(operation, context);\n }\n\n public get referenceValue(): string | RDF.Source {\n return this.innerSource.referenceValue;\n }\n\n public toString(): string {\n return `${this.innerSource.toString()}`;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-source-identify-hypermedia-annotate-source",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "A annotate-source query-source-identify-hypermedia actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"funding": {
|
|
8
|
+
"type": "opencollective",
|
|
9
|
+
"url": "https://opencollective.com/comunica-association"
|
|
10
|
+
},
|
|
7
11
|
"homepage": "https://comunica.dev/",
|
|
8
12
|
"repository": {
|
|
9
13
|
"type": "git",
|
|
@@ -37,15 +41,15 @@
|
|
|
37
41
|
"build:components": "componentsjs-generator"
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
40
|
-
"@comunica/bindings-
|
|
41
|
-
"@comunica/bus-
|
|
42
|
-
"@comunica/
|
|
43
|
-
"@comunica/
|
|
44
|
-
"@comunica/
|
|
45
|
-
"@comunica/
|
|
44
|
+
"@comunica/bus-merge-bindings-context": "^4.0.1",
|
|
45
|
+
"@comunica/bus-query-source-identify-hypermedia": "^4.0.1",
|
|
46
|
+
"@comunica/context-entries": "^4.0.1",
|
|
47
|
+
"@comunica/core": "^4.0.1",
|
|
48
|
+
"@comunica/types": "^4.0.1",
|
|
49
|
+
"@comunica/utils-bindings-factory": "^4.0.1",
|
|
46
50
|
"@rdfjs/types": "*",
|
|
47
51
|
"asynciterator": "^3.9.0",
|
|
48
|
-
"sparqlalgebrajs": "^4.3.
|
|
52
|
+
"sparqlalgebrajs": "^4.3.8"
|
|
49
53
|
},
|
|
50
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
|
|
51
55
|
}
|