@comunica/actor-query-operation-path-link 4.4.2-alpha.49.0 → 4.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/components/ActorQueryOperationPathLink.jsonld +0 -0
- package/components/components.jsonld +0 -0
- package/components/context.jsonld +0 -0
- package/lib/ActorQueryOperationPathLink.d.ts +1 -1
- package/lib/ActorQueryOperationPathLink.js +3 -3
- package/lib/ActorQueryOperationPathLink.js.map +1 -1
- package/lib/index.d.ts +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/package.json +7 -7
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActorAbstractPath } from '@comunica/actor-abstract-path';
|
|
2
2
|
import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
|
|
3
3
|
import type { IActionContext, IQueryOperationResult } from '@comunica/types';
|
|
4
|
-
import { Algebra } from '
|
|
4
|
+
import { Algebra } from 'sparqlalgebrajs';
|
|
5
5
|
/**
|
|
6
6
|
* A comunica Path Link Query Operation Actor.
|
|
7
7
|
*/
|
|
@@ -3,17 +3,17 @@ 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
5
|
const context_entries_1 = require("@comunica/context-entries");
|
|
6
|
-
const
|
|
6
|
+
const sparqlalgebrajs_1 = require("sparqlalgebrajs");
|
|
7
7
|
/**
|
|
8
8
|
* A comunica Path Link Query Operation Actor.
|
|
9
9
|
*/
|
|
10
10
|
class ActorQueryOperationPathLink extends actor_abstract_path_1.ActorAbstractPath {
|
|
11
11
|
constructor(args) {
|
|
12
|
-
super(args,
|
|
12
|
+
super(args, sparqlalgebrajs_1.Algebra.types.LINK);
|
|
13
13
|
}
|
|
14
14
|
async runOperation(operationOriginal, context) {
|
|
15
15
|
const dataFactory = context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
|
|
16
|
-
const algebraFactory = new
|
|
16
|
+
const algebraFactory = new sparqlalgebrajs_1.Factory(dataFactory);
|
|
17
17
|
const predicate = operationOriginal.predicate;
|
|
18
18
|
const operation = Object.assign(algebraFactory.createPattern(operationOriginal.subject, predicate.iri, operationOriginal.object, operationOriginal.graph), { metadata: predicate.metadata });
|
|
19
19
|
return this.mediatorQueryOperation.mediate({ operation, context });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationPathLink.js","sourceRoot":"","sources":["ActorQueryOperationPathLink.ts"],"names":[],"mappings":";;;AAAA,uEAAkE;AAElE,+DAA0D;AAE1D,
|
|
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/lib/index.d.ts
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
File without changes
|
package/lib/index.js.map
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-path-link",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "A path-link query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/actor-abstract-path": "4.
|
|
45
|
-
"@comunica/bus-query-operation": "4.
|
|
46
|
-
"@comunica/context-entries": "4.
|
|
47
|
-
"@comunica/types": "4.
|
|
48
|
-
"
|
|
44
|
+
"@comunica/actor-abstract-path": "^4.5.0",
|
|
45
|
+
"@comunica/bus-query-operation": "^4.5.0",
|
|
46
|
+
"@comunica/context-entries": "^4.5.0",
|
|
47
|
+
"@comunica/types": "^4.5.0",
|
|
48
|
+
"sparqlalgebrajs": "^5.0.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2bcd98c387a021fc5c08d375793c205ca3d1bf0d"
|
|
51
51
|
}
|