@comunica/actor-query-operation-path-inv 1.22.0 → 2.0.1-alpha.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright © 2017–2018 Ruben Taelman, Joachim Van Herwegen
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-path-inv/^1.0.0/components/context.jsonld"
25
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-inv/^2.0.0/components/context.jsonld"
26
26
  ],
27
27
  "actors": [
28
28
  ...
29
29
  {
30
- "@id": "config-sets:sparql-queryoperator-path.json#myInvPathOperator",
30
+ "@id": "urn:comunica:default:query-operation/actors#path-inv",
31
31
  "@type": "ActorQueryOperationPathInv",
32
- "cbqo:mediatorQueryOperation": { "@id": "config-sets:sparql-queryoperators.json#mediatorQueryOperation" }
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
- * `cbqo:mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
40
+ * `mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
@@ -0,0 +1,146 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-inv/^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
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-path/^2.0.0/components/context.jsonld"
7
+ ],
8
+ "@id": "npmd:@comunica/actor-query-operation-path-inv",
9
+ "components": [
10
+ {
11
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv",
12
+ "@type": "Class",
13
+ "requireElement": "ActorQueryOperationPathInv",
14
+ "extends": [
15
+ "caap:components/ActorAbstractPath.jsonld#ActorAbstractPath"
16
+ ],
17
+ "comment": "A comunica Path Inv Query Operation Actor.",
18
+ "parameters": [
19
+ {
20
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_mediatorQueryOperation",
21
+ "range": "cc:components/Mediator.jsonld#Mediator"
22
+ },
23
+ {
24
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_name",
25
+ "range": "xsd:string",
26
+ "default": {
27
+ "@id": "rdf:subject"
28
+ },
29
+ "comment": "The name for this actor."
30
+ },
31
+ {
32
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_bus",
33
+ "range": {
34
+ "@type": "ParameterRangeGenericComponent",
35
+ "component": "cc:components/Bus.jsonld#Bus",
36
+ "genericTypeInstances": [
37
+ {
38
+ "@type": "ParameterRangeGenericComponent",
39
+ "component": "cc:components/Actor.jsonld#Actor",
40
+ "genericTypeInstances": [
41
+ {
42
+ "@type": "ParameterRangeGenericTypeReference",
43
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
44
+ },
45
+ {
46
+ "@type": "ParameterRangeGenericTypeReference",
47
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
48
+ },
49
+ {
50
+ "@type": "ParameterRangeGenericTypeReference",
51
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "@type": "ParameterRangeGenericTypeReference",
57
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
58
+ },
59
+ {
60
+ "@type": "ParameterRangeGenericTypeReference",
61
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
62
+ },
63
+ {
64
+ "@type": "ParameterRangeGenericTypeReference",
65
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
66
+ }
67
+ ]
68
+ },
69
+ "default": {
70
+ "@id": "cbqo:components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus",
71
+ "@type": "cc:components/Bus.jsonld#Bus"
72
+ },
73
+ "comment": "The bus this actor subscribes to."
74
+ },
75
+ {
76
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_beforeActors",
77
+ "range": {
78
+ "@type": "ParameterRangeUnion",
79
+ "parameterRangeElements": [
80
+ {
81
+ "@type": "ParameterRangeArray",
82
+ "parameterRangeValue": {
83
+ "@type": "ParameterRangeGenericComponent",
84
+ "component": "cc:components/Actor.jsonld#Actor",
85
+ "genericTypeInstances": [
86
+ {
87
+ "@type": "ParameterRangeGenericTypeReference",
88
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
89
+ },
90
+ {
91
+ "@type": "ParameterRangeGenericTypeReference",
92
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
93
+ },
94
+ {
95
+ "@type": "ParameterRangeGenericTypeReference",
96
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
97
+ }
98
+ ]
99
+ }
100
+ },
101
+ {
102
+ "@type": "ParameterRangeUndefined"
103
+ }
104
+ ]
105
+ },
106
+ "comment": "Actor that must be registered in the bus before this actor."
107
+ }
108
+ ],
109
+ "memberKeys": [
110
+ "constructor",
111
+ "runOperation"
112
+ ],
113
+ "constructorArguments": [
114
+ {
115
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args__constructorArgument",
116
+ "fields": [
117
+ {
118
+ "keyRaw": "mediatorQueryOperation",
119
+ "value": {
120
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_mediatorQueryOperation"
121
+ }
122
+ },
123
+ {
124
+ "keyRaw": "name",
125
+ "value": {
126
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_name"
127
+ }
128
+ },
129
+ {
130
+ "keyRaw": "bus",
131
+ "value": {
132
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_bus"
133
+ }
134
+ },
135
+ {
136
+ "keyRaw": "beforeActors",
137
+ "value": {
138
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_beforeActors"
139
+ }
140
+ }
141
+ ]
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ }
@@ -1,9 +1,11 @@
1
1
  {
2
- "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-inv/^1.0.0/components/context.jsonld",
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-inv/^2.0.0/components/context.jsonld"
4
+ ],
3
5
  "@id": "npmd:@comunica/actor-query-operation-path-inv",
4
6
  "@type": "Module",
5
7
  "requireName": "@comunica/actor-query-operation-path-inv",
6
8
  "import": [
7
- "files-caqopi:components/Actor/QueryOperation/PathInv.jsonld"
9
+ "caqopi:components/ActorQueryOperationPathInv.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
- "caqopi": "npmd:@comunica/actor-query-operation-path-inv/",
7
- "files-caqopi": "caqopi:^1.0.0/",
8
-
9
- "ActorQueryOperationPathInv": "caqopi:Actor/QueryOperation/PathInv"
6
+ "caqopi": "npmd:@comunica/actor-query-operation-path-inv/^2.0.0/",
7
+ "ActorQueryOperationPathInv": {
8
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv",
9
+ "@prefix": true,
10
+ "@context": {
11
+ "args_mediatorQueryOperation": {
12
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_mediatorQueryOperation"
13
+ },
14
+ "args_name": {
15
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_name"
16
+ },
17
+ "args_bus": {
18
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_bus"
19
+ },
20
+ "args_beforeActors": {
21
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_beforeActors",
22
+ "@container": "@list"
23
+ },
24
+ "mediatorQueryOperation": {
25
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_mediatorQueryOperation"
26
+ },
27
+ "name": {
28
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_name"
29
+ },
30
+ "bus": {
31
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_bus"
32
+ },
33
+ "beforeActors": {
34
+ "@id": "caqopi:components/ActorQueryOperationPathInv.jsonld#ActorQueryOperationPathInv_args_beforeActors",
35
+ "@container": "@list"
36
+ }
37
+ }
38
+ }
10
39
  }
11
40
  ]
12
- }
41
+ }
@@ -1,12 +1,11 @@
1
1
  import { ActorAbstractPath } from '@comunica/actor-abstract-path';
2
2
  import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
3
- import type { ActionContext } from '@comunica/core';
4
- import type { IActorQueryOperationOutput } from '@comunica/types';
3
+ import type { IActionContext, IQueryOperationResult } from '@comunica/types';
5
4
  import { Algebra } from 'sparqlalgebrajs';
6
5
  /**
7
6
  * A comunica Path Inv Query Operation Actor.
8
7
  */
9
8
  export declare class ActorQueryOperationPathInv extends ActorAbstractPath {
10
9
  constructor(args: IActorQueryOperationTypedMediatedArgs);
11
- runOperation(path: Algebra.Path, context: ActionContext): Promise<IActorQueryOperationOutput>;
10
+ runOperation(operation: Algebra.Path, context: IActionContext): Promise<IQueryOperationResult>;
12
11
  }
@@ -10,9 +10,10 @@ class ActorQueryOperationPathInv extends actor_abstract_path_1.ActorAbstractPath
10
10
  constructor(args) {
11
11
  super(args, sparqlalgebrajs_1.Algebra.types.INV);
12
12
  }
13
- async runOperation(path, context) {
14
- const predicate = path.predicate;
15
- const invPath = actor_abstract_path_1.ActorAbstractPath.FACTORY.createPath(path.object, predicate.path, path.subject, path.graph);
13
+ async runOperation(operation, context) {
14
+ const predicate = operation.predicate;
15
+ const invPath = actor_abstract_path_1.ActorAbstractPath.FACTORY
16
+ .createPath(operation.object, predicate.path, operation.subject, operation.graph);
16
17
  return this.mediatorQueryOperation.mediate({ operation: invPath, context });
17
18
  }
18
19
  }
package/lib/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './ActorQueryOperationPathInv';
@@ -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("./lib/ActorQueryOperationPathInv"), exports);
13
+ __exportStar(require("./ActorQueryOperationPathInv"), exports);
14
14
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@comunica/actor-query-operation-path-inv",
3
- "version": "1.22.0",
3
+ "version": "2.0.1-alpha.8.0",
4
4
  "description": "A path-inv 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,44 +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
- "peerDependencies": {
35
- "@comunica/bus-query-operation": "^1.2.0",
36
- "@comunica/core": "^1.2.0"
37
- },
38
33
  "dependencies": {
39
- "@comunica/actor-abstract-path": "^1.22.0",
40
- "@comunica/types": "^1.22.0"
41
- },
42
- "devDependencies": {
43
- "@comunica/bus-query-operation": "^1.22.0",
44
- "@comunica/core": "^1.22.0",
45
- "sparqlalgebrajs": "^3.0.0"
46
- },
47
- "jest": {
48
- "globals": {
49
- "ts-jest": {
50
- "tsConfig": "../../tsconfig.json"
51
- }
52
- },
53
- "transform": {
54
- "^.+\\.ts$": "ts-jest"
55
- },
56
- "testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
57
- "moduleFileExtensions": [
58
- "ts",
59
- "js"
60
- ],
61
- "collectCoverage": true
34
+ "@comunica/actor-abstract-path": "2.0.1-alpha.8.0",
35
+ "@comunica/bus-query-operation": "2.0.1-alpha.8.0",
36
+ "@comunica/core": "2.0.1-alpha.8.0",
37
+ "@comunica/types": "2.0.1-alpha.8.0",
38
+ "sparqlalgebrajs": "^4.0.0"
62
39
  },
63
40
  "scripts": {
64
- "test": "node \"../../node_modules/jest/bin/jest.js\" ${1}",
65
- "test-watch": "node \"../../node_modules/jest/bin/jest.js\" ${1} --watch",
66
- "build": "node \"../../node_modules/typescript/bin/tsc\"",
67
- "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"
68
44
  },
69
- "gitHead": "0a249ba341022eb2f1b9922fcf549a9564671d9f"
45
+ "gitHead": "aaf5b7bb8d67de3364618454ed2976fd08052b61"
70
46
  }
@@ -1,22 +0,0 @@
1
- {
2
- "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-path-inv/^1.0.0/components/context.jsonld",
4
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^1.0.0/components/context.jsonld",
5
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-path/^1.0.0/components/context.jsonld"
6
- ],
7
- "@id": "npmd:@comunica/actor-query-operation-path-inv",
8
- "components": [
9
- {
10
- "@id": "caqopi:Actor/QueryOperation/PathInv",
11
- "@type": "Class",
12
- "extends": "caap:Actor/AbstractPath",
13
- "requireElement": "ActorQueryOperationPathInv",
14
- "comment": "A comunica Path Inv Query Operation Actor.",
15
- "constructorArguments": [
16
- {
17
- "extends": "cbqo:Actor/QueryOperationTypedMediated/constructorArgumentsObject"
18
- }
19
- ]
20
- }
21
- ]
22
- }
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './lib/ActorQueryOperationPathInv';