@comunica/actor-query-source-identify-hypermedia-annotate-source 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-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"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^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-query-source-identify-hypermedia/^5.0.0/components/context.jsonld"
6
6
  ],
7
7
  "@id": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source",
8
8
  "components": [
@@ -45,37 +45,37 @@
45
45
  "genericTypeInstances": [
46
46
  {
47
47
  "@type": "ParameterRangeGenericTypeReference",
48
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
48
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
49
49
  },
50
50
  {
51
51
  "@type": "ParameterRangeGenericTypeReference",
52
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
52
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
53
53
  },
54
54
  {
55
55
  "@type": "ParameterRangeGenericTypeReference",
56
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
56
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
57
57
  },
58
58
  {
59
59
  "@type": "ParameterRangeGenericTypeReference",
60
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
60
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
61
61
  }
62
62
  ]
63
63
  },
64
64
  {
65
65
  "@type": "ParameterRangeGenericTypeReference",
66
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
66
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
67
67
  },
68
68
  {
69
69
  "@type": "ParameterRangeGenericTypeReference",
70
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
70
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
71
71
  },
72
72
  {
73
73
  "@type": "ParameterRangeGenericTypeReference",
74
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
74
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
75
75
  },
76
76
  {
77
77
  "@type": "ParameterRangeGenericTypeReference",
78
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
78
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
79
79
  }
80
80
  ]
81
81
  },
@@ -112,19 +112,19 @@
112
112
  "genericTypeInstances": [
113
113
  {
114
114
  "@type": "ParameterRangeGenericTypeReference",
115
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
115
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
116
116
  },
117
117
  {
118
118
  "@type": "ParameterRangeGenericTypeReference",
119
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
119
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
120
120
  },
121
121
  {
122
122
  "@type": "ParameterRangeGenericTypeReference",
123
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
123
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
124
124
  },
125
125
  {
126
126
  "@type": "ParameterRangeGenericTypeReference",
127
- "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^4.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
127
+ "parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
128
128
  }
129
129
  ]
130
130
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^5.0.0/components/context.jsonld"
4
4
  ],
5
5
  "@id": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source",
6
6
  "components": [
@@ -29,6 +29,10 @@
29
29
  "@id": "caqsihas:components/QuerySourceAddSourceAttribution.jsonld#QuerySourceAddSourceAttribution__member_constructor",
30
30
  "memberFieldName": "constructor"
31
31
  },
