@comunica/actor-rdf-join-wrap-stream 4.5.0 → 5.0.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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-wrap-stream/^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-rdf-join/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-wrap-stream/^5.0.0/components/context.jsonld",
4
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^5.0.0/components/context.jsonld",
5
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^5.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/actor-rdf-join-wrap-stream",
8
8
  "components": [
@@ -49,37 +49,37 @@
49
49
  "genericTypeInstances": [
50
50
  {
51
51
  "@type": "ParameterRangeGenericTypeReference",
52
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
52
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
53
53
  },
54
54
  {
55
55
  "@type": "ParameterRangeGenericTypeReference",
56
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
56
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
57
57
  },
58
58
  {
59
59
  "@type": "ParameterRangeGenericTypeReference",
60
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
60
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
61
61
  },
62
62
  {
63
63
  "@type": "ParameterRangeGenericTypeReference",
64
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
64
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
65
65
  }
66
66
  ]
67
67
  },
68
68
  {
69
69
  "@type": "ParameterRangeGenericTypeReference",
70
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
70
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
71
71
  },
72
72
  {
73
73
  "@type": "ParameterRangeGenericTypeReference",
74
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
74
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
75
75
  },
76
76
  {
77
77
  "@type": "ParameterRangeGenericTypeReference",
78
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
78
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
79
79
  },
80
80
  {
81
81
  "@type": "ParameterRangeGenericTypeReference",
82
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
82
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
83
83
  }
84
84
  ]
85
85
  },
@@ -116,19 +116,19 @@
116
116
  "genericTypeInstances": [
117
117
  {
118
118
  "@type": "ParameterRangeGenericTypeReference",
119
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
119
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
120
120
  },
121
121
  {
122
122
  "@type": "ParameterRangeGenericTypeReference",
123
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
123
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
124
124
  },
125
125
  {
126
126
  "@type": "ParameterRangeGenericTypeReference",
127
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
127
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
128
128
  },
129
129
  {
130
130
  "@type": "ParameterRangeGenericTypeReference",
131
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
131
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
132
132
  }
133
133
  ]
