@comunica/actor-query-operation-path-link 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/README.md CHANGED
@@ -22,7 +22,7 @@ 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-path-link/^3.0.0/components/context.jsonld"
25
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-link/^4.0.0/components/context.jsonld"
26
26
  ],
27
27
  "actors": [
28
28
  ...
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-link/^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-query-operation/^3.0.0/components/context.jsonld",
6
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-path/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-link/^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-operation/^4.0.0/components/context.jsonld",
6
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-path/^4.0.0/components/context.jsonld"
7
7
  ],
8
8
  "@id": "npmd:@comunica/actor-query-operation-path-link",
9
9
  "components": [
@@ -40,29 +40,37 @@
40
40
  "genericTypeInstances": [
41
41
  {
42
42
  "@type": "ParameterRangeGenericTypeReference",
43
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
43
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
44
44
  },
45
45
  {
46
46
  "@type": "ParameterRangeGenericTypeReference",
47
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
47
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
48
48
  },
49
49
  {
50
50
  "@type": "ParameterRangeGenericTypeReference",
51
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
51
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
52
+ },
53
+ {
54
+ "@type": "ParameterRangeGenericTypeReference",
55
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
52
56
  }
53
57
  ]
54
58
  },
55
59
  {
56
60
  "@type": "ParameterRangeGenericTypeReference",
57
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
61
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
62
+ },
63
+ {
64
+ "@type": "ParameterRangeGenericTypeReference",
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
58
66
  },
59
67
  {
60
68
  "@type": "ParameterRangeGenericTypeReference",
61
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
69
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
62
70
  },
63
71
  {
64
72
  "@type": "ParameterRangeGenericTypeReference",
65
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
73
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
66
74
  }
67
75
  ]
68
76
  },
@@ -72,6 +80,20 @@
72
80
  },
73
81
  "comment": "The bus this actor subscribes to."
74
82
  },
83
+ {
84
+ "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_busFailMessage",
85
+ "range": {
86
+ "@type": "ParameterRangeUnion",
87
+ "parameterRangeElements": [
88
+ "xsd:string",
89
+ {
90
+ "@type": "ParameterRangeUndefined"
91
+ }
92
+ ]
93
+ },
94
+ "default": "Query operation processing failed: none of the configured actors were able to handle the operation type ${action.operation.type}",
95
+ "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}\""
96
+ },
75
97
  {
76
98
  "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_beforeActors",
77
99
  "range": {
@@ -85,15 +107,19 @@
85
107
  "genericTypeInstances": [
86
108
  {
87
109
  "@type": "ParameterRangeGenericTypeReference",
88
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
110
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
89
111
  },
90
112
  {
91
113
  "@type": "ParameterRangeGenericTypeReference",
92
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
114
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
93
115
  },
94
116
  {
95
117
  "@type": "ParameterRangeGenericTypeReference",
96
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^3.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
118
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
119
+ },
120
+ {
121
+ "@type": "ParameterRangeGenericTypeReference",
122
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
97
123
  }
98
124
  ]
99
125
  }
@@ -138,6 +164,12 @@
138
164
  "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_bus"
139
165
  }
140
166
  },