32
+ {
33
+ "@id": "caqsihas:components/QuerySourceAddSourceAttribution.jsonld#QuerySourceAddSourceAttribution__member_getFilterFactor",
34
+ "memberFieldName": "getFilterFactor"
35
+ },
32
36
  {
33
37
  "@id": "caqsihas:components/QuerySourceAddSourceAttribution.jsonld#QuerySourceAddSourceAttribution__member_getSelectorShape",
34
38
  "memberFieldName": "getSelectorShape"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "@context": [
3
- "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^4.0.0/components/context.jsonld"
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-source-identify-hypermedia-annotate-source/^5.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/^4.0.0/",
6
+ "caqsihas": "npmd:@comunica/actor-query-source-identify-hypermedia-annotate-source/^5.0.0/",
7
7
  "ActorQuerySourceIdentifyHypermediaAnnotateSource": {
8
8
  "@id": "caqsihas:components/ActorQuerySourceIdentifyHypermediaAnnotateSource.jsonld#ActorQuerySourceIdentifyHypermediaAnnotateSource",
9
9
  "@prefix": true,
@@ -8,8 +8,12 @@ const QuerySourceAddSourceAttribution_1 = require("./QuerySourceAddSourceAttribu
8
8
  * A comunica None Query Source Identify Hypermedia Actor.
9
9
  */
10
10
  class ActorQuerySourceIdentifyHypermediaAnnotateSource extends bus_query_source_identify_hypermedia_1.ActorQuerySourceIdentifyHypermedia {
11
+ mediatorMergeBindingsContext;
12
+ mediatorQuerySourceIdentifyHypermedia;
11
13
  constructor(args) {
12
14
  super(args, 'file');
15
+ this.mediatorMergeBindingsContext = args.mediatorMergeBindingsContext;
16
+ this.mediatorQuerySourceIdentifyHypermedia = args.mediatorQuerySourceIdentifyHypermedia;
13
17
  }
14
18
  async testMetadata(action) {
15
19
  if (action.context.get(exports.KEY_CONTEXT_WRAPPED)) {
@@ -1 +1 @@
1
- {"version":3,"file":"ActorQuerySourceIdentifyHypermediaAnnotateSource.js","sourceRoot":"","sources":["ActorQuerySourceIdentifyHypermediaAnnotateSource.ts"],"names":[],"mappings":";;;AAQA,yGAAoG;AAEpG,yCAAsE;AACtE,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,OAAO,IAAA,eAAQ,EAAC,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, failTest, 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 return failTest('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
+ {"version":3,"file":"ActorQuerySourceIdentifyHypermediaAnnotateSource.js","sourceRoot":"","sources":["ActorQuerySourceIdentifyHypermediaAnnotateSource.ts"],"names":[],"mappings":";;;AAQA,yGAAoG;AAEpG,yCAAsE;AACtE,uFAAoF;AAEpF;;GAEG;AACH,MAAa,gDAAiD,SAAQ,yEAAkC;IACtF,4BAA4B,CAA+B;IAC3D,qCAAqC,CAAwC;IAE7F,YAAmB,IAA2D;QAC5E,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,4BAA4B,GAAG,IAAI,CAAC,4BAA4B,CAAC;QACtE,IAAI,CAAC,qCAAqC,GAAG,IAAI,CAAC,qCAAqC,CAAC;IAC1F,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,MAA4C;QAE5C,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,2BAAmB,CAAC,EAAE,CAAC;YAC5C,OAAO,IAAA,eAAQ,EAAC,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;AA1BD,4GA0BC;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, failTest, 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 this.mediatorMergeBindingsContext = args.mediatorMergeBindingsContext;\n this.mediatorQuerySourceIdentifyHypermedia = args.mediatorQuerySourceIdentifyHypermedia;\n }\n\n public async testMetadata(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise<TestResult<IActorQuerySourceIdentifyHypermediaTest>> {\n if (action.context.get(KEY_CONTEXT_WRAPPED)) {\n return failTest('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,7 +1,7 @@
1
1
  import type { BindingsStream, FragmentSelectorShape, IActionContext, IQueryBindingsOptions, IQuerySource, QuerySourceReference } from '@comunica/types';
2
+ import type { Algebra } from '@comunica/utils-algebra';
2
3
  import type * as RDF from '@rdfjs/types';
3
4
  import type { AsyncIterator } from 'asynciterator';
4
- import type { Algebra } from 'sparqlalgebrajs';
5
5
  /**
6
6
  * A IQuerySource wrapper that skolemizes outgoing quads and bindings.
7
7
  */
@@ -11,12 +11,13 @@ export declare class QuerySourceAddSourceAttribution implements IQuerySource {
11
11
  */
12
12
  readonly innerSource: IQuerySource;
13
13
  constructor(innerSource: IQuerySource);
14
+ getFilterFactor(context: IActionContext): Promise<number>;
14
15
  getSelectorShape(context: IActionContext): Promise<FragmentSelectorShape>;
15
16
  queryBindings(operation: Algebra.Operation, context: IActionContext, options: IQueryBindingsOptions | undefined): BindingsStream;
16
17
  addSourceUrlToBindingContext(iterator: BindingsStream): BindingsStream;
17
18
  queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise<boolean>;
18
19
  queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator<RDF.Quad>;
19
- queryVoid(operation: Algebra.Update, context: IActionContext): Promise<void>;
20
+ queryVoid(operation: Algebra.Operation, context: IActionContext): Promise<void>;
20
21
  get referenceValue(): QuerySourceReference;
21
22
  toString(): string;
22
23
  }
@@ -7,9 +7,16 @@ const utils_bindings_factory_1 = require("@comunica/utils-bindings-factory");
7
7
  * A IQuerySource wrapper that skolemizes outgoing quads and bindings.
8
8
  */
9
9
  class QuerySourceAddSourceAttribution {
10
+ /**
11
+ * The query source to wrap over.
12
+ */
13
+ innerSource;
10
14
  constructor(innerSource) {
11
15
  this.innerSource = innerSource;
12
16
  }
17
+ getFilterFactor(context) {
18
+ return this.innerSource.getFilterFactor(context);
19
+ }
13
20
  async getSelectorShape(context) {
14
21
  return this.innerSource.getSelectorShape(context);
15
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"QuerySourceAddSourceAttribution.js","sourceRoot":"","sources":["QuerySourceAddSourceAttribution.ts"],"names":[],"mappings":";;;AAAA,+DAAqE;AAUrE,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 QuerySourceReference,\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(): QuerySourceReference {\n return this.innerSource.referenceValue;\n }\n\n public toString(): string {\n return `${this.innerSource.toString()}`;\n }\n}\n"]}
1
+ {"version":3,"file":"QuerySourceAddSourceAttribution.js","sourceRoot":"","sources":["QuerySourceAddSourceAttribution.ts"],"names":[],"mappings":";;;AAAA,+DAAqE;AAWrE,6EAA4D;AAI5D;;GAEG;AACH,MAAa,+BAA+B;IAC1C;;OAEG;IACa,WAAW,CAAe;IAE1C,YAAmB,WAAyB;QAC1C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEM,eAAe,CAAC,OAAuB;QAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACnD,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,SAA4B,EAAE,OAAuB;QACpE,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;AAnED,0EAmEC","sourcesContent":["import { KeysMergeBindingsContext } from '@comunica/context-entries';\nimport type {\n BindingsStream,\n FragmentSelectorShape,\n IActionContext,\n IQueryBindingsOptions,\n IQuerySource,\n MetadataBindings,\n QuerySourceReference,\n} from '@comunica/types';\nimport type { Algebra } from '@comunica/utils-algebra';\nimport { Bindings } from '@comunica/utils-bindings-factory';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\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 getFilterFactor(context: IActionContext): Promise<number> {\n return this.innerSource.getFilterFactor(context);\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.Operation, context: IActionContext): Promise<void> {\n return this.innerSource.queryVoid(operation, context);\n }\n\n public get referenceValue(): QuerySourceReference {\n return this.innerSource.referenceValue;\n }\n\n public toString(): string {\n return `${this.innerSource.toString()}`;\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-source-identify-hypermedia-annotate-source",
3
- "version": "4.5.0",
3
+ "version": "5.0.0",
4
4
  "description": "A annotate-source query-source-identify-hypermedia actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
@@ -41,15 +41,15 @@
41
41
  "build:components": "componentsjs-generator"
42
42
  },
43
43
  "dependencies": {
44
- "@comunica/bus-merge-bindings-context": "^4.5.0",
45
- "@comunica/bus-query-source-identify-hypermedia": "^4.5.0",
46
- "@comunica/context-entries": "^4.5.0",
47
- "@comunica/core": "^4.5.0",
48
- "@comunica/types": "^4.5.0",
49
- "@comunica/utils-bindings-factory": "^4.5.0",
44
+ "@comunica/bus-merge-bindings-context": "^5.0.0",
45
+ "@comunica/bus-query-source-identify-hypermedia": "^5.0.0",
46
+ "@comunica/context-entries": "^5.0.0",
47
+ "@comunica/core": "^5.0.0",
48
+ "@comunica/types": "^5.0.0",
49
+ "@comunica/utils-algebra": "^5.0.0",
50
+ "@comunica/utils-bindings-factory": "^5.0.0",
50
51
  "@rdfjs/types": "*",
51
- "asynciterator": "^3.9.0",
52
- "sparqlalgebrajs": "^5.0.2"
52
+ "asynciterator": "^3.10.0"
53
53
  },
54
- "gitHead": "2bcd98c387a021fc5c08d375793c205ca3d1bf0d"
54
+ "gitHead": "0b1756fdb9bef014133432489627c1bd71779bd0"
55
55
  }