134
134
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-wrap-stream/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-wrap-stream/^5.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-rdf-join-wrap-stream",
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
- "carjws": "npmd:@comunica/actor-rdf-join-wrap-stream/^4.0.0/",
6
+ "carjws": "npmd:@comunica/actor-rdf-join-wrap-stream/^5.0.0/",
7
7
  "ActorRdfJoinWrapStream": {
8
8
  "@id": "carjws:components/ActorRdfJoinWrapStream.jsonld#ActorRdfJoinWrapStream",
9
9
  "@prefix": true,
File without changes
@@ -7,6 +7,8 @@ const core_1 = require("@comunica/core");
7
7
  * A comunica Wrap Stream RDF Join Actor.
8
8
  */
9
9
  class ActorRdfJoinWrapStream extends bus_rdf_join_1.ActorRdfJoin {
10
+ mediatorJoin;
11
+ mediatorIteratorTransform;
10
12
  constructor(args) {
11
13
  super(args, {
12
14
  logicalType: 'inner',
@@ -16,6 +18,8 @@ class ActorRdfJoinWrapStream extends bus_rdf_join_1.ActorRdfJoin {
16
18
  canHandleUndefs: true,
17
19
  isLeaf: false,
18
20
  });
21
+ this.mediatorJoin = args.mediatorJoin;
22
+ this.mediatorIteratorTransform = args.mediatorIteratorTransform;
19
23
  }
20
24
  async test(action) {
21
25
  if (action.context.get(exports.KEY_CONTEXT_WRAPPED_RDF_JOIN) === action.entries) {
@@ -1 +1 @@
1
- {"version":3,"file":"ActorRdfJoinWrapStream.js","sourceRoot":"","sources":["ActorRdfJoinWrapStream.ts"],"names":[],"mappings":";;;AAQA,yDAAsD;AAEtD,yCAAkF;AAMlF;;GAEG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IAItD,YAAmB,IAAiC;QAClD,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,aAAa;YAC3B,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;IACL,CAAC;IAEe,KAAK,CAAC,IAAI,CAAC,MAAsB;QAE/C,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oCAA4B,CAAC,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC;YACxE,OAAO,IAAA,eAAQ,EAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,2BAAY,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClE,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAC/D,CAAC;IAEe,KAAK,CAAC,SAAS,CAAC,MAAsB;QACpD,2FAA2F;QAC3F,mDAAmD;QACnD,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAChE,MAAM,MAAM,GAAkC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEtF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,yBAAyB,CAAC,OAAO,CACxE;YACE,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,SAAS,EAAE,MAAM,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM,CAAC,cAAc;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,cAAc,EAAE,MAAM;SACvB,CACF,CAAC,CAAC;QAEH,MAAM,CAAC,cAAc,GAAiC,MAAM,CAAC;QAC7D,MAAM,CAAC,QAAQ,GAAqC,QAAQ,CAAC;QAE7D,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,OAAuB,EACvB,QAAmC;QAEnC,OAAO,IAAA,2BAAoB,EAAC;YAC1B,UAAU,EAAE,CAAC,CAAC;YACd,cAAc,EAAE,CAAC,CAAC;YAClB,aAAa,EAAE,CAAC,CAAC;YACjB,WAAW,EAAE,CAAC,CAAC;SAChB,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,iBAAiB,CAAC,MAAsB,EAAE,OAAuB;QACtE,OAAO,OAAO,CAAC,GAAG,CAAC,oCAA4B,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACnE,CAAC;CACF;AArED,wDAqEC;AAaD;;GAEG;AACU,QAAA,4BAA4B,GAAG,IAAI,uBAAgB,CAC9D,kCAAkC,CACnC,CAAC","sourcesContent":["import type { MediatorIteratorTransform } from '@comunica/bus-iterator-transform';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\n IActorRdfJoinTestSideData }\n from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { TestResult } from '@comunica/core';\nimport { ActionContextKey, failTest, passTestWithSideData } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { IActionContext, IJoinEntry, IQueryOperationResultBindings, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\n\n/**\n * A comunica Wrap Stream RDF Join Actor.\n */\nexport class ActorRdfJoinWrapStream extends ActorRdfJoin {\n public readonly mediatorJoin: MediatorRdfJoin;\n public readonly mediatorIteratorTransform: MediatorIteratorTransform;\n\n public constructor(args: IActorRdfJoinWrapStreamArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'wrap-stream',\n limitEntries: 0,\n limitEntriesMin: true,\n canHandleUndefs: true,\n isLeaf: false,\n });\n }\n\n public override async test(action: IActionRdfJoin):\n Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n if (action.context.get(KEY_CONTEXT_WRAPPED_RDF_JOIN) === action.entries) {\n return failTest('Unable to wrap join operation multiple times');\n }\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n return await this.getJoinCoefficients(action, { metadatas });\n }\n\n public override async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n // Prevent infinite recursion. In consequent query operation calls this key is set to false\n // To allow the operation to wrap ALL rdf-join runs\n action.context = this.setContextWrapped(action, action.context);\n const result: IQueryOperationResultBindings = await this.mediatorJoin.mediate(action);\n\n const { stream, metadata } = (await this.mediatorIteratorTransform.mediate(\n {\n type: result.type,\n operation: action.type,\n stream: result.bindingsStream,\n metadata: result.metadata,\n context: action.context,\n originalAction: action,\n },\n ));\n\n result.bindingsStream = <AsyncIterator<RDF.Bindings>> stream;\n result.metadata = <() => Promise<MetadataBindings>> metadata;\n\n return { result };\n }\n\n protected async getJoinCoefficients(\n _action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n return passTestWithSideData({\n iterations: -1,\n persistedItems: -1,\n blockingItems: -1,\n requestTime: -1,\n }, sideData);\n }\n\n /**\n * Sets KEY_CONTEXT_WRAPPED_RDF_JOIN key in the context to the entries being joined.\n * @param action The join action being executed\n * @param context The ActionContext\n * @returns The updated ActionContext\n */\n public setContextWrapped(action: IActionRdfJoin, context: IActionContext): IActionContext {\n return context.set(KEY_CONTEXT_WRAPPED_RDF_JOIN, action.entries);\n }\n}\n\nexport interface IActorRdfJoinWrapStreamArgs extends IActorRdfJoinArgs {\n /**\n * Mediator that runs all transforms defined by user over the output stream of the query operation\n */\n mediatorIteratorTransform: MediatorIteratorTransform;\n /**\n * Mediator that calls next join to be wrapped\n */\n mediatorJoin: MediatorRdfJoin;\n}\n\n/**\n * Key that shows if the query operation has already been wrapped by a process iterator call\n */\nexport const KEY_CONTEXT_WRAPPED_RDF_JOIN = new ActionContextKey<IJoinEntry[]>(\n '@comunica/actor-rdf-join:wrapped',\n);\n"]}
1
+ {"version":3,"file":"ActorRdfJoinWrapStream.js","sourceRoot":"","sources":["ActorRdfJoinWrapStream.ts"],"names":[],"mappings":";;;AAQA,yDAAsD;AAEtD,yCAAkF;AAMlF;;GAEG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IACtC,YAAY,CAAkB;IAC9B,yBAAyB,CAA4B;IAErE,YAAmB,IAAiC;QAClD,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,OAAO;YACpB,YAAY,EAAE,aAAa;YAC3B,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,CAAC;IAClE,CAAC;IAEe,KAAK,CAAC,IAAI,CAAC,MAAsB;QAE/C,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oCAA4B,CAAC,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC;YACxE,OAAO,IAAA,eAAQ,EAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,2BAAY,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClE,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAC/D,CAAC;IAEe,KAAK,CAAC,SAAS,CAAC,MAAsB;QACpD,2FAA2F;QAC3F,mDAAmD;QACnD,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAChE,MAAM,MAAM,GAAkC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEtF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,yBAAyB,CAAC,OAAO,CACxE;YACE,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,SAAS,EAAE,MAAM,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM,CAAC,cAAc;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,cAAc,EAAE,MAAM;SACvB,CACF,CAAC,CAAC;QAEH,MAAM,CAAC,cAAc,GAAiC,MAAM,CAAC;QAC7D,MAAM,CAAC,QAAQ,GAAqC,QAAQ,CAAC;QAE7D,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,OAAuB,EACvB,QAAmC;QAEnC,OAAO,IAAA,2BAAoB,EAAC;YAC1B,UAAU,EAAE,CAAC,CAAC;YACd,cAAc,EAAE,CAAC,CAAC;YAClB,aAAa,EAAE,CAAC,CAAC;YACjB,WAAW,EAAE,CAAC,CAAC;SAChB,EAAE,QAAQ,CAAC,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,iBAAiB,CAAC,MAAsB,EAAE,OAAuB;QACtE,OAAO,OAAO,CAAC,GAAG,CAAC,oCAA4B,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACnE,CAAC;CACF;AAvED,wDAuEC;AAaD;;GAEG;AACU,QAAA,4BAA4B,GAAG,IAAI,uBAAgB,CAC9D,kCAAkC,CACnC,CAAC","sourcesContent":["import type { MediatorIteratorTransform } from '@comunica/bus-iterator-transform';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\n IActorRdfJoinTestSideData }\n from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { TestResult } from '@comunica/core';\nimport { ActionContextKey, failTest, passTestWithSideData } from '@comunica/core';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { IActionContext, IJoinEntry, IQueryOperationResultBindings, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\n\n/**\n * A comunica Wrap Stream RDF Join Actor.\n */\nexport class ActorRdfJoinWrapStream extends ActorRdfJoin {\n public readonly mediatorJoin: MediatorRdfJoin;\n public readonly mediatorIteratorTransform: MediatorIteratorTransform;\n\n public constructor(args: IActorRdfJoinWrapStreamArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'wrap-stream',\n limitEntries: 0,\n limitEntriesMin: true,\n canHandleUndefs: true,\n isLeaf: false,\n });\n this.mediatorJoin = args.mediatorJoin;\n this.mediatorIteratorTransform = args.mediatorIteratorTransform;\n }\n\n public override async test(action: IActionRdfJoin):\n Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n if (action.context.get(KEY_CONTEXT_WRAPPED_RDF_JOIN) === action.entries) {\n return failTest('Unable to wrap join operation multiple times');\n }\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n return await this.getJoinCoefficients(action, { metadatas });\n }\n\n public override async getOutput(action: IActionRdfJoin): Promise<IActorRdfJoinOutputInner> {\n // Prevent infinite recursion. In consequent query operation calls this key is set to false\n // To allow the operation to wrap ALL rdf-join runs\n action.context = this.setContextWrapped(action, action.context);\n const result: IQueryOperationResultBindings = await this.mediatorJoin.mediate(action);\n\n const { stream, metadata } = (await this.mediatorIteratorTransform.mediate(\n {\n type: result.type,\n operation: action.type,\n stream: result.bindingsStream,\n metadata: result.metadata,\n context: action.context,\n originalAction: action,\n },\n ));\n\n result.bindingsStream = <AsyncIterator<RDF.Bindings>> stream;\n result.metadata = <() => Promise<MetadataBindings>> metadata;\n\n return { result };\n }\n\n protected async getJoinCoefficients(\n _action: IActionRdfJoin,\n sideData: IActorRdfJoinTestSideData,\n ): Promise<TestResult<IMediatorTypeJoinCoefficients, IActorRdfJoinTestSideData>> {\n return passTestWithSideData({\n iterations: -1,\n persistedItems: -1,\n blockingItems: -1,\n requestTime: -1,\n }, sideData);\n }\n\n /**\n * Sets KEY_CONTEXT_WRAPPED_RDF_JOIN key in the context to the entries being joined.\n * @param action The join action being executed\n * @param context The ActionContext\n * @returns The updated ActionContext\n */\n public setContextWrapped(action: IActionRdfJoin, context: IActionContext): IActionContext {\n return context.set(KEY_CONTEXT_WRAPPED_RDF_JOIN, action.entries);\n }\n}\n\nexport interface IActorRdfJoinWrapStreamArgs extends IActorRdfJoinArgs {\n /**\n * Mediator that runs all transforms defined by user over the output stream of the query operation\n */\n mediatorIteratorTransform: MediatorIteratorTransform;\n /**\n * Mediator that calls next join to be wrapped\n */\n mediatorJoin: MediatorRdfJoin;\n}\n\n/**\n * Key that shows if the query operation has already been wrapped by a process iterator call\n */\nexport const KEY_CONTEXT_WRAPPED_RDF_JOIN = new ActionContextKey<IJoinEntry[]>(\n '@comunica/actor-rdf-join:wrapped',\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-rdf-join-wrap-stream",
3
- "version": "4.5.0",
3
+ "version": "5.0.0",
4
4
  "description": "A wrap-stream rdf-join 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/bus-iterator-transform": "^4.5.0",
45
- "@comunica/bus-rdf-join": "^4.5.0",
46
- "@comunica/core": "^4.5.0",
47
- "@comunica/mediatortype-join-coefficients": "^4.5.0",
48
- "@comunica/types": "^4.5.0"
44
+ "@comunica/bus-iterator-transform": "^5.0.0",
45
+ "@comunica/bus-rdf-join": "^5.0.0",
46
+ "@comunica/core": "^5.0.0",
47
+ "@comunica/mediatortype-join-coefficients": "^5.0.0",
48
+ "@comunica/types": "^5.0.0"
49
49
  },
50
- "gitHead": "2bcd98c387a021fc5c08d375793c205ca3d1bf0d"
50
+ "gitHead": "0b1756fdb9bef014133432489627c1bd71779bd0"
51
51
  }