@comunica/actor-query-source-identify-rdfjs 4.2.0 → 4.4.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.
|
@@ -9,14 +9,20 @@
|
|
|
9
9
|
"@type": "Class",
|
|
10
10
|
"requireElement": "QuerySourceRdfJs",
|
|
11
11
|
"parameters": [
|
|
12
|
-
{
|
|
13
|
-
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_source",
|
|
14
|
-
"range": "urn:npm:@rdfjs/types:Source"
|
|
15
|
-
},
|
|
16
12
|
{
|
|
17
13
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_bindingsFactory",
|
|
18
14
|
"range": "urn:npm:@comunica/utils-bindings-factory:BindingsFactory"
|
|
19
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_source",
|
|
18
|
+
"range": {
|
|
19
|
+
"@type": "ParameterRangeUnion",
|
|
20
|
+
"parameterRangeElements": [
|
|
21
|
+
"urn:npm:@rdfjs/types:Source",
|
|
22
|
+
"urn:npm:@rdfjs/types:DatasetCore"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
20
26
|
{
|
|
21
27
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_dataFactory",
|
|
22
28
|
"range": {
|
|
@@ -45,14 +51,21 @@
|
|
|
45
51
|
"@type": "ParameterRangeUnion",
|
|
46
52
|
"parameterRangeElements": [
|
|
47
53
|
"xsd:string",
|
|
48
|
-
"urn:npm:@rdfjs/types:Source"
|
|
54
|
+
"urn:npm:@rdfjs/types:Source",
|
|
55
|
+
"urn:npm:@rdfjs/types:DatasetCore"
|
|
49
56
|
]
|
|
50
57
|
}
|
|
51
58
|
},
|
|
52
59
|
{
|
|
53
60
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs__member_source",
|
|
54
61
|
"memberFieldName": "source",
|
|
55
|
-
"range":
|
|
62
|
+
"range": {
|
|
63
|
+
"@type": "ParameterRangeUnion",
|
|
64
|
+
"parameterRangeElements": [
|
|
65
|
+
"caqsir:components/IRdfJsSourceExtended.jsonld#IRdfJsSourceExtended",
|
|
66
|
+
"urn:npm:@rdfjs/types:DatasetCore"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
56
69
|
},
|
|
57
70
|
{
|
|
58
71
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs__member_dataFactory",
|
|
@@ -62,6 +75,10 @@
|
|
|
62
75
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs__member_bindingsFactory",
|
|
63
76
|
"memberFieldName": "bindingsFactory"
|
|
64
77
|
},
|
|
78
|
+
{
|
|
79
|
+
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs__member_dummyDefaultGraph",
|
|
80
|
+
"memberFieldName": "dummyDefaultGraph"
|
|
81
|
+
},
|
|
65
82
|
{
|
|
66
83
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs__member_constructor",
|
|
67
84
|
"memberFieldName": "constructor"
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs",
|
|
57
57
|
"@prefix": true,
|
|
58
58
|
"@context": {
|
|
59
|
-
"source": {
|
|
60
|
-
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_source"
|
|
61
|
-
},
|
|
62
59
|
"bindingsFactory": {
|
|
63
60
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_bindingsFactory"
|
|
64
61
|
},
|
|
62
|
+
"source": {
|
|
63
|
+
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_source"
|
|
64
|
+
},
|
|
65
65
|
"dataFactory": {
|
|
66
66
|
"@id": "caqsir:components/QuerySourceRdfJs.jsonld#QuerySourceRdfJs_dataFactory"
|
|
67
67
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQuerySourceIdentifyRdfJs.js","sourceRoot":"","sources":["ActorQuerySourceIdentifyRdfJs.ts"],"names":[],"mappings":";;;AAMA,mFAA+E;AAC/E,+DAA0D;AAE1D,yCAAuE;AAEvE,6EAAmE;AAEnE,yDAAsD;AAEtD;;GAEG;AACH,MAAa,6BAA8B,SAAQ,oDAAwB;IAGzE,YAAmB,IAAwC;QACzD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,MAAkC;QAClD,MAAM,MAAM,GAAG,MAAM,CAAC,uBAAuB,CAAC;QAC9C,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACzD,OAAO,IAAA,eAAQ,EAAC,GAAG,IAAI,CAAC,IAAI,+EAA+E,CAAC,CAAC;QAC/G,CAAC;QACD,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YACnE,OAAO,IAAA,eAAQ,EAAC,GAAG,IAAI,CAAC,IAAI,0CAA0C,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,MAAkC;QACjD,MAAM,WAAW,GAAwB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QAC3F,OAAO;YACL,WAAW,EAAE;gBACX,MAAM,EAAE,IAAI,mCAAgB,
|
|
1
|
+
{"version":3,"file":"ActorQuerySourceIdentifyRdfJs.js","sourceRoot":"","sources":["ActorQuerySourceIdentifyRdfJs.ts"],"names":[],"mappings":";;;A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bindings-context';\nimport type {\n IActionQuerySourceIdentify,\n IActorQuerySourceIdentifyOutput,\n IActorQuerySourceIdentifyArgs,\n} from '@comunica/bus-query-source-identify';\nimport { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport { failTest, passTestVoid, ActionContext } from '@comunica/core';\nimport type { ComunicaDataFactory } from '@comunica/types';\nimport { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport type * as RDF from '@rdfjs/types';\nimport { QuerySourceRdfJs } from './QuerySourceRdfJs';\n\n/**\n * A comunica RDFJS Query Source Identify Actor.\n */\nexport class ActorQuerySourceIdentifyRdfJs extends ActorQuerySourceIdentify {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQuerySourceIdentifyRdfJsArgs) {\n super(args);\n }\n\n public async test(action: IActionQuerySourceIdentify): Promise<TestResult<IActorTest>> {\n const source = action.querySourceUnidentified;\n if (source.type !== undefined && source.type !== 'rdfjs') {\n return failTest(`${this.name} requires a single query source with rdfjs type to be present in the context.`);\n }\n if (typeof source.value === 'string' || !('match' in source.value)) {\n return failTest(`${this.name} received an invalid rdfjs query source.`);\n }\n return passTestVoid();\n }\n\n public async run(action: IActionQuerySourceIdentify): Promise<IActorQuerySourceIdentifyOutput> {\n const dataFactory: ComunicaDataFactory = action.context.getSafe(KeysInitQuery.dataFactory);\n return {\n querySource: {\n source: new QuerySourceRdfJs(\n <RDF.Source | RDF.DatasetCore> action.querySourceUnidentified.value,\n dataFactory,\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context, dataFactory),\n ),\n context: action.querySourceUnidentified.context ?? new ActionContext(),\n },\n };\n }\n}\n\nexport interface IActorQuerySourceIdentifyRdfJsArgs extends IActorQuerySourceIdentifyArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IQuerySource, BindingsStream, IActionContext, FragmentSelectorShape, ComunicaDataFactory } from '@comunica/types';
|
|
1
|
+
import type { IQuerySource, BindingsStream, IActionContext, FragmentSelectorShape, ComunicaDataFactory, QuerySourceReference } from '@comunica/types';
|
|
2
2
|
import type { BindingsFactory } from '@comunica/utils-bindings-factory';
|
|
3
3
|
import type * as RDF from '@rdfjs/types';
|
|
4
4
|
import { AsyncIterator } from 'asynciterator';
|
|
@@ -6,16 +6,17 @@ import type { Algebra } from 'sparqlalgebrajs';
|
|
|
6
6
|
import type { IRdfJsSourceExtended } from './IRdfJsSourceExtended';
|
|
7
7
|
export declare class QuerySourceRdfJs implements IQuerySource {
|
|
8
8
|
protected readonly selectorShape: FragmentSelectorShape;
|
|
9
|
-
referenceValue:
|
|
10
|
-
protected readonly source: IRdfJsSourceExtended;
|
|
9
|
+
referenceValue: QuerySourceReference;
|
|
10
|
+
protected readonly source: IRdfJsSourceExtended | RDF.DatasetCore;
|
|
11
11
|
private readonly dataFactory;
|
|
12
12
|
private readonly bindingsFactory;
|
|
13
|
-
|
|
13
|
+
private readonly dummyDefaultGraph;
|
|
14
|
+
constructor(source: RDF.Source | RDF.DatasetCore, dataFactory: ComunicaDataFactory, bindingsFactory: BindingsFactory);
|
|
14
15
|
static nullifyVariables(term: RDF.Term | undefined, quotedTripleFiltering: boolean): RDF.Term | undefined;
|
|
15
16
|
static hasDuplicateVariables(pattern: RDF.BaseQuad): boolean;
|
|
16
17
|
getSelectorShape(): Promise<FragmentSelectorShape>;
|
|
17
18
|
queryBindings(operation: Algebra.Operation, context: IActionContext): BindingsStream;
|
|
18
|
-
protected setMetadata(it: AsyncIterator<any>, operation: Algebra.Pattern, forceEstimateCardinality?: boolean, extraMetadata?: Record<string, any>): Promise<void>;
|
|
19
|
+
protected setMetadata(it: AsyncIterator<any>, operation: Algebra.Pattern, context: IActionContext, forceEstimateCardinality?: boolean, extraMetadata?: Record<string, any>): Promise<void>;
|
|
19
20
|
queryQuads(_operation: Algebra.Operation, _context: IActionContext): AsyncIterator<RDF.Quad>;
|
|
20
21
|
queryBoolean(_operation: Algebra.Ask, _context: IActionContext): Promise<boolean>;
|
|
21
22
|
queryVoid(_operation: Algebra.Update, _context: IActionContext): Promise<void>;
|
package/lib/QuerySourceRdfJs.js
CHANGED
|
@@ -26,6 +26,7 @@ class QuerySourceRdfJs {
|
|
|
26
26
|
this.dataFactory.variable('o'),
|
|
27
27
|
],
|
|
28
28
|
};
|
|
29
|
+
this.dummyDefaultGraph = this.dataFactory.variable('__comunica:defaultGraph');
|
|
29
30
|
}
|
|
30
31
|
static nullifyVariables(term, quotedTripleFiltering) {
|
|
31
32
|
return !term || term.termType === 'Variable' || (!quotedTripleFiltering &&
|
|
@@ -44,9 +45,14 @@ class QuerySourceRdfJs {
|
|
|
44
45
|
if (operation.type !== 'pattern') {
|
|
45
46
|
throw new Error(`Attempted to pass non-pattern operation '${operation.type}' to QuerySourceRdfJs`);
|
|
46
47
|
}
|
|
48
|
+
// Check if we're running in union default graph mode
|
|
49
|
+
const unionDefaultGraph = Boolean(context.get(context_entries_1.KeysQueryOperation.unionDefaultGraph));
|
|
50
|
+
if (operation.graph.termType === 'DefaultGraph' && unionDefaultGraph) {
|
|
51
|
+
operation.graph = this.dummyDefaultGraph;
|
|
52
|
+
}
|
|
47
53
|
// Get bindings directly if the source allows it
|
|
48
54
|
// This will be more efficient, as it avoids the intermediary quads translation and representation.
|
|
49
|
-
if (this.source.matchBindings) {
|
|
55
|
+
if ('matchBindings' in this.source && this.source.matchBindings) {
|
|
50
56
|
const rawStream = this.source.matchBindings(this.bindingsFactory, operation.subject, operation.predicate, operation.object, operation.graph);
|
|
51
57
|
let it = rawStream instanceof asynciterator_1.AsyncIterator ?
|
|
52
58
|
rawStream :
|
|
@@ -55,21 +61,27 @@ class QuerySourceRdfJs {
|
|
|
55
61
|
// SPARQL query semantics allow graph variables to only match with named graphs, excluding the default graph
|
|
56
62
|
// But this is not the case when using union default graph semantics
|
|
57
63
|
let forceEstimateCardinality = false;
|
|
58
|
-
if (operation.graph.termType === 'Variable' && !
|
|
64
|
+
if (operation.graph.termType === 'Variable' && !unionDefaultGraph) {
|
|
59
65
|
forceEstimateCardinality = true;
|
|
60
66
|
const variable = operation.graph;
|
|
61
67
|
it = it.filter(bindings => bindings.get(variable).termType !== 'DefaultGraph');
|
|
62
68
|
}
|
|
69
|
+
// Remove bindings to the dummy __comunica:defaultGraph variable if needed
|
|
70
|
+
if (operation.graph.equals(this.dummyDefaultGraph)) {
|
|
71
|
+
it = it.map(bindings => bindings.delete(this.dummyDefaultGraph));
|
|
72
|
+
// Restore graph for determining variable metadata
|
|
73
|
+
operation.graph = this.dataFactory.defaultGraph();
|
|
74
|
+
}
|
|
63
75
|
// Determine metadata
|
|
64
76
|
if (!it.getProperty('metadata')) {
|
|
65
77
|
const variables = (0, bus_query_source_identify_1.getVariables)(operation).map(variable => ({ variable, canBeUndef: false }));
|
|
66
|
-
this.setMetadata(it, operation, forceEstimateCardinality, { variables })
|
|
78
|
+
this.setMetadata(it, operation, context, forceEstimateCardinality, { variables })
|
|
67
79
|
.catch(error => it.destroy(error));
|
|
68
80
|
}
|
|
69
81
|
return it;
|
|
70
82
|
}
|
|
71
83
|
// Check if the source supports quoted triple filtering
|
|
72
|
-
const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);
|
|
84
|
+
const quotedTripleFiltering = Boolean('features' in this.source && this.source.features?.quotedTripleFiltering);
|
|
73
85
|
// Create an async iterator from the matched quad stream
|
|
74
86
|
const rawStream = this.source.match(QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering));
|
|
75
87
|
let it = rawStream instanceof asynciterator_1.AsyncIterator ?
|
|
@@ -81,16 +93,25 @@ class QuerySourceRdfJs {
|
|
|
81
93
|
}
|
|
82
94
|
// Determine metadata
|
|
83
95
|
if (!it.getProperty('metadata')) {
|
|
84
|
-
this.setMetadata(it, operation)
|
|
96
|
+
this.setMetadata(it, operation, context)
|
|
85
97
|
.catch(error => it.destroy(error));
|
|
86
98
|
}
|
|
99
|
+
// Restore graph for determining variable metadata
|
|
100
|
+
if (operation.graph.equals(this.dummyDefaultGraph)) {
|
|
101
|
+
operation.graph = this.dataFactory.defaultGraph();
|
|
102
|
+
}
|
|
87
103
|
return (0, bus_query_source_identify_1.quadsToBindings)(it, operation, this.dataFactory, this.bindingsFactory, Boolean(context.get(context_entries_1.KeysQueryOperation.unionDefaultGraph)));
|
|
88
104
|
}
|
|
89
|
-
async setMetadata(it, operation, forceEstimateCardinality = false, extraMetadata = {}) {
|
|
105
|
+
async setMetadata(it, operation, context, forceEstimateCardinality = false, extraMetadata = {}) {
|
|
90
106
|
// Check if the source supports quoted triple filtering
|
|
91
|
-
const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);
|
|
107
|
+
const quotedTripleFiltering = Boolean('features' in this.source && this.source.features?.quotedTripleFiltering);
|
|
108
|
+
// Check if we're running in union default graph mode
|
|
109
|
+
const unionDefaultGraph = Boolean(context.get(context_entries_1.KeysQueryOperation.unionDefaultGraph));
|
|
110
|
+
if (operation.graph.termType === 'DefaultGraph' && unionDefaultGraph) {
|
|
111
|
+
operation.graph = this.dummyDefaultGraph;
|
|
112
|
+
}
|
|
92
113
|
let cardinality;
|
|
93
|
-
if (this.source.countQuads) {
|
|
114
|
+
if ('countQuads' in this.source && this.source.countQuads) {
|
|
94
115
|
// If the source provides a dedicated method for determining cardinality, use that.
|
|
95
116
|
cardinality = await this.source.countQuads(QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering));
|
|
96
117
|
}
|
|
@@ -100,7 +121,11 @@ class QuerySourceRdfJs {
|
|
|
100
121
|
// because we may lose data elements due to things happening async.
|
|
101
122
|
let i = 0;
|
|
102
123
|
cardinality = await new Promise((resolve, reject) => {
|
|
103
|
-
|
|
124
|
+
let matches = this.source.match(QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering), QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering));
|
|
125
|
+
// If it's not a stream, turn it into one
|
|
126
|
+
if (typeof matches.on !== 'function') {
|
|
127
|
+
matches = (new asynciterator_1.ArrayIterator(matches));
|
|
128
|
+
}
|
|
104
129
|
matches.on('error', reject);
|
|
105
130
|
matches.on('end', () => resolve(i));
|
|
106
131
|
matches.on('data', () => i++);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuerySourceRdfJs.js","sourceRoot":"","sources":["QuerySourceRdfJs.ts"],"names":[],"mappings":";;;AAAA,mFAA+G;AAC/G,+DAA+D;AAS/D,6DAAmE;AAEnE,iDAAyE;AACzE,yCAAqF;AAErF,qDAA0C;AAG1C,MAAa,gBAAgB;IAO3B,YAAmB,MAAkB,EAAE,WAAgC,EAAE,eAAgC;QACvG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,MAAM,EAAE,GAAG,IAAI,yBAAO,CAAmB,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3D,IAAI,CAAC,aAAa,GAAG;YACnB,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE;gBACT,aAAa,EAAE,SAAS;gBACxB,OAAO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A0B,EAC1B,QAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IAEM,QAAQ;QACb,OAAO,oBAAoB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC;IAC7D,CAAC;CACF;AArMD,4CAqMC","sourcesContent":["import { filterMatchingQuotedQuads, getVariables, quadsToBindings } from '@comunica/bus-query-source-identify';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type {\n IQuerySource,\n BindingsStream,\n IActionContext,\n FragmentSelectorShape,\n ComunicaDataFactory,\n} from '@comunica/types';\nimport type { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport { MetadataValidationState } from '@comunica/utils-metadata';\nimport type * as RDF from '@rdfjs/types';\nimport { AsyncIterator, wrap as wrapAsyncIterator } from 'asynciterator';\nimport { someTermsNested, filterTermsNested, someTerms, uniqTerms } from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { IRdfJsSourceExtended } from './IRdfJsSourceExtended';\n\nexport class QuerySourceRdfJs implements IQuerySource {\n protected readonly selectorShape: FragmentSelectorShape;\n public referenceValue: string | RDF.Source;\n protected readonly source: IRdfJsSourceExtended;\n private readonly dataFactory: ComunicaDataFactory;\n private readonly bindingsFactory: BindingsFactory;\n\n public constructor(source: RDF.Source, dataFactory: ComunicaDataFactory, bindingsFactory: BindingsFactory) {\n this.source = source;\n this.referenceValue = source;\n this.dataFactory = dataFactory;\n this.bindingsFactory = bindingsFactory;\n const AF = new Factory(<RDF.DataFactory> this.dataFactory);\n this.selectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(\n this.dataFactory.variable('s'),\n this.dataFactory.variable('p'),\n this.dataFactory.variable('o'),\n ),\n },\n variablesOptional: [\n this.dataFactory.variable('s'),\n this.dataFactory.variable('p'),\n this.dataFactory.variable('o'),\n ],\n };\n }\n\n public static nullifyVariables(term: RDF.Term | undefined, quotedTripleFiltering: boolean): RDF.Term | undefined {\n return !term || term.termType === 'Variable' || (!quotedTripleFiltering &&\n term.termType === 'Quad' && someTermsNested(term, value => value.termType === 'Variable')) ?\n undefined :\n term;\n }\n\n public static hasDuplicateVariables(pattern: RDF.BaseQuad): boolean {\n const variables = filterTermsNested(pattern, term => term.termType === 'Variable');\n return variables.length > 1 && uniqTerms(variables).length < variables.length;\n }\n\n public async getSelectorShape(): Promise<FragmentSelectorShape> {\n return this.selectorShape;\n }\n\n public queryBindings(operation: Algebra.Operation, context: IActionContext): BindingsStream {\n if (operation.type !== 'pattern') {\n throw new Error(`Attempted to pass non-pattern operation '${operation.type}' to QuerySourceRdfJs`);\n }\n\n // Get bindings directly if the source allows it\n // This will be more efficient, as it avoids the intermediary quads translation and representation.\n if (this.source.matchBindings) {\n const rawStream = this.source.matchBindings(\n this.bindingsFactory,\n operation.subject,\n operation.predicate,\n operation.object,\n operation.graph,\n );\n let it: AsyncIterator<RDF.Bindings> = rawStream instanceof AsyncIterator ?\n rawStream :\n wrapAsyncIterator<RDF.Bindings>(rawStream, { autoStart: false });\n\n // Check if non-default-graph triples need to be filtered out.\n // SPARQL query semantics allow graph variables to only match with named graphs, excluding the default graph\n // But this is not the case when using union default graph semantics\n let forceEstimateCardinality = false;\n if (operation.graph.termType === 'Variable' && !context.get(KeysQueryOperation.unionDefaultGraph)) {\n forceEstimateCardinality = true;\n const variable = operation.graph;\n it = it.filter(bindings => bindings.get(variable)!.termType !== 'DefaultGraph');\n }\n\n // Determine metadata\n if (!it.getProperty('metadata')) {\n const variables = getVariables(operation).map(variable => ({ variable, canBeUndef: false }));\n this.setMetadata(it, operation, forceEstimateCardinality, { variables })\n .catch(error => it.destroy(error));\n }\n\n return it;\n }\n\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);\n\n // Create an async iterator from the matched quad stream\n const rawStream = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n let it: AsyncIterator<RDF.Quad> = rawStream instanceof AsyncIterator ?\n rawStream :\n wrapAsyncIterator<RDF.Quad>(rawStream, { autoStart: false });\n\n // Perform post-match-filtering if the source does not support quoted triple filtering.\n if (!quotedTripleFiltering) {\n it = filterMatchingQuotedQuads(operation, it);\n }\n\n // Determine metadata\n if (!it.getProperty('metadata')) {\n this.setMetadata(it, operation)\n .catch(error => it.destroy(error));\n }\n\n return quadsToBindings(\n it,\n operation,\n this.dataFactory,\n this.bindingsFactory,\n Boolean(context.get(KeysQueryOperation.unionDefaultGraph)),\n );\n }\n\n protected async setMetadata(\n it: AsyncIterator<any>,\n operation: Algebra.Pattern,\n forceEstimateCardinality = false,\n extraMetadata: Record<string, any> = {},\n ): Promise<void> {\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);\n\n let cardinality: number;\n if (this.source.countQuads) {\n // If the source provides a dedicated method for determining cardinality, use that.\n cardinality = await this.source.countQuads(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n } else {\n // Otherwise, fallback to a sub-optimal alternative where we just call match again to count the quads.\n // WARNING: we can NOT reuse the original data stream here,\n // because we may lose data elements due to things happening async.\n let i = 0;\n cardinality = await new Promise((resolve, reject) => {\n const matches = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n matches.on('error', reject);\n matches.on('end', () => resolve(i));\n matches.on('data', () => i++);\n });\n }\n\n // If `match` would require filtering afterwards, our count will be an over-estimate.\n const wouldRequirePostFiltering = (!quotedTripleFiltering &&\n someTerms(operation, term => term.termType === 'Quad')) ||\n QuerySourceRdfJs.hasDuplicateVariables(operation);\n\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: {\n type: wouldRequirePostFiltering || forceEstimateCardinality ? 'estimate' : 'exact',\n value: cardinality,\n },\n // Force requestTime to zero, since this will be free for future calls, as we're fully indexed at this stage.\n requestTime: 0,\n ...extraMetadata,\n });\n }\n\n public queryQuads(\n _operation: Algebra.Operation,\n _context: IActionContext,\n ): AsyncIterator<RDF.Quad> {\n throw new Error('queryQuads is not implemented in QuerySourceRdfJs');\n }\n\n public queryBoolean(\n _operation: Algebra.Ask,\n _context: IActionContext,\n ): Promise<boolean> {\n throw new Error('queryBoolean is not implemented in QuerySourceRdfJs');\n }\n\n public queryVoid(\n _operation: Algebra.Update,\n _context: IActionContext,\n ): Promise<void> {\n throw new Error('queryVoid is not implemented in QuerySourceRdfJs');\n }\n\n public toString(): string {\n return `QuerySourceRdfJs(${this.source.constructor.name})`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"QuerySourceRdfJs.js","sourceRoot":"","sources":["QuerySourceRdfJs.ts"],"names":[],"mappings":";;;AAAA,mFAA+G;AAC/G,+DAA+D;AAU/D,6DAAmE;AAEnE,iDAAwF;AACxF,yCAAqF;AAErF,qDAA0C;AAG1C,MAAa,gBAAgB;IAQ3B,YACE,MAAoC,EACpC,WAAgC,EAChC,eAAgC;QAEhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,eAA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,IAAI,EAAE,yBAAyB,IAAI,wBAAwB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO;gBAClF,KAAK,EAAE,WAAW;aACnB;YACD,6GAA6G;YAC7G,WAAW,EAAE,CAAC;YACd,GAAG,aAAa;SACjB,CAAC,CAAC;IACL,CAAC;IAEM,UAAU,CACf,UAA6B,EAC7B,QAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAEM,YAAY,CACjB,UAAuB,EACvB,QAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAEM,SAAS,CACd,UAA0B,EAC1B,QAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IAEM,QAAQ;QACb,OAAO,oBAAoB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC;IAC7D,CAAC;CACF;AA1OD,4CA0OC","sourcesContent":["import { filterMatchingQuotedQuads, getVariables, quadsToBindings } from '@comunica/bus-query-source-identify';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type {\n IQuerySource,\n BindingsStream,\n IActionContext,\n FragmentSelectorShape,\n ComunicaDataFactory,\n QuerySourceReference,\n} from '@comunica/types';\nimport type { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport { MetadataValidationState } from '@comunica/utils-metadata';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator, AsyncIterator, wrap as wrapAsyncIterator } from 'asynciterator';\nimport { someTermsNested, filterTermsNested, someTerms, uniqTerms } from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { IRdfJsSourceExtended } from './IRdfJsSourceExtended';\n\nexport class QuerySourceRdfJs implements IQuerySource {\n protected readonly selectorShape: FragmentSelectorShape;\n public referenceValue: QuerySourceReference;\n protected readonly source: IRdfJsSourceExtended | RDF.DatasetCore;\n private readonly dataFactory: ComunicaDataFactory;\n private readonly bindingsFactory: BindingsFactory;\n private readonly dummyDefaultGraph: RDF.Variable;\n\n public constructor(\n source: RDF.Source | RDF.DatasetCore,\n dataFactory: ComunicaDataFactory,\n bindingsFactory: BindingsFactory,\n ) {\n this.source = source;\n this.referenceValue = source;\n this.dataFactory = dataFactory;\n this.bindingsFactory = bindingsFactory;\n const AF = new Factory(<RDF.DataFactory> this.dataFactory);\n this.selectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(\n this.dataFactory.variable('s'),\n this.dataFactory.variable('p'),\n this.dataFactory.variable('o'),\n ),\n },\n variablesOptional: [\n this.dataFactory.variable('s'),\n this.dataFactory.variable('p'),\n this.dataFactory.variable('o'),\n ],\n };\n this.dummyDefaultGraph = this.dataFactory.variable('__comunica:defaultGraph');\n }\n\n public static nullifyVariables(term: RDF.Term | undefined, quotedTripleFiltering: boolean): RDF.Term | undefined {\n return !term || term.termType === 'Variable' || (!quotedTripleFiltering &&\n term.termType === 'Quad' && someTermsNested(term, value => value.termType === 'Variable')) ?\n undefined :\n term;\n }\n\n public static hasDuplicateVariables(pattern: RDF.BaseQuad): boolean {\n const variables = filterTermsNested(pattern, term => term.termType === 'Variable');\n return variables.length > 1 && uniqTerms(variables).length < variables.length;\n }\n\n public async getSelectorShape(): Promise<FragmentSelectorShape> {\n return this.selectorShape;\n }\n\n public queryBindings(operation: Algebra.Operation, context: IActionContext): BindingsStream {\n if (operation.type !== 'pattern') {\n throw new Error(`Attempted to pass non-pattern operation '${operation.type}' to QuerySourceRdfJs`);\n }\n\n // Check if we're running in union default graph mode\n const unionDefaultGraph = Boolean(context.get(KeysQueryOperation.unionDefaultGraph));\n if (operation.graph.termType === 'DefaultGraph' && unionDefaultGraph) {\n operation.graph = this.dummyDefaultGraph;\n }\n\n // Get bindings directly if the source allows it\n // This will be more efficient, as it avoids the intermediary quads translation and representation.\n if ('matchBindings' in this.source && this.source.matchBindings) {\n const rawStream = this.source.matchBindings(\n this.bindingsFactory,\n operation.subject,\n operation.predicate,\n operation.object,\n operation.graph,\n );\n let it: AsyncIterator<RDF.Bindings> = rawStream instanceof AsyncIterator ?\n rawStream :\n wrapAsyncIterator<RDF.Bindings>(rawStream, { autoStart: false });\n\n // Check if non-default-graph triples need to be filtered out.\n // SPARQL query semantics allow graph variables to only match with named graphs, excluding the default graph\n // But this is not the case when using union default graph semantics\n let forceEstimateCardinality = false;\n if (operation.graph.termType === 'Variable' && !unionDefaultGraph) {\n forceEstimateCardinality = true;\n const variable = operation.graph;\n it = it.filter(bindings => bindings.get(variable)!.termType !== 'DefaultGraph');\n }\n\n // Remove bindings to the dummy __comunica:defaultGraph variable if needed\n if (operation.graph.equals(this.dummyDefaultGraph)) {\n it = it.map(bindings => bindings.delete(this.dummyDefaultGraph));\n // Restore graph for determining variable metadata\n operation.graph = this.dataFactory.defaultGraph();\n }\n\n // Determine metadata\n if (!it.getProperty('metadata')) {\n const variables = getVariables(operation).map(variable => ({ variable, canBeUndef: false }));\n this.setMetadata(it, operation, context, forceEstimateCardinality, { variables })\n .catch(error => it.destroy(error));\n }\n\n return it;\n }\n\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean('features' in this.source && this.source.features?.quotedTripleFiltering);\n\n // Create an async iterator from the matched quad stream\n const rawStream = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n let it: AsyncIterator<RDF.Quad> = rawStream instanceof AsyncIterator ?\n rawStream :\n wrapAsyncIterator<RDF.Quad>(rawStream, { autoStart: false });\n\n // Perform post-match-filtering if the source does not support quoted triple filtering.\n if (!quotedTripleFiltering) {\n it = filterMatchingQuotedQuads(operation, it);\n }\n\n // Determine metadata\n if (!it.getProperty('metadata')) {\n this.setMetadata(it, operation, context)\n .catch(error => it.destroy(error));\n }\n\n // Restore graph for determining variable metadata\n if (operation.graph.equals(this.dummyDefaultGraph)) {\n operation.graph = this.dataFactory.defaultGraph();\n }\n\n return quadsToBindings(\n it,\n operation,\n this.dataFactory,\n this.bindingsFactory,\n Boolean(context.get(KeysQueryOperation.unionDefaultGraph)),\n );\n }\n\n protected async setMetadata(\n it: AsyncIterator<any>,\n operation: Algebra.Pattern,\n context: IActionContext,\n forceEstimateCardinality = false,\n extraMetadata: Record<string, any> = {},\n ): Promise<void> {\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean('features' in this.source && this.source.features?.quotedTripleFiltering);\n\n // Check if we're running in union default graph mode\n const unionDefaultGraph = Boolean(context.get(KeysQueryOperation.unionDefaultGraph));\n if (operation.graph.termType === 'DefaultGraph' && unionDefaultGraph) {\n operation.graph = this.dummyDefaultGraph;\n }\n\n let cardinality: number;\n if ('countQuads' in this.source && this.source.countQuads) {\n // If the source provides a dedicated method for determining cardinality, use that.\n cardinality = await this.source.countQuads(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n } else {\n // Otherwise, fallback to a sub-optimal alternative where we just call match again to count the quads.\n // WARNING: we can NOT reuse the original data stream here,\n // because we may lose data elements due to things happening async.\n let i = 0;\n cardinality = await new Promise((resolve, reject) => {\n let matches = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n\n // If it's not a stream, turn it into one\n if (typeof (<any> matches).on !== 'function') {\n matches = <RDF.Stream>(new ArrayIterator(<RDF.DatasetCore> matches));\n }\n\n (<RDF.Stream>matches).on('error', reject);\n (<RDF.Stream>matches).on('end', () => resolve(i));\n (<RDF.Stream>matches).on('data', () => i++);\n });\n }\n\n // If `match` would require filtering afterwards, our count will be an over-estimate.\n const wouldRequirePostFiltering = (!quotedTripleFiltering &&\n someTerms(operation, term => term.termType === 'Quad')) ||\n QuerySourceRdfJs.hasDuplicateVariables(operation);\n\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: {\n type: wouldRequirePostFiltering || forceEstimateCardinality ? 'estimate' : 'exact',\n value: cardinality,\n },\n // Force requestTime to zero, since this will be free for future calls, as we're fully indexed at this stage.\n requestTime: 0,\n ...extraMetadata,\n });\n }\n\n public queryQuads(\n _operation: Algebra.Operation,\n _context: IActionContext,\n ): AsyncIterator<RDF.Quad> {\n throw new Error('queryQuads is not implemented in QuerySourceRdfJs');\n }\n\n public queryBoolean(\n _operation: Algebra.Ask,\n _context: IActionContext,\n ): Promise<boolean> {\n throw new Error('queryBoolean is not implemented in QuerySourceRdfJs');\n }\n\n public queryVoid(\n _operation: Algebra.Update,\n _context: IActionContext,\n ): Promise<void> {\n throw new Error('queryVoid is not implemented in QuerySourceRdfJs');\n }\n\n public toString(): string {\n return `QuerySourceRdfJs(${this.source.constructor.name})`;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-source-identify-rdfjs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "A rdfjs query-source-identify actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-merge-bindings-context": "^4.
|
|
45
|
-
"@comunica/bus-query-source-identify": "^4.
|
|
46
|
-
"@comunica/context-entries": "^4.
|
|
47
|
-
"@comunica/core": "^4.
|
|
48
|
-
"@comunica/types": "^4.
|
|
49
|
-
"@comunica/utils-bindings-factory": "^4.
|
|
50
|
-
"@comunica/utils-metadata": "^4.
|
|
44
|
+
"@comunica/bus-merge-bindings-context": "^4.4.0",
|
|
45
|
+
"@comunica/bus-query-source-identify": "^4.4.0",
|
|
46
|
+
"@comunica/context-entries": "^4.4.0",
|
|
47
|
+
"@comunica/core": "^4.4.0",
|
|
48
|
+
"@comunica/types": "^4.4.0",
|
|
49
|
+
"@comunica/utils-bindings-factory": "^4.4.0",
|
|
50
|
+
"@comunica/utils-metadata": "^4.4.0",
|
|
51
51
|
"@rdfjs/types": "*",
|
|
52
52
|
"asynciterator": "^3.9.0",
|
|
53
53
|
"rdf-terms": "^1.11.0",
|
|
54
54
|
"sparqlalgebrajs": "^4.3.8"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "27acde56dfe0c1ff1162c1f46818ad752296ca88"
|
|
57
57
|
}
|