167
+ {
168
+ "keyRaw": "busFailMessage",
169
+ "value": {
170
+ "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_busFailMessage"
171
+ }
172
+ },
141
173
  {
142
174
  "keyRaw": "beforeActors",
143
175
  "value": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-link/^3.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-link/^4.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-query-operation-path-link",
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
- "caqopl": "npmd:@comunica/actor-query-operation-path-link/^3.0.0/",
6
+ "caqopl": "npmd:@comunica/actor-query-operation-path-link/^4.0.0/",
7
7
  "ActorQueryOperationPathLink": {
8
8
  "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink",
9
9
  "@prefix": true,
@@ -17,6 +17,9 @@
17
17
  "args_bus": {
18
18
  "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_bus"
19
19
  },
20
+ "args_busFailMessage": {
21
+ "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_busFailMessage"
22
+ },
20
23
  "args_beforeActors": {
21
24
  "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_beforeActors",
22
25
  "@container": "@list"
@@ -30,6 +33,9 @@
30
33
  "bus": {
31
34
  "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_bus"
32
35
  },
36
+ "busFailMessage": {
37
+ "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_busFailMessage"
38
+ },
33
39
  "beforeActors": {
34
40
  "@id": "caqopl:components/ActorQueryOperationPathLink.jsonld#ActorQueryOperationPathLink_args_beforeActors",
35
41
  "@container": "@list"
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActorQueryOperationPathLink = void 0;
4
4
  const actor_abstract_path_1 = require("@comunica/actor-abstract-path");
5
+ const context_entries_1 = require("@comunica/context-entries");
5
6
  const sparqlalgebrajs_1 = require("sparqlalgebrajs");
6
7
  /**
7
8
  * A comunica Path Link Query Operation Actor.
@@ -11,8 +12,10 @@ class ActorQueryOperationPathLink extends actor_abstract_path_1.ActorAbstractPat
11
12
  super(args, sparqlalgebrajs_1.Algebra.types.LINK);
12
13
  }
13
14
  async runOperation(operationOriginal, context) {
15
+ const dataFactory = context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
16
+ const algebraFactory = new sparqlalgebrajs_1.Factory(dataFactory);
14
17
  const predicate = operationOriginal.predicate;
15
- const operation = Object.assign(actor_abstract_path_1.ActorAbstractPath.FACTORY.createPattern(operationOriginal.subject, predicate.iri, operationOriginal.object, operationOriginal.graph), { metadata: predicate.metadata });
18
+ const operation = Object.assign(algebraFactory.createPattern(operationOriginal.subject, predicate.iri, operationOriginal.object, operationOriginal.graph), { metadata: predicate.metadata });
16
19
  return this.mediatorQueryOperation.mediate({ operation, context });
17
20
  }
18
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ActorQueryOperationPathLink.js","sourceRoot":"","sources":["ActorQueryOperationPathLink.ts"],"names":[],"mappings":";;;AAAA,uEAAkE;AAGlE,qDAA0C;AAE1C;;GAEG;AACH,MAAa,2BAA4B,SAAQ,uCAAiB;IAChE,YAAmB,IAA2C;QAC5D,KAAK,CAAC,IAAI,EAAE,yBAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,iBAA+B,EAC/B,OAAuB;QAEvB,MAAM,SAAS,GAAkB,iBAAiB,CAAC,SAAS,CAAC;QAC7D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,uCAAiB,CAAC,OAAO,CAAC,aAAa,CACrE,iBAAiB,CAAC,OAAO,EACzB,SAAS,CAAC,GAAG,EACb,iBAAiB,CAAC,MAAM,EACxB,iBAAiB,CAAC,KAAK,CACxB,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AAlBD,kEAkBC","sourcesContent":["import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Link Query Operation Actor.\n */\nexport class ActorQueryOperationPathLink extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.LINK);\n }\n\n public async runOperation(\n operationOriginal: Algebra.Path,\n context: IActionContext,\n ): Promise<IQueryOperationResult> {\n const predicate = <Algebra.Link> operationOriginal.predicate;\n const operation = Object.assign(ActorAbstractPath.FACTORY.createPattern(\n operationOriginal.subject,\n predicate.iri,\n operationOriginal.object,\n operationOriginal.graph,\n ), { metadata: predicate.metadata });\n return this.mediatorQueryOperation.mediate({ operation, context });\n }\n}\n"]}
1
+ {"version":3,"file":"ActorQueryOperationPathLink.js","sourceRoot":"","sources":["ActorQueryOperationPathLink.ts"],"names":[],"mappings":";;;AAAA,uEAAkE;AAElE,+DAA0D;AAE1D,qDAAmD;AAEnD;;GAEG;AACH,MAAa,2BAA4B,SAAQ,uCAAiB;IAChE,YAAmB,IAA2C;QAC5D,KAAK,CAAC,IAAI,EAAE,yBAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,iBAA+B,EAC/B,OAAuB;QAEvB,MAAM,WAAW,GAAwB,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QACpF,MAAM,cAAc,GAAG,IAAI,yBAAO,CAAC,WAAW,CAAC,CAAC;QAEhD,MAAM,SAAS,GAAkB,iBAAiB,CAAC,SAAS,CAAC;QAC7D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAC1D,iBAAiB,CAAC,OAAO,EACzB,SAAS,CAAC,GAAG,EACb,iBAAiB,CAAC,MAAM,EACxB,iBAAiB,CAAC,KAAK,CACxB,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AArBD,kEAqBC","sourcesContent":["import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { ComunicaDataFactory, IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Link Query Operation Actor.\n */\nexport class ActorQueryOperationPathLink extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.LINK);\n }\n\n public async runOperation(\n operationOriginal: Algebra.Path,\n context: IActionContext,\n ): Promise<IQueryOperationResult> {\n const dataFactory: ComunicaDataFactory = context.getSafe(KeysInitQuery.dataFactory);\n const algebraFactory = new Factory(dataFactory);\n\n const predicate = <Algebra.Link> operationOriginal.predicate;\n const operation = Object.assign(algebraFactory.createPattern(\n operationOriginal.subject,\n predicate.iri,\n operationOriginal.object,\n operationOriginal.graph,\n ), { metadata: predicate.metadata });\n return this.mediatorQueryOperation.mediate({ operation, context });\n }\n}\n"]}
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@comunica/actor-query-operation-path-link",
3
- "version": "3.3.0",
3
+ "version": "4.0.1",
4
4
  "description": "A path-link query-operation 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,10 +41,11 @@
37
41
  "build:components": "componentsjs-generator"
38
42
  },
39
43
  "dependencies": {
40
- "@comunica/actor-abstract-path": "^3.3.0",
41
- "@comunica/bus-query-operation": "^3.3.0",
42
- "@comunica/types": "^3.3.0",
43
- "sparqlalgebrajs": "^4.3.7"
44
+ "@comunica/actor-abstract-path": "^4.0.1",
45
+ "@comunica/bus-query-operation": "^4.0.1",
46
+ "@comunica/context-entries": "^4.0.1",
47
+ "@comunica/types": "^4.0.1",
48
+ "sparqlalgebrajs": "^4.3.8"
44
49
  },
45
- "gitHead": "02bde397d206f1f5a523643a6a604c89e792e2f9"
50
+ "gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
46
51
  }