-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
ActorQueryParse.ts
54 lines (49 loc) 路 1.41 KB
/
ActorQueryParse.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import type { IAction, IActorArgs, IActorOutput, IActorTest, Mediate } from '@comunica/core';
import { Actor } from '@comunica/core';
import type * as RDF from '@rdfjs/types';
import type { Algebra } from 'sparqlalgebrajs';
/**
* A comunica actor for query-parse events.
*
* Actor types:
* * Input: IActionSparqlParse: A SPARQL query string.
* * Test: <none>
* * Output: IActorSparqlParseOutput: A parsed query in SPARQL query algebra.
*
* @see IActionQueryParse
* @see IActorQueryParseOutput
*/
export abstract class ActorQueryParse extends Actor<IActionQueryParse, IActorTest, IActorQueryParseOutput> {
/**
* @param args - @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus
*/
public constructor(args: IActorQueryParseArgs) {
super(args);
}
}
export interface IActionQueryParse extends IAction {
/**
* A query.
*/
query: string;
/**
* The query format.
*/
queryFormat?: RDF.QueryFormat;
/**
* The query's default base IRI.
*/
baseIRI?: string;
}
export interface IActorQueryParseOutput extends IActorOutput {
/**
* A parsed query in SPARQL algebra.
*/
operation: Algebra.Operation;
/**
* An optionally overridden base IRI.
*/
baseIRI?: string;
}
export type IActorQueryParseArgs = IActorArgs<IActionQueryParse, IActorTest, IActorQueryParseOutput>;
export type MediatorQueryParse = Mediate<IActionQueryParse, IActorQueryParseOutput>;